]> git.sur5r.net Git - bacula/bacula/commitdiff
Fixed problems migrating settings from previous releases.
authorRobert Nelson <robertn@the-nelsons.org>
Fri, 8 Sep 2006 00:26:24 +0000 (00:26 +0000)
committerRobert Nelson <robertn@the-nelsons.org>
Fri, 8 Sep 2006 00:26:24 +0000 (00:26 +0000)
Add Readme.txt with an option to show it on the installer Finish page.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3434 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/win32/bacula.sln
bacula/src/win32/installer/InstallType.ini
bacula/src/win32/installer/InstallType.nsh
bacula/src/win32/installer/Readme.txt [new file with mode: 0644]
bacula/src/win32/installer/installer.vcproj
bacula/src/win32/installer/winbacula.nsi

index 9ae384dd785bac8d652efce05b4da5b67a646f8f..01181cc0747c294ea1f3716f03de3281cb77acca 100644 (file)
@@ -48,6 +48,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
                External-msvc = External-msvc
                ..\..\autoconf\bacula-macros\largefiles.m4 = ..\..\autoconf\bacula-macros\largefiles.m4
                ..\..\autoconf\bacula-macros\os.m4 = ..\..\autoconf\bacula-macros\os.m4
+               README.mingw32 = README.mingw32
+               README.vc8 = README.vc8
+               README.win32 = README.win32
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Header Files", "Header Files", "{C8301485-CFD1-43D4-827C-8EA050C8E256}"
index a09d907c3165c885225b79c92d7fe8b22a644cde..2993a3ac4588a8d7d757f284d6f48fc0c60d3d09 100644 (file)
@@ -15,7 +15,7 @@ Text=Installation Type
 Left=0
 Right=300
 Top=32
-Bottom=126
+Bottom=136
 
 [Field 3]
 Type=RadioButton
@@ -31,8 +31,8 @@ Type=RadioButton
 Text=Custom
 Left=6
 Right=44
-Top=80
-Bottom=90
+Top=90
+Bottom=100
 
 [Field 5]
 Type=Label
@@ -40,12 +40,12 @@ Text=The software will be installed in the default directory "Program Files\\Bac
 Left=17
 Right=295
 Top=58
-Bottom=76
+Bottom=86
 
 [Field 6]
 Type=Label
 Text=You may choose the installation directory.  The configuration defaults will be displayed and you will be given the chance to make changes before the configuration files are written.
 Left=17
 Right=295
-Top=94
-Bottom=122
+Top=104
+Bottom=132
index d219f733d240a3795005c9dc2e59e3a85b5489e8..886596e47027b27013896b9c09a6fe49785039d1 100644 (file)
@@ -8,13 +8,11 @@ Function EnterInstallType
   ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString"
 
   ${If} "$R0" != ""
-    ; Processing Upgrade - Get Install Directory
-    ${GetParent} $R0 $OldInstallDir
-
     ; Check registry for new installer
-    ReadRegStr $R0 HKLM "Software\Bacula" "InstallLocation"
-    ${If} "$R0" != ""
+    ReadRegStr $R1 HKLM "Software\Bacula" "InstallLocation"
+    ${If} "$R1" != ""
       ; New Installer 
+      StrCpy $OldInstallDir $R1
       StrCpy $InstallType ${UpgradeInstall}
 
       SetShellVarContext all
@@ -22,18 +20,16 @@ Function EnterInstallType
       StrCpy $R1 "$APPDATA\Bacula"
       StrCpy $R2 "$INSTDIR\Doc"
 
-      ; Debugging code
-      ${If} "$R0" != "$OldInstallDir"
-        DetailPrint "Uninstall directory = $OldInstallDir, Install Location = $R0"
-        StrCpy $OldInstallDir $R0
-      ${EndIf}
-
       ReadRegDWORD $PreviousComponents HKLM "Software\Bacula" "Components"
 
       WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "A previous installation has been found in $OldInstallDir.  Please choose the installation type for any additional components you select."
       WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The configuration files for additional components will be generated using defaults applicable to most installations."
       WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "The configuration defaults for additional components will be displayed and you will be given the chance to make changes before the configuration files are written."
     ${Else}
+      ; Processing Upgrade - Get Install Directory
+      ${StrRep} $R0 $R0 '"' ''
+      ${GetParent} $R0 $OldInstallDir
+
       ; Old Installer 
       StrCpy $InstallType ${MigrateInstall}
       StrCpy $R1 "$OldInstallDir\bin"
diff --git a/bacula/src/win32/installer/Readme.txt b/bacula/src/win32/installer/Readme.txt
new file mode 100644 (file)
index 0000000..276dd38
--- /dev/null
@@ -0,0 +1,49 @@
+Bacula - Windows Version Notes
+==============================
+
+These notes highlight how the Windows version of Bacula differs from the 
+other versions.  It also provides any notes additional to the documentation.
+
+For detailed documentation on using, configuring and troubleshooting Bacula,
+please consult the installed documentation or the online documentation at
+http://www.bacula.org/?page=documentation.
+
+
+Start Menu Items
+----------------
+A number of menu items have been created in the Start menu under All Programs
+in the Bacula submenu.  They may be selected to edit the configuration files,
+view the documentation or run one of the console or utility programs.  The 
+choices available will vary depending on the options you chose to install.
+
+
+File Locations
+--------------
+The programs and documentation are installed in the directory 
+"C:\Program Files\Bacula" unless a different directory was selected during
+installation.  The configuration and other application data files are in the
+"C:\Documents and Settings\All Users\Application Data\Bacula" directory.
+
+
+Storage and Director Services
+-----------------------------
+These services are still considered experimental in this release.  Use of 
+them should be approached with caution since they haven't received the
+same level of extensive usage and testing that the File service has 
+received.
+
+Storage Device Names
+--------------------
+There is a utility installed called scsilist.exe which displays the installed 
+devices, their physical address and their device name.  A link to it is 
+created in the Bacula menu when the Storage service is installed.
+
+Changer and Tape device names in Windows are Changer0, Changer1, etc and 
+Tape0, Tape1, etc.  If there isn't a device driver loaded for the Changer 
+then you need to use the address <Port>:<Bus>:<Target>:<Lun>.  Port is the 
+SCSI Adapter Number, Bus is the Bus Number on the adapter (usually 0 since 
+most adapters only have one bus), Target is the device's Target Device ID, 
+Lun is the Logical Unit Number.
+You must specify DeviceType = tape in the Device resource in bacula-sd.conf 
+since auto detection of device type doesn't work at the present time.
index 33982113adcf5eb938cf873470a4c2197030ffb9..e5a1d3c2fb441dcaafbdd68ce548473a5040bdad 100644 (file)
                        RelativePath=".\InstallType.nsh"
                        >
                </File>
+               <File
+                       RelativePath=".\Readme.txt"
+                       >
+               </File>
                <File
                        RelativePath=".\winbacula.nsi"
                        >
index 12fb3ecbcb37d0c0acb86eb0925a1ecab8dde9cc..883f76e7e93902dc61decddfbb00054d283a46f6 100644 (file)
@@ -88,6 +88,7 @@ Page custom EnterInstallType
 Page custom EnterConfigPage1 LeaveConfigPage1
 Page custom EnterConfigPage2 LeaveConfigPage2
 !InsertMacro MUI_PAGE_INSTFILES
+!Define      MUI_FINISHPAGE_SHOWREADME $INSTDIR\Readme.txt
 !InsertMacro MUI_PAGE_FINISH
 
 !InsertMacro MUI_UNPAGE_WELCOME
@@ -113,7 +114,7 @@ Var OptService
 Var OptStart
 Var OptSilent
 
-Var DependenciesDone
+Var CommonFilesDone
 Var DatabaseDone
 
 Var OsIsNT
@@ -196,7 +197,7 @@ Function .onInit
   StrCpy $OptService 1
   StrCpy $OptStart 1
   StrCpy $OptSilent 0
-  StrCpy $DependenciesDone 0
+  StrCpy $CommonFilesDone 0
   StrCpy $DatabaseDone 0
   StrCpy $OsIsNT 0
   StrCpy $AutomaticInstall 0
@@ -330,10 +331,12 @@ Function .onSelChange
   Call UpdateComponentUI
 FunctionEnd
 
-Function CopyDependencies
-  SetOutPath "$INSTDIR\bin"
+Function InstallCommonFiles
+  ${If} $CommonFilesDone = 0
+    SetOutPath "$INSTDIR"
+    File "..\Readme.txt"
 
-  ${If} $DependenciesDone = 0
+    SetOutPath "$INSTDIR\bin"
 !if "${BUILD_TOOLS}" == "VC8"
     File "${VC_REDIST_DIR}\msvcm80.dll"
     File "${VC_REDIST_DIR}\msvcp80.dll"
@@ -363,7 +366,10 @@ Function CopyDependencies
 !endif
     File "${DEPKGS_BIN}\openssl.exe"
     File "${BACULA_BIN}\bacula.dll"
-    StrCpy $DependenciesDone 1
+
+    CreateShortCut "$SMPROGRAMS\Bacula\View Readme.lnk" "write.exe" '"$INSTDIR\Readme.txt"'
+
+    StrCpy $CommonFilesDone 1
   ${EndIf}
 FunctionEnd
 
@@ -505,6 +511,13 @@ Section "-Initialize"
 
   FileClose $R1
 
+  ${If} $InstallType = ${MigrateInstall}
+    FileOpen $R1 $PLUGINSDIR\migrate.sed w
+    ${StrRep} $R2 "$APPDATA\Bacula\Work" "\" "\\\\"
+    FileWrite $R1 's;\(Working *Directory *= *\)[^ ][^ ]*.*$$;\1"$R2";$\r$\n'
+    FileWrite $R1 's;\(Pid *Directory *= *\)[^ ][^ ]*.*$$;\1"$R2";$\r$\n'
+    FileClose $R1
+  ${EndIf}
 SectionEnd
 
 SectionGroup "Client" SecGroupClient
@@ -512,6 +525,18 @@ SectionGroup "Client" SecGroupClient
 Section "File Service" SecFileDaemon
   SectionIn 1 2 3
 
+  ${If} ${FileExists} "$OldInstallDir\bin\bacula-fd.exe"
+    ${If} $InstallType <> ${MigrateInstall}
+      nsExec::ExecToLog '"$OldInstallDir\bin\bacula-fd.exe" /silent /kill'     ; Shutdown any bacula that could be running
+      Sleep 3000
+      nsExec::ExecToLog '"$OldInstallDir\bin\bacula-fd.exe" /silent /remove'   ; Remove existing service
+    ${Else}
+      nsExec::ExecToLog '"$OldInstallDir\bin\bacula-fd.exe" /kill'     ; Shutdown any bacula that could be running
+      Sleep 3000
+      nsExec::ExecToLog '"$OldInstallDir\bin\bacula-fd.exe" /remove'   ; Remove existing service
+    ${EndIf}
+  ${EndIf}
+
   SetOutPath "$INSTDIR\bin"
 
   File "${BACULA_BIN}\bacula-fd.exe"
@@ -519,13 +544,14 @@ Section "File Service" SecFileDaemon
   ${If} $InstallType = ${MigrateInstall}
   ${AndIf} ${FileExists} "$OldInstallDir\bin\bacula-fd.conf"
     CopyFiles "$OldInstallDir\bin\bacula-fd.conf" "$APPDATA\Bacula"
+    nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\migrate.sed" -i.bak "$APPDATA\Bacula\bacula-fd.conf"'
   ${Else}
     ${Unless} ${FileExists} "$APPDATA\Bacula\bacula-fd.conf"
       File "/oname=$PLUGINSDIR\bacula-fd.conf.in" "bacula-fd.conf.in"
 
       nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\bacula-fd.conf.in"'
       CopyFiles "$PLUGINSDIR\bacula-fd.conf.in" "$APPDATA\Bacula\bacula-fd.conf"
-    ${EndIf}
+    ${EndUnless}
   ${EndIf}
 
   ${If} $OsIsNT = 1
@@ -549,6 +575,12 @@ SectionGroup "Server" SecGroupServer
 Section "Storage Service" SecStorageDaemon
   SectionIn 2 3
 
+  ${If} ${FileExists} "$OldInstallDir\bin\bacula-sd.exe"
+    nsExec::ExecToLog '"$OldInstallDir\bin\bacula-sd.exe" /silent /kill'     ; Shutdown any bacula that could be running
+    Sleep 3000
+    nsExec::ExecToLog '"$OldInstallDir\bin\bacula-sd.exe" /silent /remove'   ; Remove existing service
+  ${EndIf}
+
   SetOutPath "$INSTDIR\bin"
 
   File "${DEPKGS_BIN}\loaderinfo.exe"
@@ -589,6 +621,12 @@ SectionEnd
 Section "Director Service" SecDirectorDaemon
   SectionIn 2 3
 
+  ${If} ${FileExists} "$OldInstallDir\bin\bacula-dir.exe"
+    nsExec::ExecToLog '"$OldInstallDir\bin\bacula-dir.exe" /silent /kill'     ; Shutdown any bacula that could be running
+    Sleep 3000
+    nsExec::ExecToLog '"$OldInstallDir\bin\bacula-dir.exe" /silent /remove'   ; Remove existing service
+  ${EndIf}
+
   SetOutPath "$INSTDIR\bin"
 
   Call InstallDatabase
@@ -617,7 +655,7 @@ Section "Director Service" SecDirectorDaemon
     File ${CATS_DIR}\update_postgresql_tables.sql
     File /oname=grant_privileges.cmd ${CATS_DIR}\grant_postgresql_privileges.cmd
     File ${CATS_DIR}\grant_postgresql_privileges.sql
-  ${ElseIf} $ConfigDirectorDB = 3
+  ${ElseIf} $ConfigDirectorDB = 4
     File /oname=create_database.cmd ${CATS_DIR}\create_bdb_database.cmd
     File /oname=drop_database.cmd ${CATS_DIR}\drop_bdb_database.cmd
     File /oname=make_tables.cmd ${CATS_DIR}\make_bdb_tables.cmd
@@ -657,7 +695,7 @@ Section "Command Console" SecConsole
   SetOutPath "$INSTDIR\bin"
 
   File "${BACULA_BIN}\bconsole.exe"
-  Call CopyDependencies
+  Call InstallCommonFiles
 
   ${If} $InstallType = ${MigrateInstall}
   ${AndIf} ${FileExists} "$OldInstallDir\bin\bconsole.conf"
@@ -683,7 +721,7 @@ Section "Graphical Console" SecWxConsole
   
   SetOutPath "$INSTDIR\bin"
 
-  Call CopyDependencies
+  Call InstallCommonFiles
 !if "${BUILD_TOOLS}" == "VC8"
   File "${DEPKGS_BIN}\wxbase270_vc_bacula.dll"
   File "${DEPKGS_BIN}\wxmsw270_core_vc_bacula.dll"
@@ -803,27 +841,27 @@ UninstallText "This will uninstall Bacula. Hit next to continue."
 
 Section "Uninstall"
   ; Shutdown any baculum that could be running
-  nsExec::ExecToLog '"$INSTDIR\bin\bacula-fd.exe" /kill'
-  nsExec::ExecToLog '"$INSTDIR\bin\bacula-sd.exe" /kill'
-  nsExec::ExecToLog '"$INSTDIR\bin\bacula-dir.exe" /kill'
+  nsExec::ExecToLog '"$INSTDIR\bin\bacula-fd.exe" /silent /kill'
+  nsExec::ExecToLog '"$INSTDIR\bin\bacula-sd.exe" /silent /kill'
+  nsExec::ExecToLog '"$INSTDIR\bin\bacula-dir.exe" /silent /kill'
   Sleep 3000
 
   ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-fd"
   ${If} $R0 = 1
     ; Remove bacula service
-    nsExec::ExecToLog '"$INSTDIR\bin\bacula-fd.exe" /remove'
+    nsExec::ExecToLog '"$INSTDIR\bin\bacula-fd.exe" /silent /remove'
   ${EndIf}
   
   ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-sd"
   ${If} $R0 = 1
     ; Remove bacula service
-    nsExec::ExecToLog '"$INSTDIR\bin\bacula-sd.exe" /remove'
+    nsExec::ExecToLog '"$INSTDIR\bin\bacula-sd.exe" /silent /remove'
   ${EndIf}
   
   ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-dir"
   ${If} $R0 = 1
     ; Remove bacula service
-    nsExec::ExecToLog '"$INSTDIR\bin\bacula-dir.exe" /remove'
+    nsExec::ExecToLog '"$INSTDIR\bin\bacula-dir.exe" /silent /remove'
   ${EndIf}
   
   ; remove registry keys
@@ -842,8 +880,12 @@ Section "Uninstall"
 
   ; Check for existing installation
   MessageBox MB_YESNO|MB_ICONQUESTION \
-  "Would you like to delete the current configuration files and the working state file?" IDNO +3
+  "Would you like to delete the current configuration files and the working state file?" IDNO +7
     Delete /REBOOTOK "$APPDATA\Bacula\*"
+    Delete /REBOOTOK "$APPDATA\Bacula\Work\*"
+    Delete /REBOOTOK "$APPDATA\Bacula\Spool\*"
+    RMDir "$APPDATA\Bacula\Work"
+    RMDir "$APPDATA\Bacula\Spool"
     RMDir "$APPDATA\Bacula"
 
   ; remove directories used
@@ -859,12 +901,7 @@ SectionEnd
 ; $3 - Start Service now
 ;
 Function InstallDaemon
-  Call CopyDependencies
-
-  IfFileExists "$APPDATA\Bacula\$0.conf" 0 +4
-    nsExec::ExecToLog '"$OldInstallDir\bin\$0.exe" /silent /kill'     ; Shutdown any bacula that could be running
-    nsExec::ExecToLog '"$OldInstallDir\bin\$0.exe" /silent /remove'   ; Remove existing service
-    Sleep 3000
+  Call InstallCommonFiles
 
   WriteRegDWORD HKLM "Software\Bacula" "Service_$0" $2