changeset 1325:303de3160a83

(issue163) Move all uninstaller specifics into IFDEF WRITE_UNINSTALLER sections
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 14 Oct 2014 18:33:18 +0200
parents b6fb5d347023
children dd3eefda8503
files packaging/trustbridge.nsi
diffstat 1 files changed, 17 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/packaging/trustbridge.nsi	Tue Oct 14 18:11:36 2014 +0200
+++ b/packaging/trustbridge.nsi	Tue Oct 14 18:33:18 2014 +0200
@@ -18,6 +18,10 @@
 
 ;--------------------------------
 ; Includes
+!ifndef WRITE_UNINSTALLER
+!define MULTIUSER_NOUNINSTALL
+!endif
+
 !define MULTIUSER_EXECUTIONLEVEL Highest
 !define MULTIUSER_MUI
 !define MULTIUSER_INSTALLMODE_COMMANDLINE
@@ -49,8 +53,6 @@
 VIAddVersionKey "FileVersion" "${version_number}"
 
 Var StartMenuFolder
-Var douninstcertificates
-Var uninstCertificates
 ;--------------------------------
 ; General
 
@@ -66,11 +68,15 @@
 ; MUI Images / Icons
 !define MUI_HEADERIMAGE
 !define MUI_HEADERIMAGE_BITMAP "resources\header-install.bmp"
-!define MUI_HEADERIMAGE_UNBITMAP "resources\header-uninstall.bmp"
 !define MUI_WELCOMEFINISHPAGE_BITMAP "resources\wizard-install.bmp"
+!define MUI_ICON "resources\install.ico"
+
+!ifdef WRITE_UNINSTALLER
+!define MUI_HEADERIMAGE_UNBITMAP "resources\header-uninstall.bmp"
 !define MUI_UNWELCOMEFINISHPAGE_BITMAP "resources\wizard-uninstall.bmp"
-!define MUI_ICON "resources\install.ico"
 !define MUI_UNICON "resources\uninstall.ico"
+!define MUI_UNFINISHPAGE_NOAUTOCLOSE
+!endif
 
 ; MUI welcome page text
 !define MUI_WELCOMEPAGE_TITLE  "Willkommen zur Installation von TrustBridge ${version_number}"
@@ -81,7 +87,6 @@
 Achtung: Dies ist eine Testversion!"
 
 !define MUI_FINISHPAGE_NOAUTOCLOSE
-!define MUI_UNFINISHPAGE_NOAUTOCLOSE
 
 !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
 !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${productname_short}"
@@ -109,6 +114,8 @@
 !insertmacro MUI_PAGE_FINISH
 
 !ifdef WRITE_UNINSTALLER
+  Var douninstcertificates
+  Var uninstCertificates
   !define MUI_PAGE_CUSTOMFUNCTION_SHOW un.ModifyUnWelcome
   !define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.LeaveUnWelcome
 
@@ -194,10 +201,11 @@
 
 ;--------------------------------
 ; UnInstall Functions
-
-Function "un.onInit"
-  !insertmacro MULTIUSER_UNINIT
-FunctionEnd
+!ifdef WRITE_UNINSTALLER
+  Function "un.onInit"
+    !insertmacro MULTIUSER_UNINIT
+  FunctionEnd
+!endif
 
 Section ""
   StrCmp $is_update '1' wait_a_bit continue

http://wald.intevation.org/projects/trustbridge/