gajim.nsi 29.9 KB
Newer Older
js's avatar
js committed
1 2 3 4 5 6
!include "MUI2.nsh"

Name "Gajim"
OutFile "Gajim.exe"
SetCompressor /final /solid lzma

7 8
!define myAppName "Gajim"

js's avatar
js committed
9 10
InstallDir "$PROGRAMFILES\Gajim"
InstallDirRegKey HKCU "Software\Gajim" ""
11
RequestExecutionLevel admin
js's avatar
js committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

Var StartMenuFolder

!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "data\pixmaps\nsis_header.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP "data\pixmaps\nsis_wizard.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "data\pixmaps\nsis_wizard.bmp"
;!define MUI_COMPONENTSPAGE_CHECKBITMAP "${NSISDIR}\Contrib\Graphics\Checks\colorful.bmp"
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_ABORTWARNING

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "COPYING"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Gajim"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
!insertmacro MUI_PAGE_INSTFILES
js's avatar
js committed
34
!define MUI_FINISHPAGE_RUN "$INSTDIR\bin\Gajim.exe"
js's avatar
js committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_RESERVEFILE_LANGDLL

; English
LangString NAME_Emoticons ${LANG_ENGLISH} "Emoticons"
LangString NAME_Iconsets ${LANG_ENGLISH} "Iconsets"
LangString NAME_Languages ${LANG_ENGLISH} "Languages"
LangString NAME_SecLanguagesOther ${LANG_ENGLISH} "Other"
LangString NAME_Themes ${LANG_ENGLISH} "Themes"
js's avatar
js committed
55
LangString NAME_SecDesktopIcon ${LANG_ENGLISH} "Create icon on desktop"
js's avatar
js committed
56 57 58
LangString NAME_SecAutostart ${LANG_ENGLISH} "Start Gajim when Windows starts"
LangString DESC_SecGajim ${LANG_ENGLISH} "Installs the main Gajim files."
LangString DESC_SecGtk ${LANG_ENGLISH} "Installs Gtk+ 2 (necessary to run Gajim)."
js's avatar
js committed
59
LangString DESC_SecDesktopIcon ${LANG_ENGLISH} "If set, a shortcut for Gajim will be created on the desktop."
js's avatar
js committed
60
LangString DESC_SecAutostart ${LANG_ENGLISH} "If set, Gajim will be automatically started when Windows starts."
61 62
LangString STR_Installed ${LANG_ENGLISH} "Apparently, Gajim is already installed."
LangString STR_Uninstall ${LANG_ENGLISH} "Launch Uninstaller"
63 64
LangString STR_Cancel ${LANG_ENGLISH} "Cancel"
LangString STR_Running ${LANG_ENGLISH} "It appears that Gajim is currently running.$\n\
65
		Please quit Gajim and restart the uninstaller."
js's avatar
js committed
66

js's avatar
js committed
67
; French
js's avatar
js committed
68 69
LangString NAME_Emoticons ${LANG_FRENCH} "Emoticnes"
LangString NAME_Iconsets ${LANG_FRENCH} "Bibliothque d'icnes"
70 71
LangString NAME_Languages ${LANG_FRENCH} "Langues"
LangString NAME_SecLanguagesOther ${LANG_FRENCH} "Autre"
js's avatar
js committed
72 73 74
LangString NAME_Themes ${LANG_FRENCH} "Thmes"
LangString NAME_SecDesktopIcon ${LANG_FRENCH} "Crer une icne sur le bureau"
LangString NAME_SecAutostart ${LANG_FRENCH} "Lancer Gajim au dmarrage de Windows"
75
LangString DESC_SecGajim ${LANG_FRENCH} "Installer les fichiers principaux de Gajim."
js's avatar
js committed
76 77 78
LangString DESC_SecGtk ${LANG_FRENCH} "Installer Gtk+ 2 (ncessaire  Gajim)."
LangString DESC_SecDesktopIcon ${LANG_FRENCH} "Si selectionn, un raccourci pour Gajim sera cr sur le bureau."
LangString DESC_SecAutostart ${LANG_FRENCH} "Si activ, Gajim sera automatiquement lanc au dmarrage de Windows."
79 80 81
LangString STR_Installed ${LANG_FRENCH} "Gajim est apparement dja install."
LangString STR_Uninstall ${LANG_FRENCH} "Lancer la Dsinstallation"
LangString STR_Cancel ${LANG_FRENCH} "Annuler"
82 83
LangString STR_Running ${LANG_FRENCH} "Gajim est apparament lanc.$\n\
		Fermez-le et redmarrez le dsinstallateur."
js's avatar
js committed
84 85 86 87 88 89 90

; German
LangString NAME_Emoticons ${LANG_GERMAN} "Emoticons"
LangString NAME_Iconsets ${LANG_GERMAN} "Symbolsets"
LangString NAME_Languages ${LANG_GERMAN} "Sprachen"
LangString NAME_SecLanguagesOther ${LANG_GERMAN} "Sonstige"
LangString NAME_Themes ${LANG_GERMAN} "Designs"
js's avatar
js committed
91
LangString NAME_SecDesktopIcon ${LANG_GERMAN} "Desktop-Icon erstellen"
js's avatar
js committed
92 93 94
LangString NAME_SecAutostart ${LANG_GERMAN} "Gajim mit Windows starten"
LangString DESC_SecGajim ${LANG_GERMAN} "Installiert die Hauptdateien von Gajim."
LangString DESC_SecGtk ${LANG_GERMAN} "Installert Gtk+ 2 (notwendig um Gajim zu benutzen)."
js's avatar
js committed
95
LangString DESC_SecDesktopIcon ${LANG_GERMAN} "Wenn dies aktiviert wird, wird ein Icon fr Gajim auf dem Desktop erstellt."
js's avatar
js committed
96
LangString DESC_SecAutostart ${LANG_GERMAN} "Gajim wird automatisch gestartet, sowie Windows startet, wenn dies aktivier wird."
97 98 99 100 101
LangString STR_Installed ${LANG_GERMAN} "Gajim scheint bereits installiert zu sein."
LangString STR_Uninstall ${LANG_GERMAN} "Deinstallations-Programm starten"
LangString STR_Cancel ${LANG_GERMAN} "Abbrechen"
LangString STR_Running ${LANG_GERMAN} "Es scheint, dass Gajim bereits luft.$\n\
		Bitte beenden Sie es und starten Sie den Installer erneut.."
js's avatar
js committed
102

js's avatar
js committed
103
; Italian
js's avatar
js committed
104
LangString NAME_Emoticons ${LANG_ITALIAN} "Emoticons"
js's avatar
js committed
105 106 107 108 109 110 111 112 113 114
LangString NAME_Iconsets ${LANG_ITALIAN} "Set di icone"
LangString NAME_Languages ${LANG_ITALIAN} "Lingue"
LangString NAME_SecLanguagesOther ${LANG_ITALIAN} "Altre"
LangString NAME_Themes ${LANG_ITALIAN} "Temi"
LangString NAME_SecDesktopIcon ${LANG_ITALIAN} "Crea un'icona sul desktop"
LangString NAME_SecAutostart ${LANG_ITALIAN} "Lancia Gajim quando parte Windows"
LangString DESC_SecGajim ${LANG_ITALIAN} "Installa i file principali di Gajim."
LangString DESC_SecGtk ${LANG_ITALIAN} "Installa Gtk+ 2 (necessario per eseguire Gajim)."
LangString DESC_SecDesktopIcon ${LANG_ITALIAN} "Se selezionato, un'icona verr creata sul desktop."
LangString DESC_SecAutostart ${LANG_ITALIAN} "Se selezionato, Gajim sar eseguito all'avvio di Windows."
115 116 117 118 119
LangString STR_Installed ${LANG_ITALIAN} "Gajim is apparently already installed."
LangString STR_Uninstall ${LANG_ITALIAN} "Launch Uninstall"
LangString STR_Cancel ${LANG_ITALIAN} "Cancel"
LangString STR_Running ${LANG_ITALIAN} "It appears that Gajim is currently running.$\n\
		Close it and restart uninstaller."
js's avatar
js committed
120

121
; Russian
122 123 124 125 126 127 128 129 130 131 132
LangString NAME_Emoticons ${LANG_RUSSIAN} ""
LangString NAME_Iconsets ${LANG_RUSSIAN} " "
LangString NAME_Languages ${LANG_RUSSIAN} ""
LangString NAME_SecLanguagesOther ${LANG_RUSSIAN} ""
LangString NAME_Themes ${LANG_RUSSIAN} ""
LangString NAME_SecDesktopIcon ${LANG_RUSSIAN} "    "
LangString NAME_SecAutostart ${LANG_RUSSIAN} " Gajim   Windows"
LangString DESC_SecGajim ${LANG_RUSSIAN} "   Gajim."
LangString DESC_SecGtk ${LANG_RUSSIAN} " Gtk+ 2 (   Gajim)."
LangString DESC_SecDesktopIcon ${LANG_RUSSIAN} " ,       Gajim."
LangString DESC_SecAutostart ${LANG_RUSSIAN} " , Gajim      Windows."
133 134 135 136 137
LangString STR_Installed ${LANG_RUSSIAN} "Gajim is apparently already installed."
LangString STR_Uninstall ${LANG_RUSSIAN} "Launch Uninstall"
LangString STR_Cancel ${LANG_RUSSIAN} "Cancel"
LangString STR_Running ${LANG_RUSSIAN} "It appears that Gajim is currently running.$\n\
		Close it and restart uninstaller."
js's avatar
js committed
138 139 140 141 142 143 144 145 146 147 148

Section "Gajim" SecGajim
	SectionIn RO

	SetOutPath "$INSTDIR"
	File "AUTHORS"
	File "COPYING"
	File "THANKS"
	File "THANKS.artists"

	SetOutPath "$INSTDIR\bin"
149
	File "bin\cairo._cairo.pyd"
js's avatar
js committed
150
	File "bin\_ctypes.pyd"
151 152
	File "bin\gobject._gobject.pyd"
	File "bin\gtk._gtk.pyd"
js's avatar
js committed
153 154 155 156 157
	File "bin\_hashlib.pyd"
	File "bin\_socket.pyd"
	File "bin\_sqlite3.pyd"
	File "bin\_ssl.pyd"
	File "bin\_win32sysloader.pyd"
158
	File "bin\Crypto.Cipher.AES.pyd"
js's avatar
js committed
159 160
	File "bin\atk.pyd"
	File "bin\bz2.pyd"
161
	File "bin\OpenSSL.crypto.pyd"
js's avatar
js committed
162 163 164 165 166 167 168 169 170 171 172
	File "bin\gajim.exe"
	File "bin\history_manager.exe"
	File "bin\libeay32.dll"
	File "bin\library.zip"
	File "bin\libxml2.dll"
	File "bin\msvcr71.dll"
	File "bin\pangocairo.pyd"
	File "bin\pango.pyd"
	File "bin\pyexpat.pyd"
	File "bin\python25.dll"
	File "bin\pywintypes25.dll"
173
	File "bin\OpenSSL.rand.pyd"
js's avatar
js committed
174 175 176
	File "bin\select.pyd"
	File "bin\sqlite3.dll"
	File "bin\ssleay32.dll"
177
	File "bin\OpenSSL.SSL.pyd"
js's avatar
js committed
178 179 180 181 182 183
	File "bin\unicodedata.pyd"
	File "bin\w9xpopen.exe"
	File "bin\win32api.pyd"
	File "bin\win32file.pyd"
	File "bin\winsound.pyd"
	File "bin\zlib1.dll"
184
	File /r "bin\docutils"
js's avatar
js committed
185 186

	WriteRegStr HKCU "Software\Gajim" "" $INSTDIR
187 188 189
	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayName" "Gajim"
	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "UninstallString" "$INSTDIR\Uninstall.exe"
	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayIcon" "$INSTDIR\bin\Gajim.exe"
190
	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayVersion" "0.12.1"
191
	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "URLInfoAbout" "http://www.gajim.org/"
js's avatar
js committed
192 193 194
	WriteUninstaller "$INSTDIR\Uninstall.exe"

	!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
js's avatar
js committed
195 196 197 198 199
		SetShellVarContext current
		CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
		CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
		CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Change Theme.lnk" "$INSTDIR\bin\gtk\bin\gtkthemeselector.exe"
		SetShellVarContext all
js's avatar
js committed
200 201 202 203 204 205
		CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
		CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
		CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Change Theme.lnk" "$INSTDIR\bin\gtk\bin\gtkthemeselector.exe"
	!insertmacro MUI_STARTMENU_WRITE_END

	SetOutPath "$INSTDIR\data"	
206
	File /r "data\gui"
js's avatar
js committed
207
	File /r "data\moods"
js's avatar
js committed
208
	File /r "data\activities"
js's avatar
js committed
209 210 211 212 213 214 215 216 217 218
	File /r "data\other"
	File /r "data\pixmaps"
	File /r "data\sounds"
SectionEnd

Section "Gtk+ 2" SecGtk
	SectionIn RO
	SetOutPath "$INSTDIR\bin\gtk"
	File /r "bin\gtk\bin"
	File /r "bin\gtk\etc"
Yann Leboulanger's avatar
Yann Leboulanger committed
219 220
	SetOutPath "$INSTDIR\bin\gtk\lib\gtk-2.0\2.10.0"
	File /r "bin\gtk\lib\gtk-2.0\2.10.0\loaders"
js's avatar
js committed
221 222 223 224 225 226
	SetOutPath "$INSTDIR\bin\gtk\lib\gtk-2.0\2.10.0\engines"
	File "bin\gtk\lib\gtk-2.0\2.10.0\engines\libclearlooks.dll"
	File "bin\gtk\lib\gtk-2.0\2.10.0\engines\libpixmap.dll"
	File "bin\gtk\lib\gtk-2.0\2.10.0\engines\libsvg.dll"
	SetOutPath "$INSTDIR\bin\gtk\lib\gtk-2.0\2.10.0"
	SetOutPath "$INSTDIR\bin\gtk\lib"
227 228 229 230
	File "bin\gtk\lib\charset.alias"
	SetOutPath "$INSTDIR\bin\gtk\share"
	File /r "bin\gtk\share\gtkthemeselector"
	File /r "bin\gtk\share\xml"
js's avatar
js committed
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
SectionEnd

SectionGroup $(NAME_Emoticons)

Section "animated" SecEmoticonsAnimated
	SetOutPath "$INSTDIR\data\emoticons"
	File /r "data\emoticons\animated"
SectionEnd

Section "static" SecEmoticonsStatic
	SectionIn RO
	SetOutPath "$INSTDIR\data\emoticons"
	File /r "data\emoticons\static"
SectioNEnd

Section "static-big" SecEmoticonsStaticBig
	SetOutPath "$INSTDIR\data\emoticons"
	File /r "data\emoticons\static-big"
SectionEnd

SectionGroupEnd

SectionGroup $(NAME_Iconsets)

Section "dcraven" SecIconsetsDcraven
	SectionIn RO
	SetOutPath "$INSTDIR\data\iconsets"
	File /r "data\iconsets\dcraven"
SectionEnd

Section "gnome" SecIconsetsGnome
	SetOutPath "$INSTDIR\data\iconsets"
	File /r "data\iconsets\gnome"
SectionEnd

Section "goojim" SecIconsetsGoojim
	SetOutPath "$INSTDIR\data\iconsets"
	File /r "data\iconsets\goojim"
SectionEnd

Section "gota" SecIconsetsGota
	SetOutPath "$INSTDIR\data\iconsets"
	File /r "data\iconsets\gota"
SectionEnd

Section "jabberbulb" SecIconsetsJabberbulb
	SetOutPath "$INSTDIR\data\iconsets"
	File /r "data\iconsets\jabberbulb"
SectionEnd

Section "sun" SecIconsetsSun
	SetOutPath "$INSTDIR\data\iconsets"
	File /r "data\iconsets\sun"
SectionEnd

286
Section "wroop" SecIconsetsWroop
287 288 289 290
	SetOutPath "$INSTDIR\data\iconsets"
	File /r "data\iconsets\wroop"
SectionEnd

js's avatar
js committed
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365
Section "transports" SecIconsetsTransports
	SetOutPath "$INSTDIR\data\iconsets"
	File /r "data\iconsets\transports"
	SectionIn Ro
SectionEnd

SectionGroupEnd

SectionGroup $(NAME_Languages)

Section "English (UK)" SecLanguagesEnglishUK
	SetOutPath "$INSTDIR\po"
	File /r "po\en_GB"
	SetOutPath "$INSTDIR\bin\gtk\share\locale"
	File /r "bin\gtk\share\locale\en_GB"
SectionEnd

Section "French" SecLanguagesFrench
	SetOutPath "$INSTDIR\po"
	File /r "po\fr"
	SetOutPath "$INSTDIR\bin\gtk\share\locale"
	File /r "bin\gtk\share\locale\fr"
SectionEnd

Section "German" SecLanguagesGerman
	SetOutPath "$INSTDIR\po"
	File /r "po\de"
	SetOutPath "$INSTDIR\bin\gtk\share\locale"
	File /r "bin\gtk\share\locale\de"
SectionEnd

Section "Italian" SecLanguagesItalian
	SetOutPath "$INSTDIR\po"
	File /r "po\it"
	SetOutPath "$INSTDIR\bin\gtk\share\locale"
	File /r "bin\gtk\share\locale\it"
SectionEnd

Section "Spanish" SecLanguagesSpanish
	SetOutPath "$INSTDIR\po"
	File /r "po\es"
	SetOutPath "$INSTDIR\bin\gtk\share\locale"
	File /r "bin\gtk\share\locale\es"
SectionEnd

Section "Russian" SecLanguagesRussian
	SetOutPath "$INSTDIR\po"
	File /r "po\ru"
	SetOutPath "$INSTDIR\bin\gtk\share\locale"
	File /r "bin\gtk\share\locale\ru"
SectionEnd

Section $(NAME_SecLanguagesOther) SecLanguagesOther
	SetOutPath "$INSTDIR\po"
	File /r "po\be"
	File /r "po\be@latin"
	File /r "po\bg"
	File /r "po\br"
	File /r "po\cs"
	File /r "po\da"
	File /r "po\el"
	File /r "po\eo"
	File /r "po\eu"
	File /r "po\gl"
	File /r "po\hr"
	File /r "po\lt"
	File /r "po\nb"
	File /r "po\nl"
	File /r "po\no"
	File /r "po\pl"
	File /r "po\pt"
	File /r "po\pt_BR"
	File /r "po\sk"
	File /r "po\sr"
	File /r "po\sr@Latn"
366
	File /r "po\sv"
367
	File /r "po\uk"
js's avatar
js committed
368 369
	File /r "po\zh_CN"
	SetOutPath "$INSTDIR\bin\gtk\share\locale"
370 371 372 373 374 375 376
	File /r "bin\gtk\share\locale\af"
	File /r "bin\gtk\share\locale\am"
	File /r "bin\gtk\share\locale\ang"
	File /r "bin\gtk\share\locale\ar"
	File /r "bin\gtk\share\locale\as"
	File /r "bin\gtk\share\locale\az"
	File /r "bin\gtk\share\locale\az_IR"
js's avatar
js committed
377
	File /r "bin\gtk\share\locale\be"
378
	File /r "bin\gtk\share\locale\be@latin"
js's avatar
js committed
379
	File /r "bin\gtk\share\locale\bg"
380 381
	File /r "bin\gtk\share\locale\bn"
	File /r "bin\gtk\share\locale\bn_IN"
js's avatar
js committed
382
	File /r "bin\gtk\share\locale\br"
383 384 385
	File /r "bin\gtk\share\locale\bs"
	File /r "bin\gtk\share\locale\ca"
	File /r "bin\gtk\share\locale\ca@valencia"
js's avatar
js committed
386
	File /r "bin\gtk\share\locale\cs"
387 388 389
	File /r "bin\gtk\share\locale\cy"
	File /r "bin\gtk\share\locale\da"
	File /r "bin\gtk\share\locale\dz"
js's avatar
js committed
390
	File /r "bin\gtk\share\locale\el"
391
	File /r "bin\gtk\share\locale\en_CA"
js's avatar
js committed
392
	File /r "bin\gtk\share\locale\eo"
393
	File /r "bin\gtk\share\locale\et"
js's avatar
js committed
394
	File /r "bin\gtk\share\locale\eu"
395 396 397 398 399 400 401
	File /r "bin\gtk\share\locale\fa"
	File /r "bin\gtk\share\locale\fi"
	File /r "bin\gtk\share\locale\ga"
	File /r "bin\gtk\share\locale\gl"
	File /r "bin\gtk\share\locale\gu"
	File /r "bin\gtk\share\locale\he"
	File /r "bin\gtk\share\locale\hi"
js's avatar
js committed
402
	File /r "bin\gtk\share\locale\hr"
403 404 405 406 407 408 409 410 411 412 413 414 415 416
	File /r "bin\gtk\share\locale\hu"
	File /r "bin\gtk\share\locale\hy"
	File /r "bin\gtk\share\locale\ia"
	File /r "bin\gtk\share\locale\id"
	File /r "bin\gtk\share\locale\io"
	File /r "bin\gtk\share\locale\is"
	File /r "bin\gtk\share\locale\ja"
	File /r "bin\gtk\share\locale\ka"
	File /r "bin\gtk\share\locale\kn"
	File /r "bin\gtk\share\locale\ko"
	File /r "bin\gtk\share\locale\ku"
	File /r "bin\gtk\share\locale\li"
	File /r "bin\gtk\share\locale\lt"
	File /r "bin\gtk\share\locale\lv"
js's avatar
js committed
417
	File /r "bin\gtk\share\locale\mai"
418 419 420 421 422 423 424
	File /r "bin\gtk\share\locale\mg"
	File /r "bin\gtk\share\locale\mi"
	File /r "bin\gtk\share\locale\mk"
	File /r "bin\gtk\share\locale\ml"
	File /r "bin\gtk\share\locale\mn"
	File /r "bin\gtk\share\locale\mr"
	File /r "bin\gtk\share\locale\ms"
js's avatar
js committed
425
	File /r "bin\gtk\share\locale\nb"
426
	File /r "bin\gtk\share\locale\ne"
js's avatar
js committed
427
	File /r "bin\gtk\share\locale\nl"
428 429 430 431 432
	File /r "bin\gtk\share\locale\nn"
	File /r "bin\gtk\share\locale\nso"
	File /r "bin\gtk\share\locale\oc"
	File /r "bin\gtk\share\locale\or"
	File /r "bin\gtk\share\locale\pa"
js's avatar
js committed
433
	File /r "bin\gtk\share\locale\pl"
js's avatar
js committed
434
	File /r "bin\gtk\share\locale\ps"
js's avatar
js committed
435 436
	File /r "bin\gtk\share\locale\pt"
	File /r "bin\gtk\share\locale\pt_BR"
437 438 439
	File /r "bin\gtk\share\locale\ro"
	File /r "bin\gtk\share\locale\rw"
	File /r "bin\gtk\share\locale\si"
js's avatar
js committed
440
	File /r "bin\gtk\share\locale\sk"
441 442
	File /r "bin\gtk\share\locale\sl"
	File /r "bin\gtk\share\locale\sq"
js's avatar
js committed
443
	File /r "bin\gtk\share\locale\sr"
444
	File /r "bin\gtk\share\locale\sr@ije"
js's avatar
js committed
445
	File /r "bin\gtk\share\locale\sr@latin"
js's avatar
js committed
446
	File /r "bin\gtk\share\locale\sv"
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462
	File /r "bin\gtk\share\locale\ta"
	File /r "bin\gtk\share\locale\te"
	File /r "bin\gtk\share\locale\th"
	File /r "bin\gtk\share\locale\tk"
	File /r "bin\gtk\share\locale\tl"
	File /r "bin\gtk\share\locale\tr"
	File /r "bin\gtk\share\locale\tt"
	File /r "bin\gtk\share\locale\ug"
	File /r "bin\gtk\share\locale\uk"
	File /r "bin\gtk\share\locale\ur"
	File /r "bin\gtk\share\locale\uz"
	File /r "bin\gtk\share\locale\uz@cyrillic"
	File /r "bin\gtk\share\locale\vi"
	File /r "bin\gtk\share\locale\wa"
	File /r "bin\gtk\share\locale\xh"
	File /r "bin\gtk\share\locale\yi"
js's avatar
js committed
463
	File /r "bin\gtk\share\locale\zh_CN"
464 465
	File /r "bin\gtk\share\locale\zh_HK"
	File /r "bin\gtk\share\locale\zh_TW"
js's avatar
js committed
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501
SectionEnd

SectionGroupEnd

SectionGroup $(NAME_Themes)

Section "Clearlooks" SecThemesClearlooks
	SetOutPath "$INSTDIR\bin\gtk\share\themes"
	File /r "bin\gtk\share\themes\Clearlooks"
SectionEnd

Section "Default GTK" SecThemesDefault
	SetOutPath "$INSTDIR\bin\gtk\share\themes"
	File /r "bin\gtk\share\themes\Default"
SectionEnd

Section "Glossy" SecThemesGlossy
	SetOutPath "$INSTDIR\bin\gtk\share\themes"
	File /r "bin\gtk\share\themes\Glossy"
SectionEnd

Section "Glossy-js" SecThemesGlossyJs
	SectionIn RO
	SetOutPath "$INSTDIR\bin\gtk\share\themes"
	File /r "bin\gtk\share\themes\Glossy-js"
SectionEnd

Section "MS-Windows" SecThemesMSWindows
	SetOutPath "$INSTDIR\bin\gtk\lib\gtk-2.0\2.10.0\engines"
	File "bin\gtk\lib\gtk-2.0\2.10.0\engines\libwimp.dll"
	SetOutPath "$INSTDIR\bin\gtk\share\themes"
	File /r "bin\gtk\share\themes\MS-Windows"
SectionEnd

SectionGroupEnd

js's avatar
js committed
502 503 504 505 506 507
Section $(NAME_SecDesktopIcon) SecDesktopIcon
	SetShellVarContext current
	SetOutPath "$INSTDIR\bin"
	CreateShortCut "$DESKTOP\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
SectionEnd

js's avatar
js committed
508
Section $(NAME_SecAutostart) SecAutostart
js's avatar
js committed
509
	SetShellVarContext current
js's avatar
js committed
510
	SetOutPath "$INSTDIR\bin"
js's avatar
js committed
511 512 513 514 515 516
	CreateShortCut "$SMSTARTUP\Gajim.lnk" "$INSTDIR\bin\Gajim.exe"
SectionEnd

Section "Uninstall"
	RMDir /r "$INSTDIR\bin\gtk\bin"
	RMDir /r "$INSTDIR\bin\gtk\etc"
Yann Leboulanger's avatar
Yann Leboulanger committed
517
	RMDir /r "$INSTDIR\bin\gtk\lib\gtk-2.0\2.10.0\loaders"
js's avatar
js committed
518 519 520 521 522 523 524
	Delete "$INSTDIR\bin\gtk\lib\gtk-2.0\2.10.0\engines\libclearlooks.dll"
	Delete "$INSTDIR\bin\gtk\lib\gtk-2.0\2.10.0\engines\libpixmap.dll"
	Delete "$INSTDIR\bin\gtk\lib\gtk-2.0\2.10.0\engines\libsvg.dll"
	Delete "$INSTDIR\bin\gtk\lib\gtk-2.0\2.10.0\engines\libwimp.dll"
	RMDir "$INSTDIR\bin\gtk\lib\gtk-2.0\2.10.0\engines"
	RMDir "$INSTDIR\bin\gtk\lib\gtk-2.0\2.10.0"
	RMDir "$INSTDIR\bin\gtk\lib\gtk-2.0"
525
	Delete "$INSTDIR\bin\gtk\lib\charset.alias"
js's avatar
js committed
526
	RMDir "$INSTDIR\bin\gtk\lib"
527 528 529 530 531 532 533 534 535 536 537 538 539
	RMDir /r "$INSTDIR\bin\gtk\share\locale\de"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\en_GB"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\es"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\fr"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\it"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ru"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\af"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\am"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ang"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ar"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\as"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\az"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\az_IR"
js's avatar
js committed
540
	RMDir /r "$INSTDIR\bin\gtk\share\locale\be"
541
	RMDir /r "$INSTDIR\bin\gtk\share\locale\be@latin"
js's avatar
js committed
542
	RMDir /r "$INSTDIR\bin\gtk\share\locale\bg"
543 544
	RMDir /r "$INSTDIR\bin\gtk\share\locale\bn"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\bn_IN"
js's avatar
js committed
545
	RMDir /r "$INSTDIR\bin\gtk\share\locale\br"
546 547 548
	RMDir /r "$INSTDIR\bin\gtk\share\locale\bs"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ca"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ca@valencia"
js's avatar
js committed
549
	RMDir /r "$INSTDIR\bin\gtk\share\locale\cs"
550 551 552
	RMDir /r "$INSTDIR\bin\gtk\share\locale\cy"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\da"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\dz"
js's avatar
js committed
553
	RMDir /r "$INSTDIR\bin\gtk\share\locale\el"
554
	RMDir /r "$INSTDIR\bin\gtk\share\locale\en_CA"
js's avatar
js committed
555
	RMDir /r "$INSTDIR\bin\gtk\share\locale\eo"
556
	RMDir /r "$INSTDIR\bin\gtk\share\locale\et"
js's avatar
js committed
557
	RMDir /r "$INSTDIR\bin\gtk\share\locale\eu"
558 559 560 561 562 563 564
	RMDir /r "$INSTDIR\bin\gtk\share\locale\fa"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\fi"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ga"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\gl"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\gu"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\he"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\hi"
js's avatar
js committed
565
	RMDir /r "$INSTDIR\bin\gtk\share\locale\hr"
566 567 568 569 570 571 572 573 574 575 576 577 578 579
	RMDir /r "$INSTDIR\bin\gtk\share\locale\hu"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\hy"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ia"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\id"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\io"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\is"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ja"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ka"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\kn"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ko"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ku"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\li"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\lt"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\lv"
js's avatar
js committed
580
	RMDir /r "$INSTDIR\bin\gtk\share\locale\mai"
581 582 583 584 585 586 587
	RMDir /r "$INSTDIR\bin\gtk\share\locale\mg"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\mi"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\mk"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ml"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\mn"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\mr"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ms"
js's avatar
js committed
588
	RMDir /r "$INSTDIR\bin\gtk\share\locale\nb"
589
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ne"
js's avatar
js committed
590
	RMDir /r "$INSTDIR\bin\gtk\share\locale\nl"
591 592 593 594 595
	RMDir /r "$INSTDIR\bin\gtk\share\locale\nn"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\nso"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\oc"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\or"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\pa"
js's avatar
js committed
596
	RMDir /r "$INSTDIR\bin\gtk\share\locale\pl"
js's avatar
js committed
597
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ps"
js's avatar
js committed
598 599
	RMDir /r "$INSTDIR\bin\gtk\share\locale\pt"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\pt_BR"
600 601 602
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ro"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\rw"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\si"
js's avatar
js committed
603
	RMDir /r "$INSTDIR\bin\gtk\share\locale\sk"
604 605
	RMDir /r "$INSTDIR\bin\gtk\share\locale\sl"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\sq"
js's avatar
js committed
606
	RMDir /r "$INSTDIR\bin\gtk\share\locale\sr"
607
	RMDir /r "$INSTDIR\bin\gtk\share\locale\sr@ije"
js's avatar
js committed
608
	RMDir /r "$INSTDIR\bin\gtk\share\locale\sr@latin"
js's avatar
js committed
609
	RMDir /r "$INSTDIR\bin\gtk\share\locale\sv"
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ta"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\te"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\th"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\tk"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\tl"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\tr"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\tt"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ug"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\uk"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\ur"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\uz"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\uz@cyrillic"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\vi"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\wa"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\xh"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\yi"
js's avatar
js committed
626
	RMDir /r "$INSTDIR\bin\gtk\share\locale\zh_CN"
627 628
	RMDir /r "$INSTDIR\bin\gtk\share\locale\zh_HK"
	RMDir /r "$INSTDIR\bin\gtk\share\locale\zh_TW"
js's avatar
js committed
629 630 631 632 633 634 635
	RMDir "$INSTDIR\bin\gtk\share\locale"
	RMDir /r "$INSTDIR\bin\gtk\share\themes\Clearlooks"
	RMDir /r "$INSTDIR\bin\gtk\share\themes\Default"
	RMDir /r "$INSTDIR\bin\gtk\share\themes\Glossy"
	RMDir /r "$INSTDIR\bin\gtk\share\themes\Glossy-js"
	RMDir /r "$INSTDIR\bin\gtk\share\themes\MS-Windows"
	RMDir "$INSTDIR\bin\gtk\share\themes"
636 637
	RMDir /r "$INSTDIR\bin\gtk\share\gtkthemeselector"
	RMDir /r "$INSTDIR\bin\gtk\share\xml"
js's avatar
js committed
638 639 640 641 642 643 644 645 646 647 648
	RMDir "$INSTDIR\bin\gtk\share"
	RMDir "$INSTDIR\bin\gtk"
	Delete "$INSTDIR\bin\_ctypes.pyd"
	Delete "$INSTDIR\bin\_hashlib.pyd"
	Delete "$INSTDIR\bin\_socket.pyd"
	Delete "$INSTDIR\bin\_sqlite3.pyd"
	Delete "$INSTDIR\bin\_sqlite.pyd"
	Delete "$INSTDIR\bin\_ssl.pyd"
	Delete "$INSTDIR\bin\_win32sysloader.pyd"
	Delete "$INSTDIR\bin\atk.pyd"
	Delete "$INSTDIR\bin\bz2.pyd"
649 650
	Delete "$INSTDIR\bin\cairo._cairo.pyd"
	Delete "$INSTDIR\bin\Crypto.Cipher.AES.pyd"
js's avatar
js committed
651
	Delete "$INSTDIR\bin\gajim.exe"
652 653
	Delete "$INSTDIR\bin\gobject._gobject.pyd"
	Delete "$INSTDIR\bin\gtk._gtk.pyd"
js's avatar
js committed
654 655 656 657 658
	Delete "$INSTDIR\bin\history_manager.exe"
	Delete "$INSTDIR\bin\libeay32.dll"
	Delete "$INSTDIR\bin\library.zip"
	Delete "$INSTDIR\bin\libxml2.dll"
	Delete "$INSTDIR\bin\msvcr71.dll"
659 660 661
	Delete "$INSTDIR\bin\OpenSSL.crypto.pyd"
	Delete "$INSTDIR\bin\OpenSSL.rand.pyd"
	Delete "$INSTDIR\bin\OpenSSL.SSL.pyd"
js's avatar
js committed
662 663 664 665 666 667 668 669 670 671 672 673 674 675
	Delete "$INSTDIR\bin\pangocairo.pyd"
	Delete "$INSTDIR\bin\pango.pyd"
	Delete "$INSTDIR\bin\pyexpat.pyd"
	Delete "$INSTDIR\bin\python25.dll"
	Delete "$INSTDIR\bin\pywintypes25.dll"
	Delete "$INSTDIR\bin\select.pyd"
	Delete "$INSTDIR\bin\sqlite3.dll"
	Delete "$INSTDIR\bin\ssleay32.dll"
	Delete "$INSTDIR\bin\unicodedata.pyd"
	Delete "$INSTDIR\bin\w9xpopen.exe"
	Delete "$INSTDIR\bin\win32api.pyd"
	Delete "$INSTDIR\bin\win32file.pyd"
	Delete "$INSTDIR\bin\winsound.pyd"
	Delete "$INSTDIR\bin\zlib1.dll"
676
	RMDir /r "$INSTDIR\bin\docutils"
js's avatar
js committed
677
	RMDir "$INSTDIR\bin"
678
	RMDir /r "$INSTDIR\data\gui"
js's avatar
js committed
679
	RMDir /r "$INSTDIR\data\moods"
js's avatar
js committed
680
	RMDir /r "$INSTDIR\data\activities"
js's avatar
js committed
681 682 683 684 685 686 687 688 689 690 691 692 693
	RMDir /r "$INSTDIR\data\other"
	RMDir /r "$INSTDIR\data\pixmaps"
	RMDir /r "$INSTDIR\data\sounds"
	RMDir /r "$INSTDIR\data\emoticons\animated"
	RMDir /r "$INSTDIR\data\emoticons\static"
	RMDir /r "$INSTDIR\data\emoticons\static-big"
	RMDir "$INSTDIR\data\emoticons"
	RMDir /r "$INSTDIR\data\iconsets\dcraven"
	RMDir /r "$INSTDIR\data\iconsets\gnome"
	RMDir /r "$INSTDIR\data\iconsets\goojim"
	RMDir /r "$INSTDIR\data\iconsets\gota"
	RMDir /r "$INSTDIR\data\iconsets\jabberbulb"
	RMDir /r "$INSTDIR\data\iconsets\sun"
694
	RMDir /r "$INSTDIR\data\iconsets\wroop"
js's avatar
js committed
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724
	RMDir /r "$INSTDIR\data\iconsets\transports"
	RMDir "$INSTDIR\data\iconsets"
	RMDir "$INSTDIR\data"
	RMDir /r "$INSTDIR\po\be"
	RMDir /r "$INSTDIR\po\be@latin"
	RMDir /r "$INSTDIR\po\bg"
	RMDir /r "$INSTDIR\po\br"
	RMDir /r "$INSTDIR\po\cs"
	RMDir /r "$INSTDIR\po\da"
	RMDir /r "$INSTDIR\po\de"
	RMDir /r "$INSTDIR\po\el"
	RMDir /r "$INSTDIR\po\en_GB"
	RMDir /r "$INSTDIR\po\eo"
	RMDir /r "$INSTDIR\po\es"
	RMDir /r "$INSTDIR\po\eu"
	RMDir /r "$INSTDIR\po\fr"
	RMDir /r "$INSTDIR\po\gl"
	RMDir /r "$INSTDIR\po\hr"
	RMDir /r "$INSTDIR\po\it"
	RMDir /r "$INSTDIR\po\lt"
	RMDir /r "$INSTDIR\po\nb"
	RMDir /r "$INSTDIR\po\nl"
	RMDir /r "$INSTDIR\po\no"
	RMDir /r "$INSTDIR\po\pl"
	RMDir /r "$INSTDIR\po\pt"
	RMDir /r "$INSTDIR\po\pt_BR"
	RMDir /r "$INSTDIR\po\ru"
	RMDir /r "$INSTDIR\po\sk"
	RMDir /r "$INSTDIR\po\sr"
	RMDir /r "$INSTDIR\po\sr@Latn"
js's avatar
js committed
725
	RMDir /r "$INSTDIR\po\sv"
726
	RMDir /r "$INSTDIR\po\uk"
js's avatar
js committed
727 728 729 730 731 732 733 734 735 736 737
	RMDir /r "$INSTDIR\po\zh_CN"
	RMDir "$INSTDIR\po"
	Delete "$INSTDIR\AUTHORS"
	Delete "$INSTDIR\COPYING"
	Delete "$INSTDIR\THANKS"
	Delete "$INSTDIR\THANKS.artists"
	Delete "$INSTDIR\Uninstall.exe"
	RMDir "$INSTDIR"

	!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder

js's avatar
js committed
738
	SetShellVarContext current
js's avatar
js committed
739 740 741
	Delete "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk"
	Delete "$SMPROGRAMS\$StartMenuFolder\Change Theme.lnk"
	RMDir "$SMPROGRAMS\$StartMenuFolder"
742
	Delete "$DESKTOP\Gajim.lnk"
js's avatar
js committed
743
	Delete "$SMSTARTUP\Gajim.lnk"
js's avatar
js committed
744 745 746 747
	SetShellVarContext all
	Delete "$SMPROGRAMS\$StartMenuFolder\Gajim.lnk"
	Delete "$SMPROGRAMS\$StartMenuFolder\Change Theme.lnk"
	RMDir "$SMPROGRAMS\$StartMenuFolder"
js's avatar
js committed
748 749

	DeleteRegKey /ifempty HKCU "Software\Gajim"
js's avatar
js committed
750
	DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim"
js's avatar
js committed
751 752 753 754 755
SectionEnd

!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
	!insertmacro MUI_DESCRIPTION_TEXT ${SecGajim} $(DESC_SecGajim)
	!insertmacro MUI_DESCRIPTION_TEXT ${SecGtk} $(DESC_SecGtk)
js's avatar
js committed
756
	!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktopIcon} $(DESC_SecDesktopIcon)
js's avatar
js committed
757 758 759
	!insertmacro MUI_DESCRIPTION_TEXT ${SecAutostart} $(DESC_SecAutostart)
!insertmacro MUI_FUNCTION_DESCRIPTION_END

760 761 762 763
Function un.onInit
;	Check that Gajim is not running before uninstalling
	FindWindow $0 "gdkWindowToplevel" "Gajim"
	StrCmp $0 0 Remove
764
	MessageBox MB_ICONSTOP|MB_OK $(STR_Running)
765 766 767 768
	Quit
Remove:
FunctionEnd

js's avatar
js committed
769
Function .onInit
770 771 772 773 774 775 776 777
	BringToFront
;	Check if already running
;	If so don't open another but bring to front
	System::Call "kernel32::CreateMutexA(i 0, i 0, t '$(^Name)') i .r0 ?e"
	Pop $0
	StrCmp $0 0 launch
	StrLen $0 "$(^Name)"
	IntOp $0 $0 + 1
778 779 780 781 782
	FindWindow $1 '#32770' '' 0 $1
	IntCmp $1 0 +3
	System::Call "user32::ShowWindow(i r1,i 9) i."         ; If minimized then maximize
	System::Call "user32::SetForegroundWindow(i r1) i."    ; Bring to front
	Abort
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817

launch:
;	Check to see if old install (inno setup) is already installed
	ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gajim_is1" "UninstallString"
;	remove first and last " char
	StrLen $0 $R0
	IntOp $0 $0 - 2
	strcpy $1 $R0 $0 1
	IfFileExists $1 +1 NotInstalled
	messagebox::show MB_DEFBUTTON4|MB_TOPMOST "Gajim" \
		"0,103" \
		$(STR_Installed) \
		$(STR_Uninstall) $(STR_Cancel)
		Pop $R1
	StrCmp $R1 2 Quit +1
	ExecWait '$R0 _?=$INSTDIR' $R2
	StrCmp $R2 0 +1 Quit

NotInstalled:	
;	Check to see if new installer (NSIS)already installed
	ReadRegStr $R3 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "UninstallString"
	IfFileExists $R3 +1 ReallyNotInstalled
	
	messagebox::show MB_DEFBUTTON4|MB_TOPMOST "Gajim" \
		"0,103" \
		$(STR_Installed) \
		$(STR_Uninstall) $(STR_Cancel)
		Pop $R4
	StrCmp $R4 2 Quit +1
	ExecWait '$R3 _?=$INSTDIR' $R5
	StrCmp $R5 0 ReallyNotInstalled Quit
Quit:
	Quit
 
ReallyNotInstalled:
js's avatar
js committed
818 819
	!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd