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