source: DRBLLiveSetupWizard/drbllive.nsi @ 13

Last change on this file since 13 was 13, checked in by sunny, 17 years ago
File size: 8.3 KB
Line 
1; Script generated by the HM NIS Edit Script Wizard.
2
3; HM NIS Edit Wizard helper defines
4!define PRODUCT_NAME "DRBLLiveHelper"
5!define PRODUCT_VERSION "0.0.2"
6!define PRODUCT_PUBLISHER "NCHC"
7!define PRODUCT_WEB_SITE "http://drbl.nchc.org.tw"
8!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\DRBLLiveHelper.exe"
9!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
10!define PRODUCT_UNINST_ROOT_KEY "HKLM"
11!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
12
13; MUI 1.67 compatible ------
14!include "MUI.nsh"
15
16; MUI Settings
17!define MUI_ABORTWARNING
18!define MUI_ICON "clonezilla_logo_transparent.ico"
19!define MUI_UNICON "clonezilla_logo_transparent.ico"
20
21; Language Selection Dialog Settings
22!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
23!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
24!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
25
26; Welcome page
27!insertmacro MUI_PAGE_WELCOME
28; License page
29!define MUI_LICENSEPAGE_CHECKBOX
30!insertmacro MUI_PAGE_LICENSE "COPYING.txt"
31; Components page
32!insertmacro MUI_PAGE_COMPONENTS
33; Directory page
34!insertmacro MUI_PAGE_DIRECTORY
35; Start menu page
36var ICONS_GROUP
37!define MUI_STARTMENUPAGE_NODISABLE
38!define MUI_STARTMENUPAGE_DEFAULTFOLDER "DRBLLiveHelper"
39!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
40!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
41!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
42!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
43; Instfiles page
44!insertmacro MUI_PAGE_INSTFILES
45; Finish page
46!define MUI_FINISHPAGE_RUN "$INSTDIR\DRBLLiveHelper.exe"
47!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\COPYING.txt"
48!insertmacro MUI_PAGE_FINISH
49
50; Uninstaller pages
51!insertmacro MUI_UNPAGE_INSTFILES
52
53; Language files
54!insertmacro MUI_LANGUAGE "English"
55;!insertmacro MUI_LANGUAGE "TradChinese"
56
57; MUI end ------
58
59Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
60OutFile "DRBLLiveHelperSetup.exe"
61InstallDir "$PROGRAMFILES\DRBLLiveHelper"
62InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
63ShowInstDetails show
64ShowUnInstDetails show
65
66Function .onInit
67  ;!insertmacro MUI_LANGDLL_DISPLAY
68FunctionEnd
69
70Section -Library ;-SEC01
71  CreateDirectory "$INSTDIR\lib"
72  SetOutPath "$INSTDIR\lib"
73  SetOverwrite ifnewer
74  File "lib\syslinux.exe"
75  File "lib\7za.exe"
76
77  CreateDirectory "$INSTDIR\languages"
78  SetOutPath "$INSTDIR\languages"
79  SetOverwrite ifnewer
80  File "languages\Language.txt"
81  File "languages\Language-en.txt"
82  File "languages\Language-fr.txt"
83  File "languages\Language-ja.txt"
84  File "languages\Language-nl.txt"
85  File "languages\Language-zh_tw.txt"
86 
87  SetOutPath "$INSTDIR"
88  File "DRBLLiveHelper.exe"
89  File "COPYING.txt"
90  File "AUTHORS.txt"
91 
92  ;Exec 'RegSvr32 /s "$INSTDIR\Language404.dll"'
93  ;RegDLL "$INSTDIR\Language404.dll"
94; Shortcuts
95  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
96  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
97  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\DRBLLiveHelper.lnk" "$INSTDIR\DRBLLiveHelper.exe"
98  CreateShortCut "$DESKTOP\DRBLLiveHelper.lnk" "$INSTDIR\DRBLLiveHelper.exe"
99  !insertmacro MUI_STARTMENU_WRITE_END
100SectionEnd
101
102Section /o "Source" SEC02
103  CreateDirectory "$INSTDIR\src"
104  SetOutPath "$INSTDIR\src"
105  File "RegkeyModule.bas"
106  File "ReadyDialog.frx"
107  File "ReadyDialog.frm"
108  File "Project.vbw"
109  File "Project.vbp"
110  File "FormatPage.frm"
111  File "FormatPage.frx"
112  File "BootPage.frm"
113  File "BootPage.frx"
114  File "InstallPage.frm"
115  File "InstallPage.frx"
116  File "InstallHPDialog.frx"
117  File "InstallHPDialog.frm"
118  File "FTPModule.bas"
119  File "FormatDialog.frx"
120  File "FormatDialog.frm"
121  File "CommonModule.bas"
122  File "clonezilla_logo_transparent.ico"
123  File "clonezilla_logo_transparent.gif"
124  File "Internationalization.bas"
125  File "COPYING.txt"
126  File "AUTHORS.txt"
127  File "FormatDialog.frm"
128  File "FormatDialog.frx"
129  File "LanguagePage.frm"
130  File "LanguagePage.frx"
131  File "MainModule.bas"
132  File "InstallFM20.frm"
133  File "InstallFM20.frx"
134 
135; Shortcuts
136  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
137  !insertmacro MUI_STARTMENU_WRITE_END
138SectionEnd
139
140Section -AdditionalIcons
141  SetOutPath $INSTDIR
142  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
143  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
144  ;CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
145  CopyFiles "$INSTDIR\${PRODUCT_NAME}.url" "$SMPROGRAMS\$ICONS_GROUP\"
146  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
147 
148  !insertmacro MUI_STARTMENU_WRITE_END
149SectionEnd
150
151Section -Post
152  WriteUninstaller "$INSTDIR\uninst.exe"
153  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\DRBLLiveHelper.exe"
154  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
155  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
156  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\DRBLLiveHelper.exe"
157  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
158  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
159  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
160SectionEnd
161
162; Section descriptions
163!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
164  !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Source Code"
165!insertmacro MUI_FUNCTION_DESCRIPTION_END
166
167
168Function un.onUninstSuccess
169  HideWindow
170  MessageBox MB_ICONINFORMATION|MB_OK "DRBLLiveHelper installer has been removed."
171FunctionEnd
172
173Function un.onInit
174!insertmacro MUI_UNGETLANGUAGE
175  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Do you really want to remove DRBLLiveHelper installer from your computer¡H" IDYES +2
176  Abort
177FunctionEnd
178
179Section Uninstall
180  !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
181  UnRegDLL $INSTDIR\Language404.dll"
182  Delete "$INSTDIR\${PRODUCT_NAME}.url"
183  Delete "$INSTDIR\uninst.exe"
184  Delete "$INSTDIR\src\COPYING.txt"
185  Delete "$INSTDIR\src\AUTHORS.txt"
186  Delete "$INSTDIR\src\clonezilla_logo_transparent.gif"
187  Delete "$INSTDIR\src\clonezilla_logo_transparent.ico"
188  Delete "$INSTDIR\src\CommonModule.bas"
189  Delete "$INSTDIR\src\FormatPage.frm"
190  Delete "$INSTDIR\src\FormatPage.frx"
191  Delete "$INSTDIR\src\BootPage.frm"
192  Delete "$INSTDIR\src\BootPage.frx"
193  Delete "$INSTDIR\src\InstallPage.frm"
194  Delete "$INSTDIR\src\InstallPage.frx"
195  Delete "$INSTDIR\src\FormatDialog.frm"
196  Delete "$INSTDIR\src\FormatDialog.frx"
197  Delete "$INSTDIR\src\FTPModule.bas"
198  Delete "$INSTDIR\src\InstallHPDialog.frm"
199  Delete "$INSTDIR\src\InstallHPDialog.frx"
200  Delete "$INSTDIR\src\Project.vbp"
201  Delete "$INSTDIR\src\Project.vbw"
202  Delete "$INSTDIR\src\ReadyDialog.frm"
203  Delete "$INSTDIR\src\ReadyDialog.frx"
204  Delete "$INSTDIR\src\RegkeyModule.bas"
205  Delete "$INSTDIR\src\Internationalization.bas"
206  Delete "$INSTDIR\src\MainModule.bas"
207  Delete "$INSTDIR\src\InstallFM20.frm"
208  Delete "$INSTDIR\src\InstallFM20.frx"
209  Delete "$INSTDIR\COPYING.txt"
210  Delete "$INSTDIR\AUTHORS.txt"
211  Delete "$INSTDIR\DRBLLiveHelper.exe"
212  Delete "$INSTDIR\lib\7za.exe"
213  Delete "$INSTDIR\lib\syslinux.exe"
214  Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
215  Delete "$SMPROGRAMS\$ICONS_GROUP\${PRODUCT_NAME}.url"
216  Delete "$DESKTOP\DRBLLiveHelper.lnk"
217  Delete "$SMPROGRAMS\$ICONS_GROUP\DRBLLiveHelper.lnk"
218  Delete "$INSTDIR\src\FormatDialog.frm"
219  Delete "$INSTDIR\src\FormatDialog.frx"
220  Delete "$INSTDIR\src\LanguagePage.frm"
221  Delete "$INSTDIR\src\LanguagePage.frx"
222  Delete "$INSTDIR\languages\Language.txt"
223  Delete "$INSTDIR\languages\Language-en.txt"
224  Delete "$INSTDIR\languages\Language-fr.txt"
225  Delete "$INSTDIR\languages\Language-ja.txt"
226  Delete "$INSTDIR\languages\Language-nl.txt"
227  Delete "$INSTDIR\languages\Language-zh_tw.txt"
228
229  RMDir "$SMPROGRAMS\$ICONS_GROUP"
230  RMDir "$INSTDIR\src"
231  RMDir "$INSTDIR\lib"
232  RMDir "$INSTDIR\languages"
233  RMDir "$INSTDIR"
234
235  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
236  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
237  SetAutoClose true
238SectionEnd
Note: See TracBrowser for help on using the repository browser.