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 ====
31 The org.json jar file is retrieved automatically when running
32 'hatch.sh compile' (below).
36 1. Create a directory called "lib" inside the Hatch directory.
37 2. Download the JSON jar file and put it into the "lib" directory:
39 https://search.maven.org/remotecontent?filepath=org/json/json/20160810/json-20160810.jar
41 ==== Compile Hatch Java ====
46 -------------------------------------------------------------------------
47 C:\> hatch.bat compile
48 -------------------------------------------------------------------------
53 -------------------------------------------------------------------------
55 -------------------------------------------------------------------------
57 ==== Test Hatch Java ====
59 Assuming the Java code compiles OK, this will run a series of tests.
61 NOTE: print commands are disabled by default in the tests to avoid
62 unexpected printing, but they can be added by un-commenting
63 them in src/org/evergreen_ils/hatch/TestHatch.java and recompiling.
68 -------------------------------------------------------------------------
70 -------------------------------------------------------------------------
75 -------------------------------------------------------------------------
77 -------------------------------------------------------------------------
79 == Configure Chrome for Native Messaging with Hatch ==
81 === Setup Chrome Extension ===
83 NOTE: At time of writing, the Evergreen server used must have the
84 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].
86 ==== Install Chrome Extension ====
88 . Open Chrome and navigate to chrome://extensions
89 . Enable "Developer Mode" along the top right of the page.
90 . Click the "Load Unpacked Extension..." button.
91 . Load the directory at Hatch/extension/app
93 ===== Debugging The Chrome Extension =====
95 * Click the "Background Page" link to see the exension console.
96 * Use the "Reload" link to apply changes made to the extension
98 * See also https://developer.chrome.com/extensions/getstarted
100 === Setup Chrome Native Messaging Host ===
102 See also https://developer.chrome.com/extensions/nativeMessaging
106 Edit extension/host/org.evergreen_ils.hatch.WINDOWS.json and change the
107 "path" value to match the location of your copy of "hatch.bat", found in the
108 root directory of the Hatch repository.
110 Create a Native Messaging registry key entry via the Windows command prompt.
111 Modify the path value to point to your copy of
112 HATCH/extension/host/org.evergreen_ils.hatch.WINDOWS.json.
115 -------------------------------------------------------------------------
116 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
117 -------------------------------------------------------------------------
121 Edit extension/host/org.evergreen_ils.hatch.json and change the "path"
122 value to match the location of your copy of "hatch.sh", found in the root
123 directory of the Hatch repository.
125 Copy the host file into Chrome's configuration directory.
130 -------------------------------------------------------------------------
131 $ mkdir -p ~/.config/google-chrome/NativeMessagingHosts/
132 $ cp extension/host/org.evergreen_ils.hatch.json ~/.config/google-chrome/NativeMessagingHosts/
133 -------------------------------------------------------------------------
138 -------------------------------------------------------------------------
139 $ mkdir -p ~/.config/chromium/NativeMessagingHosts/
140 $ cp extension/host/org.evergreen_ils.hatch.json ~/.config/chromium/NativeMessagingHosts/
141 -------------------------------------------------------------------------