From 3e436d33d070af75a57ec3556a53e31ed8fe34ab Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 30 Jan 2006 16:15:18 +0000 Subject: [PATCH] client side versioning git-svn-id: svn://svn.open-ils.org/ILS/trunk@2889 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/Makefile | 98 +++++++------------ Open-ILS/xul/staff_client/external/dtd2js.pl | 3 +- .../xul/staff_client/external/prune_dirs.sh | 4 + 3 files changed, 40 insertions(+), 65 deletions(-) create mode 100755 Open-ILS/xul/staff_client/external/prune_dirs.sh diff --git a/Open-ILS/xul/staff_client/Makefile b/Open-ILS/xul/staff_client/Makefile index 2e97f420fc..8062937e29 100644 --- a/Open-ILS/xul/staff_client/Makefile +++ b/Open-ILS/xul/staff_client/Makefile @@ -1,85 +1,55 @@ -VERSION=0.1.0 -PACKAGE=Evergreen -DESCRIPTION=Evergreen Staff Client -BUILD=2005072719 - -RETRIEVE_FM_ALL=wget -N http://dev.gapines.org/opac/common/js/fmall.js -RETRIEVE_CLIENT_CONFIG=cp ../../../../../../OpenSRF/examples/math_xul_client/math/content/conf/client_config.xml . -RETRIEVE_LANG_DTD=cp ../../../../../web/opac/locale/en-US/lang.dtd . +# ILS/Open-ILS/xul/staff_client/Makefile all: build @echo - @echo How do makefiles work again? - @echo BUILD = ${BUILD} - touch application.ini + @echo -#build: generated open-ils patron circ -build: generated open-ils custom +build: build_dir generated open-ils custom stamp @echo - @echo Everything before packaging + @echo + @echo To test the staff client: + @echo \tcd build/ + @echo \txulrunner application.ini -package: open_ils_staff_client.xpi +build_dir: @echo - @echo Packaging + @echo '********************************************************* Creating and populating build/ ' + mkdir -p build/ + cp -R chrome build/ + cp application.ini build/ + external/prune_dirs.sh build/ stamp: - sed -i s/^Version=.\*/Version=${VERSION}/ application.ini - sed -i s/^BuildID=.\*/BuildID=${BUILD}/ application.ini - sed -i s/^Name=.\*/Name=${PACKAGE}/ application.ini - sed -i 's/.*<\/em:version>/${VERSION}<\/em:version>/' install.rdf - sed -i 's/.*<\/em:name>/${PACKAGE}<\/em:name>/' install.rdf - sed -i 's/.*<\/em:description>/${DESCRIPTION}<\/em:description>/' install.rdf - sed -i "s/extVersion: '.\*'/extVersion: '${VERSION}'/" install.js - sed -i "s/extFullName: '.\*'/extFullName: '${DESCRIPTION}'/" install.js - sed -i 's/auth\.title ".*"/auth\.title "${DESCRIPTION}"/' chrome/locale/en-US/auth.dtd - sed -i 's/auth\.version ".*"/auth\.version "${PACKAGE} ${VERSION} ${BUILD}"/' chrome/locale/en-US/auth.dtd + @echo + @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "Stamping with Build ID: ${STAFF_CLIENT_BUILD_ID}" ) ; fi + @if [ -z "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "No Build ID for versioning" ) ; fi + @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^Version=.\*/Version=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi + @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^BuildID=.\*/BuildID=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi + @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.xul' -or -name '*.js' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi generated: @echo - @echo These things are installation specific. The staff client is the last thing you should try to build. - (cd chrome/content/conf ; ${RETRIEVE_CLIENT_CONFIG} ); - #(cd chrome/content/OpenILS/util/ ; ${RETRIEVE_FM_ALL} ); - (cd chrome/locale/en-US/ ; ${RETRIEVE_LANG_DTD} ); - external/dtd2js.pl chrome/locale/en-US/lang.dtd > chrome/content/main/lang.js - -symlinks: - ln -sf ../chrome/content/util/ server/ - ln -sf ../../chrome/content/main/constants.js server/main/constants.js - ln -sf ../../chrome/content/OpenILS/data.js server/OpenILS/data.js + @echo '********************************************************* Grabbing lang.dtd from the OPAC code ' + cp ../../../Open-ILS/web/opac/locale/en-US/lang.dtd build/chrome/locale/en-US/ + external/dtd2js.pl build/chrome/locale/en-US/lang.dtd > build/chrome/content/main/lang.js open-ils: - cp ../../../OpenSRF/src/javascript/*.js chrome/content/OpenSRF/ - cp ../../../Open-ILS/web/opac/common/js/*.js chrome/content/OpenILS/util/ - cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/marc* chrome/content/legacy/ - cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/browse* chrome/content/legacy/ - cp ../../../Evergreen/staff_client/chrome/locale/en-US/evergreen/cat.dtd chrome/locale/en-US/ - find chrome/content/legacy/ -type f -name '*.*' -exec sed -i s/evergreen/open_ils_staff_client/g {} \; - -patron: - -circ: + @echo + @echo '********************************************************* Grabbing more OPAC code and legacy code ' + cp ../../../OpenSRF/src/javascript/*.js build/chrome/content/OpenSRF/ + cp ../../../Open-ILS/web/opac/common/js/*.js build/chrome/content/OpenILS/util/ + cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/marc* build/chrome/content/legacy/ + cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/browse* build/chrome/content/legacy/ + cp ../../../Evergreen/staff_client/chrome/locale/en-US/evergreen/cat.dtd build/chrome/locale/en-US/ + find build/chrome/content/legacy/ -type f -name '*.*' -exec sed -i s/evergreen/open_ils_staff_client/g {} \; custom: - #(cd chrome/content/OpenILS/util; cp RemoteRequest.js~ RemoteRequest.js) - -open_ils_staff_client.xpi: open_ils_staff_client.jar @echo - @echo make the xpi file - zip -r open_ils_staff_client.xpi chrome/ defaults/ install.js install.rdf application.ini Makefile LICENSE README -x \*CVS\* > /dev/null - -open_ils_staff_client.jar: build @echo - @echo make the jar file - (cd chrome; zip -r open_ils_staff_client.jar content/ locale/ skin/ -x \*CVS\* > /dev/null ) + @echo '********************************************************* Placeholder for debugging tweaks ' + #(cd chrome/content/OpenILS/util; cp RemoteRequest.js~ RemoteRequest.js) clean: @echo - @echo delete derived files - rm -f open_ils_staff_client.xpi - rm -f chrome/open_ils_staff_client.jar - rm -f chrome/content/legacy/marc* - rm -f chrome/content/legacy/browse* - rm -f chrome/locale/en-US/cat.dtd - rm -f chrome/content/conf/client_config.xml - rm -f chrome/content/OpenSRF/*js - rm -f chrome/content/OpenILS/util/*js + @echo '********************************************************* Removing build/ ' + rm -rf build/ diff --git a/Open-ILS/xul/staff_client/external/dtd2js.pl b/Open-ILS/xul/staff_client/external/dtd2js.pl index 432e28a963..8f98925661 100755 --- a/Open-ILS/xul/staff_client/external/dtd2js.pl +++ b/Open-ILS/xul/staff_client/external/dtd2js.pl @@ -12,6 +12,7 @@ while( $line = <> ) { if ($line =~ //) { print "entities['$1'] = $2;\n"; } else { - print STDERR "Problem with: $line"; + chomp $line; + if ($line) { print STDERR "Problem with: $line\n"; } } } diff --git a/Open-ILS/xul/staff_client/external/prune_dirs.sh b/Open-ILS/xul/staff_client/external/prune_dirs.sh new file mode 100755 index 0000000000..0f418ff602 --- /dev/null +++ b/Open-ILS/xul/staff_client/external/prune_dirs.sh @@ -0,0 +1,4 @@ +#!/bin/bash +find $1 -type d -name CVS -exec rm -rf {} \; 2> /dev/null +find $1 -type d -name OPEN_ILS_STAFF_CLIENT -exec rm -rf {} \; 2> /dev/null +exit 0 -- 2.43.2