From 0ecd3d3ba4601557067a994df967d4f31838664e Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 22 Jan 2010 18:07:31 +0100 Subject: [PATCH] Remove servers from Win32 installer + use single file install --- .../src/win32/win32_installer/ConfigPage1.nsh | 588 +++++------ .../src/win32/win32_installer/ConfigPage2.nsh | 909 +++++++++--------- .../src/win32/win32_installer/InstallType.nsh | 15 +- bacula/src/win32/win32_installer/Makefile | 1 + bacula/src/win32/win32_installer/Readme.txt | 53 +- .../win32/win32_installer/WriteTemplates.ini | 78 +- .../win32/win32_installer/bacula-dir.conf.in | 760 +++++++-------- .../win32/win32_installer/bacula-fd.conf.in | 88 +- .../src/win32/win32_installer/winbacula.nsi | 683 ++----------- 9 files changed, 1302 insertions(+), 1873 deletions(-) mode change 100644 => 100755 bacula/src/win32/win32_installer/Readme.txt diff --git a/bacula/src/win32/win32_installer/ConfigPage1.nsh b/bacula/src/win32/win32_installer/ConfigPage1.nsh index 71965a2a38..2a16fb55fe 100644 --- a/bacula/src/win32/win32_installer/ConfigPage1.nsh +++ b/bacula/src/win32/win32_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/win32_installer/ConfigPage2.nsh b/bacula/src/win32/win32_installer/ConfigPage2.nsh index 532af9b069..7fe7b660e8 100644 --- a/bacula/src/win32/win32_installer/ConfigPage2.nsh +++ b/bacula/src/win32/win32_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="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} - ${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/win32_installer/InstallType.nsh b/bacula/src/win32/win32_installer/InstallType.nsh index 373f68cce1..e4a9711df7 100644 --- a/bacula/src/win32/win32_installer/InstallType.nsh +++ b/bacula/src/win32/win32_installer/InstallType.nsh @@ -45,13 +45,13 @@ Function EnterInstallType 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 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 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 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} @@ -66,18 +66,9 @@ Function EnterInstallType ${If} ${FileExists} "$R1\bat.conf" IntOp $PreviousComponents $PreviousComponents | ${ComponentBatConsole} ${EndIf} - ${If} ${FileExists} "$R1\wx-console.conf" - IntOp $PreviousComponents $PreviousComponents | ${ComponentGUIConsole} - ${EndIf} - ${If} ${FileExists} "$R2\bacula.pdf" + ${If} ${FileExists} "$R2\main.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)" diff --git a/bacula/src/win32/win32_installer/Makefile b/bacula/src/win32/win32_installer/Makefile index d79427adce..2459f5aded 100644 --- a/bacula/src/win32/win32_installer/Makefile +++ b/bacula/src/win32/win32_installer/Makefile @@ -14,6 +14,7 @@ DEFINES := \ -DOUT_DIR=..\\release32 \ -DSRC_DIR=release32 \ -DBUILD_TOOLS=MinGW \ + -DWINVER=32 INSTALL_EXE := $(BUILDDIR)/release32/winbacula-$(VERSION).exe diff --git a/bacula/src/win32/win32_installer/Readme.txt b/bacula/src/win32/win32_installer/Readme.txt old mode 100644 new mode 100755 index 5535f9b8cf..156788ecb6 --- a/bacula/src/win32/win32_installer/Readme.txt +++ b/bacula/src/win32/win32_installer/Readme.txt @@ -1,24 +1,11 @@ Bacula - Windows Version Disclaimer =================================== -Please note, only the Win32 Client (File daemon) is supported. All the -other components (Director, Storage daemon, their utilities) are provided -on an "as is" basis. Unfortunately, they are neither properly tested, -documented, or supported. This means that we cannot ensure that bug reports -against the non-supported components will be fixed. For them to be supported, -we need three things from the Open Source community: +Please note, only the Win32 Client (File daemon) is supported, and the other +components (Director, Storage daemon, their utilities) are not provided +because they have not been ported. If you want these components, either build +them yourself or ask Bacula Systems about them. -1. Full documentation of the Windows particularities of the Director, - the Storage daemon, and their utilities in the Bacula manual. - -2. Someone to periodically and on demand run the regressions tests. - -3. One or more developers who are willing to accept and correct Windows - related bugs as they occur. - -4. A certain Win32 community that will respond to user support questions - on the bacula-users list. (This is probably already fullfilled). - Bacula - Windows Version Notes ============================== @@ -41,10 +28,10 @@ choices available will vary depending on the options you chose to install. File Locations -------------- -The programs and documentation are installed in the directory +Everything is 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. +installation. + Code Page Problems ------------------- @@ -57,29 +44,5 @@ 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 Win32 machines, you can edit them with notepad, then choose UTF-8 +modern Windows machines, you can edit them with notepad, then choose UTF-8 output encoding before saving them. - - -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 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. diff --git a/bacula/src/win32/win32_installer/WriteTemplates.ini b/bacula/src/win32/win32_installer/WriteTemplates.ini index e4fb1de804..3b3631c3ff 100644 --- a/bacula/src/win32/win32_installer/WriteTemplates.ini +++ b/bacula/src/win32/win32_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="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 - -[Field 4] -Type="CheckBox" -Text="Save Storage template in:" -Left=6 -Right=248 -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/win32_installer/bacula-dir.conf.in b/bacula/src/win32/win32_installer/bacula-dir.conf.in index 6b3fe43a48..c42f225aed 100644 --- a/bacula/src/win32/win32_installer/bacula-dir.conf.in +++ b/bacula/src/win32/win32_installer/bacula-dir.conf.in @@ -1,380 +1,380 @@ -# -# Default Bacula Director Configuration file -# -# The only thing that MUST be changed is to add one or more -# file or directory names in the Include directive of the -# FileSet resource. -# -# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@ -# -# You might also want to change the default email address -# from root to your address. See the "mail" and "operator" -# directives in the Messages resource. -# - -Director { # define myself - Name = @director_name@ - DIRport = @director_port@ # where we listen for UA connections - QueryFile = "@bin_dir@\\query.sql" - WorkingDirectory = "@working_dir@" - PidDirectory = "@working_dir@" - Maximum Concurrent Jobs = @director_maxjobs@ - Password = "@director_password@" # Console password - Messages = Daemon -} - -JobDefs { - Name = "DefaultJob" - Type = Backup - Level = Incremental - Client = @client_name@ - FileSet = "Test Set" - Schedule = "WeeklyCycle" - Storage = File - Messages = Standard - Pool = Default - Priority = 10 -} - - -# -# Define the main nightly save backup job -# By default, this job will back up to disk in C:/tmp -Job { - Name = "Client1" - JobDefs = "DefaultJob" - Write Bootstrap = "@working_dir@\\Client1.bsr" -} - -#Job { -# Name = "Client2" -# Client = @client_name@2 -# JobDefs = "DefaultJob" -# Write Bootstrap = "@working_dir@\\Client2.bsr" -#} - -# Backup the catalog database (after the nightly save) -Job { - Name = "BackupCatalog" - JobDefs = "DefaultJob" - Level = Full - FileSet="Catalog" - Schedule = "WeeklyCycleAfterBackup" - # This creates an ASCII copy of the catalog - RunBeforeJob = "\"@bin_dir@\\make_catalog_backup\" bacula bacula" - # This deletes the copy of the catalog - RunAfterJob = "\"@bin_dir@\\delete_catalog_backup\"" - Write Bootstrap = "@working_dir@\\BackupCatalog.bsr" - Priority = 11 # run after main backup -} - -# -# Standard Restore template, to be changed by Console program -# Only one such job is needed for all Jobs/Clients/Storage ... -# -Job { - Name = "RestoreFiles" - Type = Restore - Client=@client_name@ - FileSet="Test Set" - Storage = File - Pool = Default - Messages = Standard - Where = "C:\\tmp\\bacula-restores" -} - -# -# Note: Windows path separators do NOT work correctly in FileSets. -# -# List of files to be backed up -FileSet { - Name = "Test Set" - Include { - Options { - signature = MD5 - ignore case = yes - } -# -# Put your list of files here, preceded by 'File =', one per line -# or include an external list with: -# -# File = 1 File "Start.bat" @@ -1044,11 +680,11 @@ Function InstallDaemon ${If} $OsIsNT = 1 nsExec::ExecToLog 'net start $0' ${Else} - Exec '"$INSTDIR\bin\$0.exe" -c "$APPDATA\Bacula\$0.conf"' + Exec '"$INSTDIR\$0.exe" -c "$INSTDIR\$0.conf"' ${EndIf} ${EndIf} ${Else} - CreateShortCut "$SMPROGRAMS\Bacula\Start $1.lnk" "$INSTDIR\bin\$0.exe" '-c "$APPDATA\Bacula\$0.conf"' "$INSTDIR\bin\$0.exe" 0 + CreateShortCut "$SMPROGRAMS\Bacula\Start $1.lnk" "$INSTDIR\$0.exe" '-c "$INSTDIR\$0.conf"' "$INSTDIR\$0.exe" 0 ${EndIf} FunctionEnd @@ -1145,81 +781,25 @@ Function ConfigEditAndCopy Pop $R1 FunctionEnd -Function FindDatabaseApps - Push $R1 - - ReadRegStr $0 HKLM "Software\MySQL AB\MySQL Server 5.0" "Location" - - ${If} $0 != "" - Call RemoveTrailingSlash - StrCpy $MySQLPath $0 - ReadRegStr $0 HKLM "Software\MySQL AB\MySQL Server 5.0" "Version" - StrCpy $MySQLVersion $0 - ${EndIf} - - EnumRegKey $R1 HKLM "Software\PostgreSQL\Installations" 0 - ${If} $R1 != "" - ReadRegStr $0 HKLM "Software\PostgreSQL\Installations\$R1" "Base Directory" - Call RemoveTrailingSlash - StrCpy $PostgreSQLPath $0 - ReadRegStr $0 HKLM "Software\PostgreSQL\Installations\$R1" "Version" - StrCpy $PostgreSQLVersion $0 - ${EndIf} - - Pop $R1 -FunctionEnd - -Function RemoveTrailingSlash - Push $R1 - StrCpy $R1 $0 "" -1 - ${If} $R1 == "\" - StrCpy $0 $0 -1 - ${EndIf} - Pop $R1 -FunctionEnd - -Function IsDirectorSelected - Push $R0 - SectionGetFlags ${SecDirectorDaemon} $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - Exch $R0 -FunctionEnd - Function GetSelectedComponents Push $R0 StrCpy $R0 0 ${If} ${SectionIsSelected} ${SecFileDaemon} IntOp $R0 $R0 | ${ComponentFile} ${EndIf} - ${If} ${SectionIsSelected} ${SecStorageDaemon} - IntOp $R0 $R0 | ${ComponentStorage} - ${EndIf} - ${If} ${SectionIsSelected} ${SecDirectorDaemon} - IntOp $R0 $R0 | ${ComponentDirector} - ${EndIf} ${If} ${SectionIsSelected} ${SecConsole} IntOp $R0 $R0 | ${ComponentTextConsole} ${EndIf} ${If} ${SectionIsSelected} ${SecBatConsole} IntOp $R0 $R0 | ${ComponentBatConsole} ${EndIf} - ${If} ${SectionIsSelected} ${SecWxConsole} - IntOp $R0 $R0 | ${ComponentGUIConsole} - ${EndIf} ${If} ${SectionIsSelected} ${SecDocPdf} IntOp $R0 $R0 | ${ComponentPDFDocs} ${EndIf} - ${If} ${SectionIsSelected} ${SecDocHtml} - IntOp $R0 $R0 | ${ComponentHTMLDocs} - ${EndIf} Exch $R0 FunctionEnd Function PageComponentsShow - ${If} $OsIsNT <> 1 - Call DisableServerSections - ${EndIf} - Call SelectPreviousComponents Call UpdateComponentUI FunctionEnd @@ -1263,21 +843,8 @@ 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 ${EndIf} - IntOp $R0 $NewComponents & ${ComponentStorage} - ${If} $R0 = 0 - WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 4" State 0 - WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 4" Flags DISABLED - DeleteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" State - WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST|DISABLED - ${Else} - WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 4" State 1 - DeleteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 4" Flags - WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" State "C:\$ConfigStorageName.conf" - WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST - ${EndIf} !InsertMacro MUI_HEADER_TEXT "$(TITLE_WriteTemplates)" "$(SUBTITLE_WriteTemplates)" !InsertMacro MUI_INSTALLOPTIONS_DISPLAY "WriteTemplates.ini" @@ -1293,16 +860,6 @@ Function EnterWriteTemplates ${EndIf} ${EndIf} - !InsertMacro MUI_INSTALLOPTIONS_READ $R0 "WriteTemplates.ini" "Field 4" State - ${If} $R0 <> 0 - File "/oname=$PLUGINSDIR\storage.conf.in" "storage.conf.in" - - nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\storage.conf.in"' - !InsertMacro MUI_INSTALLOPTIONS_READ $R0 "WriteTemplates.ini" "Field 5" State - ${If} $R0 != "" - CopyFiles "$PLUGINSDIR\storage.conf.in" "$R0" - ${EndIf} - ${EndIf} Pop $R1 Pop $R0 @@ -1318,22 +875,6 @@ Function SelectPreviousComponents !InsertMacro UnselectSection ${SecFileDaemon} !InsertMacro ClearSectionFlag ${SecFileDaemon} ${SF_RO} ${EndIf} - IntOp $R1 $PreviousComponents & ${ComponentStorage} - ${If} $R1 <> 0 - !InsertMacro SelectSection ${SecStorageDaemon} - !InsertMacro SetSectionFlag ${SecStorageDaemon} ${SF_RO} - ${Else} - !InsertMacro UnselectSection ${SecStorageDaemon} - !InsertMacro ClearSectionFlag ${SecStorageDaemon} ${SF_RO} - ${EndIf} - IntOp $R1 $PreviousComponents & ${ComponentDirector} - ${If} $R1 <> 0 - !InsertMacro SelectSection ${SecDirectorDaemon} - !InsertMacro SetSectionFlag ${SecDirectorDaemon} ${SF_RO} - ${Else} - !InsertMacro UnselectSection ${SecDirectorDaemon} - !InsertMacro ClearSectionFlag ${SecDirectorDaemon} ${SF_RO} - ${EndIf} IntOp $R1 $PreviousComponents & ${ComponentTextConsole} ${If} $R1 <> 0 !InsertMacro SelectSection ${SecConsole} @@ -1350,15 +891,6 @@ Function SelectPreviousComponents !InsertMacro UnselectSection ${SecBatConsole} !InsertMacro ClearSectionFlag ${SecBatConsole} ${SF_RO} ${EndIf} - IntOp $R1 $PreviousComponents & ${ComponentGUIConsole} - ${If} $R1 <> 0 - !InsertMacro SelectSection ${SecWxConsole} - !InsertMacro SetSectionFlag ${SecWxConsole} ${SF_RO} - ${Else} - !InsertMacro UnselectSection ${SecWxConsole} - !InsertMacro ClearSectionFlag ${SecWxConsole} ${SF_RO} - ${EndIf} - IntOp $R1 $PreviousComponents & ${ComponentPDFDocs} ${If} $R1 <> 0 !InsertMacro SelectSection ${SecDocPdf} !InsertMacro SetSectionFlag ${SecDocPdf} ${SF_RO} @@ -1366,26 +898,9 @@ Function SelectPreviousComponents !InsertMacro UnselectSection ${SecDocPdf} !InsertMacro ClearSectionFlag ${SecDocPdf} ${SF_RO} ${EndIf} - IntOp $R1 $PreviousComponents & ${ComponentHTMLDocs} - ${If} $R1 <> 0 - !InsertMacro SelectSection ${SecDocHtml} - !InsertMacro SetSectionFlag ${SecDocHtml} ${SF_RO} - ${Else} - !InsertMacro UnselectSection ${SecDocHtml} - !InsertMacro ClearSectionFlag ${SecDocHtml} ${SF_RO} - ${EndIf} ${EndIf} FunctionEnd -Function DisableServerSections - !InsertMacro UnselectSection ${SecGroupServer} - !InsertMacro SetSectionFlag ${SecGroupServer} ${SF_RO} - !InsertMacro UnselectSection ${SecStorageDaemon} - !InsertMacro SetSectionFlag ${SecStorageDaemon} ${SF_RO} - !InsertMacro UnselectSection ${SecDirectorDaemon} - !InsertMacro SetSectionFlag ${SecDirectorDaemon} ${SF_RO} -FunctionEnd - Function UpdateComponentUI Push $R0 Push $R1 @@ -1403,48 +918,24 @@ Function UpdateComponentUI ${Else} !InsertMacro ClearSectionFlag ${SecFileDaemon} ${SF_BOLD} ${EndIf} - IntOp $R1 $NewComponents & ${ComponentStorage} - ${If} $R1 <> 0 - !InsertMacro SetSectionFlag ${SecStorageDaemon} ${SF_BOLD} - ${Else} - !InsertMacro ClearSectionFlag ${SecStorageDaemon} ${SF_BOLD} - ${EndIf} - IntOp $R1 $NewComponents & ${ComponentDirector} - ${If} $R1 <> 0 - !InsertMacro SetSectionFlag ${SecDirectorDaemon} ${SF_BOLD} - ${Else} - !InsertMacro ClearSectionFlag ${SecDirectorDaemon} ${SF_BOLD} - ${EndIf} IntOp $R1 $NewComponents & ${ComponentTextConsole} ${If} $R1 <> 0 !InsertMacro SetSectionFlag ${SecConsole} ${SF_BOLD} ${Else} !InsertMacro ClearSectionFlag ${SecConsole} ${SF_BOLD} ${EndIf} - IntOp $R1 $NewComponents & ${ComponentBatConsole} + IntOp $R1 $NewComponents & ${ComponentBatConsole} ${If} $R1 <> 0 !InsertMacro SetSectionFlag ${SecBatConsole} ${SF_BOLD} ${Else} !InsertMacro ClearSectionFlag ${SecBatConsole} ${SF_BOLD} ${EndIf} - IntOp $R1 $NewComponents & ${ComponentGUIConsole} - ${If} $R1 <> 0 - !InsertMacro SetSectionFlag ${SecWxConsole} ${SF_BOLD} - ${Else} - !InsertMacro ClearSectionFlag ${SecWxConsole} ${SF_BOLD} - ${EndIf} IntOp $R1 $NewComponents & ${ComponentPDFDocs} ${If} $R1 <> 0 !InsertMacro SetSectionFlag ${SecDocPdf} ${SF_BOLD} ${Else} !InsertMacro ClearSectionFlag ${SecDocPdf} ${SF_BOLD} ${EndIf} - IntOp $R1 $NewComponents & ${ComponentHTMLDocs} - ${If} $R1 <> 0 - !InsertMacro SetSectionFlag ${SecDocHtml} ${SF_BOLD} - ${Else} - !InsertMacro ClearSectionFlag ${SecDocHtml} ${SF_BOLD} - ${EndIf} ${EndIf} GetDlgItem $R0 $HWNDPARENT 1 -- 2.39.5