]> git.sur5r.net Git - bacula/bacula/commitdiff
NSIS installer improvements.
authorScott Barninger <scott@barninger.com>
Sat, 13 Nov 2004 19:33:54 +0000 (19:33 +0000)
committerScott Barninger <scott@barninger.com>
Sat, 13 Nov 2004 19:33:54 +0000 (19:33 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1690 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/win32/pebuilder/Makefile.in
bacula/src/win32/winbacula.nsi.in

index 08e96d465f01bad9e9f584557f6c5f15dc63685a..d1ebe78e939f75f39c05052997c5ca39349ea2c7 100644 (file)
@@ -23,7 +23,7 @@ dummy:
 all: pebuilder zip
 
 pebuilder:
-       mkdir bacula/files
+       mkdir -p bacula/files
        cp -f ../baculafd/bacula-fd.conf bacula/files/
        cp -f ../console/bconsole.conf bacula/files/
        cp -f ../wx-console/wx-console.conf bacula/files/
index 34086b3136b09a126e789a1c5c6428e3138f93fb..e49a5ea14ebe968b0225534ba82e61fd77b83617 100755 (executable)
@@ -118,15 +118,21 @@ Section "Bacula File Service" SecService
     WriteRegDWORD HKLM "Software\Bacula" "InstalledService" "1"
  NoService:
 
-  ; Write the uninstall keys for Windows
+  ; Create Start Menu Directory
+  SetShellVarContext all
+  CreateDirectory "$SMPROGRAMS\Bacula"
+  CreateShortCut "$SMPROGRAMS\Bacula\Start Bacula Client.lnk" "$INSTDIR\bin\bacula-fd.exe" "-c $INSTDIR\bin\bacula-fd.conf" "$INSTDIR\bin\bacula-fd.exe" 0
+
+  ; Write the uninstall keys for Windows & create Start Menu entry
   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "DisplayName" "Bacula Client"
   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString" '"$INSTDIR\uninstall.exe"'
   WriteUninstaller "$INSTDIR\Uninstall.exe"
+  CreateShortCut "$SMPROGRAMS\Bacula\Uninstall Bacula.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
 
   ; Create bacula-fd.conf and have the user edit it (skipped if silent)
   IfSilent NoReminder
   StrCmp $7 "1" NoReminder  ; skip if it is an upgrade
-  MessageBox MB_OK "Please edit $INSTDIR\bin\bacula-fd.conf according to your requirements/installation! Also remember to put a shortcut into your start menu if you didn't install the client as a service."
+  MessageBox MB_OK "Please edit the client configuration file $INSTDIR\bin\bacula-fd.conf to fit your installation. When you click the OK button Wordpad will open to allow you to do this. Be sure to save your changes before closing Wordpad."
   Exec 'write "$INSTDIR\bin\bacula-fd.conf"'  ; spawn wordpad with the file to be edited
  NoReminder:
 
@@ -159,9 +165,14 @@ Section "Install Console" SecConsole
   goto do_next
  newconf:
   File /oname=bconsole.conf.new console\bconsole.conf
-       
-  ; If /service was given jump to the service install part
  do_next:
+
+  ; Create bconsole.conf and have the user edit it (skipped if silent)
+  IfSilent NoReminder
+  StrCmp $7 "1" NoReminder  ; skip if it is an upgrade
+  MessageBox MB_OK "Please edit the command line console configuration file $INSTDIR\bin\bconsole.conf to fit your installation. When you click the OK button Wordpad will open to allow you to do this. Be sure to save your changes before closing Wordpad."
+  Exec 'write "$INSTDIR\bin\bconsole.conf"'  ; spawn wordpad with the file to be edited
+ NoReminder:
 SectionEnd
 
 Section "Install wx-Console" SecWxConsole
@@ -172,9 +183,17 @@ Section "Install wx-Console" SecWxConsole
   goto do_next
  newconf:
   File /oname=wx-console.conf.new wx-console\wx-console.conf
-       
-  ; If /service was given jump to the service install part
  do_next:
+  ; Create Start Menu entry
+  SetShellVarContext all
+  CreateShortCut "$SMPROGRAMS\Bacula\WX-Console.lnk" "$INSTDIR\bin\wx-console.exe" "-c $INSTDIR\bin\wx-console.conf" "$INSTDIR\bin\wx-console.exe" 0
+
+  ; Create wx-console.conf and have the user edit it (skipped if silent)
+  IfSilent NoReminder
+  StrCmp $7 "1" NoReminder  ; skip if it is an upgrade
+  MessageBox MB_OK "Please edit the WX-console configuration file $INSTDIR\bin\wx-console.conf to fit your installation. When you click the OK button Wordpad will open to allow you to do this. Be sure to save your changes before closing Wordpad."
+  Exec 'write "$INSTDIR\bin\wx-console.conf"'  ; spawn wordpad with the file to be edited
+ NoReminder:
 SectionEnd
 
 
@@ -223,6 +242,10 @@ Section "Uninstall"
   DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula"
   DeleteRegKey HKLM "Software\Bacula"
 
+  ; remove start menu items
+  SetShellVarContext all
+  Delete /REBOOTOK "$SMPROGRAMS\Bacula\*"
+
   ; remove files and uninstaller (preserving config for now)
   CopyFiles /SILENT "$INSTDIR\bin\bacula-fd.conf" "$INSTDIR\bacula-fd.conf"
   Delete /REBOOTOK "$INSTDIR\bin\*.*"
@@ -241,6 +264,7 @@ Section "Uninstall"
   RMDir "$INSTDIR\working"
   RMDir "$INSTDIR"
   RMDir "C:\tmp"
+  RMDir "$SMPROGRAMS\Bacula"
   LeaveConfig:
   
 SectionEnd