1 ;--------------------------------
5 ;--------------------------------
7 !define Company
"Nevrax"
8 !define Product
"Ryzom"
9 !define Version
"2.1.0"
11 !define RegistryCat
"HKLM"
12 !define RegistryKey
"Software\${Company}\${Product}"
13 !define Executable
"client_ryzom_rd.exe"
14 !define DstDir
"Output"
15 !define SrcDir
"Ryzom"
16 !define Installer
"ryzom_setup_${Patch}.exe"
18 ;Registry key for uninstaller
19 !define UninstallRegistryRoot
"Software\Microsoft\Windows\CurrentVersion\Uninstall"
20 !define UninstallRegistryKey
"${UninstallRegistryRoot}\${Product}"
22 ;Properly display all languages (Installer will not work on Windows 95, 98 or ME!)
30 OutFile "${DstDir}\${Installer}"
32 ;Default installation folder
33 InstallDir "$PROGRAMFILES\${Product}"
35 ;Get installation folder from registry if available
36 InstallDirRegKey "${RegistryCat}" "${RegistryKey}" "${Product} Install Path"
38 ;Request application privileges for Windows Vista
39 RequestExecutionLevel admin
47 ;--------------------------------
54 ;--------------------------------
57 !define MUI_ICON
"${SrcDir}\ryzom.ico"
58 !define MUI_UNICON
"${SrcDir}\ryzom.ico"
59 !define MUI_HEADERIMAGE
60 !define MUI_HEADERIMAGE_BITMAP
"modern-header.bmp" ; optional
61 !define MUI_WELCOMEFINISHPAGE_BITMAP
"modern-wizard.bmp"
62 !define MUI_UNWELCOMEFINISHPAGE_BITMAP
"modern-wizard.bmp"
63 !define MUI_ABORTWARNING
65 ;Show all languages, despite user's codepage
66 !define MUI_LANGDLL_ALLLANGUAGES
68 ;--------------------------------
69 ;Language Selection Dialog Settings
71 ;Remember the installer language
72 !define MUI_LANGDLL_REGISTRY_ROOT
"${RegistryCat}"
73 !define MUI_LANGDLL_REGISTRY_KEY
"${RegistryKey}"
74 !define MUI_LANGDLL_REGISTRY_VALUENAME
"Language"
76 ;--------------------------------
78 !insertmacro MUI_PAGE_WELCOME
79 !insertmacro MUI_PAGE_DIRECTORY
81 ;Start Menu Folder Page Configuration
82 !define MUI_STARTMENUPAGE_REGISTRY_ROOT
"${RegistryCat}"
83 !define MUI_STARTMENUPAGE_REGISTRY_KEY
"${RegistryKey}"
84 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME
"Start Menu Folder"
86 !insertmacro MUI_PAGE_STARTMENU Application
$STARTMENU_FOLDER
88 !insertmacro MUI_PAGE_INSTFILES
90 !define MUI_FINISHPAGE_RUN
"$INSTDIR\${Executable}"
92 !insertmacro MUI_PAGE_FINISH
94 !insertmacro MUI_UNPAGE_WELCOME
95 !insertmacro MUI_UNPAGE_CONFIRM
96 !insertmacro MUI_UNPAGE_INSTFILES
97 !insertmacro MUI_UNPAGE_FINISH
99 ;--------------------------------
102 !insertmacro MUI_LANGUAGE
"English" ;first language is the default language
103 !insertmacro MUI_LANGUAGE
"French"
104 !insertmacro MUI_LANGUAGE
"German"
105 ;!insertmacro MUI_LANGUAGE "Spanish"
107 ;--------------------------------
110 ;If you are using solid compression, files that are required before
111 ;the actual installation should be stored first in the data block,
112 ;because this will make your installer start faster.
114 !insertmacro MUI_RESERVEFILE_LANGDLL
116 ;--------------------------------
120 LangString MSG_SUPPORT_URL_TITLE
${LANG_FRENCH} "Support"
121 LangString MSG_SUPPORT_URL
${LANG_FRENCH} "http://app.ryzom.com/app_forum/index.php?page=topic/view/22047/1&post149889=fr#1"
122 LangString MSG_HOME_URL_TITLE
${LANG_FRENCH} "${Product} sur le Web"
123 LangString MSG_HOME_URL
${LANG_FRENCH} "http://ryzom.fr"
124 LangString MSG_CONFIRM_DELETE_BACKUPS
${LANG_FRENCH} "Voulez-vous supprimer vos fichiers de sauvegarde ? Appuyer sur Oui pour effacer vos fichiers de sauvegarde."
127 LangString MSG_SUPPORT_URL_TITLE
${LANG_ENGLISH} "Support"
128 LangString MSG_SUPPORT_URL
${LANG_ENGLISH} "http://app.ryzom.com/app_forum/index.php?page=topic/view/22047/1&post149889=en#1"
129 LangString MSG_HOME_URL_TITLE
${LANG_ENGLISH} "${Product} on the Web"
130 LangString MSG_HOME_URL
${LANG_ENGLISH} "http://ryzom.com"
131 LangString MSG_CONFIRM_DELETE_BACKUPS
${LANG_ENGLISH} "Deleting Save Files? Click Yes to delete your own save files."
134 LangString MSG_SUPPORT_URL_TITLE
${LANG_GERMAN} "Support"
135 LangString MSG_SUPPORT_URL
${LANG_GERMAN} "http://app.ryzom.com/app_forum/index.php?page=topic/view/22047/1&post149889=de#1"
136 LangString MSG_HOME_URL_TITLE
${LANG_GERMAN} "${Product} im Internet"
137 LangString MSG_HOME_URL
${LANG_GERMAN} "http://ryzom.de"
138 LangString MSG_CONFIRM_DELETE_BACKUPS
${LANG_GERMAN} "Gespeicherte Dateien löschen? Klicke Ja um die eigenen Dateien zu löschen."
140 ;--------------------------------
143 !macro CreateInternetShortcut FILENAME URL ICONFILE
144 WriteINIStr "${FILENAME}.url" "InternetShortcut" "URL" "${URL}"
145 WriteINIStr "${FILENAME}.url" "InternetShortcut" "IconFile" "${ICONFILE}"
146 WriteINIStr "${FILENAME}.url" "InternetShortcut" "IconIndex" "0"
149 ; ----------------------------------------
152 ;Install for All Users
153 SetShellVarContext all
156 SetOutPath "$INSTDIR\cfg"
157 File /r
"${SrcDir}\cfg\*.*"
159 SetOutPath "$INSTDIR\data"
160 File /r
"${SrcDir}\data\*.*"
162 SetOutPath "$INSTDIR\examples"
163 File /r
"${SrcDir}\examples\*.*"
165 SetOutPath "$INSTDIR\user"
166 File /r
"${SrcDir}\user\*.*"
168 SetOutPath "$INSTDIR"
170 ;Client, configuration and misc files
171 File "${SrcDir}\client_default.cfg"
172 File "${SrcDir}\${Executable}"
173 File "${SrcDir}\configure.bat"
174 File "${SrcDir}\d3dcompiler_43.dll"
175 File "${SrcDir}\d3dx9_43.dll"
176 File "${SrcDir}\fmod.dll"
177 File "${SrcDir}\forum.url"
178 File "${SrcDir}\launch.bat"
179 File "${SrcDir}\msvcp100.dll"
180 File "${SrcDir}\msvcr100.dll"
181 File "${SrcDir}\nel_drv_direct3d_win_r.dll"
182 File "${SrcDir}\nel_drv_fmod_win_r.dll"
183 File "${SrcDir}\nel_drv_opengl_win_r.dll"
184 File "${SrcDir}\ryzom.ico"
185 File "${SrcDir}\ryzom.url"
186 File "${SrcDir}\Ryzom6.ico"
189 WriteUninstaller "$INSTDIR\Uninstall.exe"
191 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
193 ;Create shortcuts in Start Menu
194 CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
195 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
196 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\${Product}.lnk" "$INSTDIR\${Executable}"
199 !insertmacro CreateInternetShortcut
"$SMPROGRAMS\$STARTMENU_FOLDER\$(MSG_SUPPORT_URL_TITLE)" "$(MSG_SUPPORT_URL)" "$INSTDIR\ryzom.ico"
200 !insertmacro CreateInternetShortcut
"$SMPROGRAMS\$STARTMENU_FOLDER\$(MSG_HOME_URL_TITLE)" "$(MSG_HOME_URL)" "$INSTDIR\ryzom.ico"
202 !insertmacro MUI_STARTMENU_WRITE_END
205 CreateShortCut "$DESKTOP\${Product}.lnk" "$INSTDIR\${Executable}"
207 ;Add/Remove Program entry
208 WriteRegStr HKLM "${UninstallRegistryKey}" "DisplayIcon" "$INSTDIR\${Executable},0"
209 WriteRegStr HKLM "${UninstallRegistryKey}" "DisplayName" "${Product}"
210 WriteRegStr HKLM "${UninstallRegistryKey}" "DisplayVersion" "${Version}"
211 WriteRegStr HKLM "${UninstallRegistryKey}" "InstallLocation" "$INSTDIR"
212 WriteRegStr HKLM "${UninstallRegistryKey}" "QuietUninstallString" '"$INSTDIR\Uninstall.exe" /S'
213 WriteRegStr HKLM "${UninstallRegistryKey}" "UninstallString" "$INSTDIR\Uninstall.exe"
214 WriteRegStr HKLM "${UninstallRegistryKey}" "Publisher" "${Company}"
215 WriteRegStr HKLM "${UninstallRegistryKey}" "HelpLink" "$(MSG_SUPPORT_URL)"
216 WriteRegStr HKLM "${UninstallRegistryKey}" "URLInfoAbout" "$(MSG_HOME_URL)"
218 ;Store installation folder
219 WriteRegStr "${RegistryCat}" "${RegistryKey}" "${Product} Install Path" $INSTDIR
222 ;--------------------------------
225 ;Install for All Users
226 SetShellVarContext all
229 RMDir /r
"$INSTDIR\cfg"
230 RMDir /r
"$INSTDIR\data"
231 RMDir /r
"$INSTDIR\examples"
233 ;Temporary directories
234 RMDir /r
"$INSTDIR\cache"
235 RMDir /r
"$INSTDIR\unpack"
237 ;Client, configuration and misc files
238 Delete "$INSTDIR\client_default.cfg"
239 Delete "$INSTDIR\${Executable}"
240 Delete "$INSTDIR\configure.bat"
241 Delete "$INSTDIR\d3dcompiler_43.dll"
242 Delete "$INSTDIR\d3dx9_43.dll"
243 Delete "$INSTDIR\fmod.dll"
244 Delete "$INSTDIR\forum.url"
245 Delete "$INSTDIR\launch.bat"
246 Delete "$INSTDIR\msvcp100.dll"
247 Delete "$INSTDIR\msvcr100.dll"
248 Delete "$INSTDIR\nel_drv_direct3d_win_r.dll"
249 Delete "$INSTDIR\nel_drv_fmod_win_r.dll"
250 Delete "$INSTDIR\nel_drv_opengl_win_r.dll"
251 Delete "$INSTDIR\ryzom.ico"
252 Delete "$INSTDIR\ryzom.url"
253 Delete "$INSTDIR\Ryzom6.ico"
256 Delete "$INSTDIR\Uninstall.exe"
258 MessageBox MB_YESNO "$(MSG_CONFIRM_DELETE_BACKUPS)" IDNO DontDeleteMiscFiles
265 ;Delete directory if empty
268 ;Delete all shortcuts
269 !insertmacro MUI_STARTMENU_GETFOLDER Application
$MUI_TEMP
271 ;Delete Start Menu shortcuts
272 Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
273 Delete "$SMPROGRAMS\$MUI_TEMP\${Product}.lnk"
274 Delete "$SMPROGRAMS\$MUI_TEMP\$(MSG_HOME_URL_TITLE).url"
275 Delete "$SMPROGRAMS\$MUI_TEMP\$(MSG_SUPPORT_URL_TITLE).url"
276 RMDir /r
/REBOOTOK
"$SMPROGRAMS\$MUI_TEMP"
278 ;Delete desktop shortcut
279 Delete "$DESKTOP\${Product}.lnk"
282 DeleteRegKey /ifempty
"${RegistryCat}" "${RegistryKey}"
283 DeleteRegKey "${RegistryCat}" "${UninstallRegistryKey}"
286 ;--------------------------------
290 !insertmacro MUI_LANGDLL_DISPLAY
293 ;--------------------------------
294 ;Uninstaller Functions
297 !insertmacro MUI_UNGETLANGUAGE