source: tol/windows/NSIS/Tolbase.nsi.template @ 73f32c9

1941-docker-image-to-testdevel
Last change on this file since 73f32c9 was abf9afa, checked in by Jorge Pérez <josp.jorge@…>, 18 years ago

scripts to automate Windows compilation a packaging

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

  • Property mode set to 100644
File size: 3.9 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 "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
56Name "${APP_NAME} ${APP_VERSION}"
57OutFile "${APP_NAMEV}-setup.exe"
58InstallDir "$PROGRAMFILES\${APP_PUBLISHER}\${APP_NAMEV}"
59InstallDirRegKey HKLM "${APP_DIR_REGKEY}" ""
60ShowInstDetails show
61ShowUnInstDetails show
62
63Function .onIniti
64  !insertmacro MUI_LANGDLL_DISPLAY
65FunctionEnd
66
67Section "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 
76SectionEnd
77
78Section -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"
83SectionEnd
84
85Section -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}"
94SectionEnd
95
96
97Function un.onUninstSuccess
98  HideWindow
99  MessageBox MB_ICONINFORMATION|MB_OK "La desinstalación de $(^Name) finalizó satisfactoriamente."
100FunctionEnd
101
102Function 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
106FunctionEnd
107
108Section 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
119SectionEnd
Note: See TracBrowser for help on using the repository browser.