1; NSIS description file for ioquake3 installer
2;
3; EDIT WITH CARE!
4;
5; This file is used to automatically build the installers in the
6; openSUSE build service, don't break this!
7;
8; you have to copy SDL.dll and libcurl-4.dll here manually
9
10; The name of the installer
11Name "ioquake3"
12
13; The file to write
14OutFile "ioquake3-XXXVERSIONXXX-XXXRELEASEXXX.x86.exe"
15
16; The default installation directory
17InstallDir $PROGRAMFILES\ioquake3
18
19; Registry key to check for directory (so if you install again, it will
20; overwrite the old one automatically)
21InstallDirRegKey HKLM "Software\ioquake3" "Install_Dir"
22
23;--------------------------------
24
25; Pages
26
27Page components
28Page directory
29Page instfiles
30
31UninstPage uninstConfirm
32UninstPage instfiles
33
34;--------------------------------
35
36; The stuff to install
37Section "ioquake3 (required)"
38
39  SectionIn RO
40
41  ; Set output path to the installation directory.
42  SetOutPath $INSTDIR
43
44  ; Put file there
45  File "../../build/release-mingw32-x86/ioq3ded.x86.exe"
46  File "../../build/release-mingw32-x86/ioquake3.x86.exe"
47  File "../../COPYING.txt"
48  File "../../README.txt"
49  File "../../id-readme.txt"
50
51  SetOutPath "$INSTDIR\baseq3"
52  File "../../build/release-mingw32-x86/baseq3/cgamex86.dll"
53  File "../../build/release-mingw32-x86/baseq3/qagamex86.dll"
54  File "../../build/release-mingw32-x86/baseq3/uix86.dll"
55  SetOutPath "$INSTDIR\missionpack"
56  File "../../build/release-mingw32-x86/missionpack/cgamex86.dll"
57  File "../../build/release-mingw32-x86/missionpack/qagamex86.dll"
58  File "../../build/release-mingw32-x86/missionpack/uix86.dll"
59
60  ; Write the installation path into the registry
61  WriteRegStr HKLM SOFTWARE\ioquake3 "Install_Dir" "$INSTDIR"
62
63  ; Write the uninstall keys for Windows
64  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "DisplayName" "ioquake3"
65  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "UninstallString" '"$INSTDIR\uninstall.exe"'
66  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "NoModify" 1
67  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "NoRepair" 1
68  WriteUninstaller "uninstall.exe"
69
70SectionEnd
71
72; Optional section (can be disabled by the user)
73Section "Start Menu Shortcuts"
74
75  CreateDirectory "$SMPROGRAMS\ioquake3"
76  CreateShortCut "$SMPROGRAMS\ioquake3\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
77  CreateShortCut "$SMPROGRAMS\ioquake3\ioquake3.lnk" "$INSTDIR\ioquake3.x86.exe" "" "$INSTDIR\ioquake3.x86.exe" 0
78
79SectionEnd
80
81Section "SDL.dll"
82
83  SetOutPath $INSTDIR
84
85  File "SDL.dll"
86
87SectionEnd
88
89Section "libcurl"
90
91  SetOutPath $INSTDIR
92
93  File "libcurl-4.dll"
94
95SectionEnd
96
97;--------------------------------
98
99; Uninstaller
100
101Section "Uninstall"
102
103  ; Remove registry keys
104  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3"
105  DeleteRegKey HKLM SOFTWARE\ioquake3
106
107  ; Remove files and uninstaller
108  Delete $INSTDIR\baseq3\cgamex86.dll
109  Delete $INSTDIR\baseq3\qagamex86.dll
110  Delete $INSTDIR\baseq3\uix86.dll
111  Delete $INSTDIR\missionpack\cgamex86.dll
112  Delete $INSTDIR\missionpack\qagamex86.dll
113  Delete $INSTDIR\missionpack\uix86.dll
114  Delete $INSTDIR\ioquake3.x86.exe
115  Delete $INSTDIR\ioq3ded.x86.exe
116
117  Delete $INSTDIR\COPYING.txt
118  Delete $INSTDIR\README.txt
119  Delete $INSTDIR\id-readme.txt
120
121  Delete $INSTDIR\SDL.dll
122
123  Delete $INSTDIR\libcurl-4.dll
124
125  Delete $INSTDIR\uninstall.exe
126
127  ; Remove shortcuts, if any
128  Delete "$SMPROGRAMS\ioquake3\*.lnk"
129
130  ; Remove directories used
131  RMDir "$SMPROGRAMS\ioquake3"
132  RMDir "$INSTDIR\baseq3"
133  RMDir "$INSTDIR\missionpack"
134  RMDir "$INSTDIR"
135
136SectionEnd
137