Changeset 6054 in osm for applications/editors/josm/nsis
- Timestamp:
- 2007-12-13T03:21:16+01:00 (17 years ago)
- Location:
- applications/editors/josm/nsis
- Files:
-
- 4 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/nsis/josm.nsi
r5861 r6054 2 2 ; josm.nsi 3 3 ; 4 5 4 6 5 ; Set the compression mechanism first. … … 16 15 !define DEST "josm" 17 16 18 InstType "JOSM (full install)"19 20 InstType "un.Default (keep Personal Settings and plugins)"21 InstType "un.All (remove all)"22 23 17 ; Used to refresh the display of file association 24 18 !define SHCNE_ASSOCCHANGED 0x08000000 … … 38 32 ; The file to write 39 33 OutFile "${DEST}-setup-${VERSION}.exe" 40 41 ; Uninstall stuff (NSIS 2.08: "\r\n" don't work here)42 !define MUI_UNCONFIRMPAGE_TEXT_TOP "The following JAVA OpenStreetMap editor (JOSM) installation will be uninstalled. Click 'Next' to continue."43 34 44 35 XPStyle on … … 61 52 !define MUI_UNFINISHPAGE_NOAUTOCLOSE 62 53 !define MUI_WELCOMEFINISHPAGE_BITMAP "josm-nsis-brand.bmp" 63 !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of the JAVA OpenStreetMap editor (JOSM).\r\n\r\nBefore starting the installation, make sure any JOSM applications are not running.\r\n\r\nClick 'Next' to continue."54 !define MUI_WELCOMEPAGE_TEXT $(JOSM_WELCOME_TEXT) 64 55 ;!define MUI_FINISHPAGE_LINK "Install WinPcap to be able to capture packets from a network!" 65 56 ;!define MUI_FINISHPAGE_LINK_LOCATION "http://www.winpcap.org" … … 101 92 ; ============================================================================ 102 93 103 !insertmacro MUI_LANGUAGE "English" 94 ;Remember the installer language 95 !define MUI_LANGDLL_REGISTRY_ROOT "HKLM" 96 !define MUI_LANGDLL_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" 97 !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" 98 99 ;; English goes first because its the default. The rest are 100 ;; in alphabetical order (at least the strings actually displayed 101 ;; will be). 102 103 !insertmacro MUI_LANGUAGE "English" 104 !insertmacro MUI_LANGUAGE "German" 105 106 ;-------------------------------- 107 ;Translations 108 109 !define JOSM_DEFAULT_LANGFILE "locale\english.nsh" 110 111 !include "langmacros.nsh" 112 113 !insertmacro JOSM_MACRO_INCLUDE_LANGFILE "ENGLISH" "locale\english.nsh" 114 !insertmacro JOSM_MACRO_INCLUDE_LANGFILE "GERMAN" "locale\german.nsh" 115 116 ; Uninstall stuff (NSIS 2.08: "\r\n" don't work here) 117 !define MUI_UNCONFIRMPAGE_TEXT_TOP ${un.JOSM_UNCONFIRMPAGE_TEXT_TOP} 118 119 ; ============================================================================ 120 ; Installation types 121 ; ============================================================================ 122 123 InstType "$(JOSM_FULL_INSTALL)" 124 125 InstType "un.$(un.JOSM_DEFAULT_UNINSTALL)" 126 InstType "un.$(un.JOSM_FULL_UNINSTALL)" 104 127 105 128 ; ============================================================================ … … 155 178 ; ============================================================================ 156 179 ; The text to prompt the user to enter a directory 157 DirText "Choose a directory in which to install OpenStreeMap."180 DirText $(JOSM_DIR_TEXT) 158 181 159 182 ; The default installation directory … … 192 215 193 216 UpdateIcons.error1_${UPDATEICONS_UNIQUE}: 194 MessageBox MB_OK|MB_ICONSTOP "Can't find 'shell32.dll' library. Impossible to update icons"217 MessageBox MB_OK|MB_ICONSTOP $(JOSM_UPDATEICONS_ERROR1) 195 218 Goto UpdateIcons.quit_${UPDATEICONS_UNIQUE} 196 219 UpdateIcons.error2_${UPDATEICONS_UNIQUE}: 197 MessageBox MB_OK|MB_ICONINFORMATION "You should install the free 'Microsoft Layer for Unicode' to update JOSM file icons"220 MessageBox MB_OK|MB_ICONINFORMATION $(JOSM_UPDATEICONS_ERROR2) 198 221 Goto UpdateIcons.quit_${UPDATEICONS_UNIQUE} 199 222 UpdateIcons.quit_${UPDATEICONS_UNIQUE}: … … 238 261 ;Extract InstallOptions INI files 239 262 ; !insertmacro MUI_INSTALLOPTIONS_EXTRACT "AdditionalTasksPage.ini" 263 !insertmacro MUI_LANGDLL_DISPLAY 264 FunctionEnd 265 266 Function un.onInit 267 268 !insertmacro MUI_UNGETLANGUAGE 269 240 270 FunctionEnd 241 271 … … 279 309 280 310 281 Section "JOSM"SecJosm311 Section $(JOSM_SEC_JOSM) SecJosm 282 312 ;------------------------------------------- 283 313 SectionIn 1 … … 306 336 307 337 ${WriteINIStrNS} $R0 "$APPDATA\JOSM\preferences" "validator.visible" "true" 308 SectionEnd 309 310 311 SectionGroup "Plugins" SecPluginsGroup 312 313 Section "mappaint" SecMappaintPlugin 338 339 SectionEnd 340 341 342 SectionGroup $(JOSM_SEC_PLUGINS_GROUP) SecPluginsGroup 343 344 Section $(JOSM_SEC_MAPPAINT_PLUGIN) SecMappaintPlugin 314 345 ;------------------------------------------- 315 346 SectionIn 1 2 … … 332 363 ;SectionEnd 333 364 334 Section "WMS"SecWMSPlugin365 Section $(JOSM_SEC_WMS_PLUGIN) SecWMSPlugin 335 366 ;------------------------------------------- 336 367 SectionIn 1 2 … … 340 371 SectionEnd 341 372 342 Section "namefinder"SecNamefinderPlugin373 Section $(JOSM_SEC_NAMEFINDER_PLUGIN) SecNamefinderPlugin 343 374 ;------------------------------------------- 344 375 SectionIn 1 2 … … 348 379 SectionEnd 349 380 350 Section "validator"SecValidatorPlugin381 Section $(JOSM_SEC_VALIDATOR_PLUGIN) SecValidatorPlugin 351 382 ;------------------------------------------- 352 383 SectionIn 1 2 … … 358 389 SectionGroupEnd ; "Plugins" 359 390 360 Section "Start Menu Entry"SecStartMenu391 Section $(JOSM_SEC_STARTMENU) SecStartMenu 361 392 ;------------------------------------------- 362 393 SectionIn 1 2 … … 366 397 ; To qoute "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/ch11d.asp": 367 398 ; "Do not include Readme, Help, or Uninstall entries on the Programs menu." 368 CreateShortCut "$SMPROGRAMS\JOSM.lnk" "$INSTDIR\josm.exe" "" "$INSTDIR\josm.exe" 0 "" "" "JAVA OpenStreetMap - Editor"399 CreateShortCut "$SMPROGRAMS\JOSM.lnk" "$INSTDIR\josm.exe" "" "$INSTDIR\josm.exe" 0 "" "" $(JOSM_LINK_TEXT) 369 400 ;SecRequired_skip_StartMenu: 370 401 SectionEnd 371 402 372 Section "Desktop Icon"SecDesktopIcon403 Section $(JOSM_SEC_DESKTOP_ICON) SecDesktopIcon 373 404 ;------------------------------------------- 374 405 ; SectionIn 1 2 … … 383 414 ;StrCmp $0 "0" SecRequired_skip_DesktopIcon 384 415 ;SecRequired_install_DesktopIcon: 385 CreateShortCut "$DESKTOP\JOSM.lnk" "$INSTDIR\josm.exe" "" "$INSTDIR\josm.exe" 0 "" "" "JAVA OpenStreetMap - Editor"416 CreateShortCut "$DESKTOP\JOSM.lnk" "$INSTDIR\josm.exe" "" "$INSTDIR\josm.exe" 0 "" "" $(JOSM_LINK_TEXT) 386 417 ;SecRequired_skip_DesktopIcon: 387 418 SectionEnd 388 419 389 Section "Quick Launch Icon"SecQuickLaunchIcon420 Section $(JOSM_SEC_QUICKLAUNCH_ICON) SecQuickLaunchIcon 390 421 ;------------------------------------------- 391 422 SectionIn 1 2 … … 400 431 ;StrCmp $0 "0" SecRequired_skip_QuickLaunchIcon 401 432 ;SecRequired_install_QuickLaunchIcon: 402 CreateShortCut "$QUICKLAUNCH\JOSM.lnk" "$INSTDIR\josm.exe" "" "$INSTDIR\josm.exe" 0 "" "" "JAVA OpenStreetMap - Editor"433 CreateShortCut "$QUICKLAUNCH\JOSM.lnk" "$INSTDIR\josm.exe" "" "$INSTDIR\josm.exe" 0 "" "" $(JOSM_LINK_TEXT) 403 434 ;SecRequired_skip_QuickLaunchIcon: 404 435 SectionEnd 405 436 406 Section "File Extensions"SecFileExtensions437 Section $(JOSM_SEC_FILE_EXTENSIONS) SecFileExtensions 407 438 ;------------------------------------------- 408 439 SectionIn 1 2 … … 431 462 ; XXX - should better be handled inside JOSM (recent plugin manager is going in the right direction) 432 463 SetShellVarContext current 464 !include LogicLib.nsh 465 ${Switch} $LANGUAGE 466 ${Case} ${LANG_GERMAN} 467 File "..\plugins\dist\lang-de.jar" 468 ${WriteINIStrNS} $R0 "$APPDATA\JOSM\preferences" "plugins" "mappaint,wmsplugin,namefinder,validator,lang-de" 469 ${Break} 470 ${Default} 433 471 ${WriteINIStrNS} $R0 "$APPDATA\JOSM\preferences" "plugins" "mappaint,wmsplugin,namefinder,validator" 434 SectionEnd 435 436 437 Section "Uninstall" un.SecUinstall 472 ${Break} 473 ${EndSwitch} 474 SectionEnd 475 476 477 Section "un.$(un.JOSM_SEC_UNINSTALL)" un.SecUinstall 438 478 ;------------------------------------------- 439 479 … … 445 485 446 486 Delete "$INSTDIR\josm.exe" 487 IfErrors 0 NoJOSMErrorMsg 488 MessageBox MB_OK $(un.JOSM_IN_USE_ERROR) IDOK 0 ;skipped if josm.exe removed 489 Abort $(un.JOSM_IN_USE_ERROR) 490 NoJOSMErrorMsg: 447 491 Delete "$INSTDIR\uninstall.exe" 448 492 Delete "$APPDATA\JOSM\plugins\wmsplugin.jar" … … 453 497 RMDir "$APPDATA\JOSM\plugins" 454 498 RMDir "$APPDATA\JOSM" 455 IfErrors 0 NoJOSMErrorMsg456 MessageBox MB_OK "Please note: josm.exe could not be removed, it's probably in use!" IDOK 0 ;skipped if josm.exe removed457 Abort "Please note: josm.exe could not be removed, it's probably in use! Abort uninstall process!"458 NoJOSMErrorMsg:459 499 460 500 DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" 461 501 DeleteRegKey HKEY_LOCAL_MACHINE "Software\josm.exe" 462 502 DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\josm.exe" 503 504 ; Remove Language preference info 505 DeleteRegKey HKCU "Software/JOSM" ;${MUI_LANGDLL_REGISTRY_ROOT} ${MUI_LANGDLL_REGISTRY_KEY} 463 506 464 507 push $R0 … … 482 525 SectionEnd ; "Uinstall" 483 526 484 Section /o " Un.Personal Settings" un.SecPersonalSettings527 Section /o "un.$(un.JOSM_SEC_PERSONAL_SETTINGS)" un.SecPersonalSettings 485 528 ;------------------------------------------- 486 529 SectionIn 2 … … 493 536 SectionEnd 494 537 495 Section /o " Un.Personal Plugins"un.SecPlugins538 Section /o "un.$(un.JOSM_SEC_PLUGINS)"un.SecPlugins 496 539 ;------------------------------------------- 497 540 SectionIn 2 … … 516 559 ; this test must be done after all other things uninstalled (e.g. Global Settings) 517 560 IfFileExists "$INSTDIR" 0 NoFinalErrorMsg 518 MessageBox MB_OK "Please note: The directory $INSTDIRcould not be removed!"IDOK 0 ; skipped if dir doesn't exist561 MessageBox MB_OK $(un.JOSM_INSTDIR_ERROR) IDOK 0 ; skipped if dir doesn't exist 519 562 NoFinalErrorMsg: 520 563 SectionEnd … … 525 568 ; ============================================================================ 526 569 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN 527 !insertmacro MUI_DESCRIPTION_TEXT ${SecJosm} "JOSM is the JAVA OpenStreetMap editor for .osm files." 528 !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsGroup} "An assortment of useful JOSM plugins." 529 !insertmacro MUI_DESCRIPTION_TEXT ${SecMappaintPlugin} "An alternative renderer for the map with colouring, line thickness, icons after tags." 530 ; !insertmacro MUI_DESCRIPTION_TEXT ${SecOsmarenderPlugin} "Displays the current screen as nicely rendered SVG graphics in FireFox." 531 !insertmacro MUI_DESCRIPTION_TEXT ${SecWMSPlugin} "Display background images from Web Map Service (WMS) sources." 532 !insertmacro MUI_DESCRIPTION_TEXT ${SecNamefinderPlugin} "Add a 'Find places by their name' tab to the download dialog." 533 !insertmacro MUI_DESCRIPTION_TEXT ${SecValidatorPlugin} "Validates edited data if it conforms to common suggestions." 534 !insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} "Add a JOSM start menu entry." 535 !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktopIcon} "Add a JOSM desktop icon." 536 !insertmacro MUI_DESCRIPTION_TEXT ${SecQuickLaunchIcon} "Add a JOSM icon to the quick launch bar." 537 !insertmacro MUI_DESCRIPTION_TEXT ${SecFileExtensions} "Add JOSM file extensions for .osm and .gpx files." 570 !insertmacro MUI_DESCRIPTION_TEXT ${SecJosm} $(JOSM_SECDESC_JOSM) 571 !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsGroup} $(JOSM_SECDESC_PLUGINS_GROUP) 572 !insertmacro MUI_DESCRIPTION_TEXT ${SecMappaintPlugin} $(JOSM_SECDESC_MAPPAINT_PLUGIN) 573 !insertmacro MUI_DESCRIPTION_TEXT ${SecWMSPlugin} $(JOSM_SECDESC_WMS_PLUGIN) 574 !insertmacro MUI_DESCRIPTION_TEXT ${SecNamefinderPlugin} $(JOSM_SECDESC_NAMEFINDER_PLUGIN) 575 !insertmacro MUI_DESCRIPTION_TEXT ${SecValidatorPlugin} $(JOSM_SECDESC_VALIDATOR_PLUGIN) 576 !insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} $(JOSM_SECDESC_STARTMENU) 577 !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktopIcon} $(JOSM_SECDESC_DESKTOP_ICON) 578 !insertmacro MUI_DESCRIPTION_TEXT ${SecQuickLaunchIcon} $(JOSM_SECDESC_QUICKLAUNCH_ICON) 579 !insertmacro MUI_DESCRIPTION_TEXT ${SecFileExtensions} $(JOSM_SECDESC_FILE_EXTENSIONS) 538 580 539 581 … … 541 583 542 584 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN 543 !insertmacro MUI_DESCRIPTION_TEXT ${un.SecUinstall} "Uninstall JOSM."544 !insertmacro MUI_DESCRIPTION_TEXT ${un.SecPersonalSettings} "Uninstall personal settings like your preferences and bookmarks from your profile: $PROFILE."545 !insertmacro MUI_DESCRIPTION_TEXT ${un.SecPlugins} "Uninstall all plugins."585 !insertmacro MUI_DESCRIPTION_TEXT ${un.SecUinstall} $(un.JOSM_SECDESC_UNINSTALL) 586 !insertmacro MUI_DESCRIPTION_TEXT ${un.SecPersonalSettings} $(un.JOSM_SECDESC_PERSONAL_SETTINGS) 587 !insertmacro MUI_DESCRIPTION_TEXT ${un.SecPlugins} $(un.JOSM_SECDESC_PLUGINS) 546 588 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END 547 589
Note:
See TracChangeset
for help on using the changeset viewer.