RCS file: /cvsroot/filezilla/FileZilla Server/source/install/FileZilla Server.nsi,v
retrieving revision 1.36
diff -u -r1.36 FileZilla Server.nsi
|
|
|
14 | 14 | ;-------------------------------- |
15 | 15 | ;Product Info |
16 | 16 | |
17 | | !define VERSION "beta 0.9.4b" ;Define your own software version here |
18 | | Name "FileZilla Server ${VERSION}" ;Define your own software name here |
| 17 | !define PRODUCT_NAME "FileZilla Server" |
| 18 | !define PRODUCT_VERSION "beta 0.9.4b" |
| 19 | !define PRODUCT_UNINSTALL "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" |
| 20 | Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" |
19 | 21 | |
20 | 22 | ;StartOptions Page strings |
21 | 23 | LangString StartOptionsTitle ${LANG_ENGLISH} ": Server startup settings" |
… |
… |
|
24 | 26 | ;Modern UI Configuration |
25 | 27 | |
26 | 28 | !define MUI_ABORTWARNING |
27 | | |
| 29 | |
28 | 30 | !define MUI_ICON "..\res\filezilla server.ico" |
29 | 31 | !define MUI_UNICON "uninstall.ico" |
30 | | |
| 32 | |
31 | 33 | ;-------------------------------- |
32 | 34 | ;Pages |
33 | 35 | |
… |
… |
|
42 | 44 | |
43 | 45 | ;-------------------------------- |
44 | 46 | ;Languages |
45 | | |
| 47 | |
46 | 48 | !insertmacro MUI_LANGUAGE "English" |
47 | 49 | |
48 | 50 | ;-------------------------------- |
49 | 51 | ;More |
50 | | |
| 52 | |
51 | 53 | ;General |
52 | 54 | OutFile "../../FileZilla_Server.exe" |
53 | | |
| 55 | |
54 | 56 | ;Installation types |
55 | 57 | InstType "Standard" |
56 | 58 | InstType "Full" |
57 | 59 | |
58 | 60 | ;Descriptions |
59 | | LangString DESC_SecFileZillaServer ${LANG_ENGLISH} "Copy all required files of FileZilla server to the application folder." |
| 61 | LangString DESC_SecFileZillaServer ${LANG_ENGLISH} "Copy all required files of FileZilla Server to the application folder." |
60 | 62 | LangString DESC_SecSourceCode ${LANG_ENGLISH} "Copy the source code of FileZilla Server to the application folder" |
61 | | LangString DESC_SecStartMenu ${LANG_ENGLISH} "Create shortcuts to FileZilla Server in the Start menu" |
| 63 | LangString DESC_SecStartMenu ${LANG_ENGLISH} "Create shortcuts to FileZilla Server in the Start Menu" |
62 | 64 | LangString DESC_SecDesktopIcon ${LANG_ENGLISH} "Create an Icon on the desktop for quick access to FileZilla Server" |
63 | 65 | |
64 | 66 | ;Folder-selection page |
65 | | InstallDir "$PROGRAMFILES\FileZilla Server" |
| 67 | InstallDir "$PROGRAMFILES\${PRODUCT_NAME}" |
| 68 | InstallDirRegKey HKLM "${PRODUCT_UNINSTALL}" "UninstallString" |
66 | 69 | |
67 | 70 | ShowInstDetails show |
68 | 71 | |
… |
… |
|
85 | 88 | Push "FileZilla Server Helper Window" |
86 | 89 | call CloseWindowByName |
87 | 90 | DetailPrint "Uninstalling service..." |
88 | | ExecWait '"$INSTDIR\FileZilla Server.exe" /uninstall' |
| 91 | ExecWait '"$INSTDIR\FileZilla Server.exe" /uninstall' |
89 | 92 | Sleep 500 |
90 | | DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "FileZilla Server" |
91 | | DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "FileZilla Server" |
| 93 | DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "${PRODUCT_NAME}" |
| 94 | DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "${PRODUCT_NAME}" |
92 | 95 | goto copy_main_done |
93 | 96 | found: |
94 | 97 | GetTempFileName $R1 |
… |
… |
|
100 | 103 | Push "FileZilla Server Helper Window" |
101 | 104 | call CloseWindowByName |
102 | 105 | DetailPrint "Uninstalling service..." |
103 | | ExecWait '"$R1" /uninstall' |
| 106 | ExecWait '"$R1" /uninstall' |
104 | 107 | Sleep 500 |
105 | | DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "FileZilla Server" |
106 | | DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "FileZilla Server" |
| 108 | DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "${PRODUCT_NAME}" |
| 109 | DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "${PRODUCT_NAME}" |
107 | 110 | Delete "$INSTDIR\FileZilla Server.exe" |
108 | 111 | Rename $R1 "$INSTDIR\FileZilla Server.exe" |
109 | 112 | copy_main_done: |
110 | 113 | |
111 | | File "..\Release\FileZilla server.pdb" |
| 114 | File "..\Release\FileZilla Server.pdb" |
112 | 115 | |
113 | 116 | ; Stopping interface |
114 | 117 | DetailPrint "Closing interface..." |
… |
… |
|
116 | 119 | Call CloseWindowByName |
117 | 120 | |
118 | 121 | ; Put file there |
119 | | File "..\Release\FileZilla server.pdb" |
| 122 | File "..\Release\FileZilla Server.pdb" |
120 | 123 | File "..\Interface\Release\FileZilla Server Interface.exe" |
121 | 124 | File "..\GFtp\Release\FzGss.dll" |
122 | 125 | File "..\..\readme.htm" |
123 | 126 | File "..\..\license.txt" |
124 | 127 | File "dbghelp.dll" |
125 | 128 | ; Write the uninstall keys for Windows |
126 | | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\FileZilla Server" "DisplayName" "FileZilla Server (remove only)" |
127 | | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\FileZilla Server" "UninstallString" '"$INSTDIR\uninstall.exe"' |
| 129 | WriteRegStr HKLM "${PRODUCT_UNINSTALL}" "DisplayName" "FileZilla Server (remove only)" |
| 130 | WriteRegStr HKLM "${PRODUCT_UNINSTALL}" "UninstallString" '"$INSTDIR\uninstall.exe"' |
128 | 131 | WriteUninstaller "$INSTDIR\Uninstall.exe" |
129 | 132 | SectionEnd |
130 | 133 | |
… |
… |
|
160 | 163 | File "StartupOptions.ini" |
161 | 164 | File "uninstall.ico" |
162 | 165 | StrCpy $0 "source" |
163 | | |
| 166 | |
164 | 167 | SectionEnd |
165 | 168 | |
166 | 169 | ; optional section |
167 | 170 | Section "Start Menu Shortcuts" SecStartMenu |
168 | 171 | SectionIn 1 2 |
169 | | CreateDirectory "$SMPROGRAMS\FileZilla Server" |
170 | | CreateShortCut "$SMPROGRAMS\FileZilla Server\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 |
171 | | CreateShortCut "$SMPROGRAMS\FileZilla Server\FileZilla Server Interface.lnk" "$INSTDIR\FileZilla Server Interface.exe" "" "$INSTDIR\FileZilla Server Interface.exe" 0 |
| 172 | CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" |
| 173 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 |
| 174 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\FileZilla Server Interface.lnk" "$INSTDIR\FileZilla Server Interface.exe" "" "$INSTDIR\FileZilla Server Interface.exe" 0 |
172 | 175 | |
173 | 176 | strcmp $1 "9x" shortcut9x |
174 | 177 | !insertmacro MUI_INSTALLOPTIONS_READ $R0 $2 "Field 2" "State" |
175 | 178 | StrCmp $R0 "Do not install as service, start server automatically (not recommended)" shortcut9x |
176 | 179 | |
177 | 180 | ;NT service shortcuts |
178 | | CreateShortCut "$SMPROGRAMS\FileZilla Server\Start FileZilla Server.lnk" "$INSTDIR\FileZilla Server.exe" "/start" "$INSTDIR\FileZilla Server.exe" 0 |
179 | | CreateShortCut "$SMPROGRAMS\FileZilla Server\Stop FileZilla Server.lnk" "$INSTDIR\FileZilla Server.exe" "/stop" "$INSTDIR\FileZilla Server.exe" 0 |
| 181 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Start FileZilla Server.lnk" "$INSTDIR\FileZilla Server.exe" "/start" "$INSTDIR\FileZilla Server.exe" 0 |
| 182 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Stop FileZilla Server.lnk" "$INSTDIR\FileZilla Server.exe" "/stop" "$INSTDIR\FileZilla Server.exe" 0 |
180 | 183 | goto shortcut_done |
181 | | shortcut9x: |
| 184 | shortcut9x: |
182 | 185 | ;Compat mode |
183 | | CreateShortCut "$SMPROGRAMS\FileZilla Server\Start FileZilla Server.lnk" "$INSTDIR\FileZilla Server.exe" "/compat /start" "$INSTDIR\FileZilla Server.exe" 0 |
184 | | CreateShortCut "$SMPROGRAMS\FileZilla Server\Stop FileZilla Server.lnk" "$INSTDIR\FileZilla Server.exe" "/compat /stop" "$INSTDIR\FileZilla Server.exe" 0 |
| 186 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Start FileZilla Server.lnk" "$INSTDIR\FileZilla Server.exe" "/compat /start" "$INSTDIR\FileZilla Server.exe" 0 |
| 187 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Stop FileZilla Server.lnk" "$INSTDIR\FileZilla Server.exe" "/compat /stop" "$INSTDIR\FileZilla Server.exe" 0 |
185 | 188 | |
186 | 189 | shortcut_done: |
187 | | |
| 190 | |
188 | 191 | StrCmp $0 "source" CreateSourceShortcuts NoSourceShortcuts |
189 | 192 | CreateSourceShortcuts: |
190 | | CreateShortCut "$SMPROGRAMS\FileZilla Server\FileZilla Server Source Project.lnk" "$INSTDIR\source\FileZilla Server.dsw" "" "$INSTDIR\source\FileZilla Server.dsw" 0 |
| 193 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\FileZilla Server Source Project.lnk" "$INSTDIR\source\FileZilla Server.dsw" "" "$INSTDIR\source\FileZilla Server.dsw" 0 |
191 | 194 | NoSourceShortcuts: |
192 | 195 | SectionEnd |
193 | 196 | |
… |
… |
|
199 | 202 | Section "-PostInst" |
200 | 203 | |
201 | 204 | ; Write the installation path into the registry |
202 | | WriteRegStr HKCU "SOFTWARE\FileZilla Server" "Install_Dir" "$INSTDIR" |
203 | | WriteRegStr HKLM "SOFTWARE\FileZilla Server" "Install_Dir" "$INSTDIR" |
| 205 | WriteRegStr HKCU "SOFTWARE\${PRODUCT_NAME}" "Install_Dir" "$INSTDIR" |
| 206 | WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "Install_Dir" "$INSTDIR" |
204 | 207 | |
205 | 208 | ;Set Adminport |
206 | 209 | !insertmacro MUI_INSTALLOPTIONS_READ $R0 $2 "Field 4" "State" |
207 | 210 | ExecWait '"$INSTDIR\FileZilla Server.exe" /adminport $R0' |
208 | 211 | ExecWait '"$INSTDIR\FileZilla Server Interface.exe" /adminport $R0' |
209 | | |
| 212 | |
210 | 213 | StrCmp $1 "9x" Install_9x |
211 | | |
| 214 | |
212 | 215 | !insertmacro MUI_INSTALLOPTIONS_READ $R0 $2 "Field 2" "State" |
213 | 216 | StrCmp $R0 "Do not install as service, started automatically (not recommended)" Install_Standard_Auto |
214 | 217 | DetailPrint "Installing Service..." |
… |
… |
|
221 | 224 | goto done |
222 | 225 | Install_9x: |
223 | 226 | !insertmacro MUI_INSTALLOPTIONS_READ $R0 $2 "Field 2" "State" |
224 | | StrCmp $R0 "Start manually" done |
| 227 | StrCmp $R0 "Start manually" done |
225 | 228 | Install_Standard_Auto: |
226 | 229 | DetailPrint "Put FileZilla Server into registry..." |
227 | 230 | ClearErrors |
… |
… |
|
243 | 246 | goto interface_done |
244 | 247 | interface_cu: |
245 | 248 | WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "FileZilla Server Interface" '"$INSTDIR\FileZilla Server Interface.exe"' |
246 | | interface_done: |
| 249 | interface_done: |
247 | 250 | |
248 | 251 | SectionEnd |
249 | 252 | |
… |
… |
|
269 | 272 | |
270 | 273 | ; we are not NT. |
271 | 274 | StrCpy $1 "9x" |
272 | | |
| 275 | |
273 | 276 | ;Extract InstallOptions INI Files |
274 | 277 | !insertmacro MUI_INSTALLOPTIONS_EXTRACT "StartupOptions9x.ini" |
275 | 278 | StrCpy $2 "StartupOptions9x.ini" |
… |
… |
|
278 | 281 | detection_NT: |
279 | 282 | ; we are NT |
280 | 283 | StrCpy $1 "NT" |
281 | | |
| 284 | |
282 | 285 | ;Extract InstallOptions INI Files |
283 | 286 | !insertmacro MUI_INSTALLOPTIONS_EXTRACT "StartupOptions.ini" |
284 | 287 | strcpy $2 "StartupOptions.ini" |
… |
… |
|
286 | 289 | detection_end: |
287 | 290 | |
288 | 291 | FunctionEnd |
289 | | |
| 292 | |
290 | 293 | LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Startup settings" |
291 | 294 | LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Select startup behaviour for FileZilla Server" |
292 | 295 | |
… |
… |
|
344 | 347 | Push "FileZilla Server Helper Window" |
345 | 348 | Call un.CloseWindowByName |
346 | 349 | DetailPrint "Uninstalling service..." |
347 | | ExecWait '"$INSTDIR\FileZilla Server.exe" /uninstall' |
| 350 | ExecWait '"$INSTDIR\FileZilla Server.exe" /uninstall' |
348 | 351 | Sleep 500 |
349 | 352 | |
350 | 353 | ; Stopping interface |
… |
… |
|
353 | 356 | Call un.CloseWindowByName |
354 | 357 | |
355 | 358 | ; remove registry keys |
356 | | DeleteRegValue HKCU "Software\FileZilla Server" "Install_Dir" |
357 | | DeleteRegValue HKLM "Software\FileZilla Server" "Install_Dir" |
358 | | DeleteRegKey /ifempty HKCU "Software\FileZilla Server" |
359 | | DeleteRegKey /ifempty HKLM "Software\FileZilla Server" |
| 359 | DeleteRegValue HKCU "Software\${PRODUCT_NAME}" "Install_Dir" |
| 360 | DeleteRegValue HKLM "Software\${PRODUCT_NAME}" "Install_Dir" |
| 361 | DeleteRegKey /ifempty HKCU "Software\${PRODUCT_NAME}" |
| 362 | DeleteRegKey /ifempty HKLM "Software\${PRODUCT_NAME}" |
360 | 363 | MessageBox MB_YESNO "Delete settings?" IDNO NoSettingsDelete |
361 | 364 | Delete "$INSTDIR\FileZilla Server.xml" |
362 | 365 | Delete "$INSTDIR\FileZilla Server Interface.xml" |
363 | 366 | NoSettingsDelete: |
364 | | DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\FileZilla Server" |
| 367 | DeleteRegKey HKLM "${PRODUCT_UNINSTALL}" |
365 | 368 | ; remove files |
366 | 369 | Delete "$INSTDIR\FileZilla Server.exe" |
367 | 370 | Delete "$INSTDIR\FileZilla Server Interface.exe" |
368 | | Delete "$INSTDIR\FileZilla server.pdb" |
| 371 | Delete "$INSTDIR\FileZilla Server.pdb" |
369 | 372 | Delete $INSTDIR\FzGss.dll |
370 | 373 | Delete "$INSTDIR\dbghelp.dll" |
371 | 374 | Delete $INSTDIR\license.txt |
… |
… |
|
397 | 400 | |
398 | 401 | ; MUST REMOVE UNINSTALLER, too |
399 | 402 | Delete $INSTDIR\uninstall.exe |
400 | | |
| 403 | |
401 | 404 | ; remove shortcuts, if any. |
402 | | Delete "$SMPROGRAMS\FileZilla Server\*.*" |
| 405 | Delete "$SMPROGRAMS\${PRODUCT_NAME}\*.*" |
403 | 406 | Delete "$DESKTOP\FileZilla Server Interface.lnk" |
404 | | RMDir "$SMPROGRAMS\FileZilla Server" |
| 407 | RMDir "$SMPROGRAMS\${PRODUCT_NAME}" |
405 | 408 | |
406 | 409 | ; remove directories used. |
407 | 410 | |