ChangeLog update.
[wammu.git] / wammu.nsi
blob0566e3b9021fb078d8bc4e1e4fef0956608f1439
1 ; Script generated by the HM NIS Edit Script Wizard.
2 ; This script is for Unicode version of NSIS (http://www.scratchpaper.com/).
4 ; HM NIS Edit Wizard helper defines
5 !define PRODUCT_NAME "Wammu"
6 !define PRODUCT_INST_NAME "wammu"
7 !define PRODUCT_EXE_NAME "wammu.exe"
8 !define PRODUCT_VERSION "0.30"
9 !define PRODUCT_PUBLISHER "Michal Čihař"
10 !define PRODUCT_WEB_SITE "http://wammu.eu/"
11 !define PRODUCT_SUPPORT_SITE "http://wammu.eu/support/"
12 !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_EXE_NAME}"
13 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
14 !define PRODUCT_UNINST_ROOT_KEY "HKLM"
15 !define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
17 SetCompressor /SOLID lzma
18 SetCompressorDictSize 32
20 ; MUI 1.67 compatible ------
21 !include "MUI.nsh"
23 ; MUI Settings
24 !define MUI_ABORTWARNING
25 !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
26 !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
28 ; Language Selection Dialog Settings
29 !define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
30 !define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
31 !define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
33 ; Welcome page
34 !insertmacro MUI_PAGE_WELCOME
35 ; License page
36 !insertmacro MUI_PAGE_LICENSE "COPYING"
37 ; Components page
38 !insertmacro MUI_PAGE_COMPONENTS
39 ; Directory page
40 !insertmacro MUI_PAGE_DIRECTORY
41 ; Start menu page
42 var ICONS_GROUP
43 !define MUI_STARTMENUPAGE_NODISABLE
44 !define MUI_STARTMENUPAGE_DEFAULTFOLDER "Wammu"
45 !define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
46 !define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
47 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
48 !insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
49 ; Instfiles page
50 !insertmacro MUI_PAGE_INSTFILES
51 ; Finish page
52 !define MUI_FINISHPAGE_RUN "$INSTDIR\${PRODUCT_EXE_NAME}"
53 !insertmacro MUI_PAGE_FINISH
55 ; Uninstaller pages
56 !insertmacro MUI_UNPAGE_CONFIRM
57 !insertmacro MUI_UNPAGE_INSTFILES
59 ; Language files
60 !insertmacro MUI_LANGUAGE "English"
61 !insertmacro MUI_LANGUAGE "Afrikaans"
62 !insertmacro MUI_LANGUAGE "Catalan"
63 !insertmacro MUI_LANGUAGE "Czech"
64 !insertmacro MUI_LANGUAGE "German"
65 !insertmacro MUI_LANGUAGE "Greek"
66 !insertmacro MUI_LANGUAGE "Spanish"
67 !insertmacro MUI_LANGUAGE "Estonian"
68 !insertmacro MUI_LANGUAGE "Finnish"
69 !insertmacro MUI_LANGUAGE "French"
70 !insertmacro MUI_LANGUAGE "Galician"
71 !insertmacro MUI_LANGUAGE "Hebrew"
72 !insertmacro MUI_LANGUAGE "Hungarian"
73 !insertmacro MUI_LANGUAGE "Indonesian"
74 !insertmacro MUI_LANGUAGE "Italian"
75 !insertmacro MUI_LANGUAGE "Korean"
76 !insertmacro MUI_LANGUAGE "Dutch"
77 !insertmacro MUI_LANGUAGE "Polish"
78 !insertmacro MUI_LANGUAGE "PortugueseBR"
79 !insertmacro MUI_LANGUAGE "Russian"
80 !insertmacro MUI_LANGUAGE "Slovak"
81 !insertmacro MUI_LANGUAGE "Swedish"
82 !insertmacro MUI_LANGUAGE "SimpChinese"
83 !insertmacro MUI_LANGUAGE "TradChinese"
85 ; Reserve files
86 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
87 !insertmacro MUI_RESERVEFILE_LANGDLL
89 ; MUI end ------
91 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
92 OutFile "${PRODUCT_INST_NAME}-${PRODUCT_VERSION}-setup.exe"
93 InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
94 InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
95 ShowInstDetails show
96 ShowUnInstDetails show
98 Function .onInit
99 !insertmacro MUI_LANGDLL_DISPLAY
100 FunctionEnd
102 Section "Program" SEC01
103 SetOutPath "$INSTDIR"
104 SetOverwrite ifnewer
105 File /r /x locale dist\*.*
107 ; Shortcuts
108 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
109 CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
110 CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_EXE_NAME}"
111 CreateShortCut "$DESKTOP\Wammu.lnk" "$INSTDIR\${PRODUCT_EXE_NAME}"
112 !insertmacro MUI_STARTMENU_WRITE_END
113 SectionEnd
115 Section "Locales" SEC02
116 SetOutPath "$INSTDIR/share/locale/"
117 File /r dist\share\locale\*.*
119 ; Shortcuts
120 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
121 !insertmacro MUI_STARTMENU_WRITE_END
122 SectionEnd
124 Section -AdditionalIcons
125 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
126 WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
127 CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
128 CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
129 !insertmacro MUI_STARTMENU_WRITE_END
130 SectionEnd
132 Section -Post
133 WriteUninstaller "$INSTDIR\uninst.exe"
134 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\${PRODUCT_EXE_NAME}"
135 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
136 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
137 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\${PRODUCT_EXE_NAME}"
138 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
139 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
140 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "HelpLink" "${PRODUCT_SUPPORT_SITE}"
141 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
142 WriteRegDWord ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "NoModify" 1
143 WriteRegDWord ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "NoRepair" 1
144 SectionEnd
146 ; Section descriptions
147 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
148 !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Main"
149 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Translations..."
150 !insertmacro MUI_FUNCTION_DESCRIPTION_END
153 Function un.onInit
154 !insertmacro MUI_UNGETLANGUAGE
155 FunctionEnd
157 Section Uninstall
158 !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
160 Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
161 Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
162 Delete "$DESKTOP\Wammu.lnk"
163 Delete "$SMPROGRAMS\$ICONS_GROUP\Wammu.lnk"
165 RMDir "$SMPROGRAMS\$ICONS_GROUP"
166 RMDir /r /REBOOTOK "$INSTDIR"
168 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
169 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
170 SetAutoClose true
171 SectionEnd