blob: 8be010d8842d3a3aee237a696fd16d2bc0a9ab23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
; NSIS description file for ioquake3 installer
;
; EDIT WITH CARE!
;
; This file is used to automatically build the installers in the
; openSUSE build service, don't break this!
;
; 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"
; The name of the installer
Name "ioquake3"
; The file to write
OutFile "ioquake3-XXXVERSIONXXX-XXXRELEASEXXX.x86.exe"
; The default installation directory
; 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)
; handled by Multiuser.nsh
;InstallDirRegKey HKLM "Software\ioquake3" "Install_Dir"
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
;--------------------------------
;Pages
!insertmacro MULTIUSER_PAGE_INSTALLMODE
#!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;--------------------------------
;Multiuser stuff
Function .onInit
!insertmacro MULTIUSER_INIT
FunctionEnd
Function un.onInit
!insertmacro MULTIUSER_UNINIT
FunctionEnd
; The stuff to install
Section "ioquake3 (required)"
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File "../../build/release-mingw32-x86/ioq3ded.x86.exe"
File "../../build/release-mingw32-x86/ioquake3.x86.exe"
File "../../COPYING.txt"
File "../../README.txt"
File "../../id-readme.txt"
File "../../voip-readme.txt"
SetOutPath "$INSTDIR\baseq3"
File "../../build/release-mingw32-x86/baseq3/cgamex86.dll"
File "../../build/release-mingw32-x86/baseq3/qagamex86.dll"
File "../../build/release-mingw32-x86/baseq3/uix86.dll"
SetOutPath "$INSTDIR\missionpack"
File "../../build/release-mingw32-x86/missionpack/cgamex86.dll"
File "../../build/release-mingw32-x86/missionpack/qagamex86.dll"
File "../../build/release-mingw32-x86/missionpack/uix86.dll"
; Write the installation path into the registry
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 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "DisplayName" "ioquake3"
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "NoModify" 1
WriteRegDWORD SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "NoRepair" 1
WriteUninstaller "uninstall.exe"
SectionEnd
; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts"
CreateDirectory "$SMPROGRAMS\ioquake3"
CreateShortCut "$SMPROGRAMS\ioquake3\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\ioquake3\ioquake3.lnk" "$INSTDIR\ioquake3.x86.exe" "" "$INSTDIR\ioquake3.x86.exe" 0
SectionEnd
Section "SDL.dll"
SetOutPath $INSTDIR
File "SDL.dll"
SectionEnd
Section "libcurl"
SetOutPath $INSTDIR
File "libcurl-4.dll"
SectionEnd
Section "OpenAL-Soft library"
SetOutPath $INSTDIR
File "openal32.dll"
SectionEnd
;--------------------------------
; Uninstaller
Section "Uninstall"
; Remove registry keys
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3"
DeleteRegKey SHCTX "Software\ioquake3"
; Remove files and uninstaller
Delete $INSTDIR\baseq3\cgamex86.dll
Delete $INSTDIR\baseq3\qagamex86.dll
Delete $INSTDIR\baseq3\uix86.dll
Delete $INSTDIR\missionpack\cgamex86.dll
Delete $INSTDIR\missionpack\qagamex86.dll
Delete $INSTDIR\missionpack\uix86.dll
Delete $INSTDIR\ioquake3.x86.exe
Delete $INSTDIR\ioq3ded.x86.exe
Delete $INSTDIR\COPYING.txt
Delete $INSTDIR\README.txt
Delete $INSTDIR\id-readme.txt
Delete $INSTDIR\voip-readme.txt
Delete $INSTDIR\SDL.dll
Delete $INSTDIR\libcurl-4.dll
Delete $INSTDIR\openal32.dll
Delete $INSTDIR\uninstall.exe
; Remove shortcuts, if any
Delete "$SMPROGRAMS\ioquake3\Uninstall.lnk"
Delete "$SMPROGRAMS\ioquake3\ioquake3.lnk"
; Remove directories used
RMDir "$SMPROGRAMS\ioquake3"
RMDir "$INSTDIR\baseq3"
RMDir "$INSTDIR\missionpack"
RMDir "$INSTDIR"
SectionEnd
|