From a73790a10d7a23af9c22d324b5dbf91e7f943cde Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 22 Nov 2016 11:30:02 -0500 Subject: [PATCH] Hatch docs continued Signed-off-by: Bill Erickson --- INSTALL.adoc | 64 +++++++++++++--------- extension/app/manifest.json | 2 +- ...INDOWS => org.evergreen_ils.hatch.WINDOWS.json} | 0 ...tch.json.LINUX => org.evergreen_ils.hatch.json} | 0 4 files changed, 38 insertions(+), 28 deletions(-) rename extension/host/{org.evergreen_ils.hatch.json.WINDOWS => org.evergreen_ils.hatch.WINDOWS.json} (100%) rename extension/host/{org.evergreen_ils.hatch.json.LINUX => org.evergreen_ils.hatch.json} (100%) diff --git a/INSTALL.adoc b/INSTALL.adoc index 9a94eccf6a..6aa36a1cb6 100644 --- a/INSTALL.adoc +++ b/INSTALL.adoc @@ -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/ ------------------------------------------------------------------------- diff --git a/extension/app/manifest.json b/extension/app/manifest.json index 9ea19a3c4c..902cb48b04 100644 --- a/extension/app/manifest.json +++ b/extension/app/manifest.json @@ -12,6 +12,6 @@ "nativeMessaging" ], "externally_connectable": { - "matches": ["*://eg-dev-local/*"] + "matches": ["*://evergreen.example.org/*"] } } diff --git a/extension/host/org.evergreen_ils.hatch.json.WINDOWS b/extension/host/org.evergreen_ils.hatch.WINDOWS.json similarity index 100% rename from extension/host/org.evergreen_ils.hatch.json.WINDOWS rename to extension/host/org.evergreen_ils.hatch.WINDOWS.json diff --git a/extension/host/org.evergreen_ils.hatch.json.LINUX b/extension/host/org.evergreen_ils.hatch.json similarity index 100% rename from extension/host/org.evergreen_ils.hatch.json.LINUX rename to extension/host/org.evergreen_ils.hatch.json -- 2.11.0