egstaffclient\evergreen.exe -profile openils
Note that "openils" is in the root of the USB stick in our case and was where the forced profile would end up living.
We then used a Bat to Exe converter from http://www.f2ko.de ([[http://www.f2ko.de/programs.php?lang=en&pid=b2e|This specifically]]) to turn that .bat into a .exe with an icon. We used the "invisible application, current directory, delete at exit" options and specified the icon in the versioninformations section.
An autorun.inf file was also included, although behaviour will differ from windows version to windows version with it on a USB stick.
[AutoRun]
ICON=startevergreen.exe
LABEL=MVLC Evergreen Demo
OPEN=startevergreen.exe
ACTION=Start Evergreen Demo Client
To populate the USB sticks we used a bash script on a linux box (it does two at a time, and takes the shortname the stick should be for as an argument):
#!/bin/bash
echo Mounting...
mkdir /media/usb0
mkdir /media/usb1
mount /dev/sdc1 /media/usb0
mount /dev/sdd1 /media/usb1
echo Starting Copy, USB1
cp -R build/* /media/usb0 > /dev/null
echo Starting Copy, USB2
cp -R build/* /media/usb1 > /dev/null
if [ "$1" ]; then
echo Pre-reg USB Sticks with library $1
libnum=`grep $1 libs.csv | cut -d , -f 2`
sed -e s/SHORT/$1/g -e s/ID/$libnum/ -e s/NUM/0/ ws_info.tmpl > /media/usb0/egstaffclient/chrome/open_ils_staff_client/content/conf/ws_info
sed -e s/SHORT/$1/g -e s/ID/$libnum/ -e s/NUM/1/ ws_info.tmpl > /media/usb1/egstaffclient/chrome/open_ils_staff_client/content/conf/ws_info
echo Add passwords to USB sticks
for DRIVE in {usb0,usb1}; do
grep \"$1\" generic.csv | sed -e 's/ /\ /' | sed -e 's/^[0-9]*,"\([^"]*\)","\([^"]*\)",.*,"\([^"]*\)"$/\1<\/td> \2<\/td> \3<\/td><\/tr>/' | while read PASSWORD ; do
sed -i "/ /i\
$PASSWORD
" /media/$DRIVE/README.html
done
sed -i "/ /d" /media/$DRIVE/README.html
done
fi
echo Unmounting Drives
umount /media/usb0
umount /media/usb1
rmdir /media/usb0
rmdir /media/usb1
echo Done
Take note that this pulled information from ws_info.tmpl, generic.csv, and libs.csv. generic.csv was a list of our accounts for the sticks, libs.csv was a simple "SHORTNAME,ID" list. It also refers to a README.html file we made (with screenshots) for our members, where it puts username/password information in place of a <passwords/> element.
ws_info.tmpl ended up being this:
{"SERVER":{"name":"SHORT-pineconeNUM","owning_lib":"ID","lib_shortname":"SHORT"}}
The most annoying part ends up being loading and properly labeling the USB sticks.
As for the server-side registration, we used the following SQL:
INSERT INTO actor.workstation(name,owning_lib) SELECT shortname || '-pinecone' || num AS name, id AS owning_lib FROM actor.org_unit, (SELECT unnest(ARRAY[0,1]) AS num) AS n WHERE ou_type = 3 AND shortname IN ('list','of','shortnames') ORDER BY id, num;
The "ou_type = 3" part wasn't really needed, originally I wasn't limiting the shortnames to the branches we were building the sticks for.
===== Client management using WPKG TADL =====
Jeff Godin uses WPKG to install and manage staff clients.