]> git.sur5r.net Git - bacula/bacula/commitdiff
More Win installer changes
authorKern Sibbald <kern@sibbald.com>
Fri, 16 Oct 2009 15:48:16 +0000 (17:48 +0200)
committerKern Sibbald <kern@sibbald.com>
Fri, 16 Oct 2009 15:48:16 +0000 (17:48 +0200)
bacula/src/win32/win32_installer/InstallType.ini
bacula/src/win32/win32_installer/InstallType.nsh
bacula/src/win32/win64_installer/InstallType.ini
bacula/src/win32/win64_installer/InstallType.nsh

index a87189c7272690baf68f95b3ce94ee06b21834fe..73fb8d93905f683938f2ed844a7798e62d87bb71 100644 (file)
@@ -1,3 +1,8 @@
+;
+; Note: certain text in this file is overwritten by the code in
+;   InstallType.nsh
+;
+
 [Settings]
 NumFields=6
 
@@ -30,7 +35,7 @@ Bottom=54
 Type=RadioButton
 Text=Custom (not recommended)
 Left=6
-Right=200
+Right=252
 Top=90
 Bottom=100
 
index 0a0f902532d850b529097eb0211f93b9c2ef98bd..396f88bf8188d8a2c0d72c2104431a62fec104e5 100644 (file)
@@ -1,98 +1,99 @@
-Function EnterInstallType\r
-  Push $R0\r
-  Push $R1\r
-  Push $R2\r
-\r
-  ; Check if this is an upgrade by looking for an uninstaller configured \r
-  ; in the registry.\r
-  ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString"\r
-\r
-  ${If} "$R0" != ""\r
-    ; Check registry for new installer\r
-    ReadRegStr $R1 HKLM "Software\Bacula" "InstallLocation"\r
-    ${If} "$R1" != ""\r
-      ; New Installer \r
-      StrCpy $OldInstallDir $R1\r
-      StrCpy $InstallType ${UpgradeInstall}\r
-\r
-      SetShellVarContext all\r
-\r
-      StrCpy $R1 "$APPDATA\Bacula"\r
-      StrCpy $R2 "$INSTDIR\Doc"\r
-\r
-      ReadRegDWORD $PreviousComponents HKLM "Software\Bacula" "Components"\r
-\r
-      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."\r
-      WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The configuration files for additional components will be generated using defaults applicable to most installations."\r
-      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."\r
-\r
-      ReadRegDWORD $ConfigDirectorDB HKLM Software\Bacula Database\r
-\r
-      ${If} $ConfigDirectorDB = 0\r
-        IntOp $R0 $PreviousComponents & ${ComponentDirector}\r
-        ${If} $R0 <> 0\r
-          StrCpy $ConfigDirectorDB 1\r
-        ${EndIf}\r
-      ${EndIf}\r
-    ${Else}\r
-      ; Processing Upgrade - Get Install Directory\r
-      ${StrRep} $R0 $R0 '"' ''\r
-      ${GetParent} $R0 $OldInstallDir\r
-\r
-      ; Old Installer \r
-      StrCpy $InstallType ${MigrateInstall}\r
-      StrCpy $R1 "$OldInstallDir\bin"\r
-      StrCpy $R2 "$OldInstallDir\Doc"\r
-\r
-      WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "An old installation has been found in $OldInstallDir.  The Configuration will be migrated.  Please choose the installation type for any additional components you select."\r
-      WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"$PROGRAMFILES\Bacula$\".  The configuration files for additional components will be generated using defaults applicable to most installations."\r
-      WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "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."\r
-    ${EndIf}\r
-  ${Else}\r
-    ; New Install\r
-    StrCpy $InstallType ${NewInstall}\r
-    WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"$PROGRAMFILES\Bacula$\".  The configuration files will be generated using defaults applicable to most installations."\r
-  ${EndIf}\r
-\r
-  ${If} $InstallType <> ${NewInstall}\r
-  ${AndIf} $PreviousComponents = 0\r
-    ${If} ${FileExists} "$R1\bacula-fd.conf"\r
-      IntOp $PreviousComponents $PreviousComponents | ${ComponentFile}\r
-    ${EndIf}\r
-    ${If} ${FileExists} "$R1\bconsole.conf"\r
-      IntOp $PreviousComponents $PreviousComponents | ${ComponentTextConsole}\r
-    ${EndIf}\r
-    ${If} ${FileExists} "$R1\wx-console.conf"\r
-      IntOp $PreviousComponents $PreviousComponents | ${ComponentGUIConsole}\r
-    ${EndIf}\r
-    ${If} ${FileExists} "$R2\bacula.pdf"\r
-      IntOp $PreviousComponents $PreviousComponents | ${ComponentPDFDocs}\r
-    ${EndIf}\r
-    ${If} ${FileExists} "$R2\bacula\bacula.html"\r
-      IntOp $PreviousComponents $PreviousComponents | ${ComponentHTMLDocs}\r
-    ${EndIf}\r
-    ${If} ${FileExists} "$R2\bacula.html"\r
-      IntOp $PreviousComponents $PreviousComponents | ${ComponentHTMLDocs}\r
-    ${EndIf}\r
-  ${EndIf}\r
-\r
-  !InsertMacro MUI_HEADER_TEXT "$(TITLE_InstallType)" "$(SUBTITLE_InstallType)"\r
-  !InsertMacro MUI_INSTALLOPTIONS_INITDIALOG "InstallType.ini"\r
-  Pop $HDLG ;HWND of dialog\r
-\r
-  !insertmacro MUI_INSTALLOPTIONS_SHOW\r
-\r
-  ; Process Results\r
-\r
-  !insertmacro MUI_INSTALLOPTIONS_READ $R0 "InstallType.ini" "Field 3" "State"\r
-\r
-  ${If} $R0 = 1\r
-    StrCpy $AutomaticInstall 1\r
-  ${Else}\r
-    StrCpy $AutomaticInstall 0\r
-  ${EndIf}\r
-\r
-  Pop $R2\r
-  Pop $R1\r
-  Pop $R0\r
-FunctionEnd\r
+Function EnterInstallType
+  Push $R0
+  Push $R1
+  Push $R2
+
+  ; Check if this is an upgrade by looking for an uninstaller configured 
+  ; in the registry.
+  ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString"
+
+  ${If} "$R0" != ""
+    ; Check registry for new installer
+    ReadRegStr $R1 HKLM "Software\Bacula" "InstallLocation"
+    ${If} "$R1" != ""
+      ; New Installer 
+      StrCpy $OldInstallDir $R1
+      StrCpy $InstallType ${UpgradeInstall}
+
+      SetShellVarContext all
+
+      StrCpy $R1 "$APPDATA\Bacula"
+      StrCpy $R2 "$INSTDIR\Doc"
+
+      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" "You have more options, but you will have to manually edit your bacula-fd.conf file before Bacula will work."
+
+      ReadRegDWORD $ConfigDirectorDB HKLM Software\Bacula Database
+
+      ${If} $ConfigDirectorDB = 0
+        IntOp $R0 $PreviousComponents & ${ComponentDirector}
+        ${If} $R0 <> 0
+          StrCpy $ConfigDirectorDB 1
+        ${EndIf}
+      ${EndIf}
+    ${Else}
+      ; Processing Upgrade - Get Install Directory
+      ${StrRep} $R0 $R0 '"' ''
+      ${GetParent} $R0 $OldInstallDir
+
+      ; Old Installer 
+      StrCpy $InstallType ${MigrateInstall}
+      StrCpy $R1 "$OldInstallDir\bin"
+      StrCpy $R2 "$OldInstallDir\Doc"
+
+      WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "An old installation has been found in $OldInstallDir.  The Configuration will be migrated.  Please choose the installation type for any additional components you select."
+      WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"$PROGRAMFILES\Bacula$\".  The configuration files for additional components will be generated using defaults applicable to most installations."
+      WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "You have more options, but you will have to manually edit your bacula-fd.conf file before Bacula will work."
+    ${EndIf}
+  ${Else}
+    ; New Install
+    StrCpy $InstallType ${NewInstall}
+    WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"$PROGRAMFILES\Bacula$\".  The configuration files will be generated using defaults applicable to most installations."
+    WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "You have more options, but you will have to manually edit your bacula-fd.conf file before Bacula will work."
+  ${EndIf}
+
+  ${If} $InstallType <> ${NewInstall}
+  ${AndIf} $PreviousComponents = 0
+    ${If} ${FileExists} "$R1\bacula-fd.conf"
+      IntOp $PreviousComponents $PreviousComponents | ${ComponentFile}
+    ${EndIf}
+    ${If} ${FileExists} "$R1\bconsole.conf"
+      IntOp $PreviousComponents $PreviousComponents | ${ComponentTextConsole}
+    ${EndIf}
+    ${If} ${FileExists} "$R1\wx-console.conf"
+      IntOp $PreviousComponents $PreviousComponents | ${ComponentGUIConsole}
+    ${EndIf}
+    ${If} ${FileExists} "$R2\bacula.pdf"
+      IntOp $PreviousComponents $PreviousComponents | ${ComponentPDFDocs}
+    ${EndIf}
+    ${If} ${FileExists} "$R2\bacula\bacula.html"
+      IntOp $PreviousComponents $PreviousComponents | ${ComponentHTMLDocs}
+    ${EndIf}
+    ${If} ${FileExists} "$R2\bacula.html"
+      IntOp $PreviousComponents $PreviousComponents | ${ComponentHTMLDocs}
+    ${EndIf}
+  ${EndIf}
+
+  !InsertMacro MUI_HEADER_TEXT "$(TITLE_InstallType)" "$(SUBTITLE_InstallType)"
+  !InsertMacro MUI_INSTALLOPTIONS_INITDIALOG "InstallType.ini"
+  Pop $HDLG ;HWND of dialog
+
+  !insertmacro MUI_INSTALLOPTIONS_SHOW
+
+  ; Process Results
+
+  !insertmacro MUI_INSTALLOPTIONS_READ $R0 "InstallType.ini" "Field 3" "State"
+
+  ${If} $R0 = 1
+    StrCpy $AutomaticInstall 1
+  ${Else}
+    StrCpy $AutomaticInstall 0
+  ${EndIf}
+
+  Pop $R2
+  Pop $R1
+  Pop $R0
+FunctionEnd
index 562d5d9a59abff6cd49259372a9840c13714ed3f..73fb8d93905f683938f2ed844a7798e62d87bb71 100644 (file)
@@ -1,3 +1,8 @@
+;
+; Note: certain text in this file is overwritten by the code in
+;   InstallType.nsh
+;
+
 [Settings]
 NumFields=6
 
index 1863a9424e878f79c23f6b3337e58132ff0895b0..5f4cfaa3ccec67c16dd52da6554b93cc539c1dc9 100644 (file)
@@ -24,7 +24,7 @@ Function EnterInstallType
 
       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."
+      WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "You have more options, but you will have to manually edit your bacula-fd.conf file before Bacula will work."
 
       ReadRegDWORD $ConfigDirectorDB HKLM Software\Bacula Database
 
@@ -46,12 +46,13 @@ Function EnterInstallType
 
       WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "An old installation has been found in $OldInstallDir.  The Configuration will be migrated.  Please choose the installation type for any additional components you select."
       WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"C:\Program Files\Bacula$\".  The configuration files for additional components will be generated using defaults applicable to most installations."
-      WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "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."
+      WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "You have more options, but you will have to manually edit your bacula-fd.conf file before Bacula will work."
     ${EndIf}
   ${Else}
     ; New Install
     StrCpy $InstallType ${NewInstall}
     WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"C:\Program Files\Bacula$\".  The configuration files will be generated using defaults applicable to most installations."
+    WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "You have more options, but you will have to manually edit your bacula-fd.conf file before Bacula will work."
   ${EndIf}
 
   ${If} $InstallType <> ${NewInstall}