1 #---------------------------------------------------------
2 # Makefile.am for xul/staff_client
3 ## Process this file with automake to generate Makefile.in
4 #---------------------------------------------------------
6 export STAFF_CLIENT_BUILD_ID = $$(/bin/cat build/BUILD_ID)
7 OPENSRF_JSLIBS = "$(OPENSRF_LIBS)/javascript"
8 CHROME_LOCALES = $$(ls -1 chrome/locale)
9 SKIN_CSS = $$(ls -1 server/skin/*css | sed -e "s/.css/_custom.css/")
11 install-exec-local: build
13 build: build_dir chrome2remote generated custom_skins open-ils stamp
14 @echo To test the staff client:
16 @echo " xulrunner application.ini"
19 @echo ' * Creating and populating build/ '
24 cp -R components build/
25 cp application.ini build/
26 cp -R build/chrome/content/util/ build/server/
27 cp -R build/chrome/content/auth/ build/server/
28 cp build/chrome/content/main/constants.js build/server/main/constants.js
29 cp build/chrome/content/main/simple_auth.xul build/server/main/simple_auth.xul
30 cp build/chrome/content/main/bindings.xml build/server/main/bindings.xml
31 cp build/chrome/content/OpenILS/data.js build/server/OpenILS/data.js
32 cp build/chrome/content/OpenILS/global_util.js build/server/OpenILS/global_util.js
33 external/prune_dirs.sh build/
35 # Convert chrome to remote for server localization
37 sed -i 's/chrome:\/\/open_ils_staff_client\/locale\//\/xul\/server\/locale\/<\!--#echo var=locale-->\//' build/server/auth/verify_credentials.xul
38 sed -i 's/chrome:\/\/open_ils_staff_client\/locale\//\/xul\/server\/locale\/<\!--#echo var=locale-->\//' build/server/main/simple_auth.xul
39 @for loc in $(CHROME_LOCALES); do \
40 cp -r chrome/locale/$$loc build/server/locale/. ; \
44 @/bin/date +"%Y%m%d.%H%M%S" > build/BUILD_ID
45 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "Stamping with Build ID: ${STAFF_CLIENT_BUILD_ID}" ; echo ${STAFF_CLIENT_BUILD_ID} > build/BUILD_ID ) ; fi
46 @if [ -z "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "No Build ID for versioning" ; echo "none" > build/BUILD_ID ) ; fi
47 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^Version=.\*/Version=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi
48 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^BuildID=.\*/BuildID=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi
49 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.css' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
50 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.xul' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
51 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.html' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
52 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.xhtml' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
53 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.js' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
54 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.xml' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
57 @echo ' * Grabbing lang.dtd from the OPAC code '
58 cp @top_srcdir@/Open-ILS/web/opac/locale/en-US/lang.dtd build/chrome/locale/en-US/
61 @echo ' * Grabbing more OPAC code and legacy code and custom code'
62 cp @top_srcdir@/Open-ILS/web/opac/common/js/*.js build/chrome/content/OpenILS/util/
63 cp $(OPENSRF_JSLIBS)/*.js build/chrome/content/OpenILS/util/
64 external/prune_dirs.sh build/
67 @for skin in $(SKIN_CSS); do \
68 if [ ! -f "$$skin" ]; then touch build/"$$skin"; fi \