-Function EnterConfigPage1\r
- ${If} $AutomaticInstall = 1\r
- Abort\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentsFileAndStorage}\r
-\r
- ${If} $R0 = 0\r
- Abort\r
- ${EndIf}\r
-\r
- FileOpen $R5 "$PLUGINSDIR\ConfigPage1.ini" w\r
-\r
- StrCpy $R6 1 ; Field Number\r
- StrCpy $R7 0 ; Top\r
-\r
- IntOp $R0 $NewComponents & ${ComponentFile}\r
- ${If} $R0 <> 0\r
- IntOp $R8 $R7 + 52\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 12\r
-\r
- IntOp $R8 $R7 + 8\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 2\r
-\r
- IntOp $R8 $R8 - 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 2\r
-\r
- IntOp $R8 $R8 - 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 16\r
-\r
- IntOp $R8 $R7 + 8\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 14\r
-\r
- IntOp $R8 $R7 + 10\r
- 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'\r
- IntOp $R6 $R6 + 1\r
-\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 16\r
- ${Endif}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentStorage}\r
- ${If} $R0 <> 0\r
- IntOp $R8 $R7 + 52\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 12\r
- \r
- IntOp $R8 $R7 + 8\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 2\r
-\r
- IntOp $R8 $R8 - 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 2\r
-\r
- IntOp $R8 $R8 - 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 16\r
-\r
- IntOp $R8 $R7 + 8\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 14\r
-\r
- IntOp $R8 $R7 + 10\r
- 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'\r
- IntOp $R6 $R6 + 1\r
-\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 16\r
- ${Endif}\r
-\r
- IntOp $R6 $R6 - 1\r
-\r
- FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n"\r
-\r
- FileClose $R5\r
-\r
- !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)"\r
- !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage1.ini"\r
- Pop $HDLG ;HWND of dialog\r
-\r
- ; Initialize Controls\r
-\r
- StrCpy $R6 1 ; Field Number\r
-\r
- IntOp $R0 $NewComponents & ${ComponentFile}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 2\r
-\r
- ; Client Name\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- ; Client Port Number\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 5 0\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- ; Max Jobs\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 3 0\r
-\r
- IntOp $R6 $R6 + 5\r
- ${Endif}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentStorage}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 2\r
-\r
- ; Storage Name\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- ; Storage Port Number\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 5 0\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- ; Max Jobs\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage1.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 3 0\r
-\r
- IntOp $R6 $R6 + 5\r
- ${Endif}\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_SHOW\r
-\r
- ; Process results\r
-\r
- StrCpy $R6 3\r
-\r
- IntOp $R0 $NewComponents & ${ComponentFile}\r
- ${If} $R0 <> 0\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientName "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPort "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientMaxJobs "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientPassword "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 1\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientInstallService "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 1\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigClientStartService "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 3\r
- ${Endif}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentStorage}\r
- ${If} $R0 <> 0\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageName "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStoragePort "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageMaxJobs "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStoragePassword "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 1\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageInstallService "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 1\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigStorageStartService "ConfigPage1.ini" "Field $R6" "State"\r
-\r
- IntOp $R6 $R6 + 3\r
- ${Endif}\r
-FunctionEnd\r
-\r
-Function LeaveConfigPage1\r
- StrCpy $R6 5\r
-\r
- IntOp $R0 $NewComponents & ${ComponentFile}\r
- ${If} $R0 <> 0\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
- ${If} $R0 < 1024\r
- ${OrIf} $R0 > 65535\r
- MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."\r
- Abort\r
- ${EndIf}\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
- ${If} $R0 < 1\r
- ${OrIf} $R0 > 99\r
- MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."\r
- Abort\r
- ${EndIf}\r
-\r
- IntOp $R6 $R6 + 9\r
- ${Endif}\r
- \r
- IntOp $R0 $NewComponents & ${ComponentStorage}\r
- ${If} $R0 <> 0\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
- ${If} $R0 < 1024\r
- ${OrIf} $R0 > 65535\r
- MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."\r
- Abort\r
- ${EndIf}\r
-\r
- IntOp $R6 $R6 + 2\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage1.ini" "Field $R6" "State"\r
- ${If} $R0 < 1\r
- ${OrIf} $R0 > 99\r
- MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."\r
- Abort\r
- ${EndIf}\r
-\r
- IntOp $R6 $R6 + 9\r
- ${Endif}\r
-FunctionEnd\r
+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 EnterConfigPage2\r
- IntOp $R0 $NewComponents & ${ComponentsRequiringUserConfig}\r
-\r
- ${If} $R0 = 0\r
- Abort\r
- ${EndIf}\r
-\r
- FileOpen $R5 "$PLUGINSDIR\ConfigPage2.ini" w\r
-\r
- StrCpy $R6 1 ; Field Number\r
- StrCpy $R7 0 ; Top\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- ${If} $AutomaticInstall = 1\r
- IntOp $R8 $R7 + 54\r
- ${Else}\r
- IntOp $R8 $R7 + 92\r
- ${EndIf}\r
- 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'\r
- ${Else}\r
- IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R8 $R7 + 54\r
- ${Else}\r
- IntOp $R8 $R7 + 26\r
- ${EndIf}\r
- 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'\r
- ${EndIf}\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 12\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- ${If} "$ConfigDirectorName" == ""\r
- StrCpy $ConfigDirectorName "$HostName-dir"\r
- ${EndIf}\r
- ${If} "$ConfigDirectorPassword" == ""\r
- StrCpy $ConfigDirectorPassword "$LocalDirectorPassword"\r
- ${EndIf}\r
- ${Else}\r
- ${If} "$ConfigDirectorName" == "$HostName-dir"\r
- StrCpy $ConfigDirectorName ""\r
- ${EndIf}\r
- ${If} "$ConfigDirectorPassword" == "$LocalDirectorPassword"\r
- StrCpy $ConfigDirectorPassword ""\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 = 0\r
- ${OrIf} $AutomaticInstall = 0\r
- IntOp $R8 $R7 + 8\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R7 $R7 + 2\r
- IntOp $R8 $R8 - 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R7 $R7 + 2\r
- IntOp $R8 $R8 - 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R7 $R7 + 14\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
- ${If} $R0 <> 0\r
- ${OrIf} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R7 $R7 + 2\r
- IntOp $R8 $R7 + 8\r
-\r
- 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'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
- IntOp $R8 $R8 + 2\r
-\r
- 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'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 14\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R7 $R7 + 2\r
- IntOp $R8 $R7 + 8\r
-\r
- 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'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
- IntOp $R8 $R8 + 2\r
-\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 16\r
- IntOp $R8 $R7 + 8\r
-\r
- 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'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
- IntOp $R8 $R8 + 2\r
-\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 16\r
- IntOp $R8 $R7 + 8\r
-\r
- 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'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
- IntOp $R8 $R8 + 2\r
-\r
- ${If} $ConfigDirectorDB = 0\r
- ${If} $MySQLPath != ""\r
- StrCpy $ConfigDirectorDB 1\r
- ${ElseIf} $PostgreSQLPath != ""\r
- StrCpy $ConfigDirectorDB 2\r
- ${Else}\r
- StrCpy $ConfigDirectorDB 3\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- ${If} $ConfigDirectorDB = 1\r
- StrCpy $R9 1\r
- ${Else}\r
- StrCpy $R9 0\r
- ${EndIf}\r
-\r
- 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'\r
-\r
- IntOp $R6 $R6 + 1\r
-\r
- ${If} $ConfigDirectorDB = 2\r
- StrCpy $R9 1\r
- ${Else}\r
- StrCpy $R9 0\r
- ${EndIf}\r
-\r
- 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'\r
-\r
- IntOp $R6 $R6 + 1\r
-\r
- ${If} $ConfigDirectorDB = 3\r
- StrCpy $R9 1\r
- ${Else}\r
- StrCpy $R9 0\r
- ${EndIf}\r
-\r
- 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'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 12\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R8 $R7 + 10\r
- 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'\r
- IntOp $R6 $R6 + 1\r
-\r
- 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'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 12\r
- ${EndIf}\r
- ${Else}\r
- IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R7 $R7 + 2\r
- IntOp $R8 $R7 + 8\r
-\r
- 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'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
- IntOp $R8 $R8 + 2\r
-\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 14\r
- IntOp $R8 $R7 + 8\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R7 $R7 + 4\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R8 $R7 + 42\r
-\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 12\r
-\r
- IntOp $R8 $R7 + 8\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
-\r
- IntOp $R8 $R8 + 2\r
- 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'\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 16\r
- IntOp $R8 $R7 + 8\r
-\r
- 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'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 - 2\r
- IntOp $R8 $R8 + 2\r
-\r
- 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'\r
-\r
- IntOp $R6 $R6 + 1\r
- IntOp $R7 $R7 + 20\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R6 $R6 - 1\r
- FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n"\r
-\r
- FileClose $R5\r
-\r
- IntOp $R0 $NewComponents & ${ComponentsFileAndStorage}\r
- ${If} $R0 = 0\r
- ${OrIf} $AutomaticInstall = 1\r
- !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)"\r
- ${Else}\r
- !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage2)" "$(SUBTITLE_ConfigPage2)"\r
- ${EndIf}\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage2.ini"\r
- Pop $HDLG ;HWND of dialog\r
-\r
- ; Initialize Controls\r
- StrCpy $R6 2 ; Field Number\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 = 0\r
- ${OrIf} $AutomaticInstall = 0\r
- ; Name\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
- IntOp $R6 $R6 + 1\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- ; Port Number\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 5 0\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- ; Max Jobs\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 3 0\r
-\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
- ${If} $R0 <> 0\r
- ${OrIf} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 2\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 9\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R6 $R6 + 2\r
- ${EndIf}\r
- ${Else}\r
- IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 2\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 2\r
- !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"\r
- SendMessage $HCTL ${EM_LIMITTEXT} 30 0\r
- IntOp $R6 $R6 + 2\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_SHOW\r
-\r
- ; Process results\r
-\r
- StrCpy $R6 2\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 = 0\r
- ${OrIf} $AutomaticInstall = 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorName "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 1\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPort "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMaxJobs "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
- ${If} $R0 <> 0\r
- ${OrIf} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPassword "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailServer "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 2\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailAddress "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 2\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"\r
- ${If} $R5 = 1\r
- StrCpy $ConfigDirectorDB 1\r
- ${Endif}\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"\r
- ${If} $R5 = 1\r
- StrCpy $ConfigDirectorDB 2\r
- ${Endif}\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"\r
- ${If} $R5 = 1\r
- StrCpy $ConfigDirectorDB 3\r
- ${Endif}\r
- IntOp $R6 $R6 + 1\r
-\r
- ${If} $AutomaticInstall = 0\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorInstallService "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorStartService "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
- ${Else}\r
- IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorAddress "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- ${If} $AutomaticInstall = 0\r
- IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 2\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorName "ConfigPage2.ini" "Field $R6" "State"\r
- IntOp $R6 $R6 + 2\r
- !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorPassword "ConfigPage2.ini" "Field $R6" "State"\r
- ${EndIf}\r
- ${EndIf}\r
-FunctionEnd\r
-\r
-Function LeaveConfigPage2\r
- ${If} $AutomaticInstall = 0\r
- StrCpy $R6 4\r
-\r
- IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State"\r
- ${If} $R0 < 1024\r
- ${OrIf} $R0 > 65535\r
- MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."\r
- Abort\r
- ${EndIf}\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
-\r
- IntOp $R0 $NewComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- IntOp $R6 $R6 + 1\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State"\r
- ${If} $R0 < 1\r
- ${OrIf} $R0 > 99\r
- MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."\r
- Abort\r
- ${EndIf}\r
- IntOp $R6 $R6 + 1\r
- ${EndIf}\r
- ${EndIf}\r
-FunctionEnd\r
+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
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}
${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)"
-DOUT_DIR=..\\release32 \
-DSRC_DIR=release32 \
-DBUILD_TOOLS=MinGW \
+ -DWINVER=32
INSTALL_EXE := $(BUILDDIR)/release32/winbacula-$(VERSION).exe
Bacula - Windows Version Disclaimer\r
===================================\r
\r
-Please note, only the Win32 Client (File daemon) is supported. All the\r
-other components (Director, Storage daemon, their utilities) are provided\r
-on an "as is" basis. Unfortunately, they are neither properly tested, \r
-documented, or supported. This means that we cannot ensure that bug reports\r
-against the non-supported components will be fixed. For them to be supported, \r
-we need three things from the Open Source community:\r
+Please note, only the Win32 Client (File daemon) is supported, and the other\r
+components (Director, Storage daemon, their utilities) are not provided\r
+because they have not been ported. If you want these components, either build\r
+them yourself or ask Bacula Systems about them.\r
\r
-1. Full documentation of the Windows particularities of the Director,\r
- the Storage daemon, and their utilities in the Bacula manual.\r
-\r
-2. Someone to periodically and on demand run the regressions tests.\r
-\r
-3. One or more developers who are willing to accept and correct Windows\r
- related bugs as they occur.\r
-\r
-4. A certain Win32 community that will respond to user support questions\r
- on the bacula-users list. (This is probably already fullfilled). \r
- \r
\r
Bacula - Windows Version Notes\r
==============================\r
\r
File Locations\r
--------------\r
-The programs and documentation are installed in the directory \r
+Everything is installed in the directory \r
"C:\Program Files\Bacula" unless a different directory was selected during\r
-installation. The configuration and other application data files are in the\r
-"C:\Documents and Settings\All Users\Application Data\Bacula" directory.\r
+installation. \r
+\r
\r
Code Page Problems\r
-------------------\r
is written out in UTF-8 format.\r
\r
The conf files can be edited with any UTF-8 compatible editor, or on most \r
-modern Win32 machines, you can edit them with notepad, then choose UTF-8\r
+modern Windows machines, you can edit them with notepad, then choose UTF-8\r
output encoding before saving them.\r
-\r
-\r
-Storage and Director Services\r
------------------------------\r
-These services are still considered experimental in this release. Use of \r
-them should be approached with caution since they haven't received the\r
-same level of extensive usage and testing that the File service has \r
-received.\r
-\r
-Storage Device Names\r
---------------------\r
-There is a utility installed called scsilist.exe which displays the installed \r
-devices, their physical address and their device name. A link to it is \r
-created in the Bacula menu when the Storage service is installed.\r
-\r
-Changer and Tape device names in Windows are Changer0, Changer1, etc and \r
-Tape0, Tape1, etc. If there isn't a device driver loaded for the Changer \r
-then you need to use the address <Port>:<Bus>:<Target>:<Lun>. Port is the \r
-SCSI Adapter Number, Bus is the Bus Number on the adapter (usually 0 since \r
-most adapters only have one bus), Target is the device's Target Device ID, \r
-Lun is the Logical Unit Number.\r
- \r
-You must specify DeviceType = tape in the Device resource in bacula-sd.conf \r
-since auto detection of device type doesn't work at the present time.\r
-[Settings]\r
-NumFields=5\r
-CancelEnabled=0\r
-BackEnabled=0\r
-\r
-[Field 1]\r
-Type="Label"\r
-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."\r
-Left=7\r
-Right=293\r
-Top=6\r
-Bottom=32\r
-\r
-[Field 2]\r
-Type="CheckBox"\r
-Text="Save Client template in:"\r
-Left=6\r
-Right=240\r
-Top=38\r
-Bottom=48\r
-\r
-[Field 3]\r
-Type="FileRequest"\r
-State="Client.conf"\r
-Flags=\r
-Filter=Configuration Files|*.conf|All Files|*.*\r
-Left=16\r
-Right=288\r
-Top=50\r
-Bottom=62\r
-\r
-[Field 4]\r
-Type="CheckBox"\r
-Text="Save Storage template in:"\r
-Left=6\r
-Right=248\r
-Top=70\r
-Bottom=80\r
-\r
-[Field 5]\r
-Type="FileRequest"\r
-State="Storage.conf"\r
-Flags=REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST\r
-Filter=Configuration Files|*.conf|All Files|*.*\r
-Left=16\r
-Right=288\r
-Top=82\r
-Bottom=94\r
+[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
-#\r
-# Default Bacula Director Configuration file\r
-#\r
-# The only thing that MUST be changed is to add one or more\r
-# file or directory names in the Include directive of the\r
-# FileSet resource.\r
-#\r
-# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@\r
-#\r
-# You might also want to change the default email address\r
-# from root to your address. See the "mail" and "operator"\r
-# directives in the Messages resource.\r
-#\r
-\r
-Director { # define myself\r
- Name = @director_name@\r
- DIRport = @director_port@ # where we listen for UA connections\r
- QueryFile = "@bin_dir@\\query.sql"\r
- WorkingDirectory = "@working_dir@"\r
- PidDirectory = "@working_dir@"\r
- Maximum Concurrent Jobs = @director_maxjobs@\r
- Password = "@director_password@" # Console password\r
- Messages = Daemon\r
-}\r
-\r
-JobDefs {\r
- Name = "DefaultJob"\r
- Type = Backup\r
- Level = Incremental\r
- Client = @client_name@\r
- FileSet = "Test Set"\r
- Schedule = "WeeklyCycle"\r
- Storage = File\r
- Messages = Standard\r
- Pool = Default\r
- Priority = 10\r
-}\r
-\r
-\r
-#\r
-# Define the main nightly save backup job\r
-# By default, this job will back up to disk in C:/tmp\r
-Job {\r
- Name = "Client1"\r
- JobDefs = "DefaultJob"\r
- Write Bootstrap = "@working_dir@\\Client1.bsr"\r
-}\r
-\r
-#Job {\r
-# Name = "Client2"\r
-# Client = @client_name@2\r
-# JobDefs = "DefaultJob"\r
-# Write Bootstrap = "@working_dir@\\Client2.bsr"\r
-#}\r
-\r
-# Backup the catalog database (after the nightly save)\r
-Job {\r
- Name = "BackupCatalog"\r
- JobDefs = "DefaultJob"\r
- Level = Full\r
- FileSet="Catalog"\r
- Schedule = "WeeklyCycleAfterBackup"\r
- # This creates an ASCII copy of the catalog\r
- RunBeforeJob = "\"@bin_dir@\\make_catalog_backup\" bacula bacula"\r
- # This deletes the copy of the catalog\r
- RunAfterJob = "\"@bin_dir@\\delete_catalog_backup\""\r
- Write Bootstrap = "@working_dir@\\BackupCatalog.bsr"\r
- Priority = 11 # run after main backup\r
-}\r
-\r
-#\r
-# Standard Restore template, to be changed by Console program\r
-# Only one such job is needed for all Jobs/Clients/Storage ...\r
-#\r
-Job {\r
- Name = "RestoreFiles"\r
- Type = Restore\r
- Client=@client_name@\r
- FileSet="Test Set"\r
- Storage = File\r
- Pool = Default\r
- Messages = Standard\r
- Where = "C:\\tmp\\bacula-restores"\r
-}\r
-\r
-#\r
-# Note: Windows path separators do NOT work correctly in FileSets.\r
-#\r
-# List of files to be backed up\r
-FileSet {\r
- Name = "Test Set"\r
- Include {\r
- Options {\r
- signature = MD5\r
- ignore case = yes\r
- }\r
-# \r
-# Put your list of files here, preceded by 'File =', one per line\r
-# or include an external list with:\r
-#\r
-# File = <file-name\r
-#\r
-# Note: C:/ backs up everything on drive C.\r
-# if you have other drives such as D:/\r
-# you will probably want to add them too.\r
-#\r
-# By default this is defined to point to the Bacula \r
-# directory to give a reasonable FileSet to backup to\r
-# disk storage during initial testing.\r
-#\r
- File = "@BUILD_DIR@"\r
- }\r
-\r
-#\r
-# If you backup the root directory, the following excluded\r
-# files can be useful\r
-#\r
- Exclude {\r
- File = C:/Temp\r
- File = C:/tmp\r
- }\r
-}\r
-\r
-#\r
-# This is an example which will backup all the hard drives of a Windows System.\r
-#\r
-FileSet {\r
- Name = "Windows Full Set"\r
- Enable VSS = yes\r
- Include {\r
- Options {\r
- Signature = MD5\r
- Exclude = yes\r
- IgnoreCase = yes\r
- EnhancedWild = yes\r
- DriveType = fixed\r
-\r
- # Exclude directories full of lots and lots of useless little files\r
- WildDir = "[A-Z]:/Documents and Settings/*/Cookies"\r
- WildDir = "[A-Z]:/Documents and Settings/*/Recent"\r
- WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/History"\r
- WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temp"\r
- WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temporary Internet Files"\r
-\r
- # Exclude directories full of lots and lots of useless little files\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Cookies"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Recent"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/History"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temp"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temporary Internet Files"\r
-\r
- # Exclude directories full of lots and lots of useless little files\r
- WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Cookies"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Recent"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/History"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temp"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temporary Internet Files"\r
-\r
- # Some random bits of Windows we want to ignore\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Prefetch"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/msdownld.tmp"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Internet Logs"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/$Nt*Uninstall*"\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Downloaded Installations"\r
-\r
- # Temporary directories & files\r
- WildDir = "[A-Z]:/{WINNT,Windows}/Temp"\r
- WildDir = "[A-Z]:/Temp"\r
- WildFile = "*.tmp"\r
- WildDir = "[A-Z]:/tmp"\r
-\r
- # Fast Find\r
- WildFile = "[A-Z]:/ffastun*"\r
-\r
- # System Restore\r
- WildDir = "[A-Z]:/System Volume Information"\r
-\r
- # Windows Update\r
- WildDir = "[A-Z]:/WUTemp"\r
-\r
- # Recycle bins\r
- WildDir = "[A-Z]:/RECYCLE[DR]"\r
-\r
- # Swap files\r
- WildFile = "[A-Z]:/pagefile.sys"\r
- WildFile = "[A-Z]:/hiberfil.sys"\r
-\r
- # These are programs and are easier to reinstall than restore from\r
- # backup\r
- WildDir = "[A-Z]:/cygwin"\r
- WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java"\r
- WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java Web Start"\r
- WildDir = "[A-Z]:/{Program Files,PROGRA~1}/JavaSoft"\r
- WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Microsoft Office"\r
- }\r
-\r
- File = "C:/"\r
- File = "D:/"\r
- File = "E:/"\r
- File = "F:/"\r
- File = "G:/"\r
- File = "H:/"\r
- File = "I:/"\r
- File = "J:/"\r
- File = "K:/"\r
- File = "L:/"\r
- File = "M:/"\r
- File = "N:/"\r
- File = "O:/"\r
- File = "P:/"\r
- File = "Q:/"\r
- File = "R:/"\r
- File = "S:/"\r
- File = "T:/"\r
- File = "U:/"\r
- File = "V:/"\r
- File = "W:/"\r
- File = "X:/"\r
- File = "Y:/"\r
- File = "Z:/"\r
- }\r
-}\r
-\r
-#\r
-# When to do the backups, full backup on first sunday of the month,\r
-# differential (i.e. incremental since full) every other sunday,\r
-# and incremental backups other days\r
-Schedule {\r
- Name = "WeeklyCycle"\r
- Run = Full 1st sun at 23:05\r
- Run = Differential 2nd-5th sun at 23:05\r
- Run = Incremental mon-sat at 23:05\r
-}\r
-\r
-# This schedule does the catalog. It starts after the WeeklyCycle\r
-Schedule {\r
- Name = "WeeklyCycleAfterBackup"\r
- Run = Full sun-sat at 23:10\r
-}\r
-\r
-# This is the backup of the catalog\r
-FileSet {\r
- Name = "Catalog"\r
- Include {\r
- Options {\r
- signature = MD5\r
- }\r
- File = "@working_dir@\\bacula.sql"\r
- }\r
-}\r
-\r
-# Client (File Services) to backup\r
-Client {\r
- Name = @client_name@\r
- Address = @client_address@\r
- FDPort = @client_port@\r
- Catalog = MyCatalog\r
- Password = "@client_password@" # password for FileDaemon\r
- File Retention = 30 days # 30 days\r
- Job Retention = 6 months # six months\r
- AutoPrune = yes # Prune expired Jobs/Files\r
-}\r
-\r
-#\r
-# Second Client (File Services) to backup\r
-# You should change Name, Address, and Password before using\r
-#\r
-#Client {\r
-# Name = @client_name@2\r
-# Address = @client_address@2\r
-# FDPort = @client_port@\r
-# Catalog = MyCatalog\r
-# Password = "@client_password@2" # password for FileDaemon 2\r
-# File Retention = 30 days # 30 days\r
-# Job Retention = 6 months # six months\r
-# AutoPrune = yes # Prune expired Jobs/Files\r
-#}\r
-\r
-\r
-# Definition of file storage device\r
-Storage {\r
- Name = File\r
-# Do not use "localhost" here\r
- Address = @storage_address@ # N.B. Use a fully qualified name here\r
- SDPort = @storage_port@\r
- Password = "@storage_password@"\r
- Device = FileStorage\r
- Media Type = File\r
-}\r
-\r
-\r
-\r
-# Definition of DDS tape storage device\r
-#Storage {\r
-# Name = DDS-4 \r
-# Do not use "localhost" here\r
-# Address = @storage_address@ # N.B. Use a fully qualified name here\r
-# SDPort = @storage_port@\r
-# Password = "@storage_password@" # password for Storage daemon\r
-# Device = DDS-4 # must be same as Device in Storage daemon\r
-# Media Type = DDS-4 # must be same as MediaType in Storage daemon\r
-# Autochanger = yes # enable for autochanger device\r
-#}\r
-\r
-# Definition of 8mm tape storage device\r
-#Storage {\r
-# Name = "8mmDrive"\r
-# Do not use "localhost" here\r
-# Address = @storage_address@ # N.B. Use a fully qualified name here\r
-# SDPort = @storage_port@\r
-# Password = "@storage_password@"\r
-# Device = "Exabyte 8mm"\r
-# MediaType = "8mm"\r
-#}\r
-\r
-\r
-# Generic catalog service\r
-Catalog {\r
- Name = MyCatalog\r
- dbname = bacula; user = bacula; password = ""\r
-}\r
-\r
-# Reasonable message delivery -- send most everything to email address\r
-# and to the console\r
-Messages {\r
- Name = Standard\r
-#\r
-# NOTE! If you send to two email or more email addresses, you will need\r
-# to replace the %r in the from field (-f part) with a single valid\r
-# email address in both the mailcommand and the operatorcommand.\r
-#\r
- mailcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"\r
- operatorcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"\r
- mail = @job_email@ = all, !skipped \r
- operator = @job_email@ = mount\r
- console = all, !skipped, !saved\r
-#\r
-# WARNING! the following will create a file that you must cycle from\r
-# time to time as it will grow indefinitely. However, it will\r
-# also keep all your messages if they scroll off the console.\r
-#\r
- append = "@working_dir@\\log" = all, !skipped\r
-}\r
-\r
-\r
-#\r
-# Message delivery for daemon messages (no job).\r
-Messages {\r
- Name = Daemon\r
- mailcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"\r
- mail = @job_email@ = all, !skipped \r
- console = all, !skipped, !saved\r
- append = "@working_dir@\\log" = all, !skipped\r
-}\r
-\r
-\r
-\r
-# Default pool definition\r
-Pool {\r
- Name = Default\r
- Pool Type = Backup\r
- Recycle = yes # Bacula can automatically recycle Volumes\r
- AutoPrune = yes # Prune expired volumes\r
- Volume Retention = 365 days # one year\r
-}\r
-\r
-# Scratch pool definition\r
-Pool {\r
- Name = Scratch\r
- Pool Type = Backup\r
-}\r
-\r
-#\r
-# Restricted console used by tray-monitor to get the status of the director\r
-#\r
-Console {\r
- Name = @monitor_name@\r
- Password = "@monitor_password@"\r
- CommandACL = status, .status\r
-}\r
+#
+# 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 = <file-name
+#
+# Note: C:/ backs up everything on drive C.
+# if you have other drives such as D:/
+# you will probably want to add them too.
+#
+# By default this is defined to point to the Bacula
+# directory to give a reasonable FileSet to backup to
+# disk storage during initial testing.
+#
+ File = "@BUILD_DIR@"
+ }
+
+#
+# If you backup the root directory, the following excluded
+# files can be useful
+#
+ Exclude {
+ File = C:/Temp
+ File = C:/tmp
+ }
+}
+
+#
+# This is an example which will backup all the hard drives of a Windows System.
+#
+FileSet {
+ Name = "Windows Full Set"
+ Enable VSS = yes
+ Include {
+ Options {
+ Signature = MD5
+ Exclude = yes
+ IgnoreCase = yes
+ EnhancedWild = yes
+ DriveType = fixed
+
+ # Exclude directories full of lots and lots of useless little files
+ WildDir = "[A-Z]:/Documents and Settings/*/Cookies"
+ WildDir = "[A-Z]:/Documents and Settings/*/Recent"
+ WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/History"
+ WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temp"
+ WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temporary Internet Files"
+
+ # Exclude directories full of lots and lots of useless little files
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Cookies"
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Recent"
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/History"
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temp"
+ WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temporary Internet Files"
+
+ # Exclude directories full of lots and lots of useless little files
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Cookies"
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Recent"
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/History"
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temp"
+ WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temporary Internet Files"
+
+ # Some random bits of Windows we want to ignore
+ WildDir = "[A-Z]:/{WINNT,Windows}/Prefetch"
+ WildDir = "[A-Z]:/{WINNT,Windows}/msdownld.tmp"
+ WildDir = "[A-Z]:/{WINNT,Windows}/Internet Logs"
+ WildDir = "[A-Z]:/{WINNT,Windows}/$Nt*Uninstall*"
+ WildDir = "[A-Z]:/{WINNT,Windows}/Downloaded Installations"
+
+ # Temporary directories & files
+ WildDir = "[A-Z]:/{WINNT,Windows}/Temp"
+ WildDir = "[A-Z]:/Temp"
+ WildFile = "*.tmp"
+ WildDir = "[A-Z]:/tmp"
+
+ # Fast Find
+ WildFile = "[A-Z]:/ffastun*"
+
+ # System Restore
+ WildDir = "[A-Z]:/System Volume Information"
+
+ # Windows Update
+ WildDir = "[A-Z]:/WUTemp"
+
+ # Recycle bins
+ WildDir = "[A-Z]:/RECYCLE[DR]"
+
+ # Swap files
+ WildFile = "[A-Z]:/pagefile.sys"
+ WildFile = "[A-Z]:/hiberfil.sys"
+
+ # These are programs and are easier to reinstall than restore from
+ # backup
+ WildDir = "[A-Z]:/cygwin"
+ WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java"
+ WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java Web Start"
+ WildDir = "[A-Z]:/{Program Files,PROGRA~1}/JavaSoft"
+ WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Microsoft Office"
+ }
+
+ File = "C:/"
+ File = "D:/"
+ File = "E:/"
+ File = "F:/"
+ File = "G:/"
+ File = "H:/"
+ File = "I:/"
+ File = "J:/"
+ File = "K:/"
+ File = "L:/"
+ File = "M:/"
+ File = "N:/"
+ File = "O:/"
+ File = "P:/"
+ File = "Q:/"
+ File = "R:/"
+ File = "S:/"
+ File = "T:/"
+ File = "U:/"
+ File = "V:/"
+ File = "W:/"
+ File = "X:/"
+ File = "Y:/"
+ File = "Z:/"
+ }
+}
+
+#
+# When to do the backups, full backup on first sunday of the month,
+# differential (i.e. incremental since full) every other sunday,
+# and incremental backups other days
+Schedule {
+ Name = "WeeklyCycle"
+ Run = Full 1st sun at 23:05
+ Run = Differential 2nd-5th sun at 23:05
+ Run = Incremental mon-sat at 23:05
+}
+
+# This schedule does the catalog. It starts after the WeeklyCycle
+Schedule {
+ Name = "WeeklyCycleAfterBackup"
+ Run = Full sun-sat at 23:10
+}
+
+# This is the backup of the catalog
+FileSet {
+ Name = "Catalog"
+ Include {
+ Options {
+ signature = MD5
+ }
+ File = "@working_dir@\\bacula.sql"
+ }
+}
+
+# Client (File Services) to backup
+Client {
+ Name = @client_name@
+ Address = @client_address@
+ FDPort = @client_port@
+ Catalog = MyCatalog
+ Password = "@client_password@" # password for FileDaemon
+ File Retention = 30 days # 30 days
+ Job Retention = 6 months # six months
+ AutoPrune = yes # Prune expired Jobs/Files
+}
+
+#
+# Second Client (File Services) to backup
+# You should change Name, Address, and Password before using
+#
+#Client {
+# Name = @client_name@2
+# Address = @client_address@2
+# FDPort = @client_port@
+# Catalog = MyCatalog
+# Password = "@client_password@2" # password for FileDaemon 2
+# File Retention = 30 days # 30 days
+# Job Retention = 6 months # six months
+# AutoPrune = yes # Prune expired Jobs/Files
+#}
+
+
+# Definition of file storage device
+Storage {
+ Name = File
+# Do not use "localhost" here
+ Address = @storage_address@ # N.B. Use a fully qualified name here
+ SDPort = @storage_port@
+ Password = "@storage_password@"
+ Device = FileStorage
+ Media Type = File
+}
+
+
+
+# Definition of DDS tape storage device
+#Storage {
+# Name = DDS-4
+# Do not use "localhost" here
+# Address = @storage_address@ # N.B. Use a fully qualified name here
+# SDPort = @storage_port@
+# Password = "@storage_password@" # password for Storage daemon
+# Device = DDS-4 # must be same as Device in Storage daemon
+# Media Type = DDS-4 # must be same as MediaType in Storage daemon
+# Autochanger = yes # enable for autochanger device
+#}
+
+# Definition of 8mm tape storage device
+#Storage {
+# Name = "8mmDrive"
+# Do not use "localhost" here
+# Address = @storage_address@ # N.B. Use a fully qualified name here
+# SDPort = @storage_port@
+# Password = "@storage_password@"
+# Device = "Exabyte 8mm"
+# MediaType = "8mm"
+#}
+
+
+# Generic catalog service
+Catalog {
+ Name = MyCatalog
+ dbname = bacula; user = bacula; password = ""
+}
+
+# Reasonable message delivery -- send most everything to email address
+# and to the console
+Messages {
+ Name = Standard
+#
+# NOTE! If you send to two email or more email addresses, you will need
+# to replace the %r in the from field (-f part) with a single valid
+# email address in both the mailcommand and the operatorcommand.
+#
+ mailcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
+ operatorcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"
+ mail = @job_email@ = all, !skipped
+ operator = @job_email@ = mount
+ console = all, !skipped, !saved
+#
+# WARNING! the following will create a file that you must cycle from
+# time to time as it will grow indefinitely. However, it will
+# also keep all your messages if they scroll off the console.
+#
+ append = "@working_dir@\\log" = all, !skipped
+}
+
+
+#
+# Message delivery for daemon messages (no job).
+Messages {
+ Name = Daemon
+ mailcommand = "\"@bin_dir@\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"
+ mail = @job_email@ = all, !skipped
+ console = all, !skipped, !saved
+ append = "@working_dir@\\log" = all, !skipped
+}
+
+
+
+# Default pool definition
+Pool {
+ Name = Default
+ Pool Type = Backup
+ Recycle = yes # Bacula can automatically recycle Volumes
+ AutoPrune = yes # Prune expired volumes
+ Volume Retention = 365 days # one year
+}
+
+# Scratch pool definition
+Pool {
+ Name = Scratch
+ Pool Type = Backup
+}
+
+#
+# Restricted console used by tray-monitor to get the status of the director
+#
+Console {
+ Name = @monitor_name@
+ Password = "@monitor_password@"
+ CommandACL = status, .status
+}
-#\r
-# Default Bacula File Daemon Configuration file\r
-#\r
-# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@\r
-#\r
-# There is not much to change here except perhaps the\r
-# File daemon Name\r
-#\r
-\r
-#\r
-# "Global" File daemon configuration specifications\r
-#\r
-FileDaemon { # this is me\r
- Name = @client_name@\r
- FDport = @client_port@ # where we listen for the director\r
- WorkingDirectory = "@working_dir@"\r
- Pid Directory = "@working_dir@"\r
- #Plugin Directory = "@fdplugins_dir@"\r
- Maximum Concurrent Jobs = @client_maxjobs@\r
-}\r
-\r
-#\r
-# List Directors who are permitted to contact this File daemon\r
-#\r
-Director {\r
- Name = @director_name@\r
- Password = "@client_password@"\r
-}\r
-\r
-#\r
-# Restricted Director, used by tray-monitor to get the\r
-# status of the file daemon\r
-#\r
-Director {\r
- Name = @monitor_name@\r
- Password = "@monitor_password@"\r
- Monitor = yes\r
-}\r
-\r
-# Send all messages except skipped files back to Director\r
-Messages {\r
- Name = Standard\r
- director = @director_name@ = all, !skipped, !restored\r
-}\r
+#
+# Default Bacula File Daemon Configuration file
+#
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@
+#
+# There is not much to change here except perhaps the
+# File daemon Name
+#
+
+#
+# "Global" File daemon configuration specifications
+#
+FileDaemon { # this is me
+ Name = @client_name@
+ FDport = @client_port@ # where we listen for the director
+ WorkingDirectory = "@working_dir@"
+ Pid Directory = "@working_dir@"
+# Plugin Directory = "@fdplugins_dir@"
+ Maximum Concurrent Jobs = @client_maxjobs@
+}
+
+#
+# List Directors who are permitted to contact this File daemon
+#
+Director {
+ Name = @director_name@
+ Password = "@client_password@"
+}
+
+#
+# Restricted Director, used by tray-monitor to get the
+# status of the file daemon
+#
+Director {
+ Name = @monitor_name@
+ Password = "@monitor_password@"
+ Monitor = yes
+}
+
+# Send all messages except skipped files back to Director
+Messages {
+ Name = Standard
+ director = @director_name@ = all, !skipped, !restored
+}
; Added Bacula-SD and Bacula-DIR
; Replaced ParameterGiven with standard GetOptions
;
+; Kern Sibbald October 2010
+; Remove server installs
+; Install into single bacula directory
+; (i.e. undo a large part of what Robert Nelson did)
+;
+;
; Command line options:
;
; /service -
; Basics
;
Name "Bacula"
-OutFile "${OUT_DIR}\winbacula-${VERSION}.exe"
+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"
+;InstType "Server"
+;InstType "Full"
!insertmacro GetParent
Var AutomaticInstall
Var InstallType
+
!define NewInstall 0
!define UpgradeInstall 1
!define MigrateInstall 2
; 2 = Director Service
; 3 = Command Console
; 4 = Bat Console
-; 5 = wxWidgets Console
-; 7 = Documentation (PDF)
+; 5 = wxWidgits Console
+; 6 = Documentation (PDF)
; 7 = Documentation (HTML)
!define ComponentFile 1
StrCpy $MySQLVersion ""
StrCpy $PostgreSQLPath ""
StrCpy $PostgreSQLVersion ""
+ StrCpy $LocalDirectorPassword ""
${GetParameters} $R0
Pop $LocalHostAddress
Call GetUserName
- Pop $ConfigDirectorMailAddress
-
- Call FindDatabaseApps
; Configuration Defaults
StrCpy $ConfigClientName "$HostName-fd"
StrCpy $ConfigClientPort 9102
- StrCpy $ConfigClientMaxJobs 5
+ StrCpy $ConfigClientMaxJobs 10
;StrCpy $ConfigClientPassword
StrCpy $ConfigClientInstallService "$OptService"
StrCpy $ConfigClientStartService "$OptStart"
- StrCpy $ConfigStorageName "$HostName-sd"
- StrCpy $ConfigStoragePort 9103
- StrCpy $ConfigStorageMaxJobs 10
- ;StrCpy $ConfigStoragePassword
- StrCpy $ConfigStorageInstallService "$OptService"
- StrCpy $ConfigStorageStartService "$OptStart"
-
- ;StrCpy $ConfigDirectorName "$HostName-dir"
- StrCpy $ConfigDirectorPort 9101
- StrCpy $ConfigDirectorMaxJobs 1
- ;StrCpy $ConfigDirectorPassword
- StrCpy $ConfigDirectorDB 0
- StrCpy $ConfigDirectorInstallService "$OptService"
- StrCpy $ConfigDirectorStartService "$OptStart"
StrCpy $ConfigMonitorName "$HostName-mon"
;StrCpy $ConfigMonitorPassword
+; PLUGINSDIR refers to temporary helper programs and not Bacula plugins!
InitPluginsDir
File "/oname=$PLUGINSDIR\openssl.exe" "${SRC_DIR}\openssl.exe"
File "/oname=$PLUGINSDIR\libeay32.dll" "${SRC_DIR}\libeay32.dll"
SetPluginUnload alwaysoff
+; Set client password
nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'
pop $R0
${If} $R0 = 0
FileClose $R1
${EndIf}
- nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'
- pop $R0
- ${If} $R0 = 0
- FileOpen $R1 "$PLUGINSDIR\pw.txt" r
- IfErrors +4
- FileRead $R1 $R0
- ${StrTrimNewLines} $ConfigStoragePassword $R0
- FileClose $R1
- ${EndIf}
-
- nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'
- pop $R0
- ${If} $R0 = 0
- FileOpen $R1 "$PLUGINSDIR\pw.txt" r
- IfErrors +4
- FileRead $R1 $R0
- ${StrTrimNewLines} $LocalDirectorPassword $R0
- FileClose $R1
- ${EndIf}
-
SetPluginUnload manual
+; Set monitor password
nsExec::Exec '"$PLUGINSDIR\openssl.exe" rand -base64 -out $PLUGINSDIR\pw.txt 33'
pop $R0
${If} $R0 = 0
SetOutPath "$INSTDIR"
File "Readme.txt"
- SetOutPath "$INSTDIR\bin"
-!if "${BUILD_TOOLS}" == "VC8"
- File "${SRC_DIR}\msvcm80.dll"
- File "${SRC_DIR}\msvcp80.dll"
- File "${SRC_DIR}\msvcr80.dll"
- File "${SRC_DIR}\Microsoft.VC80.CRT.manifest"
- File "${SRC_DIR}\pthreadVCE.dll"
-!endif
-!if "${BUILD_TOOLS}" == "VC8_DEBUG"
- File "${SRC_DIR}\msvcm80.dll"
- File "${SRC_DIR}\msvcp80.dll"
- File "${SRC_DIR}\msvcr80.dll"
- File "${SRC_DIR}\Microsoft.VC80.CRT.manifest"
- File "${SRC_DIR}\msvcm80d.dll"
- File "${SRC_DIR}\msvcp80d.dll"
- File "${SRC_DIR}\msvcr80d.dll"
- File "${SRC_DIR}\Microsoft.VC80.DebugCRT.manifest"
- File "${SRC_DIR}\pthreadVCE.dll"
-!endif
+ SetOutPath "$INSTDIR"
!if "${BUILD_TOOLS}" == "MinGW"
File "${SRC_DIR}\mingwm10.dll"
File "${SRC_DIR}\pthreadGCE.dll"
-!endif
- File "${SRC_DIR}\libeay32.dll"
- File "${SRC_DIR}\ssleay32.dll"
File "${SRC_DIR}\zlib1.dll"
-!if "${BUILD_TOOLS}" == "VC8"
- File "${SRC_DIR}\zlib1.dll.manifest"
+ File "${SRC_DIR}\ssleay32.dll"
+ File "${SRC_DIR}\libeay32.dll"
!endif
-!If "${BUILD_TOOLS}" == "VC8_DEBUG"
- File "${SRC_DIR}\zlib1.dll.manifest"
+!if "${BUILD_TOOLS}" == "MinGW64"
+ File "${SRC_DIR}\pthreadGCE.dll"
+ File "${SRC_DIR}\cryptoeay32-0.9.8.dll"
+ File "${SRC_DIR}\ssleay32-0.9.8.dll"
+ File "${SRC_DIR}\zlib1.dll"
!endif
+ File "${SRC_DIR}\bacula.dll"
+
File "/oname=$INSTDIR\openssl.cnf" "${SRC_DIR}\openssl.cnf"
File "${SRC_DIR}\openssl.exe"
File "${SRC_DIR}\bsleep.exe"
File "${SRC_DIR}\bsmtp.exe"
- File "${SRC_DIR}\bacula.dll"
File "${SRC_DIR}\expr64.exe"
File "${SRC_DIR}\snooze.exe"
FunctionEnd
Section "-Initialize"
- ${If} $MySQLPath != ""
- DetailPrint "Found MySQL (version $MySQLVersion)"
- ${EndIf}
- ${If} $PostgreSQLPath != ""
- DetailPrint "Found PostgreSQL (version $PostgreSQLVersion)"
- ${EndIf}
WriteRegStr HKLM Software\Bacula InstallLocation "$INSTDIR"
Pop $R2
WriteRegDWORD HKLM Software\Bacula Components $R2
- WriteRegDWORD HKLM Software\Bacula Database $ConfigDirectorDB
-
; remove start menu items
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\Bacula\Documentation"
CreateDirectory "$INSTDIR"
- CreateDirectory "$INSTDIR\bin"
- CreateDirectory "$APPDATA\Bacula"
- CreateDirectory "$APPDATA\Bacula\Work"
- CreateDirectory "$APPDATA\Bacula\Spool"
+ CreateDirectory "$INSTDIR\working"
SetOutPath "$INSTDIR"
File "..\..\..\LICENSE"
- Delete /REBOOTOK "$INSTDIR\bin\License.txt"
+ Delete /REBOOTOK "$INSTDIR\License.txt"
+; Output a series of SED commands to configure the .conf file(s)
FileOpen $R1 $PLUGINSDIR\config.sed w
FileWrite $R1 "s;@VERSION@;${VERSION};g$\r$\n"
FileWrite $R1 "s;@DATE@;${__DATE__};g$\r$\n"
!If "$BUILD_TOOLS" == "MinGW"
StrCpy $R2 "MinGW32"
!Else
- StrCpy $R2 "MVS"
+ StrCpy $R2 "MinGW64"
!EndIf
Call GetHostName
FileWrite $R1 "s;@DISTVER@;$R2;g$\r$\n"
- ${StrRep} $R2 "$APPDATA\Bacula\Work" "\" "\\\\"
+ ${StrRep} $R2 "$INSTDIR\working" "\" "\\\\"
FileWrite $R1 's;@working_dir@;$R2;g$\r$\n'
- ${StrRep} $R2 "$APPDATA\Bacula\Work" "\" "\\"
+ ${StrRep} $R2 "$INSTDIR\working" "\" "\\"
FileWrite $R1 's;@working_dir_cmd@;$R2;g$\r$\n'
- ${StrRep} $R2 "$INSTDIR\bin" "\" "\\\\"
- FileWrite $R1 's;@bin_dir@;$R2;g$\r$\n'
- ${StrRep} $R2 "$INSTDIR\bin" "\" "\\"
- FileWrite $R1 's;@bin_dir_cmd@;$R2;g$\r$\n'
+; ${StrRep} $R2 "$INSTDIR" "\" "\\\\"
+; FileWrite $R1 's;@bin_dir@;$R2;g$\r$\n'
+; ${StrRep} $R2 "$INSTDIR" "\" "\\"
+; FileWrite $R1 's;@bin_dir_cmd@;$R2;g$\r$\n'
- ${StrRep} $R2 "$INSTDIR\bin\fdplugins" "\" "\\\\"
+ ${StrRep} $R2 "$INSTDIR\plugins" "\" "\\\\"
FileWrite $R1 's;@fdplugins_dir@;$R2;g$\r$\n'
${StrRep} $R2 "$INSTDIR" "\" "/"
FileWrite $R1 "s;@BUILD_DIR@;$R2;g$\r$\n"
- Call IsDirectorSelected
- Pop $R2
- ${If} $R2 = 1
- FileWrite $R1 "s;@director_address@;$LocalHostAddress;g$\r$\n"
- ${Else}
- ${If} "$ConfigDirectorAddress" != ""
- FileWrite $R1 "s;@director_address@;$ConfigDirectorAddress;g$\r$\n"
- ${EndIf}
- ${EndIf}
-
FileWrite $R1 "s;@client_address@;$LocalHostAddress;g$\r$\n"
- FileWrite $R1 "s;@storage_address@;$LocalHostAddress;g$\r$\n"
${If} "$ConfigClientName" != ""
FileWrite $R1 "s;@client_name@;$ConfigClientName;g$\r$\n"
${If} "$ConfigClientPassword" != ""
FileWrite $R1 "s;@client_password@;$ConfigClientPassword;g$\r$\n"
${EndIf}
- ${If} "$ConfigStorageName" != ""
- FileWrite $R1 "s;@storage_name@;$ConfigStorageName;g$\r$\n"
- ${EndIf}
- ${If} "$ConfigStoragePort" != ""
- FileWrite $R1 "s;@storage_port@;$ConfigStoragePort;g$\r$\n"
- ${EndIf}
- ${If} "$ConfigStorageMaxJobs" != ""
- FileWrite $R1 "s;@storage_maxjobs@;$ConfigStorageMaxJobs;g$\r$\n"
- ${EndIf}
- ${If} "$ConfigStoragePassword" != ""
- FileWrite $R1 "s;@storage_password@;$ConfigStoragePassword;g$\r$\n"
- ${EndIf}
${If} "$ConfigDirectorName" != ""
FileWrite $R1 "s;@director_name@;$ConfigDirectorName;g$\r$\n"
${EndIf}
${If} "$ConfigDirectorPort" != ""
FileWrite $R1 "s;@director_port@;$ConfigDirectorPort;g$\r$\n"
${EndIf}
- ${If} "$ConfigDirectorMaxJobs" != ""
- FileWrite $R1 "s;@director_maxjobs@;$ConfigDirectorMaxJobs;g$\r$\n"
- ${EndIf}
${If} "$ConfigDirectorPassword" != ""
FileWrite $R1 "s;@director_password@;$ConfigDirectorPassword;g$\r$\n"
${EndIf}
- ${If} "$ConfigDirectorMailServer" != ""
- FileWrite $R1 "s;@smtp_host@;$ConfigDirectorMailServer;g$\r$\n"
- ${EndIf}
- ${If} "$ConfigDirectorMailAddress" != ""
- FileWrite $R1 "s;@job_email@;$ConfigDirectorMailAddress;g$\r$\n"
- ${EndIf}
${If} "$ConfigMonitorName" != ""
FileWrite $R1 "s;@monitor_name@;$ConfigMonitorName;g$\r$\n"
${EndIf}
FileWrite $R1 "s;@monitor_password@;$ConfigMonitorPassword;g$\r$\n"
${EndIf}
- ${If} $ConfigDirectorDB = 1
- ${If} $MySQLPath != ""
- ${StrRep} $R2 "$MySQLPath\bin" "\" "\\"
- FileWrite $R1 "s;@SQL_BINDIR@;$R2;g$\r$\n"
- ${EndIf}
- ${ElseIf} $ConfigDirectorDB = 2
- ${If} $PostgreSQLPath != ""
- ${StrRep} $R2 "$PostgreSQLPath\bin" "\" "\\"
- FileWrite $R1 "s;@SQL_BINDIR@;$R2;g$\r$\n"
- ${EndIf}
- ${EndIf}
-
FileClose $R1
- ${If} $InstallType = ${MigrateInstall}
- FileOpen $R1 $PLUGINSDIR\migrate.sed w
- ${StrRep} $R2 "$APPDATA\Bacula\Work" "\" "\\\\"
- FileWrite $R1 's;\(Working *Directory *= *\)[^ ][^ ]*.*$$;\1"$R2";$\r$\n'
- FileWrite $R1 's;\(Pid *Directory *= *\)[^ ][^ ]*.*$$;\1"$R2";$\r$\n'
- FileClose $R1
- ${EndIf}
-
- ${If} ${FileExists} "$OldInstallDir\bin\bacula-fd.exe"
- nsExec::ExecToLog '"$OldInstallDir\bin\bacula-fd.exe" /kill' ; Shutdown any bacula that could be running
- Sleep 3000
- nsExec::ExecToLog '"$OldInstallDir\bin\bacula-fd.exe" /remove' ; Remove existing service
- ${EndIf}
-
- ${If} ${FileExists} "$OldInstallDir\bin\bacula-sd.exe"
- nsExec::ExecToLog '"$OldInstallDir\bin\bacula-sd.exe" /kill' ; Shutdown any bacula that could be running
- Sleep 3000
- nsExec::ExecToLog '"$OldInstallDir\bin\bacula-sd.exe" /remove' ; Remove existing service
- ${EndIf}
-
- ${If} ${FileExists} "$OldInstallDir\bin\bacula-dir.exe"
- nsExec::ExecToLog '"$OldInstallDir\bin\bacula-dir.exe" /kill' ; Shutdown any bacula that could be running
- Sleep 3000
- nsExec::ExecToLog '"$OldInstallDir\bin\bacula-dir.exe" /remove' ; Remove existing service
- ${EndIf}
-
SectionEnd
SectionGroup "Client" SecGroupClient
Section "File Service" SecFileDaemon
SectionIn 1 2 3
- SetOutPath "$INSTDIR\bin\fdplugins"
+ SetOutPath "$INSTDIR\plugins"
File "${SRC_DIR}\exchange-fd.dll"
- SetOutPath "$INSTDIR\bin"
+ SetOutPath "$INSTDIR"
File "${SRC_DIR}\bacula-fd.exe"
- ${If} $InstallType = ${MigrateInstall}
- ${AndIf} ${FileExists} "$OldInstallDir\bin\bacula-fd.conf"
- CopyFiles "$OldInstallDir\bin\bacula-fd.conf" "$APPDATA\Bacula"
- nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\migrate.sed" -i.bak "$APPDATA\Bacula\bacula-fd.conf"'
- ${Else}
- File "/oname=$PLUGINSDIR\bacula-fd.conf" "bacula-fd.conf.in"
+ File "/oname=$PLUGINSDIR\bacula-fd.conf" "bacula-fd.conf.in"
- StrCpy $0 "$APPDATA\Bacula"
- StrCpy $1 bacula-fd.conf
- Call ConfigEditAndCopy
- ${EndIf}
+ StrCpy $0 "$INSTDIR"
+ StrCpy $1 bacula-fd.conf
+ Call ConfigEditAndCopy
StrCpy $0 bacula-fd
StrCpy $1 "File Service"
Call InstallDaemon
- CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Client Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-fd.conf"'
-SectionEnd
-
-SectionGroupEnd
-
-SectionGroup "Server" SecGroupServer
-
-Section "Storage Service" SecStorageDaemon
- SectionIn 2 3
-
- SetOutPath "$INSTDIR\bin"
-
- File "${SRC_DIR}\loaderinfo.exe"
- File "${SRC_DIR}\mt.exe"
- File "${SRC_DIR}\mtx.exe"
- File "${SRC_DIR}\scsitape.exe"
- File "${SRC_DIR}\tapeinfo.exe"
- File "${SRC_DIR}\bacula-sd.exe"
- File "${SRC_DIR}\bcopy.exe"
- File "${SRC_DIR}\bextract.exe"
- File "${SRC_DIR}\bls.exe"
- File "${SRC_DIR}\bscan.exe"
- File "${SRC_DIR}\btape.exe"
- File "${SRC_DIR}\scsilist.exe"
- File "${SRC_DIR}\mkisofs.exe"
- File "${SRC_DIR}\growisofs.exe"
- File "${SRC_DIR}\dvd-ram-control.exe"
- File "${SRC_DIR}\dvd+rw-booktype.exe"
- File "${SRC_DIR}\dvd+rw-format.exe"
- File "${SRC_DIR}\dvd+rw-mediainfo.exe"
-
- File "/oname=$PLUGINSDIR\mtx-changer.cmd" "${SRC_DIR}\mtx-changer.cmd"
-
- StrCpy $0 "$INSTDIR\bin"
- StrCpy $1 mtx-changer.cmd
- Call ConfigEditAndCopy
-
- File "/oname=$PLUGINSDIR\disk-changer.cmd" "${SRC_DIR}\disk-changer.cmd"
-
- StrCpy $0 "$INSTDIR\bin"
- StrCpy $1 disk-changer.cmd
- Call ConfigEditAndCopy
-
- File "/oname=$PLUGINSDIR\dvd-handler.cmd" "${SRC_DIR}\dvd-handler.cmd"
-
- StrCpy $0 "$INSTDIR\bin"
- StrCpy $1 dvd-handler.cmd
- Call ConfigEditAndCopy
-
- File "/oname=$PLUGINSDIR\bacula-sd.conf" "bacula-sd.conf.in"
-
- StrCpy $0 "$APPDATA\Bacula"
- StrCpy $1 bacula-sd.conf
- Call ConfigEditAndCopy
-
- StrCpy $0 bacula-sd
- StrCpy $1 "Storage Service"
- StrCpy $2 $ConfigStorageInstallService
- StrCpy $3 $ConfigStorageStartService
- Call InstallDaemon
-
- CreateShortCut "$SMPROGRAMS\Bacula\Configuration\List Devices.lnk" "$INSTDIR\bin\scsilist.exe" "/pause"
- CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Storage Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-sd.conf"'
-SectionEnd
-
-Section "Director Service" SecDirectorDaemon
- SectionIn 2 3
-
- SetOutPath "$INSTDIR\bin"
-
- ${If} $ConfigDirectorDB = 1
- File /oname=bacula_cats.dll "${SRC_DIR}\cats_mysql.dll"
- File "${SRC_DIR}\libmysql.dll"
- File /oname=$PLUGINSDIR\create_database.cmd ${SRC_DIR}\create_mysql_database.cmd
- File /oname=$PLUGINSDIR\drop_database.cmd ${SRC_DIR}\drop_mysql_database.cmd
- File /oname=$PLUGINSDIR\make_tables.cmd ${SRC_DIR}\make_mysql_tables.cmd
- File ${SRC_DIR}\make_mysql_tables.sql
- File /oname=$PLUGINSDIR\drop_tables.cmd ${SRC_DIR}\drop_mysql_tables.cmd
- File ${SRC_DIR}\drop_mysql_tables.sql
- File /oname=$PLUGINSDIR\grant_privileges.cmd ${SRC_DIR}\grant_mysql_privileges.cmd
- File ${SRC_DIR}\grant_mysql_privileges.sql
- File /oname=$PLUGINSDIR\make_catalog_backup.cmd ${SRC_DIR}\make_mysql_catalog_backup.cmd
- ${ElseIf} $ConfigDirectorDB = 2
- File /oname=bacula_cats.dll "${SRC_DIR}\cats_postgresql.dll"
- File "${SRC_DIR}\libpq.dll"
-!if "${BUILD_TOOLS}" == "VC8"
- File "${SRC_DIR}\comerr32.dll"
- File "${SRC_DIR}\libintl-2.dll"
- File "${SRC_DIR}\libiconv-2.dll"
- File "${SRC_DIR}\krb5_32.dll"
-!endif
-!If "${BUILD_TOOLS}" == "VC8_DEBUG"
- File "${SRC_DIR}\comerr32.dll"
- File "${SRC_DIR}\libintl-2.dll"
- File "${SRC_DIR}\libiconv-2.dll"
- File "${SRC_DIR}\krb5_32.dll"
-!endif
- File /oname=$PLUGINSDIR\create_database.cmd ${SRC_DIR}\create_postgresql_database.cmd
- File /oname=$PLUGINSDIR\drop_database.cmd ${SRC_DIR}\drop_postgresql_database.cmd
- File /oname=$PLUGINSDIR\make_tables.cmd ${SRC_DIR}\make_postgresql_tables.cmd
- File ${SRC_DIR}\create_postgresql_database.sql
- File ${SRC_DIR}\make_postgresql_tables.sql
- File /oname=$PLUGINSDIR\drop_tables.cmd ${SRC_DIR}\drop_postgresql_tables.cmd
- File ${SRC_DIR}\drop_postgresql_tables.sql
- File /oname=$PLUGINSDIR\grant_privileges.cmd ${SRC_DIR}\grant_postgresql_privileges.cmd
- File ${SRC_DIR}\grant_postgresql_privileges.sql
- File /oname=$PLUGINSDIR\make_catalog_backup.cmd ${SRC_DIR}\make_postgresql_catalog_backup.cmd
- ${ElseIf} $ConfigDirectorDB = 3
- File "${SRC_DIR}\sqlite3.exe"
-!if "${BUILD_TOOLS}" == "VC8"
- File "${SRC_DIR}\sqlite3.exe.manifest"
-!endif
-!If "${BUILD_TOOLS}" == "VC8_DEBUG"
- File "${SRC_DIR}\sqlite3.exe.manifest"
-!endif
- File /oname=bacula_cats.dll "${SRC_DIR}\cats_sqlite3.dll"
- File /oname=$PLUGINSDIR\create_database.cmd ${SRC_DIR}\create_sqlite3_database.cmd
- File /oname=$PLUGINSDIR\drop_database.cmd ${SRC_DIR}\drop_sqlite3_database.cmd
- File /oname=$PLUGINSDIR\make_tables.cmd ${SRC_DIR}\make_sqlite3_tables.cmd
- File ${SRC_DIR}\make_sqlite3_tables.sql
- File /oname=$PLUGINSDIR\drop_tables.cmd ${SRC_DIR}\drop_sqlite3_tables.cmd
- File /oname=$PLUGINSDIR\grant_privileges.cmd ${SRC_DIR}\grant_sqlite3_privileges.cmd
- File /oname=$PLUGINSDIR\make_catalog_backup.cmd ${SRC_DIR}\make_sqlite3_catalog_backup.cmd
- ${EndIf}
-
- File "${SRC_DIR}\bacula-dir.exe"
- File "${SRC_DIR}\dbcheck.exe"
-
- File "/oname=$PLUGINSDIR\delete_catalog_backup.cmd" "${SRC_DIR}\delete_catalog_backup.cmd"
-
- StrCpy $0 "$INSTDIR\bin"
-
- StrCpy $1 create_database.cmd
- Call ConfigEditAndCopy
-
- StrCpy $1 drop_database.cmd
- Call ConfigEditAndCopy
-
- StrCpy $1 make_tables.cmd
- Call ConfigEditAndCopy
-
- StrCpy $1 drop_tables.cmd
- Call ConfigEditAndCopy
-
- StrCpy $1 grant_privileges.cmd
- Call ConfigEditAndCopy
-
- StrCpy $1 make_catalog_backup.cmd
- Call ConfigEditAndCopy
-
- StrCpy $1 delete_catalog_backup.cmd
- Call ConfigEditAndCopy
-
- File "${SRC_DIR}\query.sql"
-
- File "/oname=$PLUGINSDIR\bacula-dir.conf" "bacula-dir.conf.in"
-
- StrCpy $0 "$APPDATA\Bacula"
- StrCpy $1 bacula-dir.conf
- Call ConfigEditAndCopy
-
- StrCpy $0 bacula-dir
- StrCpy $1 "Director Service"
- StrCpy $2 $ConfigDirectorInstallService
- StrCpy $3 $ConfigDirectorStartService
- Call InstallDaemon
-
- CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Director Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bacula-dir.conf"'
+ CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Client Configuration.lnk" "write.exe" '"$INSTDIR\bacula-fd.conf"'
SectionEnd
SectionGroupEnd
Section "Command Console" SecConsole
SectionIn 1 2 3
- SetOutPath "$INSTDIR\bin"
+ SetOutPath "$INSTDIR"
File "${SRC_DIR}\bconsole.exe"
Call InstallCommonFiles
- ${If} $InstallType = ${MigrateInstall}
- ${AndIf} ${FileExists} "$OldInstallDir\bin\bconsole.conf"
- CopyFiles "$OldInstallDir\bin\bconsole.conf" "$APPDATA\Bacula"
- ${Else}
- File "/oname=$PLUGINSDIR\bconsole.conf" "bconsole.conf.in"
- StrCpy $0 "$APPDATA\Bacula"
- StrCpy $1 bconsole.conf
- Call ConfigEditAndCopy
- ${EndIf}
-
- CreateShortCut "$SMPROGRAMS\Bacula\bconsole.lnk" "$INSTDIR\bin\bconsole.exe" '-c "$APPDATA\Bacula\bconsole.conf"' "$INSTDIR\bin\bconsole.exe" 0
- CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Command Console Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bconsole.conf"'
+ CreateShortCut "$SMPROGRAMS\Bacula\bconsole.lnk" "$INSTDIR\bconsole.exe" '-c "$INSTDIR\bconsole.conf"' "$INSTDIR\bconsole.exe" 0
+ CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Command Console Configuration.lnk" "write.exe" '"$INSTDIR\bconsole.conf"'
SectionEnd
Section "Bat Console" SecBatConsole
SectionIn 1 2 3
-
- SetOutPath "$INSTDIR\bin"
+
+ SetOutPath "$INSTDIR"
Call InstallCommonFiles
File "${SRC_DIR}\QtCore4.dll"
File "${SRC_DIR}\bat.exe"
- ${If} $InstallType = ${MigrateInstall}
- ${AndIf} ${FileExists} "$OldInstallDir\bin\bat.conf"
- CopyFiles "$OldInstallDir\bin\bat.conf" "$APPDATA\Bacula"
- ${Else}
- File "/oname=$PLUGINSDIR\bat.conf" "bat.conf.in"
- StrCpy $0 "$APPDATA\Bacula"
- StrCpy $1 bat.conf
- Call ConfigEditAndCopy
- ${EndIf}
+ File "/oname=$PLUGINSDIR\bat.conf" "bat.conf.in"
+ StrCpy $0 "$INSTDIR"
+ StrCpy $1 bat.conf
+ Call ConfigEditAndCopy
; Create Start Menu entry
- CreateShortCut "$SMPROGRAMS\Bacula\Bat.lnk" "$INSTDIR\bin\bat.exe" '-c "$APPDATA\Bacula\bat.conf"' "$INSTDIR\bin\bat.exe" 0
- CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Bat Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bat.conf"'
+ CreateShortCut "$SMPROGRAMS\Bacula\Bat.lnk" "$INSTDIR\bat.exe" '-c "$INSTDIR\bat.conf"' "$INSTDIR\bat.exe" 0
+ CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Bat Configuration.lnk" "write.exe" '"$INSTDIR\bat.conf"'
SectionEnd
-Section "Graphical Console" SecWxConsole
- SectionIn 1 2 3
+; Deleted because wxconsole is deprecated
+;Section "Graphical Console" SecWxConsole
+; SectionIn 1 2 3
- SetOutPath "$INSTDIR\bin"
-
- Call InstallCommonFiles
-!if "${BUILD_TOOLS}" == "VC8"
- File "${SRC_DIR}\wxbase28_vc_bacula.dll"
- File "${SRC_DIR}\wxmsw28_core_vc_bacula.dll"
-!endif
-!If "${BUILD_TOOLS}" == "VC8_DEBUG"
- File "${SRC_DIR}\wxbase28_vc_bacula.dll"
- File "${SRC_DIR}\wxmsw28_core_vc_bacula.dll"
-!endif
-!if "${BUILD_TOOLS}" == "MinGW"
- File "${SRC_DIR}\wxbase28_gcc_bacula.dll"
- File "${SRC_DIR}\wxmsw28_core_gcc_bacula.dll"
-!endif
-
- File "${SRC_DIR}\bwx-console.exe"
-
- ${If} $InstallType = ${MigrateInstall}
- ${AndIf} ${FileExists} "$OldInstallDir\bin\bwx-console.conf"
- CopyFiles "$OldInstallDir\bin\bwx-console.conf" "$APPDATA\Bacula"
- ${Else}
- File "/oname=$PLUGINSDIR\bwx-console.conf" "bwx-console.conf.in"
- StrCpy $0 "$APPDATA\Bacula"
- StrCpy $1 bwx-console.conf
- Call ConfigEditAndCopy
- ${EndIf}
-
- ; Create Start Menu entry
- CreateShortCut "$SMPROGRAMS\Bacula\bwx-console.lnk" "$INSTDIR\bin\bwx-console.exe" '-c "$APPDATA\Bacula\bwx-console.conf"' "$INSTDIR\bin\bwx-console.exe" 0
- CreateShortCut "$SMPROGRAMS\Bacula\Configuration\Edit Graphical Console Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bwx-console.conf"'
-SectionEnd
+; SetOutPath "$INSTDIR"
+;
+;SectionEnd
SectionGroupEnd
CreateShortCut "$SMPROGRAMS\Bacula\Documentation\Misc.lnk" '"$INSTDIR\doc\misc.pdf"'
CreateShortCut "$SMPROGRAMS\Bacula\Documentation\Utility.lnk" '"$INSTDIR\doc\utility.pdf"'
CreateShortCut "$SMPROGRAMS\Bacula\Documentation\Problems.lnk" '"$INSTDIR\doc\problems.pdf"'
+ SetOutPath "$INSTDIR"
SectionEnd
-Section "Documentation (HTML Format)" SecDocHtml
- SectionIn 3
+;Section "Documentation (HTML Format)" SecDocHtml
+; SectionIn 3
- SetOutPath "$INSTDIR\doc"
- CreateDirectory "$INSTDIR\doc"
+; SetOutPath "$INSTDIR\doc"
+; CreateDirectory "$INSTDIR\doc"
; File "${SRC_DIR}\manual\bacula\*.html"
; File "${SRC_DIR}\manual\bacula\*.png"
; File "${SRC_DIR}\manual\bacula\*.css"
; CreateShortCut "$SMPROGRAMS\Bacula\Documentation\Manual (HTML).lnk" '"$INSTDIR\doc\index.html"'
-SectionEnd
+;SectionEnd
SectionGroupEnd
${If} $OsIsNT = 1
nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$INSTDIR" /T /G SYSTEM:F Administrators:F'
- nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$APPDATA\Bacula" /T /G SYSTEM:F Administrators:F'
${EndIf}
; Write the uninstall keys for Windows & create Start Menu entry
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "VersionMinor" $R0
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "NoRepair" 1
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "URLUpdateInfo" "http://sourceforge.net/project/showfiles.php?group_id=50727"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "URLUpdateInfo" "http://www.bacula.org"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "URLInfoAbout" "http://www.bacula.org"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "HelpLink" "http://www.bacula.org/?page=support"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "HelpLink" "http://www.bacula.org?page=support"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteUninstaller "$INSTDIR\Uninstall.exe"
CreateShortCut "$SMPROGRAMS\Bacula\Uninstall Bacula.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
; Extra Page descriptions
LangString DESC_SecFileDaemon ${LANG_ENGLISH} "Install Bacula File Daemon on this system."
-LangString DESC_SecStorageDaemon ${LANG_ENGLISH} "Install Bacula Storage Daemon on this system."
-LangString DESC_SecDirectorDaemon ${LANG_ENGLISH} "Install Bacula Director Daemon on this system."
LangString DESC_SecConsole ${LANG_ENGLISH} "Install command console program on this system."
LangString DESC_SecBatConsole ${LANG_ENGLISH} "Install Bat graphical console program on this system."
-LangString DESC_SecWxConsole ${LANG_ENGLISH} "Install wxWidgets graphical console program on this system."
-LangString DESC_SecDocPdf ${LANG_ENGLISH} "Install documentation in Acrobat format on this system."
-LangString DESC_SecDocHtml ${LANG_ENGLISH} "Install documentation in HTML format on this system."
LangString TITLE_ConfigPage1 ${LANG_ENGLISH} "Configuration"
LangString SUBTITLE_ConfigPage1 ${LANG_ENGLISH} "Set installation configuration."
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)
- !InsertMacro MUI_DESCRIPTION_TEXT ${SecStorageDaemon} $(DESC_SecStorageDaemon)
- !InsertMacro MUI_DESCRIPTION_TEXT ${SecDirectorDaemon} $(DESC_SecDirectorDaemon)
!InsertMacro MUI_DESCRIPTION_TEXT ${SecConsole} $(DESC_SecConsole)
!InsertMacro MUI_DESCRIPTION_TEXT ${SecBatConsole} $(DESC_SecBatConsole)
- !InsertMacro MUI_DESCRIPTION_TEXT ${SecWxConsole} $(DESC_SecWxConsole)
- !InsertMacro MUI_DESCRIPTION_TEXT ${SecDocPdf} $(DESC_SecDocPdf)
- !InsertMacro MUI_DESCRIPTION_TEXT ${SecDocHtml} $(DESC_SecDocHtml)
!InsertMacro MUI_FUNCTION_DESCRIPTION_END
; 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
- nsExec::ExecToLog '"$INSTDIR\bin\bacula-fd.exe" /kill'
- nsExec::ExecToLog '"$INSTDIR\bin\bacula-sd.exe" /kill'
- nsExec::ExecToLog '"$INSTDIR\bin\bacula-dir.exe" /kill'
+ nsExec::ExecToLog '"$INSTDIR\bacula-fd.exe" /kill'
Sleep 3000
ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-fd"
${If} $R0 = 1
; Remove bacula service
- nsExec::ExecToLog '"$INSTDIR\bin\bacula-fd.exe" /remove'
- nsExec::ExecToLog '"$INSTDIR\bin\exchange-fd.dll" /remove'
- ${EndIf}
-
- ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-sd"
- ${If} $R0 = 1
- ; Remove bacula service
- nsExec::ExecToLog '"$INSTDIR\bin\bacula-sd.exe" /remove'
- ${EndIf}
-
- ReadRegDWORD $R0 HKLM "Software\Bacula" "Service_Bacula-dir"
- ${If} $R0 = 1
- ; Remove bacula service
- nsExec::ExecToLog '"$INSTDIR\bin\bacula-dir.exe" /remove'
+ nsExec::ExecToLog '"$INSTDIR\bacula-fd.exe" /remove'
+ nsExec::ExecToLog '"$INSTDIR\plugins\exchange-fd.dll" /remove'
${EndIf}
; remove registry keys
RMDir "$SMPROGRAMS\Bacula"
; remove files and uninstaller (preserving config for now)
- Delete /REBOOTOK "$INSTDIR\bin\*"
Delete /REBOOTOK "$INSTDIR\doc\*"
Delete /REBOOTOK "$INSTDIR\*"
; Check for existing installation
MessageBox MB_YESNO|MB_ICONQUESTION \
"Would you like to delete the current configuration files and the working state file?" IDNO NoDel
- Delete /REBOOTOK "$APPDATA\Bacula\*"
- Delete /REBOOTOK "$APPDATA\Bacula\Work\*"
- Delete /REBOOTOK "$APPDATA\Bacula\Spool\*"
+ Delete /REBOOTOK "$INSTDIR\*"
+ Delete /REBOOTOK "$INSTDIR\working\*"
+ Delete /REBOOTOK "$INSTDIR\plugins\*"
Delete /REBOOTOK "$PLUGINSDIR\bacula-*.conf"
Delete /REBOOTOK "$PLUGINSDIR\*console.conf"
Delete /REBOOTOK "$PLUGINSDIR\*conf.in"
Delete /REBOOTOK "$PLUGINSDIR\*.sed"
Delete /REBOOTOK "$PLUGINSDIR\*.cmd"
Delete /REBOOTOK "$PLUGINSDIR\*.sql"
- RMDir "$APPDATA\Bacula\Work"
- RMDir "$APPDATA\Bacula\Spool"
- RMDir "$APPDATA\Bacula"
+ RMDir "$INSTDIR\plugins"
+ RMDir "$INSTDIR\working"
+ RMDir "$INSTDIR"
NoDel:
; remove directories used
- RMDir "$INSTDIR\bin"
RMDir "$INSTDIR\doc"
RMDir "$INSTDIR"
SectionEnd
WriteRegDWORD HKLM "Software\Bacula" "Service_$0" $2
${If} $2 = 1
- nsExec::ExecToLog '"$INSTDIR\bin\$0.exe" /install -c "$APPDATA\Bacula\$0.conf"'
+ nsExec::ExecToLog '"$INSTDIR\$0.exe" /install -c "$INSTDIR\$0.conf"'
${If} $OsIsNT <> 1
File "Start.bat"
${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
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
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"
${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
!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}
!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}
!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
${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