annex4-inc / vscode-control4-ext

VSCode extension for building Control4 drivers.
GNU General Public License v3.0
25 stars 6 forks source link

Capabilities #6

Closed kelegorm2 closed 1 year ago

kelegorm2 commented 1 year ago

Hi,

I see this extension working very good. I'm developing a webview driver and traying to do it with this extension, but I cant find the way for adding capabilities to the driver XML.

Is there any way to do it? I already tried to modify the xml file in the intermediate folder, but of course is overwriten every time.

other than that I have a bit of experience with Typescript development. Let me know if you need help to maintain the extension.

Thanx a lot for the effor and sharing. I've starred the repo

annex4 commented 1 year ago

Capabilities can be defined in the Control4 section of the package.json file.

See the following for an example: https://github.com/annex4-inc/generic-camera-driver/blob/master/package.json

kelegorm2 commented 1 year ago

Perfect. There is already a way to do it. Thank you

annex4 commented 1 year ago

Just pushed a change so that the values are described in the JSON schema. I also updated it so it can properly support multiple proxy bindings. The new format in the package.json file would look something like this:

"capabilities": {
    "web_view_url": [ { "proxybindingid": 5001, "value": "http://127.0.0.1" } ],
    "navigator_display_option": [{
        "proxybindingid": 5001,
        "display_icons": [ 
            { "height": 300, "width": 300, "path": "controller://driver/generic_webview/images/webview_300.png" },
            { "height": 90, "width": 90, "path": "controller://driver/generic_webview/images/webview_90.png" },
            { "height": 70, "width": 70, "path": "controller://driver/generic_webview/images/webview_70.png" }
        ]
    }]
}

I'll close this issue once I push a new update to the extension out with the changes.

kelegorm2 commented 1 year ago

Perfect Thank you...!!!

annex4 commented 1 year ago

Changes made in version 0.0.5