Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Hatch Developer Install Documentation

Build and Test Hatch Java Libs

Windows

TODO

Linux

Download JDK 8

  1. Go to oracle.com, accept the license, download the Linux .tar.gz file.

  2. Extract the file in the Hatch root directory and link it into place.

$ tar -zxf jdk*tar.gz
$ ln -s jdk1.8* jdk1.8
Note
We may some day use openjdk, but its JavaFX libs are not ready for prime time as of writing.

Download org.json Java JSON Library

$ mkdir -p lib
$ cd lib
$ wget -O json-20160810.jar \
    'https://search.maven.org/remotecontent?filepath=org/json/json/20160810/json-20160810.jar'
$ cd ../

Compile Hatch Java

$ ./run.sh compile

Test Hatch Java

Assuming the Java code compiles OK, this will run a series of tests.

$ ./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 server.

...
"externally_connectable": {
  "matches": ["*://eg-dev-local/*"]
}
...
Note
At time of writing, the Evergreen server used must have the patches included in the Hatch Native Messaging working branch.

Install Chrome Extension

  1. Open Chrome and navigate to chrome://extensions

  2. Enable "Developer Mode" along the top right of the page.

  3. Click the "Load Unpacked Extension…​" button.

  4. Load the directory at Hatch/extension/app

Debugging The Chrome Extension

Setup Chrome Native Messaging Host

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.

...
  "path": "/home/berick/code/Hatch/start-hatch",
...

Windows

TODO

Linux

Copy the host file into Chrome’s configuration directory.

For Chrome:

$ mkdir -p ~/.config/google-chrome/NativeMessagingHosts/
$ cp extension/host/org.evergreen_ils.hatch.json ~/.config/google-chrome/NativeMessagingHosts/

For Chromium:

$ mkdir -p ~/.config/chromium/NativeMessagingHosts/
$ cp extension/host/org.evergreen_ils.hatch.json ~/.config/chromium/NativeMessagingHosts/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.