| 1 | ; Script generated by the HM NIS Edit Script Wizard.
|
|---|
| 2 |
|
|---|
| 3 | ; HM NIS Edit Wizard helper defines
|
|---|
| 4 | !define APP_VERSION "##APP_VERSION##"
|
|---|
| 5 | !define APP_RELEASE "##APP_RELEASE##"
|
|---|
| 6 | !define APP_NAME "TOL (MSVC)"
|
|---|
| 7 | !define APP_NAMEV "tol-msvc-v${APP_VERSION}"
|
|---|
| 8 | !define APP_DISPLAY_NAME "${APP_NAME} ${APP_VERSION}"
|
|---|
| 9 | !define APP_PUBLISHER "Tol-Project"
|
|---|
| 10 | !define APP_WEB_SITE "http://www.tol-project.org"
|
|---|
| 11 | !define APP_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${APP_NAMEV}"
|
|---|
| 12 | !define APP_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAMEV}"
|
|---|
| 13 | !define APP_UNINST_ROOT_KEY "HKLM"
|
|---|
| 14 |
|
|---|
| 15 | ;SetCompressor bzip2
|
|---|
| 16 |
|
|---|
| 17 | ; MUI 1.67 compatible ------
|
|---|
| 18 | !include "MUI.nsh"
|
|---|
| 19 |
|
|---|
| 20 | ; MUI Settings
|
|---|
| 21 | !define MUI_ABORTWARNING
|
|---|
| 22 | !define MUI_ICON "..\..\NSIS\tolbase-install.ico"
|
|---|
| 23 | !define MUI_UNICON "..\..\NSIS\tolbase-uninstall.ico"
|
|---|
| 24 |
|
|---|
| 25 | ; Language Selection Dialog Settings
|
|---|
| 26 | !define MUI_LANGDLL_REGISTRY_ROOT "${APP_UNINST_ROOT_KEY}"
|
|---|
| 27 | !define MUI_LANGDLL_REGISTRY_KEY "${APP_UNINST_KEY}"
|
|---|
| 28 | !define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
|
|---|
| 29 |
|
|---|
| 30 | ; Welcome page
|
|---|
| 31 | !insertmacro MUI_PAGE_WELCOME
|
|---|
| 32 | ; License page
|
|---|
| 33 | !insertmacro MUI_PAGE_LICENSE "..\..\tol\COPYING"
|
|---|
| 34 | ; Directory page
|
|---|
| 35 | !insertmacro MUI_PAGE_DIRECTORY
|
|---|
| 36 | ; Instfiles page
|
|---|
| 37 | !insertmacro MUI_PAGE_INSTFILES
|
|---|
| 38 | ; Finish page
|
|---|
| 39 | !define MUI_FINISHPAGE_RUN "$INSTDIR\bin\tolbase.exe"
|
|---|
| 40 | !insertmacro MUI_PAGE_FINISH
|
|---|
| 41 |
|
|---|
| 42 | ; Uninstaller pages
|
|---|
| 43 | !insertmacro MUI_UNPAGE_INSTFILES
|
|---|
| 44 |
|
|---|
| 45 | ; Language files
|
|---|
| 46 | !insertmacro MUI_LANGUAGE "English"
|
|---|
| 47 | !insertmacro MUI_LANGUAGE "German"
|
|---|
| 48 | !insertmacro MUI_LANGUAGE "Italian"
|
|---|
| 49 | !insertmacro MUI_LANGUAGE "Portuguese"
|
|---|
| 50 | !insertmacro MUI_LANGUAGE "Spanish"
|
|---|
| 51 |
|
|---|
| 52 | ; Reserve files
|
|---|
| 53 | !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
|---|
| 54 |
|
|---|
| 55 | ; MUI end ------
|
|---|
| 56 |
|
|---|
| 57 | Name "${APP_DISPLAY_NAME}"
|
|---|
| 58 | OutFile "${APP_NAMEV}-win32.exe"
|
|---|
| 59 | InstallDir "$PROGRAMFILES\${APP_PUBLISHER}\${APP_NAMEV}"
|
|---|
| 60 | InstallDirRegKey HKLM "${APP_DIR_REGKEY}" ""
|
|---|
| 61 | ShowInstDetails show
|
|---|
| 62 | ShowUnInstDetails show
|
|---|
| 63 |
|
|---|
| 64 | Function .onInit
|
|---|
| 65 | !insertmacro MUI_LANGDLL_DISPLAY
|
|---|
| 66 | FunctionEnd
|
|---|
| 67 |
|
|---|
| 68 | Section "Principal" SEC01
|
|---|
| 69 | SetOverwrite try
|
|---|
| 70 |
|
|---|
| 71 | ##CreateDirAndFiles##
|
|---|
| 72 |
|
|---|
| 73 | SetShellVarContext all
|
|---|
| 74 |
|
|---|
| 75 | CreateDirectory "$SMPROGRAMS\${APP_DISPLAY_NAME}"
|
|---|
| 76 | CreateShortCut "$SMPROGRAMS\${APP_DISPLAY_NAME}\tolbase-msvc-v3.2.lnk" "$INSTDIR\bin\tolbase.exe"
|
|---|
| 77 | WriteINIStr "$SMPROGRAMS\${APP_DISPLAY_NAME}\Tol-Project Site.url" "InternetShortcut" "URL" "${APP_WEB_SITE}"
|
|---|
| 78 | CreateShortCut "$SMPROGRAMS\${APP_DISPLAY_NAME}\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
|---|
| 79 |
|
|---|
| 80 | SectionEnd
|
|---|
| 81 |
|
|---|
| 82 | Section -Post
|
|---|
| 83 | WriteUninstaller "$INSTDIR\Uninstall.exe"
|
|---|
| 84 | WriteRegStr HKLM "${APP_DIR_REGKEY}" "" "$INSTDIR"
|
|---|
| 85 | WriteRegStr ${APP_UNINST_ROOT_KEY} "${APP_UNINST_KEY}" "DisplayName" "$(^Name)"
|
|---|
| 86 | WriteRegStr ${APP_UNINST_ROOT_KEY} "${APP_UNINST_KEY}" "UninstallString" "$INSTDIR\Uninstall.exe"
|
|---|
| 87 | WriteRegStr ${APP_UNINST_ROOT_KEY} "${APP_UNINST_KEY}" "DisplayIcon" "$INSTDIR\lib\toltk\images\tolbase-msvc.ico"
|
|---|
| 88 | WriteRegStr ${APP_UNINST_ROOT_KEY} "${APP_UNINST_KEY}" "DisplayVersion" "${APP_RELEASE}"
|
|---|
| 89 | WriteRegStr ${APP_UNINST_ROOT_KEY} "${APP_UNINST_KEY}" "URLInfoAbout" "${APP_WEB_SITE}"
|
|---|
| 90 | WriteRegStr ${APP_UNINST_ROOT_KEY} "${APP_UNINST_KEY}" "Publisher" "${APP_PUBLISHER}"
|
|---|
| 91 | SectionEnd
|
|---|
| 92 |
|
|---|
| 93 |
|
|---|
| 94 | Function un.onUninstSuccess
|
|---|
| 95 | HideWindow
|
|---|
| 96 | MessageBox MB_ICONINFORMATION|MB_OK "La desinstalación de $(^Name) finalizó satisfactoriamente."
|
|---|
| 97 | FunctionEnd
|
|---|
| 98 |
|
|---|
| 99 | Function un.onInit
|
|---|
| 100 | !insertmacro MUI_UNGETLANGUAGE
|
|---|
| 101 | MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "¿Está completamente seguro que desea desinstalar $(^Name) junto con todos sus componentes?" IDYES +2
|
|---|
| 102 | Abort
|
|---|
| 103 | FunctionEnd
|
|---|
| 104 |
|
|---|
| 105 | Section Uninstall
|
|---|
| 106 | Delete "$INSTDIR\Uninstall.exe"
|
|---|
| 107 | Delete "$INSTDIR\bin\stdlib\tol_release_check.tol"
|
|---|
| 108 |
|
|---|
| 109 | ##DeleteDirAndFiles##
|
|---|
| 110 |
|
|---|
| 111 | RMDir "$INSTDir"
|
|---|
| 112 |
|
|---|
| 113 | SetShellVarContext all
|
|---|
| 114 |
|
|---|
| 115 | Delete "$SMPROGRAMS\${APP_DISPLAY_NAME}\Uninstall.lnk"
|
|---|
| 116 | Delete "$SMPROGRAMS\${APP_DISPLAY_NAME}\tolbase-msvc-v3.2.lnk"
|
|---|
| 117 | Delete "$SMPROGRAMS\${APP_DISPLAY_NAME}\Tol-Project Site.url"
|
|---|
| 118 | RMDir "$SMPROGRAMS\${APP_DISPLAY_NAME}"
|
|---|
| 119 |
|
|---|
| 120 | DeleteRegKey ${APP_UNINST_ROOT_KEY} "${APP_UNINST_KEY}"
|
|---|
| 121 | DeleteRegKey HKLM "${APP_DIR_REGKEY}"
|
|---|
| 122 |
|
|---|
| 123 | SetAutoClose true
|
|---|
| 124 | SectionEnd |
|---|