1 = Hatch Developer Install Documentation =
3 == Build and Test Hatch Java Libs ==
10 ==== Download JDK 8 ====
13 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html[oracle.com],
14 accept the license, download the Linux .tar.gz file.
16 2. Extract the file in the Hatch root directory and link it into place.
19 -------------------------------------------------------------------------
21 $ ln -s jdk1.8* jdk1.8
22 -------------------------------------------------------------------------
24 NOTE: We may some day use openjdk, but its JavaFX libs are not ready
25 for prime time as of writing.
27 ==== Download org.json Java JSON Library ====
30 -------------------------------------------------------------------------
33 $ wget -O json-20160810.jar \
34 'https://search.maven.org/remotecontent?filepath=org/json/json/20160810/json-20160810.jar'
36 -------------------------------------------------------------------------
38 ==== Compile Hatch Java ====
41 -------------------------------------------------------------------------
43 -------------------------------------------------------------------------
45 ==== Test Hatch Java ====
47 Assuming the Java code compiles OK, this will run a series of tests.
50 -------------------------------------------------------------------------
52 -------------------------------------------------------------------------
54 NOTE: print commands are disabled by default in the tests to avoid
55 unexpected printing, but they can be added by un-commenting
56 them in src/org/evergreen_ils/hatch/TestHatch.java and recompiling.
59 == Configure Chrome/Chromium for Native Messaging with Hatch ==
61 === Setup Chrome Extension ===
63 ==== Tweak Extension Values ====
65 Edit extension/app/manifest.json and change the "egserver.example.org" value
66 found here to the hostname of your Evergreen server.
69 -------------------------------------------------------------------------
71 "externally_connectable": {
72 "matches": ["*://egserver.example.org/*"]
75 -------------------------------------------------------------------------
77 NOTE: At time of writing, the Evergreen server used must have the
78 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].
80 ==== Install Chrome Extension ====
82 . Open Chrome and navigate to chrome://extensions
83 . Enable "Developer Mode" along the top right of the page.
84 . Click the "Load Unpacked Extension..." button.
85 . Load the directory at Hatch/extension/app
87 ===== Debugging The Chrome Extension =====
89 * Click the "Background Page" link to see the exension console.
90 * Use the "Reload" link to apply changes made to the extension
92 * See also https://developer.chrome.com/extensions/getstarted
94 === Setup Chrome Native Messaging Host ===
98 Edit extension/host/org.evergreen_ils.hatch.json.LINUX and change the "path"
99 value to match the location of your copy of "hatch.sh", found in the root
100 directory of the Hatch repository.
104 Edit extension/host/org.evergreen_ils.hatch.json.WINDOWS and change the
105 "path" value to match the location of your copy of "hatch.bat", found in the
106 root directory of the Hatch repository.
110 -------------------------------------------------------------------------
112 "path": "/home/berick/code/Hatch/hatchsh",
114 -------------------------------------------------------------------------
116 See also https://developer.chrome.com/extensions/nativeMessaging
124 Copy the host file into Chrome's configuration directory.
129 -------------------------------------------------------------------------
130 $ mkdir -p ~/.config/google-chrome/NativeMessagingHosts/
131 $ cp extension/host/org.evergreen_ils.hatch.json.LINUX \
132 ~/.config/google-chrome/NativeMessagingHosts/org.evergreen_ils.hatch.json
133 -------------------------------------------------------------------------
138 -------------------------------------------------------------------------
139 $ mkdir -p ~/.config/chromium/NativeMessagingHosts/
140 $ cp extension/host/org.evergreen_ils.hatch.json.LINUX \
141 ~/.config/chromium/NativeMessagingHosts/org.evergreen_ils.hatch.json
142 -------------------------------------------------------------------------