Made use of MultiUser.nsh NSIS header...

...to make mixed-mode per-machine/per-user installer thus fixing bug
#12360
This commit is contained in:
Sergey Popov 2008-09-29 16:25:44 +00:00
parent 5e0012f5aa
commit e15f804586

17
packaging/windows/Wesnoth.nsi.in Normal file → Executable file
View file

@ -1,13 +1,14 @@
;--------------------------------
;Include Modern UI
SetCompressor /SOLID lzma
!include "MUI.nsh"
!define MULTIUSER_EXECUTIONLEVEL Highest
!define MULTIUSER_MUI
!define MULTIUSER_INSTALLMODE_COMMANDLINE
!include "MultiUser.nsh"
!include "MUI2.nsh"
;--------------------------------
;General
SetCompressor /SOLID lzma
;Name and file
Name "Battle for Wesnoth"
OutFile "wesnoth-%version-win32.exe"
@ -18,8 +19,6 @@
;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\Battle for Wesnoth\%version" ""
RequestExecutionLevel user
;--------------------------------
;Variables
@ -45,6 +44,7 @@
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "COPYING"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MULTIUSER_PAGE_INSTALLMODE
!insertmacro MUI_PAGE_DIRECTORY
;Start Menu Folder Page Configuration
@ -129,6 +129,7 @@
;because this will make your installer start faster.
!insertmacro MUI_RESERVEFILE_LANGDLL
ReserveFile "${NSISDIR}\Plugins\*.dll"
;--------------------------------
;Installer Sections
@ -168,6 +169,7 @@ SectionEnd
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
!insertmacro MULTIUSER_INIT
FunctionEnd
@ -214,6 +216,7 @@ SectionEnd
Function un.onInit
!insertmacro MULTIUSER_UNINIT
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd