source: tol/windows/NSIS/Tolbase.nsi.template @ 4dd22a0

1941-docker-image-to-testdevel
Last change on this file since 4dd22a0 was 4dd22a0, checked in by Pedro Gea <pgea@…>, 11 years ago

Refs #1827
Cambios en el instalador de TOL (MSVC):

  • Se corrige la versión de google/sparsehash en el sdk
  • Se modifican nombre en el instlador
  • Se añaden los nuevos iconos del instalador/desinstalador
  • Se corrige el desinstalador (no borraba accesos directos)
  • Se corrige el nombre del método .onInit (muestra opciones de lenguaje).

Se podrían revisar aún algunas cuestiones como los mensajes en español que se utilizan.

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@6788 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100644
File size: 4.0 KB
Line 
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
57Name "${APP_DISPLAY_NAME}"
58OutFile "${APP_NAMEV}-win32.exe"
59InstallDir "$PROGRAMFILES\${APP_PUBLISHER}\${APP_NAMEV}"
60InstallDirRegKey HKLM "${APP_DIR_REGKEY}" ""
61ShowInstDetails show
62ShowUnInstDetails show
63
64Function .onInit
65  !insertmacro MUI_LANGDLL_DISPLAY
66FunctionEnd
67
68Section "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
80SectionEnd
81
82Section -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}"
91SectionEnd
92
93
94Function un.onUninstSuccess
95  HideWindow
96  MessageBox MB_ICONINFORMATION|MB_OK "La desinstalación de $(^Name) finalizó satisfactoriamente."
97FunctionEnd
98
99Function 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
103FunctionEnd
104
105Section 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
124SectionEnd
Note: See TracBrowser for help on using the repository browser.