; winbacula.nsi
;
-; Written by Michel Meyers (michel@tcnnet.dyndns.org)
+; Began as a version written by Michel Meyers (michel@tcnnet.dyndns.org)
;
-; Updated by Kern Sibbald for native Win32 Bacula
+; Adapted by Kern Sibbald for native Win32 Bacula
; added a number of elements from Christopher Hull's installer
;
; D. Scott Barninger Nov 13 2004
; added Start Menu items
; fix uninstall of config files to do all not just bacula-fd.conf
;
+; D. Scott Barninger Dec 05 2004
+; added specification of default permissions for bacula-fd.conf
+; - thanks to Jamie Ffolliott for pointing me at cacls
+; added removal of working-dir files if user selects to remove config
+; uninstall is now 100% clean
+;
+; D. Scott Barninger Apr 17 2005
+; 1.36.3 release docs update
+; add pdf manual and menu shortcut
+;
; Command line options:
;
; /cygwin - do cygwin install into c:\cygwin\bacula
Call IsNt
Pop $R0
StrCmp $R0 "false" do_win98
- MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to start the Bacula Client now?" IDNO NoStart
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to start the Bacula Client now?" IDNO SetPerms
Exec 'net start bacula'
+ SetPerms:
+ ; set default permissions on config file so it's not world readable
+ Exec 'cmd /C echo Y|cacls "$INSTDIR\bin\bacula-fd.conf" /G SYSTEM:F Administrators:F'
goto NoStart
do_win98:
File Start.bat
Section "Install Documentation" SecDoc
SetOutPath "$INSTDIR\doc"
CreateDirectory "$INSTDIR\doc"
- File ..\..\doc\html-manual\*.html
- File ..\..\doc\html-manual\*.gif
- File ..\..\doc\html-manual\*.jpg
+ File ..\..\..\docs\manual\bacula\*.html
+ File ..\..\..\docs\manual\bacula\*.png
+ File ..\..\..\docs\manual\bacula\*.css
+ File ..\..\..\docs\manual\bacula.pdf
+ ; Create Start Menu entry
+ SetShellVarContext all
+ CreateShortCut "$SMPROGRAMS\Bacula\Manual.lnk" "$INSTDIR\doc\bacula.pdf"
SectionEnd
;
Delete /REBOOTOK "$INSTDIR\Uninstall.exe"
; Check for existing installation
- MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to delete the current configuration files?" IDNO LeaveConfig
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to delete the current configuration files and the working state file?" IDNO LeaveConfig
Delete /REBOOTOK "$INSTDIR\bin\*.conf"
+ Delete /REBOOTOK "$INSTDIR\working\*"
; remove directories used
RMDir "$INSTDIR\bin"
RMDir "$INSTDIR\doc"