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