]> git.evergreen-ils.org Git - working/Hatch.git/blob - INSTALL.adoc
LP1733692: Improve Hatch Un/Installer
[working/Hatch.git] / INSTALL.adoc
1 = Hatch Install Documentation =
2
3 This documentation assumes Windows users will use the Hatch Windows 
4 installer.  The Linux-only steps can also be done on Windows, but 
5 are not documented here.
6
7 == Install Java ==
8
9 === Windows ===
10
11 Windows only requires a JRE to run Hatch, not a full JDK.  Download and 
12 install JRE version 1.8 or higher from (for example) 
13 http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html[oracle.com].
14
15 === Linux ===
16
17 [source,sh]
18 -------------------------------------------------------------------------
19 # Debian/Ubuntu version
20 $ sudo apt-get install openjdk-8-jdk openjfx
21 -------------------------------------------------------------------------
22
23 == Install Hatch ==
24
25 === Windows ===
26
27 Execute the 'Hatch Installer.exe' executable.
28
29 NOTE: See installer/windows/README.adoc for building the Windows 
30 installer from Linux or Windows.  When building the Windows installer
31 on Windows, the full JDK will be required (for compiling Java).
32
33 === Linux ===
34
35 [source,sh]
36 -------------------------------------------------------------------------
37 $ ./hatch.sh compile
38 -------------------------------------------------------------------------
39
40 ==== Optional: Test Hatch ====
41
42 NOTE: print commands are disabled by default in the tests to avoid 
43 unexpected printing, but they can be added by un-commenting 
44 them in src/org/evergreen_ils/hatch/TestHatch.java and recompiling.
45
46 [source,sh]
47 -------------------------------------------------------------------------
48 $ mkdir -p ~/.evergreen
49 $ ./hatch.sh test
50 -------------------------------------------------------------------------
51
52 == Install Chrome Extension [Windows & Linux] ==
53
54 . Install the exenstion directly in the browser from the 
55 https://chrome.google.com/webstore/detail/hatch-native-messenger/ppooibdipmklfichpmkcgplfgdplgahl[Chrome App Store]
56
57 === Optional: Debugging The Chrome Extension ===
58
59  * Navigate to chrome://extensions
60  * Enable "Developer Mode" along the top right of the page.
61  * Click the "Background Page" link to see the exension console.
62  * When the extension is loaded (or reloaded), it should show
63    "Connecting to native messaging host: org.evergreen_ils.hatch" 
64    in the Background Page console with no errors.
65  * Use the "Reload" link to apply local changes made to the 
66    extension (e.g. main.js).  (This might only work when installing
67    the exention manually via developer mode tools).
68  * See also https://developer.chrome.com/extensions/getstarted
69
70 === Linux: Configure Native Messaging ===
71
72 Edit extension/host/org.evergreen_ils.hatch.json and change the "path" 
73 value to match the location of your copy of "hatch.sh", found in the root 
74 directory of the Hatch repository. 
75
76 Copy the host file into Chrome's configuration directory.
77
78 For Chrome:
79
80 [source,sh]
81 -------------------------------------------------------------------------
82 $ mkdir -p ~/.config/google-chrome/NativeMessagingHosts/
83 $ cp extension/host/org.evergreen_ils.hatch.json ~/.config/google-chrome/NativeMessagingHosts/
84 -------------------------------------------------------------------------
85
86 For Chromium:
87
88 [source,sh]
89 -------------------------------------------------------------------------
90 $ mkdir -p ~/.config/chromium/NativeMessagingHosts/
91 $ cp extension/host/org.evergreen_ils.hatch.json ~/.config/chromium/NativeMessagingHosts/
92 -------------------------------------------------------------------------
93
94 == Using Hatch ==
95
96 * In Chrome, navigate to the browser staff URL (https://HOSTNAME/eg/staff/).
97 * Open the Javascript console.  It should show messages like:
98
99 [source,sh]
100 -------------------------------------------------------------------------
101 Loading Hatch relay content script
102 ...
103 sending to Hatch: {"key":"eg.workstation.all","action":"get","msgid":1}
104 ...
105 Hatch responded to message ID 1
106 -------------------------------------------------------------------------
107
108 * Enable Hatch features by navigating to 
109   https://HOSTNAME/eg/staff/admin/workstation/hatch.
110 * To determine if Hatch can see your printer(s), navigate to
111   https://HOSTNAME/eg/staff/admin/workstation/print/config
112  ** The "Select Printer" drop-down should show your printer(s).
113  ** The various printer attribute selectors should show values supported
114     by the selected printer.
115