From 7a53c09a482f44ec8a1a0e3c692e36c59703cf4b Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 23 Jan 2010 08:57:13 +0100 Subject: [PATCH] Tweak Win32 install --- .../src/win32/win32_installer/winbacula.nsi | 7 +- .../src/win32/win64_installer/ConfigPage2.nsh | 6 +- bacula/src/win32/win64_installer/Readme.txt | 8 +- .../src/win32/win64_installer/winbacula.nsi | 111 +++++++++--------- 4 files changed, 69 insertions(+), 63 deletions(-) diff --git a/bacula/src/win32/win32_installer/winbacula.nsi b/bacula/src/win32/win32_installer/winbacula.nsi index 82d411903a..5437892b2a 100644 --- a/bacula/src/win32/win32_installer/winbacula.nsi +++ b/bacula/src/win32/win32_installer/winbacula.nsi @@ -477,6 +477,11 @@ Section "Command Console" SecConsole File "${SRC_DIR}\bconsole.exe" Call InstallCommonFiles + File "/oname=$PLUGINSDIR\bconsole.conf" "bconsole.conf.in" + StrCpy $0 "$INSTDIR" + StrCpy $1 bconsole.conf + Call ConfigEditAndCopy + 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"' @@ -553,7 +558,7 @@ Section "-Finish" Push $R0 ${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 "$INSTDIR" /T /G SYSTEM:F Administrators:F' ${EndIf} ; Write the uninstall keys for Windows & create Start Menu entry diff --git a/bacula/src/win32/win64_installer/ConfigPage2.nsh b/bacula/src/win32/win64_installer/ConfigPage2.nsh index 72259c3857..11238293e9 100644 --- a/bacula/src/win32/win64_installer/ConfigPage2.nsh +++ b/bacula/src/win32/win64_installer/ConfigPage2.nsh @@ -25,7 +25,7 @@ Function EnterConfigPage2 ${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' + FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Enter data for Director allowed to access this Client (required)"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n' ${EndIf} IntOp $R6 $R6 + 1 @@ -202,13 +202,13 @@ Function EnterConfigPage2 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' +; 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' +; 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 diff --git a/bacula/src/win32/win64_installer/Readme.txt b/bacula/src/win32/win64_installer/Readme.txt index 2e7397d939..670a3956c4 100755 --- a/bacula/src/win32/win64_installer/Readme.txt +++ b/bacula/src/win32/win64_installer/Readme.txt @@ -1,12 +1,16 @@ 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, +Please note, only the Win64 Client (File daemon) is supported. +The other components (Director, Storage daemon, their utilities) are not provided because they have not been ported. +If you need these components, you can either build them yourself or +ask Bacula Systems. + Note: the Win64 Client can only be installed on 64 bit Windows Operating systems. + Bacula - Windows Version Notes ============================== diff --git a/bacula/src/win32/win64_installer/winbacula.nsi b/bacula/src/win32/win64_installer/winbacula.nsi index b2e2022d19..d6ef82f5d2 100644 --- a/bacula/src/win32/win64_installer/winbacula.nsi +++ b/bacula/src/win32/win64_installer/winbacula.nsi @@ -261,7 +261,7 @@ Function .onInit StrCpy $ConfigClientName "$HostName-fd" StrCpy $ConfigClientPort 9102 - StrCpy $ConfigClientMaxJobs 5 + StrCpy $ConfigClientMaxJobs 10 ;StrCpy $ConfigClientPassword StrCpy $ConfigClientInstallService "$OptService" StrCpy $ConfigClientStartService "$OptStart" @@ -401,10 +401,10 @@ Section "-Initialize" ${StrRep} $R2 "$INSTDIR\working" "\" "\\" FileWrite $R1 's;@working_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" "\" "\\\\" +; 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\plugins" "\" "\\\\" FileWrite $R1 's;@fdplugins_dir@;$R2;g$\r$\n' @@ -429,6 +429,12 @@ Section "-Initialize" ${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} "$ConfigDirectorPassword" != "" + FileWrite $R1 "s;@director_password@;$ConfigDirectorPassword;g$\r$\n" + ${EndIf} ${If} "$ConfigMonitorName" != "" FileWrite $R1 "s;@monitor_name@;$ConfigMonitorName;g$\r$\n" ${EndIf} @@ -438,13 +444,6 @@ Section "-Initialize" FileClose $R1 - - ${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} - SectionEnd SectionGroup "Client" SecGroupClient @@ -487,6 +486,11 @@ Section "Command Console" SecConsole File "${SRC_DIR}\bconsole.exe" Call InstallCommonFiles + File "/oname=$PLUGINSDIR\bconsole.conf" "bconsole.conf.in" + StrCpy $0 "$INSTDIR" + StrCpy $1 bconsole.conf + Call ConfigEditAndCopy + 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"' @@ -495,37 +499,32 @@ SectionEnd Section "Bat Console" SecBatConsole SectionIn 1 2 3 -; SetOutPath "$INSTDIR\bin" + SetOutPath "$INSTDIR" -; Call InstallCommonFiles -; File "${SRC_DIR}\QtCore4.dll" -; File "${SRC_DIR}\QtGui4.dll" + Call InstallCommonFiles + File "${SRC_DIR}\QtCore4.dll" + File "${SRC_DIR}\QtGui4.dll" -; File "${SRC_DIR}\bat.exe" + 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 "$APPDDATA\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 -; Essentially deleted because wxconsole is not implemented on Win64 -Section "Graphical Console" SecWxConsole - SectionIn 1 2 3 - - SetOutPath "$INSTDIR" - -SectionEnd +; Deleted because wxconsole is deprecated +;Section "Graphical Console" SecWxConsole +; SectionIn 1 2 3 +; +; SetOutPath "$INSTDIR" +; +;SectionEnd SectionGroupEnd @@ -534,8 +533,7 @@ Section "-Finish" Push $R0 ${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 "$INSTDIR" /T /G SYSTEM:F Administrators:F' +; nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$INSTDIR" /T /G SYSTEM:F Administrators:F' ${EndIf} ; Write the uninstall keys for Windows & create Start Menu entry @@ -561,7 +559,7 @@ SectionEnd LangString DESC_SecFileDaemon ${LANG_ENGLISH} "Install Bacula File 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_SecBatConsole ${LANG_ENGLISH} "Install Bat graphical console program on this system." LangString TITLE_ConfigPage1 ${LANG_ENGLISH} "Configuration" LangString SUBTITLE_ConfigPage1 ${LANG_ENGLISH} "Set installation configuration." @@ -578,7 +576,7 @@ LangString SUBTITLE_WriteTemplates ${LANG_ENGLISH} "Create a resource template f !InsertMacro MUI_FUNCTION_DESCRIPTION_BEGIN !InsertMacro MUI_DESCRIPTION_TEXT ${SecFileDaemon} $(DESC_SecFileDaemon) !InsertMacro MUI_DESCRIPTION_TEXT ${SecConsole} $(DESC_SecConsole) -; !InsertMacro MUI_DESCRIPTION_TEXT ${SecBatConsole} $(DESC_SecBatConsole) + !InsertMacro MUI_DESCRIPTION_TEXT ${SecBatConsole} $(DESC_SecBatConsole) !InsertMacro MUI_FUNCTION_DESCRIPTION_END ; Uninstall section @@ -772,9 +770,9 @@ Function GetSelectedComponents ${If} ${SectionIsSelected} ${SecConsole} IntOp $R0 $R0 | ${ComponentTextConsole} ${EndIf} -; ${If} ${SectionIsSelected} ${SecBatConsole} -; IntOp $R0 $R0 | ${ComponentBatConsole} -; ${EndIf} + ${If} ${SectionIsSelected} ${SecBatConsole} + IntOp $R0 $R0 | ${ComponentBatConsole} + ${EndIf} Exch $R0 FunctionEnd @@ -863,14 +861,14 @@ Function SelectPreviousComponents !InsertMacro UnselectSection ${SecConsole} !InsertMacro ClearSectionFlag ${SecConsole} ${SF_RO} ${EndIf} -; IntOp $R1 $PreviousComponents & ${ComponentBatConsole} -; ${If} $R1 <> 0 -; !InsertMacro SelectSection ${SecBatConsole} -; !InsertMacro SetSectionFlag ${SecBatConsole} ${SF_RO} -; ${Else} -; !InsertMacro UnselectSection ${SecBatConsole} -; !InsertMacro ClearSectionFlag ${SecBatConsole} ${SF_RO} -; ${EndIf} + IntOp $R1 $PreviousComponents & ${ComponentBatConsole} + ${If} $R1 <> 0 + !InsertMacro SelectSection ${SecBatConsole} + !InsertMacro SetSectionFlag ${SecBatConsole} ${SF_RO} + ${Else} + !InsertMacro UnselectSection ${SecBatConsole} + !InsertMacro ClearSectionFlag ${SecBatConsole} ${SF_RO} + ${EndIf} ${EndIf} FunctionEnd @@ -897,12 +895,12 @@ Function UpdateComponentUI ${Else} !InsertMacro ClearSectionFlag ${SecConsole} ${SF_BOLD} ${EndIf} -; IntOp $R1 $NewComponents & ${ComponentBatConsole} -; ${If} $R1 <> 0 -; !InsertMacro SetSectionFlag ${SecBatConsole} ${SF_BOLD} -; ${Else} -; !InsertMacro ClearSectionFlag ${SecBatConsole} ${SF_BOLD} -; ${EndIf} + IntOp $R1 $NewComponents & ${ComponentBatConsole} + ${If} $R1 <> 0 + !InsertMacro SetSectionFlag ${SecBatConsole} ${SF_BOLD} + ${Else} + !InsertMacro ClearSectionFlag ${SecBatConsole} ${SF_BOLD} + ${EndIf} ${EndIf} GetDlgItem $R0 $HWNDPARENT 1 @@ -918,7 +916,6 @@ Function UpdateComponentUI Pop $R0 FunctionEnd - !include "InstallType.nsh" !include "ConfigPage1.nsh" !include "ConfigPage2.nsh" -- 2.39.5