Move PostgreSQL ifnormation from ServersideInstallation to Admin misc.
[working/Evergreen.git] / 1.6 / admin / StaffclientInstallation.xml
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <chapter xml:id="StaffclientInstallation" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xl="http://www.w3.org/1999/xlink">\r
3         <title>Installing the Staff Client</title>\r
4         <para>You can install the Staff Client from pre-built images and packages without actually having to first build it. Pre-built packages are currently available \r
5         for <systemitem class="osname">Windows</systemitem>, <systemitem class="osname">Mac OS X</systemitem>, and <systemitem class="osname">Linux</systemitem>. If you need to manually build \r
6         the Staff Client, see <xref linkend="serversideinstallation-building-staffclient"/>.</para>\r
7         <section xml:id="serversideinstallation-prebuilt-staffclient">\r
8                 <title>Installing a Pre-Built Staff Client</title>\r
9                 <para>This section reviews the process of installing pre-built versions of the Staff Client in various environments.</para>\r
10                 <simplesect>\r
11                         <title>Installing on <systemitem class="osname">Windows</systemitem></title>\r
12                         <para>A standard <systemitem class="osname">Windows</systemitem> installer that contains the current version of the Staff Client is available from the downloads section \r
13                         of the Evergreen website at <ulink url="http://www.evergreen-ils.org/downloads.php">http://www.evergreen-ils.org/downloads.php</ulink>. Download the Staff Client installer, \r
14                         then run it.</para>\r
15                         <para>Click <guibutton>Next</guibutton> to continue through the guided install process. The install wizard will ask you to agree to the end-user license, ask you where to \r
16                         install the software, ask about where to place icons, and then will install the software on your workstation.</para>\r
17                         <para>When you run the Staff Client for the first time, a screen similar to this should appear:</para>\r
18                                 <mediaobject>\r
19                                         <imageobject>\r
20                                                 <imagedata fileref="../media/serversideinstallation-staffclient-2.png" scalefit="1" width="70%"/>\r
21                                         </imageobject>\r
22                                 </mediaobject>\r
23                         <para>First, configure the server you would like to connect to in the <emphasis role="bold">Server</emphasis> section. For example, the PINES demo system is \r
24                         <systemitem class="domain">demo.gapines.org</systemitem>. After selecting a server, click <guibutton>Re-Test Server</guibutton>.</para>\r
25                         <para>Because this is the initial run of the Staff Client, the <emphasis role="bold">Workstation</emphasis> section in the upper-right states: <emphasis role="bold">Not \r
26                         yet configured for the specified server</emphasis>. The first thing that must be done to the Staff Client on every workstation is to assign it a workstation name. This is \r
27                         covered in <xref linkend="serversideinstallation-workstationnames"/>.</para>\r
28                 </simplesect>\r
29                 <simplesect>\r
30                         <title>Installing on <systemitem class="osname">Mac OS X</systemitem></title>\r
31                         <para>A <systemitem class="osname">Mac OS X</systemitem> package that contains the current version of the Staff Client is available for use with \r
32                         <application>"xulrunner"</application>.</para>\r
33                         <simplesect>\r
34                                 <title>Evergreen Indiana Pkg file [Evergreen v1.2.3.0]</title>\r
35                                 <procedure>\r
36                                         <step>Download and install the latest version of <application>"xulrunner"</application> for <systemitem class="osname">Mac OS X</systemitem>. Release notes \r
37                                         for the latest version can be found here: \r
38                                         <ulink url="http://developer.mozilla.org/en/docs/XULRunner_1.8.0.4_Release_Notes">http://developer.mozilla.org/en/docs/XULRunner_1.8.0.4_Release_Notes</ulink>.\r
39                                          Note, later versions may not work correctly.</step>\r
40                                         <step>Download and install the <systemitem class="osname">Mac OS X</systemitem> Installation package for the 1_2_3_0 Version Staff Client from \r
41                                         <ulink url="http://evergreen.lib.in.us/opac/extras/files/evergreen_osx_staff_client_1_2_3.zip">\r
42                                         http://evergreen.lib.in.us/opac/extras/files/evergreen_osx_staff_client_1_2_3.zip</ulink>.</step>\r
43                                         <step>To upgrade to a more recent version of the Staff Client, you can copy the directory <emphasis>build</emphasis> from a working \r
44                                         <systemitem class="osname">Windows</systemitem> installation of the desired version of the Staff Client to your Mac. The required files may be located in \r
45                                         a directory like this on the <systemitem class="osname">Windows</systemitem> machine: <filename class="directory">C:\Program Files\Evergreen Staff Client\build\r
46                                         </filename>. Copy these files into the folder <filename class="directory">Resources</filename> within the Open-ILS package in your Applications directory on \r
47                                         the Mac, overwriting files with the same names.</step>\r
48                                         <step>Drag the application's icon into your toolbar for easier access.</step>\r
49                                 </procedure>\r
50                                 <para/>\r
51                 \r
52                                 <para>Click <guibutton>Continue</guibutton>, accept the license, then finish the installation. The application will be located at the destination you selected \r
53                                 during installation. You will then be able to drag the application into your toolbar for easier access.</para>\r
54                         </simplesect>\r
55                         <simplesect>\r
56                                 <title>Running directly using <application>"xulrunner"</application></title>\r
57                                 <para>You must install an appropriate version of <application>"xulrunner"</application> to match the Evergreen version. See the following table for the recommended \r
58                                 version of <application>xulrunner</application>:</para>\r
59                                 <table>\r
60                                         <title>Evergreen / XULRunner Dependencies</title>\r
61                                         <tgroup align="left" cols="2" colsep="1" rowsep="1">\r
62                                                 <colspec colnum="1" colwidth="1.0*"/>\r
63                                                 <colspec colnum="2" colwidth="3.0*"/>\r
64                                                 <tbody>\r
65                                                         <row>\r
66                                                                 <entry>Evergreen 1.6.x.x</entry>\r
67                                                                 <entry>XULrunner 1.9</entry>\r
68                                                         </row>\r
69                                                         <row>\r
70                                                                 <entry>Evergreen 1.4.x.x</entry>\r
71                                                                 <entry>XULrunner 1.8.0.4 or XULrunner 1.8.0.3</entry>\r
72                                                         </row>\r
73                                                         <row>\r
74                                                                 <entry>Evergreen 1.2.x.x</entry>\r
75                                                                 <entry>XULrunner 1.8.0.4 or XULrunner 1.8.0.3</entry>\r
76                                                         </row>\r
77                                                 </tbody>\r
78                                         </tgroup>\r
79                                 </table>\r
80                                 <note><para>If you have issues removing previously installed <application>xulrunner</application> versions see \r
81                                 <xref linkend="serversideinstallation-staffclient-remove-xulrunner"/> for information on removing previous <application>"XULRunner"</application> versions.</para></note>\r
82                                 <para>The Staff Client data from the directory <filename class="directory">./staff_client/build</filename> must be placed somewhere on the machine (e.g. \r
83                                 <emphasis>~/Desktop/Evergreen_Staff_Client</emphasis>). Remember to call <application>XULRunner</application> with the full path to the binary, followed by \r
84                                 the install command and the path to the client data:</para>\r
85 <screen>\r
86 <userinput>/Library/Frameworks/XUL.framework/xulrunner-bin --install-app ~/Desktop/Evergreen_Staff_Client</userinput>\r
87 </screen>\r
88                                 <para>This command should exit quietly. A folder will be created, named <emphasis>/Applications/OpenILS</emphasis>, containing a launcher \r
89                                 named <emphasis>open_ils_staff_client</emphasis>.</para>\r
90                         </simplesect>\r
91                         <simplesect xml:id="serversideinstallation-staffclient-remove-xulrunner">\r
92                                 <title>Removing previously installed <application>xulrunner</application> versions</title>\r
93                                 <para>If you already have a newer version installed, per the release notes, you will need to remove the entire directory \r
94                                 <filename class="directory">/Library/Frameworks/XUL.framework</filename> before downgrading.</para>\r
95                                 <para>In addition, you may also need to remove the previous file <filename>/Library/Receipts/xulrunner-ver-mak.pkg</filename>.</para>\r
96                                 <para>If there is no file <filename>/Library/Receipts/xulrunner-ver-mak.pkg</filename> (possibly in newer OSX releases) you need to flush the file \r
97                                 <emphasis>receiptdb</emphasis>.</para>\r
98                                 <note><para>If you install a newer version over a previous (older) install, the older one is not removed but the symlinks get changed to the newer one.</para></note>\r
99                                 <para>First, get the package identifier, then purge/forget the build that was initially installed:</para>\r
100 <screen>\r
101 <userinput>sudo pkgutil --pkgs > /tmp/pkgs.txt</userinput>\r
102 <userinput>sudo pkgutil --forget org.mozilla.xulrunner</userinput>\r
103 </screen>\r
104                                 <note><para>It may not be necessary to edit the file <filename>/Library/Receipts/InstallHistory.plist</filename> after deleting the folder \r
105                                 <emphasis>XUL.framework</emphasis>.</para></note>\r
106                         </simplesect>\r
107                         <simplesect>\r
108                                 <title>Creating an APP file: Staff Client &amp; <application>"xulrunner"</application> Bundled</title>\r
109                                 <para>An APP file is basically a folder. Start with a folder structure like this:</para>                                \r
110 <screen>\r
111 * Evergreen.app\r
112   * Contents\r
113     * Frameworks\r
114     * Resources\r
115     * MacOS\r
116 </screen>\r
117                                 <para>Create an APP folder structure with the following commands:</para>\r
118 <screen>\r
119 <userinput>mkdir -p Evergreen.app/Contents/Frameworks</userinput>\r
120 <userinput>mkdir -p Evergreen.app/Contents/Resources</userinput>\r
121 <userinput>mkdir -p Evergreen.app/Contents/MacOS</userinput>\r
122 </screen>\r
123                                 <para/>\r
124                                 <procedure>\r
125                                         <step>\r
126                                                 <para>Create a new file in the folder <emphasis>Evergreen.app/Contents/Info.plist</emphasis> containing the following data (adjust for your \r
127                                                 version of Evergreen):</para>                                   \r
128 <programlisting language="xml"><![CDATA[\r
129 <?xml version="1.0" encoding="UTF-8"?>\r
130 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\r
131 <plist version="1.0">\r
132 <dict>\r
133 <key>CFBundleExecutable</key>\r
134 <string>xulrunner</string>\r
135 <key>CFBundleGetInfoString</key>\r
136 <string>OpenILS open_ils_staff_client rel_1_6_0_7</string>\r
137 <key>CFBundleInfoDictionaryVersion</key>\r
138 <string>6.0</string>\r
139 <key>CFBundleName</key>\r
140 <string>Evergreen Staff Client</string>\r
141 <key>CFBundlePackageType</key>\r
142 <string>APPL</string>\r
143 <key>CFBundleShortVersionString</key>\r
144 <string>rel_1_6_0_7</string>\r
145 <key>CFBundleVersion</key>\r
146 <string>rel_1_6_0_7.rel_1_6_0_7</string>\r
147 <key>NSAppleScriptEnabled</key>\r
148 <true/>\r
149 <key>CFBundleTypeIconFile</key>\r
150 <string>Evergreen.icns</string>\r
151 </dict>\r
152 </plist>\r
153 ]]></programlisting>\r
154                                                 \r
155                                         </step>\r
156                                         <step>\r
157                                                 <para>Download and install an appropriate <systemitem class="osname">Mac OS X</systemitem>package of <application>"XULRunner"</application> from \r
158                                                 the Mozilla website (see above for recommendations).</para></step>\r
159                                         <step>\r
160                                                 <para>Make a copy of <emphasis>/Library/Frameworks/XUL.Framework</emphasis> inside your APP file. It should look something like this:</para>\r
161                                                 \r
162 <screen>\r
163 * Evergreen.app/\r
164 __* Contents/\r
165 ____* Frameworks/\r
166 ______* XUL.Framework/\r
167 ______* Versions/\r
168 ________* Current -> 1.9.1.3 (symlink)\r
169 ________* 1.9.1.3/\r
170 ______* XUL -> Versions/Current/XUL\r
171 ______* libxpcom.dylib -> Versions/Current/libxpcom.dylib\r
172 ______* xulrunner-bin -> Versions/Current/xulrunner-bin\r
173 </screen>\r
174                                         </step>\r
175                                         <step><para>Copy <emphasis>XUL.Framework/Versions/Current/xulrunner</emphasis> into <emphasis>Evergreen.app/MacOS</emphasis> \r
176                                         (do not symlink; copy the file).</para></step>\r
177                                         <step>\r
178                                                 <para>Make <emphasis>Evergreen.app/Resources</emphasis> the root of your Evergreen application files like this:</para>\r
179 <screen>\r
180 * Evergreen.app/\r
181 __* Contents/\r
182 ____* Resources/\r
183 ______* BUILD_ID\r
184 ______* application.ini\r
185 ______* chrome/\r
186 ______* components/\r
187 ______* etc.\r
188 </screen>\r
189                                         </step>\r
190                                         <step>Put a <systemitem class="osname">Mac</systemitem> format icon file named <emphasis>Evergreen.icns</emphasis> in Resources.</step>\r
191                                 </procedure>\r
192                         </simplesect>\r
193                 </simplesect>\r
194                 <simplesect xml:id="serversideinstallation-staffclient">\r
195                         <title>Installing on <systemitem class="osname">Linux</systemitem></title>\r
196                         <simplesect>\r
197                                 <title>Quick Upgrade of the Staff Client</title>\r
198                                 <para>A <systemitem class="osname">Linux</systemitem> Staff Client is automatically built on the server as part of the normal \r
199                                 <emphasis>make install</emphasis> process for Evergreen server-side software. To upgrade the Staff Client on a remote workstation with a new version, \r
200                                 just copy the directory tree containing the Staff Client from the server to the remote workstation.</para>\r
201                                 <para>The following example assumes you already have an <systemitem class="username">opensrf</systemitem> user account on both the server and the \r
202                                 remote workstation. Remember to replace <literal>user</literal>, <literal>client.linux.machine</literal> and <literal>eg-client-x.x.x.x</literal> with \r
203                                 the proper user name, client machine name, and \r
204                                 version number in the following example.</para>\r
205                                 <para>As the <systemitem class="username">opensrf</systemitem> user, change directory to the Staff Client source directory, then recursively copy \r
206                                 the entire directory tree to the remote workstation:</para>                     \r
207 <screen>\r
208 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput>\r
209 <userinput>scp -r build user@client.linux.machine:~/eg-client-x.x.x.x/</userinput>\r
210 </screen>\r
211                                 <para>To test the newly copied Staff Client, as the <systemitem class="username">opensrf</systemitem> user log into the remote workstation and execute \r
212                                 it as shown:</para>                             \r
213                                 <screen><userinput>xulrunner ~/eg-client-x.x.x.x/build/application.ini</userinput></screen>     \r
214                         </simplesect>\r
215                         <simplesect>\r
216                                 <title>Building the Staff Client on the Server</title>\r
217                                 <para>A <systemitem class="osname">Linux</systemitem> Staff Client is automatically built on the server as part of the normal \r
218                                 <emphasis>make install</emphasis> process for Evergreen server-side software.</para>\r
219                                 <para>In order to install a compatible Staff Client on another <systemitem class="osname">Linux</systemitem> system, just copy the applicable files from \r
220                                 the server to that system, or even manually build it on that system. Ensure that the BUILD_ID you choose on the server matches the BUILD_ID for each Staff \r
221                                 Client you use on other systems.</para>\r
222                                 <para>If you will be using a pre-packaged <systemitem class="osname">Windows</systemitem> version on some systems, you may want to choose the BUILD_ID  \r
223                                 on both server and other versions to match that of the <systemitem class="osname">Windows</systemitem> Staff Client. To determine which BUILD_ID is used \r
224                                 in an existing Staff Client installation, just click <guibutton>About this Client</guibutton> on the running Staff Client.</para>\r
225                                 <para>If you are allowed to make changes on the Evergreen server, another option is to create a symbolic link. In order for a copy of the Staff Client and \r
226                                 server to work together, the BUILD_ID must match the name of the directory containing the server components of the Staff Client, or the name of a symbolic \r
227                                 link to that directory.</para>\r
228 <screen>\r
229 <userinput>cd /openils/var/web/xul</userinput>\r
230 <userinput>ln -s SERVER_BUILD_ID/ CLIENT_BUILD_ID</userinput>\r
231 </screen>       \r
232                         </simplesect>\r
233                         <simplesect>\r
234                                 <title>Building the Staff Client on the client Machine</title>\r
235                                 <para>This section is directed toward end-users who wish to use <systemitem class="osname">Linux</systemitem> rather than \r
236                                 <systemitem class="osname">Windows</systemitem> for client machines, but have limited <systemitem class="osname">Linux</systemitem> experience. You can \r
237                                 build the Staff Client on a <systemitem class="osname">Linux</systemitem> system without installing the Evergreen Server component. This is a relatively \r
238                                 simple process compared to server installation, but does require some command-line work. The following directions are for building Staff Client version \r
239                                 1.2.1.4 on <systemitem class="osname">Kubuntu 7.10</systemitem>; you must modify them for other distributions (the instructions should work as-is for \r
240                                 <systemitem class="osname">Ubuntu</systemitem> or <systemitem class="osname">Debian</systemitem> derivatives).</para>\r
241                                 <procedure>\r
242                                         <step>\r
243                                                 <para>Prerequisites</para>\r
244                                                 <para>Both <application>"subversion"</application> and <application>"xulrunner"</application> are required to build the Staff Client.\r
245                                                 As the <systemitem class="username">root</systemitem> user, use <application>"apt-get"</application> to install packages \r
246                                                 for <application>"subversion"</application> and <application>"xulrunner"</application>. You can also use <application>"synaptic"</application>, \r
247                                                 the graphical user interface for <application>"apt-get"</application>. For <application>"subversion"</application>, select the latest \r
248                                                 version; for <application>"xulrunner"</application>, select version <emphasis>1.8.1.4-2ubuntu5</emphasis>.</para>\r
249                                                 \r
250 <screen>\r
251 <userinput>sudo apt-get install subversion</userinput>\r
252 <userinput>sudo apt-get install xulrunner</userinput>\r
253 </screen>\r
254                                         </step>\r
255                                         <step>\r
256                                                 <para>Download the Source Code</para>\r
257                                                 <itemizedlist>\r
258                                                         <listitem>\r
259                                                                 <para>Determine which version is needed</para>\r
260                                                                 <para>For most end-users, a specific version is required to communicate properly with the Evergreen server. Check with your \r
261                                                                 system administrator, IT person, or HelpDesk to determine which Staff Client versions are supported.</para>\r
262                                                                 <para>Next, you need to determine which <emphasis>tag</emphasis> to use when downloading the source code. Tags are markers in the \r
263                                                                 source code to create a snapshot of the code as it existed at a certain time; tags usually point to tested and stable code, or at \r
264                                                                 least a community-recognized release version.</para>\r
265                                                                 <para>To determine which tag to use, browse to \r
266                                                                 <ulink url="http://svn.open-ils.org/trac/ILS/browser">http://svn.open-ils.org/trac/ILS/browser</ulink>. Look in the \r
267                                                                 <guibutton>Visit</guibutton> drop-down box; see the list of Branches and, further down, a list of Tags. You may have to do some \r
268                                                                 guesswork, but it is fairly straightforward to determine which tag to use. If the server is version 1.2.1.4, you will want to use the \r
269                                                                 tag that looks most appropriate. For example, as you look through the tag list, notice the tag named 'rel_1_2_1_4'. This is the \r
270                                                                 tag you need; make a note of it for the next step.</para>\r
271                                                         </listitem>\r
272                                                         <listitem>\r
273                                                                 <para>Download the Code</para>\r
274                                                                 <para>As the <systemitem class="username">opensrf</systemitem> user, open a terminal (command-line prompt) and navigate to the directory \r
275                                                                 in which you wish to download the Staff Client. Use the following commands to download the proper version of the source code by tag \r
276                                                                 name:</para>                    \r
277 <screen>\r
278 <userinput>cd /YOUR/DOWNLOAD/DIRECTORY</userinput>\r
279 <userinput>svn co svn://svn.open-ils.org/ILS/tags/rel_1_2_1_4/</userinput>\r
280 </screen>\r
281                                                                 <para>Remember to change <literal>rel_1_2_1_4</literal> to the appropriate tag for your installation.</para>\r
282                                                         </listitem>\r
283                                                 </itemizedlist>\r
284                                         </step>\r
285                                         <step>\r
286                                                 <para>Build the Staff Client</para>\r
287                                                 <section>\r
288                                                         <title>Evergreen 1.2.x</title>\r
289                                                         <para>In the following example, navigate to the directory in which the source code was downloaded, then navigate to the proper subdirectory and \r
290                                                         run the <command>make</command> utility to actually build the Staff Client. Remember to check with your system administrator about which \r
291                                                         Staff Client BUILD_ID to use. The server checks the Staff Client BUILD_ID against itself to determine whether or not a connecting client \r
292                                                         is supported. For instance, for the PINES installation (version 1.2.1.4) the supported BUILD_ID is <literal>rel_1_2_1_4</literal>. Modify \r
293                                                         the following commands accordingly.</para>\r
294                                                         <para>As the <systemitem class="username">opensrf</systemitem> user, run the following commands to build the Staff \r
295                                                         Client:</para>                                                  \r
296 <screen>\r
297 <userinput>cd /YOUR/DOWNLOAD/DIRECTORY</userinput>\r
298 <userinput>cd Open-ILS/xul/staff_client</userinput>\r
299 <userinput>make STAFF_CLIENT_BUILD_ID='rel_1_2_1_4'</userinput>\r
300 ...\r
301 </screen>\r
302                                                 </section>\r
303                                                 <section>\r
304                                                         <title>Evergreen 1.4.x</title>\r
305                                                         <para>The 1.4 series of Evergreen has complicated the build process for the Staff Client a bit. If you downloaded a .tar.gz (compressed \r
306                                                         tar archive) of Evergreen, then your steps will resemble the following:</para>\r
307                                                         <caution>FIXME -- Need instructions for getting certain Javascript files from OpenSRF, preferably without actually installing OpenSRF.\r
308 </caution>                                                      \r
309 <screen>\r
310 <userinput>wget http://evergreen-ils.org/downloads/Evergreen-ILS-1.4.0.4.tar.gz</userinput>\r
311 <userinput>tar xfz Evergreen-ILS-1.4.0.4.tar.gz</userinput>\r
312 <userinput>cd Evergreen-ILS-1.4.0.4/</userinput>\r
313 <userinput>./configure --prefix=/openils --sysconfdir=/openils/conf</userinput>\r
314 <userinput>cd Open-ILS/xul/staff_client/</userinput>\r
315 <userinput>make STAFF_CLIENT_BUILD_ID='rel_1_4_0_4' install</userinput>\r
316 </screen>\r
317                                                         <para/>\r
318                                                         <para>If you're installing from a Subversion checkout:</para>\r
319 \r
320 <screen>\r
321 <userinput>svn co svn://svn.open-ils.org/ILS/tags/rel_1_4_0_4/</userinput>\r
322 <userinput>cd rel_1_4_0_4</userinput>\r
323 <userinput>./autogen.sh</userinput>   # If you downloaded a .tar.gz of Evergreen, you may skip this step\r
324 <userinput>./configure --prefix=/openils --sysconfdir=/openils/conf</userinput>\r
325 <userinput>cd Open-ILS/xul/staff_client/</userinput>\r
326 <userinput>make STAFF_CLIENT_BUILD_ID='rel_1_4_0_4' install</userinput>\r
327 </screen>\r
328 \r
329                                                 </section>\r
330                                         </step>\r
331                                         <step>\r
332                                                 <para>Run the Staff Client (from the command line)</para>\r
333                                                 <para>As the <systemitem class="username">opensrf</systemitem> user, navigate to the directory <filename class="directory">build/</filename> \r
334                                                 (not <filename class="directory">staff_client/</filename>) and run the following command:</para>                                        \r
335                                                 <screen><userinput>xulrunner application.ini</userinput></screen>\r
336                                         </step>\r
337                                         <step>\r
338                                                 <para>(OPTIONAL) Cleaning Up / Creating Shortcuts</para>\r
339                                                 <para>The source code download included many files that are needed to build the Staff Client, but are not necessary to run it. You may \r
340                                                 wish to remove them to save space, or to create a clean directory containing the built Staff Client that can be copied to other machines. To \r
341                                                 create a clean "staging" directory in which to place the finished Staff Client, issue the following commands:</para>    \r
342                                         \r
343 <screen>\r
344 <userinput>mkdir ~/&lt;Destination Directory&gt;</userinput>\r
345 <userinput>cd ~/&lt;Download Directory>/Open-ILS/xul/</userinput>\r
346 <userinput>cp -r staff_client ~/&lt;Destination Directory~/&gt;</userinput>\r
347 </screen>\r
348                                                 <para>Finally, test the Staff Client to verify that all the necessary files were moved to the destination directory:</para>\r
349                                         \r
350 <screen>\r
351 <userinput>cd ~/&lt;Destination Directory>/staff_client/build</userinput>\r
352 <userinput>xulrunner application.ini</userinput>\r
353 </screen>\r
354                                                 <para>If there were no problems, then finish the cleanup by removing the original download directory and all subdirectories:</para>\r
355                                                 <screen><userinput>rm -r -f ~/&lt;Download Directory&gt;</userinput></screen>\r
356                                                 <para>Finally, test the copied Staff Client. You can create "Desktop / Start Menu / K-Menu" shortcuts for the Staff Client by using the following command as the target:</para>                                         \r
357 <screen>\r
358 <userinput>xulrunner ~/&lt;Destination Directory&gt;/staff_client/build/application.ini</userinput>\r
359 </screen>       \r
360                                         </step>\r
361                                 </procedure>\r
362                         </simplesect>\r
363                         <simplesect>\r
364                                 <title>Using <application>"Wine"</application> to Install On Linux</title>\r
365                                 <para>The <systemitem class="osname">Linux</systemitem> application <application>"Wine"</application> is another alternative for those who wish to install the \r
366                                 packaged <systemitem class="osname">Windows</systemitem> versions rather than building the Staff Client manually. <application>"Wine"</application> is a \r
367                                 <systemitem class="osname">Linux</systemitem> application that allows users to directly run <systemitem class="osname">Windows</systemitem> executables, and is a simple \r
368                                 way for casual <systemitem class="osname">Linux</systemitem> users to use the Staff Client. More information about <application>"Wine"</application> can be found at \r
369                                 <ulink url="http://www.winehq.org/site/docs/wineusr-guide/getting-wine">http://www.winehq.org/site/docs/wineusr-guide/getting-wine</ulink>.</para>\r
370                                 <para>As the <systemitem class="username">root</systemitem> user, use <application>"apt-get"</application> to install the package for <application>"Wine"</application>. \r
371                                 You can also use <application>"synaptic"</application>, the graphical user interface.</para>\r
372                                 <procedure>\r
373                                         <step>\r
374                                                 <para>Install <application>"Wine"</application></para>                                                          \r
375                                                 <screen><userinput>sudo apt-get install wine</userinput></screen>\r
376                                         </step>\r
377                                         <step>\r
378                                                 <para>Download <systemitem class="osname">Windows</systemitem> installer for the Staff Client</para>\r
379                                                 <para>As the <systemitem class="username">opensrf</systemitem> user, run the following commands to download the <systemitem class="osname">Windows</systemitem> installer for the proper Staff Client from the <emphasis>open-ils.org</emphasis> website and place it in a temporary directory:</para>\r
380 <screen>\r
381 <userinput>cd /YOUR/DOWNLOAD/DIRECTORY</userinput>\r
382 <userinput>wget http://open-ils.org/downloads/evergreen-setup-rel_version-number.exe</userinput>\r
383 </screen>\r
384 \r
385                                         </step>\r
386                                         <step>\r
387                                                 <para>Run the downloaded <systemitem class="osname">Windows</systemitem> installer</para>\r
388                                                 <para>As the <systemitem class="username">opensrf</systemitem> user, navigate to the directory where you downloaded the \r
389                                                 <systemitem class="osname">Windows</systemitem> executable file, then execute it:</para>\r
390 <screen>\r
391 <userinput>cd /YOUR/DOWNLOAD/DIRECTORY</userinput>\r
392 <userinput>wine evergreen-setup-rel_version-number.exe</userinput>\r
393 </screen>\r
394                                                 \r
395                                                 <para>If this step fails, you may need to configure Wine first to properly emulate <systemitem class="osname">WindowsXP</systemitem>. To do so, type \r
396                                                 the command <command>winecfg</command> from the command line; in the <guibutton>Applications</guibutton> tab of the window that pops up, \r
397                                                 select <guibutton>Default Settings</guibutton> and choose <guibutton>Windows XP</guibutton> from the drop-down menu, then click \r
398                                                 <guibutton>Apply</guibutton>.</para>\r
399                                         </step>\r
400                                         <step>\r
401                                                 <para>Launch the Staff Client</para>\r
402                                                 <para>A new entry for the Staff Client should now appear somewhere in the <guibutton>All Applications</guibutton> menu of your \r
403                                                 <systemitem class="osname">Linux</systemitem> desktop. Also, find a new desktop shortcut for the Staff Client. To launch the Staff Client, visit \r
404                                                 the <guibutton>All Applications</guibutton> menu, find a section similar to <emphasis><menuchoice><guimenu>Wine</guimenu>\r
405                                                 <guimenuitem>Program Files</guimenuitem><guimenuitem>Evergreen Staff Client</guimenuitem><guimenuitem>Evergreen Staff Client</guimenuitem>\r
406                                                 </menuchoice></emphasis>, or else launch the Staff Client from the desktop shortcut.</para>\r
407                                         </step>\r
408                                 </procedure>\r
409                         </simplesect>\r
410                         <simplesect>\r
411                                 <title>Running the Staff Client over an SSH Tunnel</title>\r
412                                 <para>The Staff Client can use an SSH tunnel as a SOCKS 5 proxy. For more details, see <xref linkend="serversideinstallation-proxy"/>.</para>\r
413                         </simplesect>\r
414                 </simplesect>\r
415                 <simplesect xml:id="serversideinstallation-workstationnames">\r
416                         <title>Assigning Workstation Names</title>\r
417                         <para>The Staff Client must be assigned to a library and given a unique name before it will connect fully to the Evergreen server. The only restriction is that the \r
418                         workstation's name must be unique within the assigned library. Make sure to select a workstation name that you will remember later, and reflects the role, purpose, and/or \r
419                         location of a particular computer. These names will come up later in statistical reporting, and can also be handy when troubleshooting.</para>\r
420                         <mediaobject>\r
421                         <imageobject>\r
422                                 <imagedata fileref="../media/serversideinstallation-staffclient-workstationnames-1.png" scalefit="1" width="70%"/>\r
423                         </imageobject>\r
424                         </mediaobject>\r
425                         <para>In order to assign a workstation a name, a user with appropriate permissions must login to the Staff Client. In PINES, the local system administrator (OPSM) has the \r
426                         ability to assign workstation names in his or her library system. Library managers (LIBM's) have the ability within their branch. To assign a workstation a name, login to \r
427                         the system. You will be prompted to assign the workstation a library and a name:</para>\r
428                         <mediaobject>\r
429                         <imageobject>\r
430                                 <imagedata fileref="../media/serversideinstallation-staffclient-workstationnames-2.png" scalefit="1" width="70%"/>\r
431                         </imageobject>\r
432                         </mediaobject>\r
433                         <para>Select the library this workstation physically operates in from the drop down menu. In this example, we have selected <literal>MGRL-MA</literal>. Type in a friendly name \r
434                         for the workstation. In this example, we are installing the Staff Client on the director's personal system, and have named it as such. Then hit \r
435                         <emphasis role="bold">Register</emphasis>.</para>\r
436                         <para>Once you have registered your workstation with the server, your screen will look like this:</para>\r
437                         <mediaobject>\r
438                         <imageobject>\r
439                                 <imagedata fileref="../media/serversideinstallation-staffclient-workstationnames-3.png" scalefit="1" width="70%"/>\r
440                         </imageobject>\r
441                         </mediaobject>\r
442                         <para>You are now ready to log into the Staff Client for the first time. Type in your password again, and hit <emphasis role="bold">Login</emphasis>.</para>\r
443                 </simplesect>\r
444         </section>\r
445         <section xml:id="serversideinstallation-building-staffclient">\r
446                 <title>Manually Building the Staff Client</title>\r
447                 <para>This section reviews the process of manually building the Staff Client in various environments.</para>\r
448                 <para>The Staff Client is automatically built by default as part of the normal <emphasis>make install</emphasis> process for Evergreen server-side software. See \r
449                 <xref linkend="serversideinstallation-compilingevergreen"/> to review details related to building the Staff Client in the final compile/link/install phase of the default Evergreen \r
450                 build process.</para>\r
451                 <simplesect>\r
452                         <title>Building the Staff Client</title>\r
453                         <para>You can also manually build the Staff Client by using the <command>make</command> utility in the Staff Client source directory (e.g., the directory \r
454                         <filename class="directory">/home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</filename> for the current Evergreen version). There are a number of possible options \r
455                         to manually build special versions of the Staff Client on a <systemitem class="osname">Linux</systemitem> system. Following is a list of environment variables that can be passed \r
456                         to <command>make</command> to influence the manual build process:</para>\r
457                         <simplesect>\r
458                                 <title>Option STAFF_CLIENT_BUILD_ID</title>\r
459                                 <para>During the normal <emphasis>make install</emphasis> Evergreen server-side software build process, the variable defaults to an automatically generated \r
460                                 date/time string, but you can also override the value of BUILD_ID.</para>\r
461                                 <para>The following commands could be used during the normal build process:</para>\r
462 <screen>\r
463 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7</userinput>\r
464 <userinput>make STAFF_CLIENT_BUILD_ID=rel_1_6_0_7 install</userinput>\r
465 </screen>                                       \r
466                                 <para>The following commands will manually build the Staff Client using a different BUILD_ID.</para>\r
467                                 <para>As the <systemitem class="username">opensrf</systemitem> user, change directory to the Staff Client source directory, then set the variable and \r
468                                 build the Staff Client:</para>                                  \r
469 <screen>\r
470 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput>\r
471 <userinput>make STAFF_CLIENT_BUILD_ID=my_test_id  build</userinput>\r
472 ...\r
473 </screen>               \r
474                         </simplesect>\r
475                         <simplesect>\r
476                                 <title>Option STAFF_CLIENT_VERSION</title>\r
477                                 <para>During the normal <emphasis>make install</emphasis> Evergreen server-side software build process, the variable is pulled automatically from a README file in \r
478                                 the Evergreen source root. The variable defaults to <emphasis>0trunk.revision</emphasis>, where the value of <literal>revision</literal> is automatically generated. You \r
479                                 can override the value of VERSION similarly to the BUILD_ID.</para>\r
480                                 <para>The following commands could be used during the normal build process:</para>\r
481 <screen>\r
482 <userinput>$ cd /home/opensrf/Evergreen-ILS-1.6.0.7</userinput>\r
483 <userinput>$ make STAFF_CLIENT_VERSION=0mytest.200 install</userinput>\r
484 ...\r
485 </screen>\r
486 \r
487                                 <para>The following commands will manually build the Staff Client using a different VERSION.</para>\r
488                                 <para>If you plan to make extensions update automatically, the VERSION needs to conform to the format recommended in \r
489                                 <ulink url="https://developer.mozilla.org/en/Toolkit_version_format">Toolkit Version Format</ulink> and newer versions need to be higher \r
490                                 than older versions.</para>\r
491                                 <para>As the <systemitem class="username">opensrf</systemitem> user, change directory to the Staff Client source directory, then set the variable and build the \r
492                                 Staff Client:</para>\r
493 <screen>\r
494 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput>\r
495 <userinput>make STAFF_CLIENT_VERSION=0mytest.200  build</userinput>\r
496 </screen>\r
497                         </simplesect>\r
498                         <simplesect>\r
499                                 <title>Option STAFF_CLIENT_STAMP_ID variable</title>\r
500                                 <para>During the normal <emphasis>make install</emphasis> Evergreen server-side software build process, this variable is generated from STAFF_CLIENT_VERSION. \r
501                                 You can override the value of STAMP_ID similarly to the BUILD_ID.</para>\r
502                                 <para>The following commands could be used during the normal build process:</para>\r
503 <screen>\r
504 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7</userinput>\r
505 <userinput>make STAFF_CLIENT_STAMP_ID=my_test_stamp install</userinput>\r
506 </screen>\r
507                                 <para>The following commands will manually build the Staff Client using a different STAMP_ID.</para>\r
508                                 <para>It is possible to have multiple versions of the Staff Client by specifying a different STAMP_ID for each, possibly for different uses or \r
509                                 client-side customizations.</para>\r
510                                 <para>As the <systemitem class="username">opensrf</systemitem> user, change directory to the Staff Client source directory, then set the variable and \r
511                                 build the Staff Client:</para>\r
512 <screen>\r
513 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput>\r
514 <userinput>make STAFF_CLIENT_STAMP_ID=my_test_stamp  build</userinput>\r
515 </screen>                               \r
516                         </simplesect>\r
517                 </simplesect>\r
518                 <simplesect>\r
519                         <title>Advanced Build Options</title>\r
520                         <para>In addition to the basic options listed above, there are a number of advanced options for building the Staff Client. Most are target names for \r
521                         the <command>make</command> utility and require that you build the Staff Client from its source directory. See the following table for a list of possible \r
522                         <command>make</command> target keywords:</para>\r
523                         <table>\r
524                                 <title>Keywords Targets for <application>"make"</application> Command</title>\r
525                                 <tgroup align="left" cols="2" colsep="1" rowsep="1">\r
526                                         <colspec colnum="1" colwidth="1.0*"/>\r
527                                         <colspec colnum="2" colwidth="3.0*"/>\r
528                                         <thead>\r
529                                                 <row>\r
530                                                         <entry>Keyword</entry>\r
531                                                         <entry>Description</entry>\r
532                                                 </row>\r
533                                         </thead>\r
534                                         <tbody>\r
535                                                 <row>\r
536                                                         <entry>clients</entry>\r
537                                                         <entry>Runs "make win-client", "make linux-client", and "make generic-client" individually</entry>\r
538                                                 </row>\r
539                                                 <row>\r
540                                                         <entry>client_dir</entry>\r
541                                                         <entry>Builds a client directory from the build directory, without doing a rebuild. The same as "copy everything but server/".</entry>\r
542                                                 </row>\r
543                                                 <row>\r
544                                                         <entry>client_app</entry>\r
545                                                         <entry>Prerequisite "client_dir"; removes "install.rdf" from client directory so an APP bundle can't be installed as an extension</entry>\r
546                                                 </row>\r
547                                                 <row>\r
548                                                         <entry>client_ext</entry>\r
549                                                         <entry>Prerequisite "client_dir"; remove "application.ini", "autoupdate.js", "standalone_xul_app.js" from client directory so an \r
550                                                         extension won't break Firefox</entry>\r
551                                                 </row>\r
552                                                 <row>\r
553                                                         <entry>extension</entry>\r
554                                                         <entry>Prerequisite "client_ext"; rewritten to use "client_ext"</entry>\r
555                                                 </row>\r
556                                                 <row>\r
557                                                         <entry>generic-client</entry>\r
558                                                         <entry>Prerequisite "client_app"; makes an XPI file suitable for use with "xulrunner --install-app""</entry>\r
559                                                 </row>\r
560                                                 <row>\r
561                                                         <entry>win-xulrunner</entry>\r
562                                                         <entry>Prerequisite "client_app"; adds Windows xulrunner to client build</entry>\r
563                                                 </row>\r
564                                                 <row>\r
565                                                         <entry>linux-xulrunner</entry>\r
566                                                         <entry>Prerequisite "client_app"; adds Linux xulrunner to client build</entry>\r
567                                                 </row>\r
568                                                 <row>\r
569                                                         <entry>win-client</entry>\r
570                                                         <entry>Prerequisite "win-xulrunner"; builds "setup exe" (requires that "nsis" package be installed, will add options for \r
571                                                         automatic update if configured and developer options if client build was a "make devbuild")</entry>\r
572                                                 </row>\r
573                                                 <row>\r
574                                                         <entry>linux-client</entry>\r
575                                                         <entry>Prerequisite "linux_xulrunner"; builds a "tar.bz2" bundle of the Linux client</entry>\r
576                                                 </row>\r
577                                                 <row>\r
578                                                         <entry>[generic-|win-|linux-|extension-]updates[-client]</entry>\r
579                                                         <entry>Calls external/make_updates.sh to build full and partial updates generic/win/linux/extension prefix limit to \r
580                                                         that distribution; Adding the string "-client" builds clients and copies them to a subdirectory of the directory \r
581                                                         <filename class="directory">updates</filename> as well; the target "extension-updates-client" doesn't exist.</entry>\r
582                                                 </row>\r
583                                         </tbody>\r
584                                 </tgroup>\r
585                         </table>\r
586                         <para>Descriptions of other special build options follow:</para>\r
587                         <itemizedlist>\r
588                                 <listitem>\r
589                                         <para>Developer Build</para>\r
590                                         <para>You can create a so-called "developer build" of the Staff Client by substituting <literal>devbuild</literal> for <literal>build</literal> \r
591                                         when running <command>make</command>. The build will contain an extra configuration file that enables some developer options.</para>\r
592                                         <para>As the <systemitem class="username">opensrf</systemitem> user, run <command>make</command> from the Staff Client source directory:</para>\r
593                                                 <title>Commands to do a "developer build"</title>\r
594 <screen>\r
595 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput>\r
596 <userinput>make devbuild</userinput>\r
597 </screen>                       \r
598                                 </listitem>\r
599                                 <listitem>\r
600                                         <para>Compressed Javascript</para>\r
601                                         <para>You can execute the Google application <application>"Closure Compiler"</application> to automatically review and compress Javascript code after the \r
602                                         build process completes, by substituting <literal>compress-javascript</literal> for <literal>build</literal> when running <command>make</command>. \r
603                                         For more information see <ulink url="http://code.google.com/closure/compiler/">Google "Closure Compiler"</ulink>.</para>\r
604                                         <para>As the <systemitem class="username">opensrf</systemitem> user, run the following commands from the Staff Client source directory:</para>\r
605                                         \r
606 <screen>\r
607 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput>\r
608 <userinput>make compress-javascript</userinput>\r
609 </screen>\r
610                                         <para>You can also combine Javascript review and compression, and also perform a "developer build".</para>\r
611                                         <para>As the <systemitem class="username">opensrf</systemitem> user, run the following commands from the Staff Client source directory:</para>\r
612 <screen>\r
613 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput>\r
614 # order of options is important!\r
615 <userinput>make  devbuild  compress-javascript</userinput>\r
616 </screen>                       \r
617                                 </listitem>\r
618                                 <listitem>\r
619                                         <para>Automatic Update Host</para>\r
620                                         <para>The host used to check for automatic Staff Client updates can be overridden by specifying the AUTOUPDATE_HOST option. \r
621                                         The following commands could have been used during the normal build process:</para>\r
622 <screen>\r
623 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7</userinput>\r
624 <userinput>make AUTOUPDATE_HOST=localhost install</userinput>\r
625 </screen>\r
626                                         \r
627                                         <para>You can manually set AUTOUPDATE_HOST to set up automatic update checking. The following commands will manually build the Staff \r
628                                         Client using a different AUTOUPDATE_HOST.</para>\r
629                                         <para>As the <systemitem class="username">opensrf</systemitem> user, change directory to the Staff Client source directory, then set the \r
630                                         variable and build the Staff Client:</para>\r
631 <screen>\r
632 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput>\r
633 <userinput>make AUTOUPDATE_HOST=localhost build</userinput>\r
634 </screen>\r
635                                         \r
636                                         <para>For more information on Automatic Updates, see <xref linkend="serversideinstallation-staffclient-autoupdate"/>.</para>\r
637                                 </listitem>\r
638                         </itemizedlist>\r
639                 </simplesect>\r
640                 <simplesect>\r
641                         <title>Installing and Activating a Manually Built Staff Client</title>\r
642                         <para>The Staff Client is automatically built, installed and activated as part of the normal <emphasis>make install</emphasis> process for Evergreen server-side \r
643                         software. However, if you manually build the Staff Client, then you need to take additional steps to properly install and activate it. You also have the option \r
644                         of installing the Staff Client on the same machine it was built on, or on a different machine.</para>\r
645                         <para>Assuming you have already built the Staff Client, and that your installation is in the directory <filename class="directory">/openils/var/web/xul</filename>, \r
646                         as the <systemitem class="username">opensrf</systemitem> user, change directory to the Staff Client source directory, then execute the following commands:</para>\r
647 <screen>\r
648 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput>\r
649 <userinput>mkdir -p "/openils/var/web/xul/$(cat build/BUILD_ID)"</userinput>\r
650 <userinput>cp -R build/server "/openils/var/web/xul/$(cat build/BUILD_ID)"</userinput>\r
651 </screen>\r
652 \r
653                 </simplesect>\r
654                 <simplesect>\r
655                         <title>Packaging the Staff Client</title>\r
656                         <para>Once the Staff Client has been built, you can create several forms of client packages by using some targeted <command>make</command> commands in the Staff \r
657                         Client source directory.</para>\r
658                         <itemizedlist>\r
659                                 <listitem>\r
660                                         <para>Packaging a Generic Client</para>\r
661                                         <para>This build creates a Staff Client packaged as an XPI file to use with <emphasis>XULRunner</emphasis>. It requires that you already have \r
662                                         the <application>"zip"</application> utility installed on your system. It will create the output file <filename>evergreen_staff_client.xpi</filename>, \r
663                                         suitable for use with the <emphasis>XULRunner</emphasis> option <option>--install-app</option>.</para>\r
664                                         <para>As the <systemitem class="username">opensrf</systemitem> user, change directory to the Staff Client source directory, \r
665                                         then execute the following commands:</para>\r
666 <screen>\r
667 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput>\r
668 <userinput>make generic-client</userinput>\r
669 </screen>\r
670 \r
671                                 </listitem>\r
672                                 <listitem>\r
673                                         <para>Packaging a <systemitem class="osname">Windows</systemitem> Client</para>\r
674                                         <para>This build creates a Staff Client packaged as a <systemitem class="osname">Windows</systemitem> executable. It requires that you already have \r
675                                         the <application>"unzip"</application> utility installed on your system. It also requires that you install <ulink url="http://nsis.sourceforge.net/">NSIS \r
676                                         (Nullsoft Scriptable Install System)</ulink>, a professional open source utility package used to create <systemitem class="osname">Windows</systemitem> \r
677                                         installers (the <application>"makensis"</application> utility is installed as part of the <application>"nsis"</application> package). We recommend using \r
678                                         Version 2.45 or later. This build will create the output file <filename>evergreen_staff_client_setup.exe</filename>.</para>\r
679                                         <para>(OPTIONAL) If you wish for the Staff Client to have a link icon/tray icon by default, you may wish to provide a pre-modified \r
680                                         <filename>xulrunner-stub.exe</filename>. Place it in the Staff Client source directory and <application>"make"</application> will automatically use it instead  \r
681                                         of the one that comes with the downloaded <emphasis>XULRunner</emphasis> release. The version of <filename>xulrunner-stub.exe</filename> need not match \r
682                                         exactly.</para>\r
683                                         <para>(OPTIONAL) You can also use a tool such as <ulink url="http://www.angusj.com/resourcehacker/">Resource Hacker</ulink> to embed icons. \r
684                                         <application>Resource Hacker</application> is an open-source utility used to view, modify, rename, add, delete and extract resources in 32bit \r
685                                         <systemitem class="osname">Windows</systemitem> executables. See the following table for some useful icon ID strings:</para>\r
686                                         <table>\r
687                                                 <title>Useful icon ID strings</title>\r
688                                                 <tgroup align="left" cols="2" colsep="1" rowsep="1">\r
689                                                         <colspec colnum="1" colwidth="1.0*"/>\r
690                                                         <colspec colnum="2" colwidth="1.0*"/>\r
691                                                         <tbody>\r
692                                                                 <row>\r
693                                                                         <entry>IDI_APPICON</entry>\r
694                                                                         <entry>Tray icon</entry>\r
695                                                                 </row>\r
696                                                                 <row>\r
697                                                                         <entry>32512</entry>\r
698                                                                         <entry>Default window icon</entry>\r
699                                                                 </row>\r
700                                                         </tbody>\r
701                                                 </tgroup>\r
702                                         </table>\r
703                                         <para>As the <systemitem class="username">opensrf</systemitem> user, change directory to the Staff Client source directory, then execute the following commands:</para>\r
704 <screen>\r
705 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput>\r
706 <userinput>make win-client</userinput>\r
707 </screen>\r
708                                 </listitem>\r
709                                 <listitem>\r
710                                         <para>Packaging a <systemitem class="osname">Linux</systemitem> Client</para>\r
711                                         <para>This build creates a Staff Client package for <systemitem class="osname">Linux</systemitem> as a "tar.bz2" file with \r
712                                         <emphasis>XULRunner</emphasis> already bundled with it. It creates the output file <filename>evergreen_staff_client.tar.bz2</filename>.</para>\r
713                                         <para>As the <systemitem class="username">opensrf</systemitem> user, change directory to the Staff Client source directory, then execute the \r
714                                         following commands:</para>\r
715                                         \r
716                                                 \r
717 <screen>\r
718 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput>\r
719 <userinput>make linux-client</userinput>\r
720 </screen>\r
721                                         \r
722                                 </listitem>\r
723                                 <listitem>\r
724                                         <para>Packaging a Firefox Extension</para>\r
725                                         <para>This build requires that you already have the <application>"zip"</application> utility installed on your system. It creates a \r
726                                         Staff Client packaged as a Firefox extension and creates the output file <filename>evergreen.xpi</filename>.</para>\r
727                                         <para>As the <systemitem class="username">opensrf</systemitem> user, change directory to the Staff Client source directory, then \r
728                                         execute the following commands:</para>                                                  \r
729 <screen>\r
730 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput>\r
731 <userinput>make extension</userinput>\r
732 </screen>\r
733                                         \r
734                                 </listitem>\r
735                         </itemizedlist>\r
736                 </simplesect>\r
737                 <simplesect xml:id="serversideinstallation-staffclient-autoupdate">\r
738                         <title>Staff Client Automatic Updates</title>\r
739                         <para>It is possible to set up support for automatic Staff Client updates, either during the normal Evergreen server-side build process, or by manually \r
740                         building the Staff Client with certain special options.</para>\r
741                         <simplesect>\r
742                                 <title>WARNINGS</title>\r
743                                 <para>Automatic update server certificate requirements are more strict than normal server requirements. Firefox and \r
744                                 <emphasis>XULRunner</emphasis> will both ignore any automatic update server that is not validated by a trusted certificate authority. \r
745                                 Servers with exceptions added to force the Staff Client to accept them <emphasis>WILL NOT WORK</emphasis>.</para>\r
746                                 <para>In addition, automatic updates have special requirements for the file <filename>update.rdf</filename>:</para>\r
747                                 <orderedlist>\r
748                                         <listitem>It must be served from an SSL server, or</listitem>\r
749                                         <listitem>It must be signed with the <ulink url="https://developer.mozilla.org/en/McCoy">McCoy</ulink> tool.</listitem>\r
750                                 </orderedlist>\r
751                                 <para>You can pre-install the signing key into the file <filename>install.rdf</filename> directly, or install it into a copy as \r
752                                 <emphasis>install.mccoy.rdf</emphasis>. If the latter exists it will be copied into the build instead of the original file \r
753                                 <filename>install.rdf</filename>.</para>\r
754                         </simplesect>\r
755                         <simplesect>\r
756                                 <title>Autoupdate Host</title>\r
757                                 <para>The name of the automatic update host can be provided in either of two ways:</para>\r
758                                 <orderedlist>\r
759                                         <listitem>At configuration time for the normal build of the Evergreen server-side software, or</listitem>\r
760                                         <listitem>During a manual Staff Client build process.</listitem>\r
761                                 </orderedlist>\r
762                                 <para/>\r
763                                 <itemizedlist>\r
764                                         <listitem>\r
765                                                 <para>At configuration time for the normal build of Evergreen server-side software</para>\r
766                                                 <para>This must be done when the Evergreen server-side software is first configured (see <xref linkend="serversideinstallation-configure"/>). \r
767                                                 As the <systemitem class="username">opensrf</systemitem> user, use the <command>configure</command> utility as shown:</para>\r
768                                                 \r
769 <screen>\r
770 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7</userinput>\r
771 <userinput>./configure --prefix=/openils --sysconfdir=/openils/conf --with-updateshost=hostname</userinput>\r
772 <userinput>make</userinput>\r
773 </screen>\r
774                                                 \r
775                                         </listitem>\r
776                                         <listitem>\r
777                                                 <para>During a manual Staff Client build process</para>\r
778                                                 <para>You will used the variable AUTOUPDATE_HOST=hostname (see above). If you specify just a hostname (such as <uri>example.com</uri>) \r
779                                                 then the URL will be a secure URL (such as <uri>https://example.com</uri>. If you wish to use a non-HTTPS URL then prefix the host \r
780                                                 name with "http://" (such as <uri>http://example.com</uri>).</para>\r
781                                                 <para>If neither option is used then, by default, the Staff Client will not include the automatic update preferences.</para>\r
782                                         </listitem>\r
783                                 </itemizedlist>\r
784                         </simplesect>\r
785                         <simplesect>\r
786                                 <title>Building Updates</title>\r
787                                 <para>Similar to building clients, the targets <literal>generic-updates</literal>, <literal>win-updates</literal>, <literal>linux-updates</literal>, \r
788                                 and <literal>extension-updates</literal> can be used individually with <command>make</command> to build the update files for the Staff Client. To build \r
789                                 all the targets at once, simply use the target <literal>updates</literal>.</para>\r
790                                 <para>A "full" update will be built for each specified target (or for all if you use the target <literal>updates</literal>). For all but extensions \r
791                                 any previous full updates (archived by default in the directory <filename class="directory">/openils/var/updates/archives</filename>) will be used to \r
792                                 make partial updates. Partial updates tend to be much smaller and will thus download more quickly, but if something goes wrong with a partial update the \r
793                                 full update will be used as a fallback. Extensions do not currently support partial updates.</para>\r
794                                 <para>As the <systemitem class="username">opensrf</systemitem> user, change directory to the Staff Client source directory, then execute the \r
795                                 following commands:</para>                      \r
796                                 <screen><userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput></screen>\r
797                                 <para>Command to build all updates at once:</para>\r
798                                 <screen><userinput>make updates</userinput></screen>\r
799                                 <para>Commands to build updates individually:</para>\r
800 \r
801 <screen>\r
802 <userinput>make generic-updates</userinput>\r
803 <userinput>make win-updates</userinput>\r
804 <userinput>make linux-updates</userinput>\r
805 <userinput>make extension-updates</userinput>\r
806 </screen>\r
807         \r
808                         </simplesect>\r
809                         <simplesect>\r
810                                 <title>Building updates with clients</title>\r
811                                 <para>To save time and effort you can build updates and manual download clients at the same time by adding the string "-client" to each target name. For instance, you \r
812                                 can specify <literal>win-updates-client</literal>. You can also specify <literal>updates-client</literal> to build all the targets at once. This does not work for \r
813                                 extension-updates.</para>\r
814                                 <para>The clients will be installed alongside the updates and listed on the web page <uri>manualupdate.html</uri>, rather than left in the Staff Client directory.</para>\r
815                                 <para>As the <systemitem class="username">opensrf</systemitem> user, change directory to the Staff Client source directory, then execute the following commands:</para>\r
816                                 <screen><userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput></screen>\r
817                                 <para>Command to build all updates at once:</para>\r
818                                 <screen><userinput>make updates-client</userinput></screen>\r
819                                 <para>Commands to build updates individually:</para>\r
820 <screen>\r
821 <userinput>make generic-updates-client</userinput>\r
822 <userinput>make win-updates-client</userinput>\r
823 <userinput>make linux-updates-client</userinput>\r
824 </screen>\r
825                         </simplesect>\r
826                         <simplesect>\r
827                                 <title>Activating the Update Server</title>\r
828                                 <para>This section reviews scripts associated with the update server, and requires some final adjustments to file permissions.</para>\r
829                                 <para>The Apache example configuration creates a directory <filename class="directory">updates</filename> that, by default, points to the directory \r
830                                 <filename class="directory">/openils/var/updates/pub</filename>. This directory contains one HTML file and several specially-named script files.</para>\r
831                                 <para>The file <filename>updatedetails.html</filename> is the fallback web page for the update details. The <application>"check"</application> \r
832                                 script is used for <emphasis>XULRunner</emphasis> updates. The <application>"update.rdf"</application> script is used for extension updates. \r
833                                 The <application>"manualupdate.html"</application> script checks for clients to provide download links when automatic updates have failed and uses the \r
834                                 download script to force a download of the generic client XPI (compared to Firefox trying to install it as an extension).</para>\r
835                                 <para>The following scripts should be marked as executable: <emphasis>check, download, manualupdate.html, update.rdf</emphasis>. As the \r
836                                 <systemitem class="username">root</systemitem> user, change directory to the updates directory, then execute the following commands:</para>\r
837 <screen>\r
838 <userinput>cd /openils/var/updates/pub</userinput>\r
839 <userinput>chmod +x  check  download  manualupdate.html  update.rdf</userinput>\r
840 </screen>\r
841                                 \r
842                         </simplesect>\r
843                 </simplesect>\r
844                 <simplesect>\r
845                         <title>Other tips</title>\r
846                         <simplesect>\r
847                                 <title>Multiple workstations on one install</title>\r
848                                 <para>Multiple workstation registrations for the same server can be accomplished with a single Staff Client install by using multiple profiles. When \r
849                                 running <emphasis>XULRunner</emphasis> you can specify the option <option>-profilemanager</option> or <option>-P</option> (uppercase "P") to force the Profile Manager \r
850                                 to start. Unchecking the option <option>Don't ask at startup</option> will make this the default.</para>\r
851                                 <para>Once you have opened the Profile Manager you can create additional profiles, one for each workstation you wish to register. You may need to install SSL exceptions \r
852                                 for each profile.</para>\r
853                                 <para>When building targets <literal>win-client</literal>, <literal>win-updates-client</literal>, or <literal>updates-client</literal>, you can \r
854                                 specify <literal>NSIS_EXTRAOPTS=-DPROFILES</literal> to add an "Evergreen Staff Client Profile Manager" option to the start menu.</para>\r
855                                 <para>As the <systemitem class="username">opensrf</systemitem> user, change directory to the Staff Client source directory, then execute the following commands:</para>\r
856 <screen>\r
857 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client</userinput>\r
858 <userinput>make NSIS_EXTRAOPTS=-DPROFILES win-client</userinput>\r
859 </screen>\r
860                                 \r
861                         </simplesect>\r
862                         <simplesect>\r
863                                 <title> Multiple Staff Clients</title>\r
864                                 <para>This may be confusing if you are not careful, but you can log in to multiple Evergreen servers at the same time, or a single Evergreen server multiple \r
865                                 times. In either case you will need to create an additional profile for each additional server or workstation you want to log in as (see previous tip).</para>\r
866                                 <para>Once you have created the profiles, run <emphasis>XULRunner</emphasis> with the option <option>-no-remote</option> (in addition to \r
867                                 <option>-profilemanger</option> or <option>-P</option> if needed). Instead of <emphasis>XULRunner</emphasis> opening a new login window on your existing \r
868                                 session it will start a new session instead, which can then be logged in to a different server or workstation ID.</para>\r
869                         </simplesect>\r
870                 </simplesect>\r
871         </section>\r
872         <section xml:id="serversideinstallation-running-staffclient">\r
873                 <title>Running the Staff Client</title>\r
874                 <para>Run the Staff Client on a <systemitem class="osname">Linux</systemitem> system by using the application <emphasis>XULRunner</emphasis> (installed automatically and by \r
875                 default with Firefox version 3.0 and later on <systemitem class="osname">Ubuntu</systemitem> and <systemitem class="osname">Debian</systemitem> distributions).</para>\r
876                 <para>For example, if the source files for the Evergreen installation are in the directory <filename class="directory">/home/opensrf/Evergreen-ILS-1.6.0.7/</filename>, \r
877                 start the Staff Client as shown in the following command example:</para>\r
878                 <screen><userinput>xulrunner /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client/build/application.ini</userinput></screen>\r
879         </section>\r
880         <section xml:id="serversideinstallation-proxy">\r
881                 <title>Configuring a Proxy for the Staff Client</title>\r
882                 <para>By using an SSH proxy and an SSH tunnel, it is possible to provide secure (encrypted) network communications between the Staff Client and one or more Evergreen \r
883                 servers. In addition to providing excellent data security, this method also buffers and caches data traveling to and from the Staff Client and can speed up access to resources \r
884                 on remote Evergreen servers. This is important if your system architecture includes many Staff Clients and Evergreen servers in a busy environment, through network firewalls, \r
885                 or must operate over insecure networks.</para>\r
886                 <simplesect>\r
887                         <title>Why Use a Proxy for the Staff Client?</title>\r
888                         <para>There are several reasons for sending network traffic for the Staff Client through an SSH proxy:</para>\r
889                         <itemizedlist>\r
890                                 <listitem><emphasis role="bold">Firewalls</emphasis> may prevent you from reaching the server. This may happen when you are connecting the Staff Client \r
891                                 to a test server that should not be available generally, or it may be the result of network design priorities other than ease of use.</listitem>\r
892                                 <listitem>You may wish to <emphasis role="bold">improve security</emphasis> where Staff Client traffic may be susceptible to network eavesdropping. \r
893                                 This is especially true when wireless is otherwise the best option for connecting a staff machine to the network.</listitem>\r
894                                 <listitem>You may wish to buffer and cache data from remote Evergreen servers to speed up access from Staff Clients.</listitem>\r
895                         </itemizedlist>\r
896                 </simplesect>\r
897                 <simplesect>\r
898                         <title>Setting Up an SSH Tunnel</title>\r
899                         <para>You will need a server that has network access to the Evergreen server you want to reach, and allows you to log in there via SSH. Use your username and \r
900                         password for that SSH server to set up a tunnel.</para>\r
901                         <para>For <systemitem class="osname">Windows</systemitem> users, one good solution is the open-source utility \r
902                         <ulink url="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</ulink>, a free telnet/SSH client. An example of setting up a \r
903                         <application>"PuTTY"</application> session follows:</para>                      \r
904 <mediaobject>\r
905 <imageobject>\r
906         <imagedata fileref="../media/serversideinstallation-proxy-putty.png" scalefit="1" width="70%"/>\r
907 </imageobject>\r
908 </mediaobject>\r
909                         <procedure>\r
910                                 <step>Use the menu on the left to go to <emphasis><menuchoice><guimenu>Connection</guimenu><guimenuitem>SSH</guimenuitem>\r
911                                 <guimenuitem>Tunnels</guimenuitem></menuchoice></emphasis>.</step>\r
912                                 <step>Enter <literal>9999</literal> in the "Source port".</step>\r
913                                 <step>Choose <guibutton>Dynamic</guibutton>. Do not enter anything in the Destination text entry box.</step>\r
914                                 <step>Click <guibutton>Add</guibutton>. "D9999" will now appear in the "Forwarded ports" list.</step>\r
915                                 <step>Use the menu on the left to go back to "Session", and enter the host name of the SSH server.</step>\r
916                                 <step>A window will open up so that you can enter your username and password. Once you are logged in, the tunnel is open.</step>\r
917                         </procedure>\r
918                 </simplesect>\r
919                 <simplesect>\r
920                         <title>Configuring the Staff Client to Use the SSH Tunnel</title>\r
921                         <para>In order to tell the Staff Client that all traffic should be sent through the SSH tunnel just configured, you must edit the file \r
922                         <filename>C:\Program Files\Evergreen Staff Client\greprefs\all.js</filename>. Search this file for the word <emphasis role="bold">socks</emphasis> to \r
923                         find the appropriate section for the following changes.</para>\r
924                                 <mediaobject>\r
925                                         <imageobject>\r
926                                                 <imagedata fileref="../media/serversideinstallation-proxy-socks-1.png" scalefit="1" width="70%"/>\r
927                                         </imageobject>\r
928                                 </mediaobject>\r
929                         <para>Make the following changes:</para>\r
930                         <itemizedlist>\r
931                                 <listitem>Change the value of <emphasis>network.proxy.socks</emphasis> from <emphasis role="bold">""</emphasis> to \r
932                                 <emphasis role="bold">"localhost"</emphasis>.</listitem>\r
933                                 <listitem>Change the value of <emphasis>network.proxy.socks_port</emphasis> from <emphasis role="bold">"0"</emphasis> to \r
934                                 <emphasis role="bold">9999</emphasis>.</listitem>\r
935                         </itemizedlist>\r
936                                 <mediaobject>\r
937                                         <imageobject>\r
938                                                 <imagedata fileref="../media/serversideinstallation-proxy-socks-2.png" scalefit="1" width="70%"/>\r
939                                         </imageobject>\r
940                                 </mediaobject>\r
941                         <para>If everything is working correctly, you should now be able to run the Staff Client and all its data will be sent encrypted through the SSH \r
942                         tunnel you have just configured.</para>\r
943                 </simplesect>\r
944         </section>\r
945 </chapter>\r