Skip to content

Commit

Permalink
Fixing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgk committed Nov 22, 2016
1 parent 4298305 commit fbad88e
Showing 1 changed file with 33 additions and 8 deletions.
41 changes: 33 additions & 8 deletions extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,43 @@ Test of nativeMessaging

To use this webextension (as a developer) you need to do the following before manually loading the extension in firefox or chrome:

**Update the registry**
Run the following (or use regedit) with the appropriate path inserted:
## On Windows

### Update the path in the app manifest
Edit the "path" in gowebserial_firefox.json (for Firefox) and/or gowebserial_chrome.json (for Chrome) to point to the go-webserial-native-msg.exe file

### Update the registry
Either

a) edit chrome_windows.reg and firefox_windows.reg to match extension path (where this file is) and run them

or

b) do it manually by running the following (or use regedit) with the appropriate path inserted:
Chrome: REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\gowebserial" /ve /t REG_SZ /d "C:\path\to\gowebserial_chrome.json" /f
Firefox: REG ADD "HKEY_CURRENT_USER\SOFTWARE\Mozilla\NativeMessagingHosts\gowebserial" /ve /d "C:\path\to\gowebserial.json" /f

**Update extension id in app manifest (Chrome)**
For Chrome only:
### Load the extension
Load the extension manually (see the relevant browser docs)

### Update extension id in app manifest (Chrome)
Load the extension into chrome and find its ID (something like "pmmajlahjokcgknoodfclcdhcngjfpee")
Edit the "allowed_origins" in gowebserial_chrome.json so it matches the ID
(save and reload)

**Update the path in the app manifest**
Edit the "path" in gowebserial_firefox.json (for Firefox) and/or gowebserial_chrome.json (for Chrome) to point to the go-webserial.exe file
## On Linux

### Update the path in the app manifest
Edit the "path" in gowebserial_firefox.json (for Firefox) and/or gowebserial_chrome.json (for Chrome) to point to the go-webserial-native-msg binary

Chrome: copy gowebserial_chrome.json to ~/.config/google-chrome/NativeMessagingHosts/ext.gowebserial.json
Firefox: copy gowebserial_firefox.json to ~/.mozilla/native-messaging-hosts/

### Load the extension
Load the extension manually (see the relevant browser docs)

### Update extension id in app manifest (Chrome only)
Load the extension into chrome and find its ID (something like "pmmajlahjokcgknoodfclcdhcngjfpee")
Edit the "allowed_origins" in ext.gowebserial.json so it matches the ID
(save and reload)

**Load the extension**
Load the extension manually (see the relevant browser docs) and off you go!

0 comments on commit fbad88e

Please sign in to comment.