Hatch docs continued collab/berick/native-messaging-host
authorBill Erickson <berickxx@gmail.com>
Tue, 22 Nov 2016 16:30:02 +0000 (11:30 -0500)
committerBill Erickson <berickxx@gmail.com>
Tue, 22 Nov 2016 16:30:02 +0000 (11:30 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
INSTALL.adoc
extension/app/manifest.json
extension/host/org.evergreen_ils.hatch.WINDOWS.json [new file with mode: 0644]
extension/host/org.evergreen_ils.hatch.json [new file with mode: 0644]
extension/host/org.evergreen_ils.hatch.json.LINUX [deleted file]
extension/host/org.evergreen_ils.hatch.json.WINDOWS [deleted file]

index 9a94ecc..6aa36a1 100644 (file)
@@ -37,6 +37,15 @@ $ cd ../
 
 ==== Compile Hatch Java ====
 
+===== Windows =====
+
+[source,sh]
+-------------------------------------------------------------------------
+C:\> hatch.bat compile
+-------------------------------------------------------------------------
+
+===== Linux =====
+
 [source,sh]
 -------------------------------------------------------------------------
 $ ./hatch.sh compile
@@ -46,30 +55,38 @@ $ ./hatch.sh compile
 
 Assuming the Java code compiles OK, this will run a series of tests.
 
+NOTE: print commands are disabled by default in the tests to avoid 
+unexpected printing, but they can be added by un-commenting 
+them in src/org/evergreen_ils/hatch/TestHatch.java and recompiling.
+
+===== Windows =====
+
 [source,sh]
 -------------------------------------------------------------------------
-$ ./hatch.sh test
+C:\> hatch.bat test
 -------------------------------------------------------------------------
 
-NOTE: print commands are disabled by default in the tests to avoid 
-unexpected printing, but they can be added by un-commenting 
-them in src/org/evergreen_ils/hatch/TestHatch.java and recompiling.
+===== Linux =====
 
+[source,sh]
+-------------------------------------------------------------------------
+$ ./hatch.sh test
+-------------------------------------------------------------------------
 
-== Configure Chrome/Chromium for Native Messaging with Hatch ==
+== Configure Chrome for Native Messaging with Hatch ==
 
 === Setup Chrome Extension ===
 
 ==== Tweak Extension Values ====
 
-Edit extension/app/manifest.json and change the "egserver.example.org" value 
+Edit extension/app/manifest.json and change the "evergreen.example.org" value 
 found here to the hostname of your Evergreen server.
 
 [source,js]
 -------------------------------------------------------------------------
 ...
 "externally_connectable": {
-  "matches": ["*://egserver.example.org/*"]
+  "matches": ["*://evergreen.example.org/*"]
 }
 ...
 -------------------------------------------------------------------------
@@ -93,34 +110,29 @@ patches included in the http://git.evergreen-ils.org/?p=working/Evergreen.git;a=
 
 === Setup Chrome Native Messaging Host ===
 
-==== Linux ====
-
-Edit extension/host/org.evergreen_ils.hatch.json.LINUX and change the "path" 
-value to match the location of your copy of "hatch.sh", found in the root 
-directory of the Hatch repository. 
+See also https://developer.chrome.com/extensions/nativeMessaging
 
 ==== Windows ====
 
-Edit extension/host/org.evergreen_ils.hatch.json.WINDOWS and change the 
+Edit extension/host/org.evergreen_ils.hatch.WINDOWS.json and change the 
 "path" value to match the location of your copy of "hatch.bat", found in the 
 root directory of the Hatch repository. 
 
+Create a Native Messaging registry key entry via the Windows command prompt.
+Modify the path value to point to your copy of 
+HATCH/extension/host/org.evergreen_ils.hatch.WINDOWS.json.
 
-[source,js]
+[source,sh]
 -------------------------------------------------------------------------
-...
-  "path": "/home/berick/code/Hatch/hatchsh",
-...
+C:\> REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\org.evergreen_ils.hatch" /ve /t REG_SZ /d "C:\path\to\extension\host\org.evergreen_ils.hatch.WINDOWS.json" /f
 -------------------------------------------------------------------------
 
-See also https://developer.chrome.com/extensions/nativeMessaging
-
-==== Windows ====
-
-TODO
-
 ==== Linux ====
 
+Edit extension/host/org.evergreen_ils.hatch.json and change the "path" 
+value to match the location of your copy of "hatch.sh", found in the root 
+directory of the Hatch repository. 
+
 Copy the host file into Chrome's configuration directory.
 
 For Chrome:
@@ -128,8 +140,7 @@ For Chrome:
 [source,sh]
 -------------------------------------------------------------------------
 $ mkdir -p ~/.config/google-chrome/NativeMessagingHosts/
-$ cp extension/host/org.evergreen_ils.hatch.json.LINUX \
-    ~/.config/google-chrome/NativeMessagingHosts/org.evergreen_ils.hatch.json
+$ cp extension/host/org.evergreen_ils.hatch.json ~/.config/google-chrome/NativeMessagingHosts/
 -------------------------------------------------------------------------
 
 For Chromium:
@@ -137,7 +148,6 @@ For Chromium:
 [source,sh]
 -------------------------------------------------------------------------
 $ mkdir -p ~/.config/chromium/NativeMessagingHosts/
-$ cp extension/host/org.evergreen_ils.hatch.json.LINUX \
-    ~/.config/chromium/NativeMessagingHosts/org.evergreen_ils.hatch.json
+$ cp extension/host/org.evergreen_ils.hatch.json ~/.config/chromium/NativeMessagingHosts/
 -------------------------------------------------------------------------
 
index 9ea19a3..902cb48 100644 (file)
@@ -12,6 +12,6 @@
     "nativeMessaging"
   ],
   "externally_connectable": {
-    "matches": ["*://eg-dev-local/*"]
+    "matches": ["*://evergreen.example.org/*"]
   }
 }
diff --git a/extension/host/org.evergreen_ils.hatch.WINDOWS.json b/extension/host/org.evergreen_ils.hatch.WINDOWS.json
new file mode 100644 (file)
index 0000000..c15698c
--- /dev/null
@@ -0,0 +1,9 @@
+{
+  "name": "org.evergreen_ils.hatch",
+  "description": "Hatch Native Messaging Host",
+  "path": "C:\\Users\\berick\\Code\\Hatch\\hatch.bat",
+  "type": "stdio",
+  "allowed_origins": [
+    "chrome-extension://knldjmfmopnpolahpmmgbagdohdnhkik/"
+  ]
+}
diff --git a/extension/host/org.evergreen_ils.hatch.json b/extension/host/org.evergreen_ils.hatch.json
new file mode 100644 (file)
index 0000000..426133f
--- /dev/null
@@ -0,0 +1,9 @@
+{
+  "name": "org.evergreen_ils.hatch",
+  "description": "Hatch Native Messaging Host",
+  "path": "/home/berick/code/Hatch/hatch.sh",
+  "type": "stdio",
+  "allowed_origins": [
+    "chrome-extension://knldjmfmopnpolahpmmgbagdohdnhkik/"
+  ]
+}
diff --git a/extension/host/org.evergreen_ils.hatch.json.LINUX b/extension/host/org.evergreen_ils.hatch.json.LINUX
deleted file mode 100644 (file)
index 426133f..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "name": "org.evergreen_ils.hatch",
-  "description": "Hatch Native Messaging Host",
-  "path": "/home/berick/code/Hatch/hatch.sh",
-  "type": "stdio",
-  "allowed_origins": [
-    "chrome-extension://knldjmfmopnpolahpmmgbagdohdnhkik/"
-  ]
-}
diff --git a/extension/host/org.evergreen_ils.hatch.json.WINDOWS b/extension/host/org.evergreen_ils.hatch.json.WINDOWS
deleted file mode 100644 (file)
index c15698c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "name": "org.evergreen_ils.hatch",
-  "description": "Hatch Native Messaging Host",
-  "path": "C:\\Users\\berick\\Code\\Hatch\\hatch.bat",
-  "type": "stdio",
-  "allowed_origins": [
-    "chrome-extension://knldjmfmopnpolahpmmgbagdohdnhkik/"
-  ]
-}