aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-04-12 12:31:00 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-04-12 12:31:00 +0000
commita2d3fdea0aea4fc83e15273f00a74ca90c09defd (patch)
tree5f984732d2163ffd149cf018929c9372b9a40a7d /misc
parentbb5ea861aa0a40be8b46b1027c9cd06ee29bc8f3 (diff)
downloadioquake3-aero-a2d3fdea0aea4fc83e15273f00a74ca90c09defd.tar.gz
ioquake3-aero-a2d3fdea0aea4fc83e15273f00a74ca90c09defd.zip
nsis: support proper multi user installation
git-svn-id: svn://svn.icculus.org/quake3/trunk@1520 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'misc')
-rw-r--r--misc/nsis/ioquake3.nsi.in32
1 files changed, 28 insertions, 4 deletions
diff --git a/misc/nsis/ioquake3.nsi.in b/misc/nsis/ioquake3.nsi.in
index 24a9fb4..b37835e 100644
--- a/misc/nsis/ioquake3.nsi.in
+++ b/misc/nsis/ioquake3.nsi.in
@@ -7,6 +7,16 @@
;
; you have to copy SDL.dll and libcurl-4.dll here manually
+!define MULTIUSER_MUI
+!define MULTIUSER_EXECUTIONLEVEL Highest
+!define MULTIUSER_INSTALLMODE_COMMANDLINE
+!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "Software\ioquake3"
+!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME "Install_Mode"
+!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "Software\ioquake3"
+!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME "Install_Dir"
+!define MULTIUSER_INSTALLMODE_INSTDIR "ioquake3"
+!include MultiUser.nsh
+
!include "MUI2.nsh"
!define MUI_ICON "../quake3.ico"
@@ -17,11 +27,13 @@ Name "ioquake3"
OutFile "ioquake3-XXXVERSIONXXX-XXXRELEASEXXX.x86.exe"
; The default installation directory
-InstallDir $PROGRAMFILES\ioquake3
+; set by Multiuser.nsh
+;InstallDir $PROGRAMFILES\ioquake3
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
-InstallDirRegKey HKLM "Software\ioquake3" "Install_Dir"
+; handled by Multiuser.nsh
+;InstallDirRegKey HKLM "Software\ioquake3" "Install_Dir"
;--------------------------------
;Interface Settings
@@ -31,6 +43,7 @@ InstallDirRegKey HKLM "Software\ioquake3" "Install_Dir"
;--------------------------------
;Pages
+!insertmacro MULTIUSER_PAGE_INSTALLMODE
#!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
@@ -46,6 +59,16 @@ InstallDirRegKey HKLM "Software\ioquake3" "Install_Dir"
;--------------------------------
+;--------------------------------
+;Multiuser stuff
+Function .onInit
+ !insertmacro MULTIUSER_INIT
+FunctionEnd
+
+Function un.onInit
+ !insertmacro MULTIUSER_UNINIT
+FunctionEnd
+
; The stuff to install
Section "ioquake3 (required)"
@@ -72,7 +95,8 @@ Section "ioquake3 (required)"
File "../../build/release-mingw32-x86/missionpack/uix86.dll"
; Write the installation path into the registry
- WriteRegStr HKLM SOFTWARE\ioquake3 "Install_Dir" "$INSTDIR"
+ WriteRegStr SHCTX "Software\ioquake3" ${MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME} "$INSTDIR"
+ WriteRegStr SHCTX "Software\ioquake3" ${MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME} "$MultiUser.InstallMode"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "DisplayName" "ioquake3"
@@ -124,7 +148,7 @@ Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3"
- DeleteRegKey HKLM SOFTWARE\ioquake3
+ DeleteRegKey SHCTX "Software\ioquake3"
; Remove files and uninstaller
Delete $INSTDIR\baseq3\cgamex86.dll