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