Misc updates to installer rigging
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 6 May 2011 19:41:00 +0000 (19:41 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 6 May 2011 19:41:00 +0000 (19:41 +0000)
Fewer spurious errors (extras.nsi, MUI_TEXT)
More checks (makensis, unzip, branding)
Slightly improved Welcome screen

Author: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>

git-svn-id: svn://svn.open-ils.org/ILS/trunk@20446 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/Makefile.am
Open-ILS/xul/staff_client/windowssetup.nsi

index f3e16a6..18b479e 100644 (file)
@@ -26,6 +26,7 @@ export NSIS_WICON=$$(if [ -f client/evergreen.ico ]; then echo '-DWICON'; fi)
 export NSIS_AUTOUPDATE=$$([ -f client/defaults/preferences/autoupdate.js ] && echo '-DAUTOUPDATE')
 export NSIS_DEV=$$([ -f client/defaults/preferences/developers.js ] && echo '-DDEVELOPER')
 export NSIS_PERMACHINE=$$([ -f client/defaults/preferences/aa_per_machine.js ] && echo '-DPERMACHINE')
+export NSIS_EXTRAS=$$([ -f extras.nsi ] && echo '-DEXTRAS')
 # Url taken from http://nsis.sourceforge.net/AccessControl_plug-in
 NSIS_ACCESSCONTROL=http://nsis.sourceforge.net/mediawiki/images/4/4a/AccessControl.zip
 
@@ -253,9 +254,23 @@ generic-client: client_app
 # https://developer.mozilla.org/en/XULRunner/Deploying_XULRunner_1.8
 # for their respective platforms in regards to XULRunner deployment
 
+nsis_check:
+       @echo 'Checking for makensis'
+       @type -P makensis > /dev/null || ( echo 'MAKENSIS NOT FOUND: Cannot continue. Do you need to install the NSIS package?' && exit 1 )
+
+unzip_check:
+       @echo 'Checking for unzip'
+       @type -P unzip > /dev/null || ( echo 'UNZIP NOT FOUND: Cannot continue.' && exit 1 )
+
+branding_check:
+       @echo 'Checking for branding'
+       @[ -f xulrunner-stub.exe ] || echo 'xulrunner-stub.exe not found'
+       @[ -f build/evergreen.ico ] || echo 'build/evergreen.ico not found'
+       @if [ ! -f xulrunner-stub.exe -o ! -f build/evergreen.ico ]; then echo 'Branding incomplete. Did you forget to run "make rigbeta" or "make rigrelease"?'; echo 'You will need to "make rebuild" afterwards.'; exit 1; fi
+
 # Note that I decided to use win/lin channels for ease of coding platform specific updates
 
-win-xulrunner: client_app
+win-xulrunner: unzip_check branding_check client_app
        @echo 'Preparing Windows xulrunner'
        @if [ ! -f ${XULRUNNER_WINFILE} ]; then wget ${XULRUNNER_URL}${XULRUNNER_WINFILE}; fi
        @unzip -q ${XULRUNNER_WINFILE} -dclient
@@ -273,10 +288,10 @@ linux-xulrunner: client_app
 
 # Build a windows installer.
 
-win-client: win-xulrunner
+win-client: nsis_check win-xulrunner
        @if [ "${NSIS_AUTOUPDATE}${NSIS_PERMACHINE}" -a ! -d AccessControl ]; then echo 'Fetching AccessControl Plugin'; wget ${NSIS_ACCESSCONTROL} -O AccessControl.zip; unzip AccessControl.zip; fi
        @echo 'Building installer'
-       @makensis -V2 -DPRODUCT_VERSION="${STAFF_CLIENT_VERSION}" ${NSIS_WICON} ${NSIS_AUTOUPDATE} ${NSIS_DEV} ${NSIS_PERMACHINE} ${NSIS_EXTRAOPTS} windowssetup.nsi
+       @makensis -V2 -DPRODUCT_VERSION="${STAFF_CLIENT_VERSION}" ${NSIS_WICON} ${NSIS_AUTOUPDATE} ${NSIS_DEV} ${NSIS_PERMACHINE} ${NSIS_EXTRAS} ${NSIS_EXTRAOPTS} windowssetup.nsi
        @echo 'Done'
 
 # For linux, just build a tar.bz2 archive
index f2b3164..46c7c36 100644 (file)
 !define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
 !define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
 
+; Make the welcome page a tad less verbose on the name
+; Note: The title bar will still be verbose (full product name + version + "Setup")
+!define MUI_WELCOMEPAGE_TITLE "Welcome to the Evergreen Staff Client ${PRODUCT_VERSION} Setup Wizard"
+
 ; Welcome page
 !insertmacro MUI_PAGE_WELCOME
 ; License page, if we have one
@@ -69,9 +73,7 @@ var ICONS_GROUP
 !insertmacro MUI_UNPAGE_INSTFILES
 
 ; Language files
-!insertmacro MUI_LANGUAGE "Czech"
 !insertmacro MUI_LANGUAGE "English"
-!insertmacro MUI_LANGUAGE "French"
 
 ; MUI end ------
 
@@ -114,9 +116,11 @@ Section "Staff Client" SECMAIN
   CreateShortCut "$DESKTOP\Evergreen Staff Client ${PRODUCT_TAG}.lnk" "$INSTDIR\evergreen.exe"
   
   ; External script for extra things.
+  !ifdef EXTRAS
   !define EXTERNAL_EXTRAS_SECMAIN
   !include /NONFATAL "extras.nsi"
   !undef EXTERNAL_EXTRAS_SECMAIN
+  !endif
 
   !insertmacro MUI_STARTMENU_WRITE_END
 
@@ -208,6 +212,7 @@ Section -Post
 SectionEnd
 
 ; Section descriptions
+!ifdef AUTOUPDATE | DEVELOPER | PERMACHINE
 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
   !insertmacro MUI_DESCRIPTION_TEXT ${SECMAIN} "The Evergreen Staff Client with XULRunner, Required"
   !ifdef AUTOUPDATE
@@ -220,7 +225,7 @@ SectionEnd
   !insertmacro MUI_DESCRIPTION_TEXT ${SECPERMAC}  "Default registration and offline storage to per machine instead of per user"
   !endif
 !insertmacro MUI_FUNCTION_DESCRIPTION_END
-
+!endif
 
 Function un.onUninstSuccess
   HideWindow
@@ -265,9 +270,11 @@ Section Uninstall
   Delete "$SMPROGRAMS\$ICONS_GROUP\Evergreen Staff Client.lnk"
 
   ; External script for removing extra files before we wipe out the install directory
+  !ifdef EXTRAS
   !define EXTERNAL_EXTRAS_UNINSTALL
   !include /NONFATAL "extras.nsi"
   !undef EXTERNAL_EXTRAS_UNINSTALL
+  !endif
 
   RMDir "$SMPROGRAMS\$ICONS_GROUP"
   RMDir /r "$INSTDIR\updates"