From 2cae0a04b77e0781b9d94055b81332732798e883 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 4 Apr 2009 19:19:26 +0000 Subject: [PATCH] Cleanup Win installer dialog messages a bit git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8688 91ce42f0-d328-0410-95d8-f526ca767f89 --- .../src/win32/win32_installer/ConfigPage2.nsh | 2 +- .../win32/win32_installer/WriteTemplates.ini | 8 +- .../src/win32/win32_installer/winbacula.nsi | 2 +- .../src/win32/win64_installer/ConfigPage1.nsh | 588 +++++------ .../src/win32/win64_installer/ConfigPage2.nsh | 909 +++++++++--------- .../src/win32/win64_installer/InstallType.nsh | 196 ++-- bacula/src/win32/win64_installer/Readme.txt | 96 +- .../win32/win64_installer/WriteTemplates.ini | 78 +- .../src/win32/win64_installer/winbacula.nsi | 15 +- bacula/technotes | 1 + 10 files changed, 942 insertions(+), 953 deletions(-) diff --git a/bacula/src/win32/win32_installer/ConfigPage2.nsh b/bacula/src/win32/win32_installer/ConfigPage2.nsh index 321d7b98cc..532af9b069 100644 --- a/bacula/src/win32/win32_installer/ConfigPage2.nsh +++ b/bacula/src/win32/win32_installer/ConfigPage2.nsh @@ -25,7 +25,7 @@ Function EnterConfigPage2 ${Else} IntOp $R8 $R7 + 26 ${EndIf} - FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Remote Director"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n' + FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Enter data for Director allowed to access this Client"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n' ${EndIf} IntOp $R6 $R6 + 1 diff --git a/bacula/src/win32/win32_installer/WriteTemplates.ini b/bacula/src/win32/win32_installer/WriteTemplates.ini index c3c0aad8c6..e4fb1de804 100644 --- a/bacula/src/win32/win32_installer/WriteTemplates.ini +++ b/bacula/src/win32/win32_installer/WriteTemplates.ini @@ -13,9 +13,9 @@ Bottom=32 [Field 2] Type="CheckBox" -Text="Client" +Text="Save Client template in:" Left=6 -Right=40 +Right=240 Top=38 Bottom=48 @@ -31,9 +31,9 @@ Bottom=62 [Field 4] Type="CheckBox" -Text="Storage" +Text="Save Storage template in:" Left=6 -Right=48 +Right=248 Top=70 Bottom=80 diff --git a/bacula/src/win32/win32_installer/winbacula.nsi b/bacula/src/win32/win32_installer/winbacula.nsi index 565e65e62a..7cac72b04f 100644 --- a/bacula/src/win32/win32_installer/winbacula.nsi +++ b/bacula/src/win32/win32_installer/winbacula.nsi @@ -248,7 +248,7 @@ Function .onInit StrCpy $ConfigClientName "$HostName-fd" StrCpy $ConfigClientPort 9102 - StrCpy $ConfigClientMaxJobs 2 + StrCpy $ConfigClientMaxJobs 5 ;StrCpy $ConfigClientPassword StrCpy $ConfigClientInstallService "$OptService" StrCpy $ConfigClientStartService "$OptStart" diff --git a/bacula/src/win32/win64_installer/ConfigPage1.nsh b/bacula/src/win32/win64_installer/ConfigPage1.nsh index 71965a2a38..2a16fb55fe 100644 --- a/bacula/src/win32/win64_installer/ConfigPage1.nsh +++ b/bacula/src/win32/win64_installer/ConfigPage1.nsh @@ -1,294 +1,294 @@ -Function EnterConfigPage1 - ${If} $AutomaticInstall = 1 - Abort - ${EndIf} - - IntOp $R0 $NewComponents & ${ComponentsFileAndStorage} - - ${If} $R0 = 0 - Abort - ${EndIf} - - FileOpen $R5 "$PLUGINSDIR\ConfigPage1.ini" w - - StrCpy $R6 1 ; Field Number - StrCpy $R7 0 ; Top - - IntOp $R0 $NewComponents & ${ComponentFile} - ${If} $R0 <> 0 - IntOp $R8 $R7 + 52 - FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Client"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 12 - - IntOp $R8 $R7 + 8 - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - - IntOp $R8 $R8 + 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigClientName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 2 - - IntOp $R8 $R8 - 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - - IntOp $R8 $R8 + 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigClientPort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 2 - - IntOp $R8 $R8 - 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - - IntOp $R8 $R8 + 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigClientMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 16 - - IntOp $R8 $R7 + 8 - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - - IntOp $R8 $R8 + 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigClientPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 14 - - IntOp $R8 $R7 + 10 - FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigClientInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - - FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigClientStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 16 - ${Endif} - - IntOp $R0 $NewComponents & ${ComponentStorage} - ${If} $R0 <> 0 - IntOp $R8 $R7 + 52 - FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Storage"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 12 - - IntOp $R8 $R7 + 8 - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - - IntOp $R8 $R8 + 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigStorageName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 2 - - IntOp $R8 $R8 - 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - - IntOp $R8 $R8 + 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigStoragePort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 2 - - IntOp $R8 $R8 - 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - - IntOp $R8 $R8 + 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigStorageMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 16 - - IntOp $R8 $R7 + 8 - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - - IntOp $R8 $R8 + 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigStoragePassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 14 - - IntOp $R8 $R7 + 10 - FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigStorageInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - - FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigStorageStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 16 - ${Endif} - - IntOp $R6 $R6 - 1 - - FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n" - - FileClose $R5 - - !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)" - !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage1.ini" - Pop $HDLG ;HWND of dialog - - ; Initialize Controls - - StrCpy $R6 1 ; Field Number - - IntOp $R0 $NewComponents & ${ComponentFile} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 2 - - ; Client Name - !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND" - SendMessage $HCTL ${EM_LIMITTEXT} 30 0 - - IntOp $R6 $R6 + 2 - - ; Client Port Number - !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND" - SendMessage $HCTL ${EM_LIMITTEXT} 5 0 - - IntOp $R6 $R6 + 2 - - ; Max Jobs - !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND" - SendMessage $HCTL ${EM_LIMITTEXT} 3 0 - - IntOp $R6 $R6 + 5 - ${Endif} - - IntOp $R0 $NewComponents & ${ComponentStorage} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 2 - - ; Storage Name - !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND" - SendMessage $HCTL ${EM_LIMITTEXT} 30 0 - - IntOp $R6 $R6 + 2 - - ; Storage Port Number - !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND" - SendMessage $HCTL ${EM_LIMITTEXT} 5 0 - - IntOp $R6 $R6 + 2 - - ; Max Jobs - !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND" - SendMessage $HCTL ${EM_LIMITTEXT} 3 0 - - IntOp $R6 $R6 + 5 - ${Endif} - - !insertmacro MUI_INSTALLOPTIONS_SHOW - - ; Process results - - StrCpy $R6 3 - - IntOp $R0 $NewComponents & ${ComponentFile} - ${If} $R0 <> 0 - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientName "ConfigPage1.ini" "Field $R6" "State" - - IntOp $R6 $R6 + 2 - - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPort "ConfigPage1.ini" "Field $R6" "State" - - IntOp $R6 $R6 + 2 - - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientMaxJobs "ConfigPage1.ini" "Field $R6" "State" - - IntOp $R6 $R6 + 2 - - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPassword "ConfigPage1.ini" "Field $R6" "State" - - IntOp $R6 $R6 + 1 - - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientInstallService "ConfigPage1.ini" "Field $R6" "State" - - IntOp $R6 $R6 + 1 - - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientStartService "ConfigPage1.ini" "Field $R6" "State" - - IntOp $R6 $R6 + 3 - ${Endif} - - IntOp $R0 $NewComponents & ${ComponentStorage} - ${If} $R0 <> 0 - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageName "ConfigPage1.ini" "Field $R6" "State" - - IntOp $R6 $R6 + 2 - - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStoragePort "ConfigPage1.ini" "Field $R6" "State" - - IntOp $R6 $R6 + 2 - - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageMaxJobs "ConfigPage1.ini" "Field $R6" "State" - - IntOp $R6 $R6 + 2 - - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStoragePassword "ConfigPage1.ini" "Field $R6" "State" - - IntOp $R6 $R6 + 1 - - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageInstallService "ConfigPage1.ini" "Field $R6" "State" - - IntOp $R6 $R6 + 1 - - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageStartService "ConfigPage1.ini" "Field $R6" "State" - - IntOp $R6 $R6 + 3 - ${Endif} -FunctionEnd - -Function LeaveConfigPage1 - StrCpy $R6 5 - - IntOp $R0 $NewComponents & ${ComponentFile} - ${If} $R0 <> 0 - !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State" - ${If} $R0 < 1024 - ${OrIf} $R0 > 65535 - MessageBox MB_OK "Port must be between 1024 and 65535 inclusive." - Abort - ${EndIf} - - IntOp $R6 $R6 + 2 - - !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State" - ${If} $R0 < 1 - ${OrIf} $R0 > 99 - MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive." - Abort - ${EndIf} - - IntOp $R6 $R6 + 9 - ${Endif} - - IntOp $R0 $NewComponents & ${ComponentStorage} - ${If} $R0 <> 0 - !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State" - ${If} $R0 < 1024 - ${OrIf} $R0 > 65535 - MessageBox MB_OK "Port must be between 1024 and 65535 inclusive." - Abort - ${EndIf} - - IntOp $R6 $R6 + 2 - - !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State" - ${If} $R0 < 1 - ${OrIf} $R0 > 99 - MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive." - Abort - ${EndIf} - - IntOp $R6 $R6 + 9 - ${Endif} -FunctionEnd +Function EnterConfigPage1 + ${If} $AutomaticInstall = 1 + Abort + ${EndIf} + + IntOp $R0 $NewComponents & ${ComponentsFileAndStorage} + + ${If} $R0 = 0 + Abort + ${EndIf} + + FileOpen $R5 "$PLUGINSDIR\ConfigPage1.ini" w + + StrCpy $R6 1 ; Field Number + StrCpy $R7 0 ; Top + + IntOp $R0 $NewComponents & ${ComponentFile} + ${If} $R0 <> 0 + IntOp $R8 $R7 + 52 + FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Client"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 12 + + IntOp $R8 $R7 + 8 + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + + IntOp $R8 $R8 + 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigClientName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 2 + + IntOp $R8 $R8 - 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + + IntOp $R8 $R8 + 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigClientPort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 2 + + IntOp $R8 $R8 - 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + + IntOp $R8 $R8 + 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigClientMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 16 + + IntOp $R8 $R7 + 8 + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + + IntOp $R8 $R8 + 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigClientPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 14 + + IntOp $R8 $R7 + 10 + FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigClientInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + + FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigClientStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 16 + ${Endif} + + IntOp $R0 $NewComponents & ${ComponentStorage} + ${If} $R0 <> 0 + IntOp $R8 $R7 + 52 + FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Storage"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 12 + + IntOp $R8 $R7 + 8 + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + + IntOp $R8 $R8 + 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigStorageName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 2 + + IntOp $R8 $R8 - 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + + IntOp $R8 $R8 + 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigStoragePort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 2 + + IntOp $R8 $R8 - 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + + IntOp $R8 $R8 + 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigStorageMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 16 + + IntOp $R8 $R7 + 8 + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + + IntOp $R8 $R8 + 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigStoragePassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 14 + + IntOp $R8 $R7 + 10 + FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigStorageInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + + FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigStorageStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 16 + ${Endif} + + IntOp $R6 $R6 - 1 + + FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n" + + FileClose $R5 + + !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)" + !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage1.ini" + Pop $HDLG ;HWND of dialog + + ; Initialize Controls + + StrCpy $R6 1 ; Field Number + + IntOp $R0 $NewComponents & ${ComponentFile} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 2 + + ; Client Name + !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND" + SendMessage $HCTL ${EM_LIMITTEXT} 30 0 + + IntOp $R6 $R6 + 2 + + ; Client Port Number + !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND" + SendMessage $HCTL ${EM_LIMITTEXT} 5 0 + + IntOp $R6 $R6 + 2 + + ; Max Jobs + !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND" + SendMessage $HCTL ${EM_LIMITTEXT} 3 0 + + IntOp $R6 $R6 + 5 + ${Endif} + + IntOp $R0 $NewComponents & ${ComponentStorage} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 2 + + ; Storage Name + !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND" + SendMessage $HCTL ${EM_LIMITTEXT} 30 0 + + IntOp $R6 $R6 + 2 + + ; Storage Port Number + !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND" + SendMessage $HCTL ${EM_LIMITTEXT} 5 0 + + IntOp $R6 $R6 + 2 + + ; Max Jobs + !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND" + SendMessage $HCTL ${EM_LIMITTEXT} 3 0 + + IntOp $R6 $R6 + 5 + ${Endif} + + !insertmacro MUI_INSTALLOPTIONS_SHOW + + ; Process results + + StrCpy $R6 3 + + IntOp $R0 $NewComponents & ${ComponentFile} + ${If} $R0 <> 0 + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientName "ConfigPage1.ini" "Field $R6" "State" + + IntOp $R6 $R6 + 2 + + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPort "ConfigPage1.ini" "Field $R6" "State" + + IntOp $R6 $R6 + 2 + + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientMaxJobs "ConfigPage1.ini" "Field $R6" "State" + + IntOp $R6 $R6 + 2 + + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPassword "ConfigPage1.ini" "Field $R6" "State" + + IntOp $R6 $R6 + 1 + + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientInstallService "ConfigPage1.ini" "Field $R6" "State" + + IntOp $R6 $R6 + 1 + + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientStartService "ConfigPage1.ini" "Field $R6" "State" + + IntOp $R6 $R6 + 3 + ${Endif} + + IntOp $R0 $NewComponents & ${ComponentStorage} + ${If} $R0 <> 0 + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageName "ConfigPage1.ini" "Field $R6" "State" + + IntOp $R6 $R6 + 2 + + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStoragePort "ConfigPage1.ini" "Field $R6" "State" + + IntOp $R6 $R6 + 2 + + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageMaxJobs "ConfigPage1.ini" "Field $R6" "State" + + IntOp $R6 $R6 + 2 + + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStoragePassword "ConfigPage1.ini" "Field $R6" "State" + + IntOp $R6 $R6 + 1 + + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageInstallService "ConfigPage1.ini" "Field $R6" "State" + + IntOp $R6 $R6 + 1 + + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageStartService "ConfigPage1.ini" "Field $R6" "State" + + IntOp $R6 $R6 + 3 + ${Endif} +FunctionEnd + +Function LeaveConfigPage1 + StrCpy $R6 5 + + IntOp $R0 $NewComponents & ${ComponentFile} + ${If} $R0 <> 0 + !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State" + ${If} $R0 < 1024 + ${OrIf} $R0 > 65535 + MessageBox MB_OK "Port must be between 1024 and 65535 inclusive." + Abort + ${EndIf} + + IntOp $R6 $R6 + 2 + + !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State" + ${If} $R0 < 1 + ${OrIf} $R0 > 99 + MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive." + Abort + ${EndIf} + + IntOp $R6 $R6 + 9 + ${Endif} + + IntOp $R0 $NewComponents & ${ComponentStorage} + ${If} $R0 <> 0 + !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State" + ${If} $R0 < 1024 + ${OrIf} $R0 > 65535 + MessageBox MB_OK "Port must be between 1024 and 65535 inclusive." + Abort + ${EndIf} + + IntOp $R6 $R6 + 2 + + !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State" + ${If} $R0 < 1 + ${OrIf} $R0 > 99 + MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive." + Abort + ${EndIf} + + IntOp $R6 $R6 + 9 + ${Endif} +FunctionEnd diff --git a/bacula/src/win32/win64_installer/ConfigPage2.nsh b/bacula/src/win32/win64_installer/ConfigPage2.nsh index 321d7b98cc..72259c3857 100644 --- a/bacula/src/win32/win64_installer/ConfigPage2.nsh +++ b/bacula/src/win32/win64_installer/ConfigPage2.nsh @@ -1,454 +1,455 @@ -Function EnterConfigPage2 - IntOp $R0 $NewComponents & ${ComponentsRequiringUserConfig} - - ${If} $R0 = 0 - Abort - ${EndIf} - - FileOpen $R5 "$PLUGINSDIR\ConfigPage2.ini" w - - StrCpy $R6 1 ; Field Number - StrCpy $R7 0 ; Top - - IntOp $R0 $NewComponents & ${ComponentDirector} - ${If} $R0 <> 0 - ${If} $AutomaticInstall = 1 - IntOp $R8 $R7 + 54 - ${Else} - IntOp $R8 $R7 + 92 - ${EndIf} - FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Director"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n' - ${Else} - IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles} - ${If} $R0 <> 0 - IntOp $R8 $R7 + 54 - ${Else} - IntOp $R8 $R7 + 26 - ${EndIf} - FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Remote Director"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n' - ${EndIf} - - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 12 - - IntOp $R0 $NewComponents & ${ComponentDirector} - ${If} $R0 <> 0 - ${If} "$ConfigDirectorName" == "" - StrCpy $ConfigDirectorName "$HostName-dir" - ${EndIf} - ${If} "$ConfigDirectorPassword" == "" - StrCpy $ConfigDirectorPassword "$LocalDirectorPassword" - ${EndIf} - ${Else} - ${If} "$ConfigDirectorName" == "$HostName-dir" - StrCpy $ConfigDirectorName "" - ${EndIf} - ${If} "$ConfigDirectorPassword" == "$LocalDirectorPassword" - StrCpy $ConfigDirectorPassword "" - ${EndIf} - ${EndIf} - - IntOp $R0 $NewComponents & ${ComponentDirector} - ${If} $R0 = 0 - ${OrIf} $AutomaticInstall = 0 - IntOp $R8 $R7 + 8 - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - - IntOp $R8 $R8 + 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - - ${If} $AutomaticInstall = 0 - IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles} - ${If} $R0 <> 0 - IntOp $R7 $R7 + 2 - IntOp $R8 $R8 - 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - - IntOp $R8 $R8 + 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigDirectorPort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - ${EndIf} - - IntOp $R0 $NewComponents & ${ComponentDirector} - ${If} $R0 <> 0 - IntOp $R7 $R7 + 2 - IntOp $R8 $R8 - 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - - IntOp $R8 $R8 + 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigDirectorMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - ${EndIf} - ${EndIf} - - IntOp $R7 $R7 + 14 - ${EndIf} - - IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles} - ${If} $R0 <> 0 - ${OrIf} $AutomaticInstall = 0 - IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles} - ${If} $R0 <> 0 - IntOp $R7 $R7 + 2 - IntOp $R8 $R7 + 8 - - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n' - - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - IntOp $R8 $R8 + 2 - - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' - - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 14 - ${EndIf} - ${EndIf} - - IntOp $R0 $NewComponents & ${ComponentDirector} - ${If} $R0 <> 0 - IntOp $R7 $R7 + 2 - IntOp $R8 $R7 + 8 - - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Mail Server"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n' - - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - IntOp $R8 $R8 + 2 - - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorMailServer$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 16 - IntOp $R8 $R7 + 8 - - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Mail Address"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n' - - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - IntOp $R8 $R8 + 2 - - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorMailAddress$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 16 - IntOp $R8 $R7 + 8 - - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Database"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n' - - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - IntOp $R8 $R8 + 2 - - ${If} $ConfigDirectorDB = 0 - ${If} $MySQLPath != "" - StrCpy $ConfigDirectorDB 1 - ${ElseIf} $PostgreSQLPath != "" - StrCpy $ConfigDirectorDB 2 - ${Else} - StrCpy $ConfigDirectorDB 3 - ${EndIf} - ${EndIf} - - ${If} $ConfigDirectorDB = 1 - StrCpy $R9 1 - ${Else} - StrCpy $R9 0 - ${EndIf} - - FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="MySQL"$\r$\nFlags="GROUP"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=90$\r$\nBottom=$R8$\r$\n$\r$\n' - - IntOp $R6 $R6 + 1 - - ${If} $ConfigDirectorDB = 2 - StrCpy $R9 1 - ${Else} - StrCpy $R9 0 - ${EndIf} - - FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="PostgreSQL"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=94$\r$\nTop=$R7$\r$\nRight=146$\r$\nBottom=$R8$\r$\n$\r$\n' - - IntOp $R6 $R6 + 1 - - ${If} $ConfigDirectorDB = 3 - StrCpy $R9 1 - ${Else} - StrCpy $R9 0 - ${EndIf} - - FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="Sqlite"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=150$\r$\nTop=$R7$\r$\nRight=182$\r$\nBottom=$R8$\r$\n$\r$\n' - - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 12 - - ${If} $AutomaticInstall = 0 - IntOp $R8 $R7 + 10 - FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigDirectorInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - - FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigDirectorStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n' - - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 12 - ${EndIf} - ${Else} - IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles} - ${If} $R0 <> 0 - IntOp $R7 $R7 + 2 - IntOp $R8 $R7 + 8 - - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Address"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n' - - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - IntOp $R8 $R8 + 2 - - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorAddress$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 14 - IntOp $R8 $R7 + 8 - ${EndIf} - ${EndIf} - - IntOp $R7 $R7 + 4 - - ${If} $AutomaticInstall = 0 - IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector} - ${If} $R0 <> 0 - IntOp $R8 $R7 + 42 - - FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Monitor"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 12 - - IntOp $R8 $R7 + 8 - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - - IntOp $R8 $R8 + 2 - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigMonitorName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=150$\r$\nBottom=$R8$\r$\n$\r$\n' - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 16 - IntOp $R8 $R7 + 8 - - FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n' - - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 - 2 - IntOp $R8 $R8 + 2 - - FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigMonitorPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' - - IntOp $R6 $R6 + 1 - IntOp $R7 $R7 + 20 - ${EndIf} - ${EndIf} - - IntOp $R6 $R6 - 1 - FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n" - - FileClose $R5 - - IntOp $R0 $NewComponents & ${ComponentsFileAndStorage} - ${If} $R0 = 0 - ${OrIf} $AutomaticInstall = 1 - !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)" - ${Else} - !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage2)" "$(SUBTITLE_ConfigPage2)" - ${EndIf} - - !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage2.ini" - Pop $HDLG ;HWND of dialog - - ; Initialize Controls - StrCpy $R6 2 ; Field Number - - IntOp $R0 $NewComponents & ${ComponentDirector} - ${If} $R0 = 0 - ${OrIf} $AutomaticInstall = 0 - ; Name - IntOp $R6 $R6 + 1 - !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND" - SendMessage $HCTL ${EM_LIMITTEXT} 30 0 - IntOp $R6 $R6 + 1 - - ${If} $AutomaticInstall = 0 - IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 1 - ; Port Number - !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND" - SendMessage $HCTL ${EM_LIMITTEXT} 5 0 - IntOp $R6 $R6 + 1 - ${EndIf} - - IntOp $R0 $NewComponents & ${ComponentDirector} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 1 - ; Max Jobs - !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND" - SendMessage $HCTL ${EM_LIMITTEXT} 3 0 - - IntOp $R6 $R6 + 1 - ${EndIf} - ${EndIf} - ${EndIf} - - IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles} - ${If} $R0 <> 0 - ${OrIf} $AutomaticInstall = 0 - IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 2 - ${EndIf} - ${EndIf} - - IntOp $R0 $NewComponents & ${ComponentDirector} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 9 - - ${If} $AutomaticInstall = 0 - IntOp $R6 $R6 + 2 - ${EndIf} - ${Else} - IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 2 - ${EndIf} - ${EndIf} - - ${If} $AutomaticInstall = 0 - IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 2 - !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND" - SendMessage $HCTL ${EM_LIMITTEXT} 30 0 - IntOp $R6 $R6 + 2 - ${EndIf} - ${EndIf} - - !insertmacro MUI_INSTALLOPTIONS_SHOW - - ; Process results - - StrCpy $R6 2 - - IntOp $R0 $NewComponents & ${ComponentDirector} - ${If} $R0 = 0 - ${OrIf} $AutomaticInstall = 0 - IntOp $R6 $R6 + 1 - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorName "ConfigPage2.ini" "Field $R6" "State" - IntOp $R6 $R6 + 1 - - ${If} $AutomaticInstall = 0 - IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 1 - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPort "ConfigPage2.ini" "Field $R6" "State" - IntOp $R6 $R6 + 1 - ${EndIf} - - IntOp $R0 $NewComponents & ${ComponentDirector} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 1 - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMaxJobs "ConfigPage2.ini" "Field $R6" "State" - IntOp $R6 $R6 + 1 - ${EndIf} - ${EndIf} - ${EndIf} - - IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles} - ${If} $R0 <> 0 - ${OrIf} $AutomaticInstall = 0 - IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 1 - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPassword "ConfigPage2.ini" "Field $R6" "State" - IntOp $R6 $R6 + 1 - ${EndIf} - ${EndIf} - - IntOp $R0 $NewComponents & ${ComponentDirector} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 1 - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailServer "ConfigPage2.ini" "Field $R6" "State" - IntOp $R6 $R6 + 2 - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailAddress "ConfigPage2.ini" "Field $R6" "State" - IntOp $R6 $R6 + 2 - !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State" - ${If} $R5 = 1 - StrCpy $ConfigDirectorDB 1 - ${Endif} - IntOp $R6 $R6 + 1 - !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State" - ${If} $R5 = 1 - StrCpy $ConfigDirectorDB 2 - ${Endif} - IntOp $R6 $R6 + 1 - !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State" - ${If} $R5 = 1 - StrCpy $ConfigDirectorDB 3 - ${Endif} - IntOp $R6 $R6 + 1 - - ${If} $AutomaticInstall = 0 - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorInstallService "ConfigPage2.ini" "Field $R6" "State" - IntOp $R6 $R6 + 1 - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorStartService "ConfigPage2.ini" "Field $R6" "State" - IntOp $R6 $R6 + 1 - ${EndIf} - ${Else} - IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 1 - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorAddress "ConfigPage2.ini" "Field $R6" "State" - IntOp $R6 $R6 + 1 - ${EndIf} - ${EndIf} - - ${If} $AutomaticInstall = 0 - IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 2 - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorName "ConfigPage2.ini" "Field $R6" "State" - IntOp $R6 $R6 + 2 - !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorPassword "ConfigPage2.ini" "Field $R6" "State" - ${EndIf} - ${EndIf} -FunctionEnd - -Function LeaveConfigPage2 - ${If} $AutomaticInstall = 0 - StrCpy $R6 4 - - IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 1 - !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State" - ${If} $R0 < 1024 - ${OrIf} $R0 > 65535 - MessageBox MB_OK "Port must be between 1024 and 65535 inclusive." - Abort - ${EndIf} - IntOp $R6 $R6 + 1 - ${EndIf} - - IntOp $R0 $NewComponents & ${ComponentDirector} - ${If} $R0 <> 0 - IntOp $R6 $R6 + 1 - !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State" - ${If} $R0 < 1 - ${OrIf} $R0 > 99 - MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive." - Abort - ${EndIf} - IntOp $R6 $R6 + 1 - ${EndIf} - ${EndIf} -FunctionEnd +Function EnterConfigPage2 + IntOp $R0 $NewComponents & ${ComponentsRequiringUserConfig} + + ${If} $R0 = 0 + Abort + ${EndIf} + + FileOpen $R5 "$PLUGINSDIR\ConfigPage2.ini" w + + StrCpy $R6 1 ; Field Number + StrCpy $R7 0 ; Top + + IntOp $R0 $NewComponents & ${ComponentDirector} + ${If} $R0 <> 0 + ${If} $AutomaticInstall = 1 + IntOp $R8 $R7 + 54 + ${Else} + IntOp $R8 $R7 + 92 + ${EndIf} + FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Director"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n' + ${Else} + IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles} + ${If} $R0 <> 0 + IntOp $R8 $R7 + 54 + ${Else} + IntOp $R8 $R7 + 26 + ${EndIf} + FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Enter data for Director Allowed to access this Client"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n' + ${EndIf} + + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 12 + + IntOp $R0 $NewComponents & ${ComponentDirector} + ${If} $R0 <> 0 + ${If} "$ConfigDirectorName" == "" + StrCpy $ConfigDirectorName "$HostName-dir" + ${EndIf} + ${If} "$ConfigDirectorPassword" == "" + StrCpy $ConfigDirectorPassword "$LocalDirectorPassword" + ${EndIf} + ${Else} + ${If} "$ConfigDirectorName" == "$HostName-dir" + StrCpy $ConfigDirectorName "" + ${EndIf} + ${If} "$ConfigDirectorPassword" == "$LocalDirectorPassword" + StrCpy $ConfigDirectorPassword "" + ${EndIf} + ${EndIf} + + IntOp $R0 $NewComponents & ${ComponentDirector} + ${If} $R0 = 0 + ${OrIf} $AutomaticInstall = 0 + IntOp $R8 $R7 + 8 + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + + IntOp $R8 $R8 + 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + + ${If} $AutomaticInstall = 0 + IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles} + ${If} $R0 <> 0 + IntOp $R7 $R7 + 2 + IntOp $R8 $R8 - 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + + IntOp $R8 $R8 + 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigDirectorPort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + ${EndIf} + + IntOp $R0 $NewComponents & ${ComponentDirector} + ${If} $R0 <> 0 + IntOp $R7 $R7 + 2 + IntOp $R8 $R8 - 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + + IntOp $R8 $R8 + 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigDirectorMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + ${EndIf} + ${EndIf} + + IntOp $R7 $R7 + 14 + ${EndIf} + + IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles} + ${If} $R0 <> 0 + ${OrIf} $AutomaticInstall = 0 + IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles} + ${If} $R0 <> 0 + IntOp $R7 $R7 + 2 + IntOp $R8 $R7 + 8 + + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n' + + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + IntOp $R8 $R8 + 2 + + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' + + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 14 + ${EndIf} + ${EndIf} + + IntOp $R0 $NewComponents & ${ComponentDirector} + ${If} $R0 <> 0 + IntOp $R7 $R7 + 2 + IntOp $R8 $R7 + 8 + + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Mail Server"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n' + + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + IntOp $R8 $R8 + 2 + + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorMailServer$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 16 + IntOp $R8 $R7 + 8 + + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Mail Address"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n' + + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + IntOp $R8 $R8 + 2 + + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorMailAddress$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 16 + IntOp $R8 $R7 + 8 + + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Database"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n' + + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + IntOp $R8 $R8 + 2 + + ${If} $ConfigDirectorDB = 0 + ${If} $MySQLPath != "" + StrCpy $ConfigDirectorDB 1 + ${ElseIf} $PostgreSQLPath != "" + StrCpy $ConfigDirectorDB 2 + ${Else} + StrCpy $ConfigDirectorDB 3 + ${EndIf} + ${EndIf} + + ${If} $ConfigDirectorDB = 1 + StrCpy $R9 1 + ${Else} + StrCpy $R9 0 + ${EndIf} + + FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="MySQL"$\r$\nFlags="GROUP"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=90$\r$\nBottom=$R8$\r$\n$\r$\n' + + IntOp $R6 $R6 + 1 + + ${If} $ConfigDirectorDB = 2 + StrCpy $R9 1 + ${Else} + StrCpy $R9 0 + ${EndIf} + + FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="PostgreSQL"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=94$\r$\nTop=$R7$\r$\nRight=146$\r$\nBottom=$R8$\r$\n$\r$\n' + + IntOp $R6 $R6 + 1 + + ${If} $ConfigDirectorDB = 3 + StrCpy $R9 1 + ${Else} + StrCpy $R9 0 + ${EndIf} + + FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="Sqlite"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=150$\r$\nTop=$R7$\r$\nRight=182$\r$\nBottom=$R8$\r$\n$\r$\n' + + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 12 + + ${If} $AutomaticInstall = 0 + IntOp $R8 $R7 + 10 + FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigDirectorInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + + FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigDirectorStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n' + + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 12 + ${EndIf} + ${Else} + IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles} + ${If} $R0 <> 0 + IntOp $R7 $R7 + 2 + IntOp $R8 $R7 + 8 + + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Address"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n' + + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + IntOp $R8 $R8 + 2 + + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorAddress$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 14 + IntOp $R8 $R7 + 8 + ${EndIf} + ${EndIf} + + IntOp $R7 $R7 + 4 + + ${If} $AutomaticInstall = 0 + IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector} + IntOp $R0 0 & 0 + ${If} $R0 <> 0 + IntOp $R8 $R7 + 42 + + FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Monitor"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 12 + + IntOp $R8 $R7 + 8 + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + + IntOp $R8 $R8 + 2 + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigMonitorName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=150$\r$\nBottom=$R8$\r$\n$\r$\n' + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 16 + IntOp $R8 $R7 + 8 + + FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n' + + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 - 2 + IntOp $R8 $R8 + 2 + + FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigMonitorPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n' + + IntOp $R6 $R6 + 1 + IntOp $R7 $R7 + 20 + ${EndIf} + ${EndIf} + + IntOp $R6 $R6 - 1 + FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n" + + FileClose $R5 + + IntOp $R0 $NewComponents & ${ComponentsFileAndStorage} + ${If} $R0 = 0 + ${OrIf} $AutomaticInstall = 1 + !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)" + ${Else} + !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage2)" "$(SUBTITLE_ConfigPage2)" + ${EndIf} + + !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage2.ini" + Pop $HDLG ;HWND of dialog + + ; Initialize Controls + StrCpy $R6 2 ; Field Number + + IntOp $R0 $NewComponents & ${ComponentDirector} + ${If} $R0 = 0 + ${OrIf} $AutomaticInstall = 0 + ; Name + IntOp $R6 $R6 + 1 + !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND" + SendMessage $HCTL ${EM_LIMITTEXT} 30 0 + IntOp $R6 $R6 + 1 + + ${If} $AutomaticInstall = 0 + IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 1 + ; Port Number + !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND" + SendMessage $HCTL ${EM_LIMITTEXT} 5 0 + IntOp $R6 $R6 + 1 + ${EndIf} + + IntOp $R0 $NewComponents & ${ComponentDirector} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 1 + ; Max Jobs + !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND" + SendMessage $HCTL ${EM_LIMITTEXT} 3 0 + + IntOp $R6 $R6 + 1 + ${EndIf} + ${EndIf} + ${EndIf} + + IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles} + ${If} $R0 <> 0 + ${OrIf} $AutomaticInstall = 0 + IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 2 + ${EndIf} + ${EndIf} + + IntOp $R0 $NewComponents & ${ComponentDirector} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 9 + + ${If} $AutomaticInstall = 0 + IntOp $R6 $R6 + 2 + ${EndIf} + ${Else} + IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 2 + ${EndIf} + ${EndIf} + + ${If} $AutomaticInstall = 0 + IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 2 + !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND" + SendMessage $HCTL ${EM_LIMITTEXT} 30 0 + IntOp $R6 $R6 + 2 + ${EndIf} + ${EndIf} + + !insertmacro MUI_INSTALLOPTIONS_SHOW + + ; Process results + + StrCpy $R6 2 + + IntOp $R0 $NewComponents & ${ComponentDirector} + ${If} $R0 = 0 + ${OrIf} $AutomaticInstall = 0 + IntOp $R6 $R6 + 1 + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorName "ConfigPage2.ini" "Field $R6" "State" + IntOp $R6 $R6 + 1 + + ${If} $AutomaticInstall = 0 + IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 1 + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPort "ConfigPage2.ini" "Field $R6" "State" + IntOp $R6 $R6 + 1 + ${EndIf} + + IntOp $R0 $NewComponents & ${ComponentDirector} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 1 + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMaxJobs "ConfigPage2.ini" "Field $R6" "State" + IntOp $R6 $R6 + 1 + ${EndIf} + ${EndIf} + ${EndIf} + + IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles} + ${If} $R0 <> 0 + ${OrIf} $AutomaticInstall = 0 + IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 1 + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPassword "ConfigPage2.ini" "Field $R6" "State" + IntOp $R6 $R6 + 1 + ${EndIf} + ${EndIf} + + IntOp $R0 $NewComponents & ${ComponentDirector} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 1 + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailServer "ConfigPage2.ini" "Field $R6" "State" + IntOp $R6 $R6 + 2 + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailAddress "ConfigPage2.ini" "Field $R6" "State" + IntOp $R6 $R6 + 2 + !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State" + ${If} $R5 = 1 + StrCpy $ConfigDirectorDB 1 + ${Endif} + IntOp $R6 $R6 + 1 + !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State" + ${If} $R5 = 1 + StrCpy $ConfigDirectorDB 2 + ${Endif} + IntOp $R6 $R6 + 1 + !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State" + ${If} $R5 = 1 + StrCpy $ConfigDirectorDB 3 + ${Endif} + IntOp $R6 $R6 + 1 + + ${If} $AutomaticInstall = 0 + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorInstallService "ConfigPage2.ini" "Field $R6" "State" + IntOp $R6 $R6 + 1 + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorStartService "ConfigPage2.ini" "Field $R6" "State" + IntOp $R6 $R6 + 1 + ${EndIf} + ${Else} + IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 1 + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorAddress "ConfigPage2.ini" "Field $R6" "State" + IntOp $R6 $R6 + 1 + ${EndIf} + ${EndIf} + + ${If} $AutomaticInstall = 0 + IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 2 + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorName "ConfigPage2.ini" "Field $R6" "State" + IntOp $R6 $R6 + 2 + !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorPassword "ConfigPage2.ini" "Field $R6" "State" + ${EndIf} + ${EndIf} +FunctionEnd + +Function LeaveConfigPage2 + ${If} $AutomaticInstall = 0 + StrCpy $R6 4 + + IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 1 + !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State" + ${If} $R0 < 1024 + ${OrIf} $R0 > 65535 + MessageBox MB_OK "Port must be between 1024 and 65535 inclusive." + Abort + ${EndIf} + IntOp $R6 $R6 + 1 + ${EndIf} + + IntOp $R0 $NewComponents & ${ComponentDirector} + ${If} $R0 <> 0 + IntOp $R6 $R6 + 1 + !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State" + ${If} $R0 < 1 + ${OrIf} $R0 > 99 + MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive." + Abort + ${EndIf} + IntOp $R6 $R6 + 1 + ${EndIf} + ${EndIf} +FunctionEnd diff --git a/bacula/src/win32/win64_installer/InstallType.nsh b/bacula/src/win32/win64_installer/InstallType.nsh index 0a0f902532..1863a9424e 100644 --- a/bacula/src/win32/win64_installer/InstallType.nsh +++ b/bacula/src/win32/win64_installer/InstallType.nsh @@ -1,98 +1,98 @@ -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" "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." - - 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 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." - ${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." - ${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 +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" "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." + + 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 $\"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." + ${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." + ${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 diff --git a/bacula/src/win32/win64_installer/Readme.txt b/bacula/src/win32/win64_installer/Readme.txt index b8a52d8f07..2e7397d939 100755 --- a/bacula/src/win32/win64_installer/Readme.txt +++ b/bacula/src/win32/win64_installer/Readme.txt @@ -1,48 +1,48 @@ -Bacula - Windows Version Disclaimer -=================================== - -Please note, only the Win64 Client (File daemon) is supported, and -contrary to the Win32 Client, the other components (Director, Storage daemon, -their utilities) are not provided because they have not been ported. -Note: the Win64 Client can only be installed on 64 bit Windows Operating -systems. - -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 --------------- -Everything is installed in the directory -"C:\Program Files\Bacula" unless a different directory was selected during -installation. Note: due to a bug in the NSIS installer we are using, on -64 bit machines appears to install Bacula in "C:\Program Files (x86)\Bacula". - -Code Page Problems -------------------- -Please note that Bacula expects the contents of the configuration files to be -written in UTF-8 format. Some translations of "Application Data" have accented -characters, and apparently the installer writes this translated data in the -standard Windows code page coding. This occurs for the Working Directory, and -when it happens the daemon will not start since Bacula cannot find the directory. -The workaround is to manually edit the appropriate conf file and ensure that it -is written out in UTF-8 format. - -The conf files can be edited with any UTF-8 compatible editor, or on most -modern Windows machines, you can edit them with notepad, then choose UTF-8 -output encoding before saving them. +Bacula - Windows Version Disclaimer +=================================== + +Please note, only the Win64 Client (File daemon) is supported, and +contrary to the Win32 Client, the other components (Director, Storage daemon, +their utilities) are not provided because they have not been ported. +Note: the Win64 Client can only be installed on 64 bit Windows Operating +systems. + +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 +-------------- +Everything is installed in the directory +"C:\Program Files\Bacula" unless a different directory was selected during +installation. Note: due to a bug in the NSIS installer we are using, on +64 bit machines appears to install Bacula in "C:\Program Files (x86)\Bacula". + +Code Page Problems +------------------- +Please note that Bacula expects the contents of the configuration files to be +written in UTF-8 format. Some translations of "Application Data" have accented +characters, and apparently the installer writes this translated data in the +standard Windows code page coding. This occurs for the Working Directory, and +when it happens the daemon will not start since Bacula cannot find the directory. +The workaround is to manually edit the appropriate conf file and ensure that it +is written out in UTF-8 format. + +The conf files can be edited with any UTF-8 compatible editor, or on most +modern Windows machines, you can edit them with notepad, then choose UTF-8 +output encoding before saving them. diff --git a/bacula/src/win32/win64_installer/WriteTemplates.ini b/bacula/src/win32/win64_installer/WriteTemplates.ini index c3c0aad8c6..1b9b1b1b8b 100644 --- a/bacula/src/win32/win64_installer/WriteTemplates.ini +++ b/bacula/src/win32/win64_installer/WriteTemplates.ini @@ -1,48 +1,30 @@ -[Settings] -NumFields=5 -CancelEnabled=0 -BackEnabled=0 - -[Field 1] -Type="Label" -Text="Templates of the Client and Storage resources can be generated that are customized with the information about this system. These templates can then be copied to the Director computer and included in the Director's configuration file." -Left=7 -Right=293 -Top=6 -Bottom=32 - -[Field 2] -Type="CheckBox" -Text="Client" -Left=6 -Right=40 -Top=38 -Bottom=48 - -[Field 3] -Type="FileRequest" -State="Client.conf" -Flags= -Filter=Configuration Files|*.conf|All Files|*.* -Left=16 -Right=288 -Top=50 -Bottom=62 - -[Field 4] -Type="CheckBox" -Text="Storage" -Left=6 -Right=48 -Top=70 -Bottom=80 - -[Field 5] -Type="FileRequest" -State="Storage.conf" -Flags=REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST -Filter=Configuration Files|*.conf|All Files|*.* -Left=16 -Right=288 -Top=82 -Bottom=94 +[Settings] +NumFields=3 +CancelEnabled=0 +BackEnabled=0 + +[Field 1] +Type="Label" +Text="A Template of the Client resource can be generated that contains the information about this Client. This template can then be copied to the Director computer and included in the Director's configuration file." +Left=7 +Right=293 +Top=6 +Bottom=32 + +[Field 2] +Type="CheckBox" +Text="Save Client template in: +Left=6 +Right=240 +Top=38 +Bottom=48 + +[Field 3] +Type="FileRequest" +State="Client.conf" +Flags= +Filter=Configuration Files|*.conf|All Files|*.* +Left=16 +Right=288 +Top=50 +Bottom=62 diff --git a/bacula/src/win32/win64_installer/winbacula.nsi b/bacula/src/win32/win64_installer/winbacula.nsi index f00db372d5..382d352162 100644 --- a/bacula/src/win32/win64_installer/winbacula.nsi +++ b/bacula/src/win32/win64_installer/winbacula.nsi @@ -1,4 +1,4 @@ -; winbsclient.nsi +; winbacula.nsi ; ; Began as a version written by Michel Meyers (michel@tcnnet.dyndns.org) ; @@ -35,6 +35,9 @@ ; Eric Bollengier March 2009 ; Updated to handle Win64 installation ; +; Kern Sibbald April 2009 +; Correct some Win64 install problems +; ; Version $Id: winbacula.nsi 7074 2008-05-31 18:43:21Z kerns $ ; ; Command line options: @@ -64,10 +67,12 @@ Name "Bacula" OutFile "${OUT_DIR}\win${WINVER}bacula-${VERSION}.exe" SetCompressor lzma -InstallDir "$PROGRAMFILES\bacula" +InstallDir "C:\Program Files\Bacula" InstallDirRegKey HKLM "Software\Bacula" "InstallLocation" InstType "Client" +;InstType "Server" +;InstType "Full" !insertmacro GetParent @@ -552,7 +557,7 @@ LangString TITLE_InstallType ${LANG_ENGLISH} "Installation Type" LangString SUBTITLE_InstallType ${LANG_ENGLISH} "Choose installation type." LangString TITLE_WriteTemplates ${LANG_ENGLISH} "Create Templates" -LangString SUBTITLE_WriteTemplates ${LANG_ENGLISH} "Create resource templates for inclusion in the Director's configuration file." +LangString SUBTITLE_WriteTemplates ${LANG_ENGLISH} "Create a resource template for inclusion in the Director's configuration file." !InsertMacro MUI_FUNCTION_DESCRIPTION_BEGIN !InsertMacro MUI_DESCRIPTION_TEXT ${SecFileDaemon} $(DESC_SecFileDaemon) @@ -564,7 +569,7 @@ LangString SUBTITLE_WriteTemplates ${LANG_ENGLISH} "Create resource templates fo ; Uninstall section -UninstallText "This will uninstall Bacula. Hit next to continue." +UninstallText "This will uninstall Bacula. Click Uninstall to continue." Section "Uninstall" ; Shutdown any baculum that could be running @@ -810,7 +815,7 @@ Function EnterWriteTemplates WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" State 1 DeleteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" Flags WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 3" State "C:\$ConfigClientName.conf" - WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST +; WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST ${EndIf} diff --git a/bacula/technotes b/bacula/technotes index 8063f4fc68..88e62e029c 100644 --- a/bacula/technotes +++ b/bacula/technotes @@ -3,6 +3,7 @@ General: 04Apr09 +kes Cleanup Win installer dialog messages a bit ... kes Separate object/binaries in Win32 and Win64 builds. More to be done. kes Add bconsole to Win64 installer. 03Apr09 -- 2.39.5