==== Test Hatch Java ====
Assuming the Java code compiles OK, this will run a series of tests.
-Not print commands are enabled by default in the tests, but they
-can be added by un-commenting them in
-src/org/evergreen_ils/hatch/TestHatch.java and recompiling.
[source,sh]
-------------------------------------------------------------------------
$ ./run.sh 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.
+
+
== Configure Chrome/Chromium for Native Messaging with Hatch ==
=== Setup Chrome Extension ===
==== Tweak Extension Values ====
Edit extension/app/manifest.json and change the "eg-dev-local" value found
-here to the hostname of your Evergreen browser client.
+here to the hostname of your Evergreen server.
[source,js]
-------------------------------------------------------------------------
...
-------------------------------------------------------------------------
+NOTE: At time of writing, the Evergreen server used must have the
+patches included in the http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1640255-hatch-native-messaging[Hatch Native Messaging working branch].
+
==== Install Chrome Extension ====
. Open Chrome and navigate to chrome://extensions
. Click the "Load Unpacked Extension..." button.
. Load the directory at Hatch/extension/app
-===== Debugging Chrome Extension =====
+===== Debugging The Chrome Extension =====
* Click the "Background Page" link to see the exension console.
* Use the "Reload" link to apply changes made to the extension
=== Setup Chrome Native Messaging Host ===
-==== Linux ====
+Edit extension/host/org.evergreen_ils.hatch.json and change the "path" value
+to match the location of your copy of "start-hatch", found in the root
+directory of the Hatch repository.
+
+[source,js]
+-------------------------------------------------------------------------
+...
+ "path": "/home/berick/code/Hatch/start-hatch",
+...
+-------------------------------------------------------------------------
+
+See also https://developer.chrome.com/extensions/nativeMessaging
-1. Edit extension/host/org.evergreen_ils.hatch.json and change the "path" value
-to the location of your copy of "start-hatch", found in the root directory
-of the Hatch repository. The "path" value cannot be a relative path!
+==== Windows ====
+
+TODO
+
+==== Linux ====
-2. Copy the host file into Chrome's configuration directory.
+Copy the host file into Chrome's configuration directory.
For Chrome:
[source,sh]
-------------------------------------------------------------------------
$ mkdir -p ~/.config/google-chrome/NativeMessagingHosts/
-$ cp extension/host/org.evergreen_ils.hatch.json \
- ~/.config/google-chrome/NativeMessagingHosts/
+$ cp extension/host/org.evergreen_ils.hatch.json ~/.config/google-chrome/NativeMessagingHosts/
-------------------------------------------------------------------------
For Chromium:
[source,sh]
-------------------------------------------------------------------------
$ mkdir -p ~/.config/chromium/NativeMessagingHosts/
-$ cp extension/host/org.evergreen_ils.hatch.json \
- ~/.config/chromium/NativeMessagingHosts/
+$ cp extension/host/org.evergreen_ils.hatch.json ~/.config/chromium/NativeMessagingHosts/
-------------------------------------------------------------------------