1
; Armagetron Advanced Dedicated Server Setup Script
2
!define PRODUCT_BASENAME "Armagetron Sty+CT"
3
!define PRODUCT_NAME "${PRODUCT_BASENAME} Dedicated Server"
4
!define PRODUCT_VERSION "0.2.9-styct_alpha20120506"
5
!define PRODUCT_PUBLISHER "Armagetron Advanced Team"
6
!define PRODUCT_WEB_SITE "http://armagetronad.sf.net"
7
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_BASENAME}\armagetronad_dedicated.exe"
8
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
9
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
13
; MUI 1.67 compatible ------
17
!define MUI_ABORTWARNING
18
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
19
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
20
!define MUI_WELCOMEFINISHPAGE_BITMAP "banner.bmp"
22
; Language Selection Dialog Settings
23
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
24
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
25
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
26
!define MUI_WELCOMEPAGE_TITLE_3LINES
27
!define MUI_FINISHPAGE_TITLE_3LINES
30
!insertmacro MUI_PAGE_WELCOME
32
!insertmacro MUI_PAGE_LICENSE "COPYING.txt"
34
!insertmacro MUI_PAGE_DIRECTORY
36
!insertmacro MUI_PAGE_INSTFILES
38
!insertmacro MUI_PAGE_FINISH
41
!insertmacro MUI_UNPAGE_CONFIRM
42
!insertmacro MUI_UNPAGE_INSTFILES
45
!insertmacro MUI_LANGUAGE "Dutch"
46
!insertmacro MUI_LANGUAGE "English"
47
!insertmacro MUI_LANGUAGE "French"
48
!insertmacro MUI_LANGUAGE "German"
49
!insertmacro MUI_LANGUAGE "Polish"
50
!insertmacro MUI_LANGUAGE "Spanish"
53
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
57
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
58
OutFile "armagetronad-dedicated-${PRODUCT_VERSION}.win32.exe"
59
InstallDir "$PROGRAMFILES\${PRODUCT_BASENAME} Dedicated"
60
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
62
ShowUnInstDetails show
65
!insertmacro MUI_LANGDLL_DISPLAY
68
Section "MainSection" SEC01
72
File "Armagetron Forums.url"
74
# install desktop entry for current user
75
CreateShortCut "$DESKTOP\${PRODUCT_BASENAME} Server.lnk" "$INSTDIR\armagetronad_dedicated.exe"
77
# install start menu for all users
78
SetShellVarContext all
79
CreateDirectory "$SMPROGRAMS\${PRODUCT_BASENAME}"
80
CreateShortCut "$SMPROGRAMS\${PRODUCT_BASENAME}\Armagetron Forums.lnk" "$INSTDIR\Armagetron Forums.url"
81
File "armagetronad_dedicated.exe"
82
CreateShortCut "$SMPROGRAMS\${PRODUCT_BASENAME}\${PRODUCT_BASENAME} Server.lnk" "$INSTDIR\armagetronad_dedicated.exe"
83
SetOutPath "$INSTDIR\config"
86
SetOutPath "$INSTDIR\config\examples"
87
File ".\config\examples\*.cfg"
88
SetOutPath "$INSTDIR\config\examples\cvs_test"
89
File ".\config\examples\cvs_test\*.cfg"
92
SetOutPath "$INSTDIR\doc"
93
File /nonfatal ".\doc\*.html"
94
CreateShortCut "$SMPROGRAMS\${PRODUCT_BASENAME}\Documentation.lnk" "$INSTDIR\doc\index.html"
95
SetOutPath "$INSTDIR\doc\net"
96
File /nonfatal ".\doc\net\*.html"
97
SetOutPath "$INSTDIR\language"
103
SetOutPath "$INSTDIR\models"
104
File ".\models\*.mod"
105
SetOutPath "$INSTDIR\resource\included"
106
File /r ".\resource\included\*.*"
107
SetOutPath "$INSTDIR\sound"
109
SetOutPath "$INSTDIR\textures"
110
File ".\textures\*.png"
111
File ".\textures\*.jpg"
112
#SetOutPath "$INSTDIR\var"
113
#File ".\var\README.txt"
116
Section -AdditionalIcons
117
CreateShortCut "$SMPROGRAMS\${PRODUCT_BASENAME}\Uninstall ${PRODUCT_BASENAME} Server.lnk" "$INSTDIR\uninst_dedicated.exe"
121
WriteUninstaller "$INSTDIR\uninst_dedicated.exe"
122
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\armagetronad_dedicated.exe"
123
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
124
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst_dedicated.exe"
125
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\armagetronad_dedicated.exe"
126
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
127
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
128
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
132
!insertmacro MUI_UNGETLANGUAGE
136
# uninstall for all users
137
SetShellVarContext all
139
Delete "$INSTDIR\*.txt"
140
Delete "$INSTDIR\*.exe"
141
Delete "$INSTDIR\*.dll"
142
Delete "$INSTDIR\var\README.txt"
143
Delete "$INSTDIR\var\stdout.txt"
145
RMDir /r "$INSTDIR\textures"
146
RMDir /r "$INSTDIR\sound"
147
RMDir /r "$INSTDIR\resource\included"
148
RMDir /r "$INSTDIR\models"
149
RMDir /r "$INSTDIR\language"
150
RMDir /r "$INSTDIR\doc"
151
RMDir /r "$INSTDIR\config\examples"
152
Delete "$INSTDIR\config\settings_visual.cfg"
153
Delete "$INSTDIR\config\settings_dedicated.cfg"
154
Delete "$INSTDIR\config\settings.cfg"
155
Delete "$INSTDIR\config\master.srv"
156
Delete "$INSTDIR\config\default.cfg"
157
Delete "$INSTDIR\config\aiplayers.cfg"
158
Delete "$INSTDIR\armagetronad.exe"
159
Delete "$INSTDIR\Armagetron Forums.url"
162
RMDir "$INSTDIR\resource"
163
RMDir "$INSTDIR\config"
166
Delete "$SMPROGRAMS\${PRODUCT_BASENAME}\Uninstall ${PRODUCT_BASENAME} Server.lnk"
167
Delete "$SMPROGRAMS\${PRODUCT_BASENAME}\Documentation.lnk"
168
Delete "$DESKTOP\${PRODUCT_BASENAME} Server.lnk"
169
Delete "$SMPROGRAMS\${PRODUCT_BASENAME}\${PRODUCT_BASENAME} Server.lnk"
170
Delete "$SMPROGRAMS\${PRODUCT_BASENAME}\Armagetron Forums.lnk"
172
RMDir "$SMPROGRAMS\${PRODUCT_BASENAME}"
174
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
175
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"