Bumping version numbers, adding Upgrade Script and Changelog
[transitory.git] / Open-ILS / xul / staff_client / windowssetup.nsi
index d5077fb..e7e96bb 100644 (file)
@@ -3,7 +3,10 @@
 ; HM NIS Edit Wizard helper defines
 ; Old versions of makensis don't like this, moved to Makefile
 ;!define /file PRODUCT_VERSION "client/VERSION"
-!define PRODUCT_TAG "Trunk"
+!define PRODUCT_TAG "2.3"
+!define PRODUCT_INSTALL_TAG "${PRODUCT_TAG}"
+!define UI_IMAGESET "beta"
+;!define UI_IMAGESET "release"
 !define PRODUCT_NAME "Evergreen Staff Client ${PRODUCT_TAG}"
 !define PRODUCT_PUBLISHER "Evergreen Community"
 !define PRODUCT_WEB_SITE "http://evergreen-ils.org/"
   !define PRODUCT_LICENSE
 !endif
 
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_BITMAP "custom_images\${UI_IMAGESET}\header.bmp"
+!define MUI_WELCOMEFINISHPAGE_BITMAP "custom_images\${UI_IMAGESET}\install.bmp"
+!define MUI_UNWELCOMEFINISHPAGE_BITMAP "custom_images\${UI_IMAGESET}\uninstall.bmp"
+
+; This should improve compression, and solves some zlib related issues with extensions
+SetCompressor /SOLID lzma
+
 ; MUI 1.67 compatible ------
 !include "MUI.nsh"
 
 !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
@@ -61,21 +76,20 @@ var ICONS_GROUP
 !insertmacro MUI_UNPAGE_INSTFILES
 
 ; Language files
-!insertmacro MUI_LANGUAGE "Czech"
 !insertmacro MUI_LANGUAGE "English"
-!insertmacro MUI_LANGUAGE "French"
 
 ; MUI end ------
 
 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
 OutFile "evergreen_staff_client_setup.exe"
-InstallDir "$PROGRAMFILES\Evergreen Staff Client ${PRODUCT_TAG}"
-InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
+InstallDir "$PROGRAMFILES\Evergreen Staff Client ${PRODUCT_INSTALL_TAG}"
+InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "${PRODUCT_INSTALL_TAG}"
 ShowInstDetails show
 ShowUnInstDetails show
 RequestExecutionLevel admin
 
 Section "Staff Client" SECMAIN
+  SetShellVarContext All ; All Users (for shortcuts)
   ; Uninstall old (inno) variant?
   IfFileExists "$INSTDIR/unin000.exe" 0 +3
     ExecWait '"$INSTDIR/unins000.exe" /VERYSILENT'
@@ -105,9 +119,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
 
@@ -199,6 +215,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
@@ -211,7 +228,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
@@ -234,6 +251,7 @@ Function "un.RemoveFileCheck"
 FunctionEnd
 
 Section Uninstall
+  SetShellVarContext All ; All Users (for shortcuts)
   !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
   Delete "$INSTDIR\${PRODUCT_NAME}.url"
   Delete "$INSTDIR\uninst.exe"
@@ -255,9 +273,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"