${Else}\r
IntOp $R8 $R7 + 26\r
${EndIf}\r
- FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Remote Director"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n'\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
\r
[Field 2]\r
Type="CheckBox"\r
-Text="Client"\r
+Text="Save Client template in:"\r
Left=6\r
-Right=40\r
+Right=240\r
Top=38\r
Bottom=48\r
\r
\r
[Field 4]\r
Type="CheckBox"\r
-Text="Storage"\r
+Text="Save Storage template in:"\r
Left=6\r
-Right=48\r
+Right=248\r
Top=70\r
Bottom=80\r
\r
\r
StrCpy $ConfigClientName "$HostName-fd"\r
StrCpy $ConfigClientPort 9102\r
- StrCpy $ConfigClientMaxJobs 2\r
+ StrCpy $ConfigClientMaxJobs 5\r
;StrCpy $ConfigClientPassword\r
StrCpy $ConfigClientInstallService "$OptService"\r
StrCpy $ConfigClientStartService "$OptStart"\r
-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="Remote Director"$\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
-Function EnterInstallType\r
- Push $R0\r
- Push $R1\r
- Push $R2\r
-\r
- ; Check if this is an upgrade by looking for an uninstaller configured \r
- ; in the registry.\r
- ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString"\r
-\r
- ${If} "$R0" != ""\r
- ; Check registry for new installer\r
- ReadRegStr $R1 HKLM "Software\Bacula" "InstallLocation"\r
- ${If} "$R1" != ""\r
- ; New Installer \r
- StrCpy $OldInstallDir $R1\r
- StrCpy $InstallType ${UpgradeInstall}\r
-\r
- SetShellVarContext all\r
-\r
- StrCpy $R1 "$APPDATA\Bacula"\r
- StrCpy $R2 "$INSTDIR\Doc"\r
-\r
- ReadRegDWORD $PreviousComponents HKLM "Software\Bacula" "Components"\r
-\r
- WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "A previous installation has been found in $OldInstallDir. Please choose the installation type for any additional components you select."\r
- WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The configuration files for additional components will be generated using defaults applicable to most installations."\r
- WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "The configuration defaults for additional components will be displayed and you will be given the chance to make changes before the configuration files are written."\r
-\r
- ReadRegDWORD $ConfigDirectorDB HKLM Software\Bacula Database\r
-\r
- ${If} $ConfigDirectorDB = 0\r
- IntOp $R0 $PreviousComponents & ${ComponentDirector}\r
- ${If} $R0 <> 0\r
- StrCpy $ConfigDirectorDB 1\r
- ${EndIf}\r
- ${EndIf}\r
- ${Else}\r
- ; Processing Upgrade - Get Install Directory\r
- ${StrRep} $R0 $R0 '"' ''\r
- ${GetParent} $R0 $OldInstallDir\r
-\r
- ; Old Installer \r
- StrCpy $InstallType ${MigrateInstall}\r
- StrCpy $R1 "$OldInstallDir\bin"\r
- StrCpy $R2 "$OldInstallDir\Doc"\r
-\r
- WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "An old installation has been found in $OldInstallDir. The Configuration will be migrated. Please choose the installation type for any additional components you select."\r
- WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"$PROGRAMFILES\Bacula$\". The configuration files for additional components will be generated using defaults applicable to most installations."\r
- WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "You may choose the installation directory. The configuration defaults will be displayed and you will be given the chance to make changes before the configuration files are written."\r
- ${EndIf}\r
- ${Else}\r
- ; New Install\r
- StrCpy $InstallType ${NewInstall}\r
- WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"$PROGRAMFILES\Bacula$\". The configuration files will be generated using defaults applicable to most installations."\r
- ${EndIf}\r
-\r
- ${If} $InstallType <> ${NewInstall}\r
- ${AndIf} $PreviousComponents = 0\r
- ${If} ${FileExists} "$R1\bacula-fd.conf"\r
- IntOp $PreviousComponents $PreviousComponents | ${ComponentFile}\r
- ${EndIf}\r
- ${If} ${FileExists} "$R1\bconsole.conf"\r
- IntOp $PreviousComponents $PreviousComponents | ${ComponentTextConsole}\r
- ${EndIf}\r
- ${If} ${FileExists} "$R1\wx-console.conf"\r
- IntOp $PreviousComponents $PreviousComponents | ${ComponentGUIConsole}\r
- ${EndIf}\r
- ${If} ${FileExists} "$R2\bacula.pdf"\r
- IntOp $PreviousComponents $PreviousComponents | ${ComponentPDFDocs}\r
- ${EndIf}\r
- ${If} ${FileExists} "$R2\bacula\bacula.html"\r
- IntOp $PreviousComponents $PreviousComponents | ${ComponentHTMLDocs}\r
- ${EndIf}\r
- ${If} ${FileExists} "$R2\bacula.html"\r
- IntOp $PreviousComponents $PreviousComponents | ${ComponentHTMLDocs}\r
- ${EndIf}\r
- ${EndIf}\r
-\r
- !InsertMacro MUI_HEADER_TEXT "$(TITLE_InstallType)" "$(SUBTITLE_InstallType)"\r
- !InsertMacro MUI_INSTALLOPTIONS_INITDIALOG "InstallType.ini"\r
- Pop $HDLG ;HWND of dialog\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_SHOW\r
-\r
- ; Process Results\r
-\r
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "InstallType.ini" "Field 3" "State"\r
-\r
- ${If} $R0 = 1\r
- StrCpy $AutomaticInstall 1\r
- ${Else}\r
- StrCpy $AutomaticInstall 0\r
- ${EndIf}\r
-\r
- Pop $R2\r
- Pop $R1\r
- Pop $R0\r
-FunctionEnd\r
+Function EnterInstallType
+ Push $R0
+ Push $R1
+ Push $R2
+
+ ; Check if this is an upgrade by looking for an uninstaller configured
+ ; in the registry.
+ ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString"
+
+ ${If} "$R0" != ""
+ ; Check registry for new installer
+ ReadRegStr $R1 HKLM "Software\Bacula" "InstallLocation"
+ ${If} "$R1" != ""
+ ; New Installer
+ StrCpy $OldInstallDir $R1
+ StrCpy $InstallType ${UpgradeInstall}
+
+ SetShellVarContext all
+
+ StrCpy $R1 "$APPDATA\Bacula"
+ StrCpy $R2 "$INSTDIR\Doc"
+
+ ReadRegDWORD $PreviousComponents HKLM "Software\Bacula" "Components"
+
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "A previous installation has been found in $OldInstallDir. Please choose the installation type for any additional components you select."
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The configuration files for additional components will be generated using defaults applicable to most installations."
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "The configuration defaults for additional components will be displayed and you will be given the chance to make changes before the configuration files are written."
+
+ ReadRegDWORD $ConfigDirectorDB HKLM Software\Bacula Database
+
+ ${If} $ConfigDirectorDB = 0
+ IntOp $R0 $PreviousComponents & ${ComponentDirector}
+ ${If} $R0 <> 0
+ StrCpy $ConfigDirectorDB 1
+ ${EndIf}
+ ${EndIf}
+ ${Else}
+ ; Processing Upgrade - Get Install Directory
+ ${StrRep} $R0 $R0 '"' ''
+ ${GetParent} $R0 $OldInstallDir
+
+ ; Old Installer
+ StrCpy $InstallType ${MigrateInstall}
+ StrCpy $R1 "$OldInstallDir\bin"
+ StrCpy $R2 "$OldInstallDir\Doc"
+
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 1" "Text" "An old installation has been found in $OldInstallDir. The Configuration will be migrated. Please choose the installation type for any additional components you select."
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"C:\Program Files\Bacula$\". The configuration files for additional components will be generated using defaults applicable to most installations."
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 6" "Text" "You may choose the installation directory. The configuration defaults will be displayed and you will be given the chance to make changes before the configuration files are written."
+ ${EndIf}
+ ${Else}
+ ; New Install
+ StrCpy $InstallType ${NewInstall}
+ WriteINIStr "$PLUGINSDIR\InstallType.ini" "Field 5" "Text" "The software will be installed in the default directory $\"C:\Program Files\Bacula$\". The configuration files will be generated using defaults applicable to most installations."
+ ${EndIf}
+
+ ${If} $InstallType <> ${NewInstall}
+ ${AndIf} $PreviousComponents = 0
+ ${If} ${FileExists} "$R1\bacula-fd.conf"
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentFile}
+ ${EndIf}
+ ${If} ${FileExists} "$R1\bconsole.conf"
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentTextConsole}
+ ${EndIf}
+ ${If} ${FileExists} "$R1\wx-console.conf"
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentGUIConsole}
+ ${EndIf}
+ ${If} ${FileExists} "$R2\bacula.pdf"
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentPDFDocs}
+ ${EndIf}
+ ${If} ${FileExists} "$R2\bacula\bacula.html"
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentHTMLDocs}
+ ${EndIf}
+ ${If} ${FileExists} "$R2\bacula.html"
+ IntOp $PreviousComponents $PreviousComponents | ${ComponentHTMLDocs}
+ ${EndIf}
+ ${EndIf}
+
+ !InsertMacro MUI_HEADER_TEXT "$(TITLE_InstallType)" "$(SUBTITLE_InstallType)"
+ !InsertMacro MUI_INSTALLOPTIONS_INITDIALOG "InstallType.ini"
+ Pop $HDLG ;HWND of dialog
+
+ !insertmacro MUI_INSTALLOPTIONS_SHOW
+
+ ; Process Results
+
+ !insertmacro MUI_INSTALLOPTIONS_READ $R0 "InstallType.ini" "Field 3" "State"
+
+ ${If} $R0 = 1
+ StrCpy $AutomaticInstall 1
+ ${Else}
+ StrCpy $AutomaticInstall 0
+ ${EndIf}
+
+ Pop $R2
+ Pop $R1
+ Pop $R0
+FunctionEnd
-Bacula - Windows Version Disclaimer
-===================================
-
-Please note, only the Win64 Client (File daemon) is supported, and
-contrary to the Win32 Client, the other components (Director, Storage daemon,
-their utilities) are not provided because they have not been ported.
-Note: the Win64 Client can only be installed on 64 bit Windows Operating
-systems.
-
-Bacula - Windows Version Notes
-==============================
-
-These notes highlight how the Windows version of Bacula differs from the
-other versions. It also provides any notes additional to the documentation.
-
-For detailed documentation on using, configuring and troubleshooting Bacula,
-please consult the installed documentation or the online documentation at
-http://www.bacula.org/?page=documentation.
-
-
-Start Menu Items
-----------------
-A number of menu items have been created in the Start menu under All Programs
-in the Bacula submenu. They may be selected to edit the configuration files,
-view the documentation or run one of the console or utility programs. The
-choices available will vary depending on the options you chose to install.
-
-
-File Locations
---------------
-Everything is installed in the directory
-"C:\Program Files\Bacula" unless a different directory was selected during
-installation. Note: due to a bug in the NSIS installer we are using, on
-64 bit machines appears to install Bacula in "C:\Program Files (x86)\Bacula".
-
-Code Page Problems
--------------------
-Please note that Bacula expects the contents of the configuration files to be
-written in UTF-8 format. Some translations of "Application Data" have accented
-characters, and apparently the installer writes this translated data in the
-standard Windows code page coding. This occurs for the Working Directory, and
-when it happens the daemon will not start since Bacula cannot find the directory.
-The workaround is to manually edit the appropriate conf file and ensure that it
-is written out in UTF-8 format.
-
-The conf files can be edited with any UTF-8 compatible editor, or on most
-modern Windows machines, you can edit them with notepad, then choose UTF-8
-output encoding before saving them.
+Bacula - Windows Version Disclaimer\r
+===================================\r
+\r
+Please note, only the Win64 Client (File daemon) is supported, and\r
+contrary to the Win32 Client, the other components (Director, Storage daemon,\r
+their utilities) are not provided because they have not been ported.\r
+Note: the Win64 Client can only be installed on 64 bit Windows Operating\r
+systems.\r
+\r
+Bacula - Windows Version Notes\r
+==============================\r
+\r
+These notes highlight how the Windows version of Bacula differs from the \r
+other versions. It also provides any notes additional to the documentation.\r
+\r
+For detailed documentation on using, configuring and troubleshooting Bacula,\r
+please consult the installed documentation or the online documentation at\r
+http://www.bacula.org/?page=documentation.\r
+\r
+\r
+Start Menu Items\r
+----------------\r
+A number of menu items have been created in the Start menu under All Programs\r
+in the Bacula submenu. They may be selected to edit the configuration files,\r
+view the documentation or run one of the console or utility programs. The \r
+choices available will vary depending on the options you chose to install.\r
+\r
+\r
+File Locations\r
+--------------\r
+Everything is installed in the directory \r
+"C:\Program Files\Bacula" unless a different directory was selected during\r
+installation. Note: due to a bug in the NSIS installer we are using, on \r
+64 bit machines appears to install Bacula in "C:\Program Files (x86)\Bacula".\r
+\r
+Code Page Problems\r
+-------------------\r
+Please note that Bacula expects the contents of the configuration files to be \r
+written in UTF-8 format. Some translations of "Application Data" have accented\r
+characters, and apparently the installer writes this translated data in the\r
+standard Windows code page coding. This occurs for the Working Directory, and \r
+when it happens the daemon will not start since Bacula cannot find the directory.\r
+The workaround is to manually edit the appropriate conf file and ensure that it\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 Windows machines, you can edit them with notepad, then choose UTF-8\r
+output encoding before saving them.\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="Client"\r
-Left=6\r
-Right=40\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="Storage"\r
-Left=6\r
-Right=48\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
-; winbsclient.nsi
+; winbacula.nsi
;
; Began as a version written by Michel Meyers (michel@tcnnet.dyndns.org)
;
; Eric Bollengier March 2009
; Updated to handle Win64 installation
;
+; Kern Sibbald April 2009
+; Correct some Win64 install problems
+;
; Version $Id: winbacula.nsi 7074 2008-05-31 18:43:21Z kerns $
;
; Command line options:
OutFile "${OUT_DIR}\win${WINVER}bacula-${VERSION}.exe"
SetCompressor lzma
-InstallDir "$PROGRAMFILES\bacula"
+InstallDir "C:\Program Files\Bacula"
InstallDirRegKey HKLM "Software\Bacula" "InstallLocation"
InstType "Client"
+;InstType "Server"
+;InstType "Full"
!insertmacro GetParent
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)
; 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
WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" State 1
DeleteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 2" Flags
WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 3" State "C:\$ConfigClientName.conf"
- WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST
+; WriteINIStr "$PLUGINSDIR\WriteTemplates.ini" "Field 5" Flags REQ_SAVE|FILE_EXPLORER|WARN_IF_EXIST
${EndIf}
General:
04Apr09
+kes Cleanup Win installer dialog messages a bit ...
kes Separate object/binaries in Win32 and Win64 builds. More to be done.
kes Add bconsole to Win64 installer.
03Apr09