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