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