From: Norbert Bizet Date: Thu, 3 Dec 2020 14:46:30 +0000 (-0500) Subject: win32: Fix #7095 File deamon and plugins are not selected by default anymore X-Git-Tag: Release-11.3.2~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6de49c891b6875e3fc2ab33c3285c106f3995293;p=thirdparty%2Fbacula.git win32: Fix #7095 File deamon and plugins are not selected by default anymore --- diff --git a/bacula/src/win32/full_win32_installer/winbacula.nsi b/bacula/src/win32/full_win32_installer/winbacula.nsi index ed2249aeb..acb463a84 100644 --- a/bacula/src/win32/full_win32_installer/winbacula.nsi +++ b/bacula/src/win32/full_win32_installer/winbacula.nsi @@ -1306,15 +1306,15 @@ FunctionEnd ; in silent mode, we manually select or deselect modules, depending on cmdline parameter Function SilentSelectComponents - ; by default fd and plugins are selected - !InsertMacro SelectSection ${SecFileDaemon} - !InsertMacro SetSectionFlag ${SecFileDaemon} ${SF_RO} - !InsertMacro SelectSection ${SecAllDrivesPlugin} - !InsertMacro SetSectionFlag ${SecAllDrivesPlugin} ${SF_RO} - !InsertMacro SelectSection ${SecWinBMRPlugin} - !InsertMacro SetSectionFlag ${SecWinBMRPlugin} ${SF_RO} - !InsertMacro SelectSection ${SecCDPPlugin} - !InsertMacro SetSectionFlag ${SecCDPPlugin} ${SF_RO} + ClearErrors + ${GetOptions} $CMDLINE "-ComponentFile" $TmpComponent + ${IfNot} ${Errors} + !InsertMacro SelectSection ${SecFileDaemon} + !InsertMacro SetSectionFlag ${SecFileDaemon} ${SF_RO} + ${Else} + !InsertMacro UnselectSection ${SecFileDaemon} + !InsertMacro ClearSectionFlag ${SecFileDaemon} ${SF_RO} + ${EndIf} ClearErrors ${GetOptions} $CMDLINE "-ComponentStorage" $TmpComponent ${IfNot} ${Errors} @@ -1352,6 +1352,33 @@ Function SilentSelectComponents !InsertMacro ClearSectionFlag ${SecTrayMonitor} ${SF_RO} ${EndIf} ClearErrors + ${GetOptions} $CMDLINE "-ComponentAllDrivesPlugin" $TmpComponent + ${IfNot} ${Errors} + !InsertMacro SelectSection ${SecAllDrivesPlugin} + !InsertMacro SetSectionFlag ${SecAllDrivesPlugin} ${SF_RO} + ${Else} + !InsertMacro UnselectSection ${SecAllDrivesPlugin} + !InsertMacro ClearSectionFlag ${SecAllDrivesPlugin} ${SF_RO} + ${EndIf} + ClearErrors + ${GetOptions} $CMDLINE "-ComponentWinBMRPlugin" $TmpComponent + ${IfNot} ${Errors} + !InsertMacro SelectSection ${SecWinBMRPlugin} + !InsertMacro SetSectionFlag ${SecWinBMRPlugin} ${SF_RO} + ${Else} + !InsertMacro UnselectSection ${SecWinBMRPlugin} + !InsertMacro ClearSectionFlag ${SecWinBMRPlugin} ${SF_RO} + ${EndIf} + ClearErrors + ${GetOptions} $CMDLINE "-ComponentCDPPlugin" $TmpComponent + ${IfNot} ${Errors} + !InsertMacro SelectSection ${SecCDPPlugin} + !InsertMacro SetSectionFlag ${SecCDPPlugin} ${SF_RO} + ${Else} + !InsertMacro UnselectSection ${SecCDPPlugin} + !InsertMacro ClearSectionFlag ${SecCDPPlugin} ${SF_RO} + ${EndIf} + ClearErrors FunctionEnd Function SelectPreviousComponents diff --git a/bacula/src/win32/win32_installer/winbacula.nsi b/bacula/src/win32/win32_installer/winbacula.nsi index 4750ed4c7..71985fa5e 100644 --- a/bacula/src/win32/win32_installer/winbacula.nsi +++ b/bacula/src/win32/win32_installer/winbacula.nsi @@ -1174,15 +1174,15 @@ FunctionEnd ; in silent mode, we manually select or deselect modules, depending on cmdline parameter Function SilentSelectComponents - ; by default fd and plugins are selected - !InsertMacro SelectSection ${SecFileDaemon} - !InsertMacro SetSectionFlag ${SecFileDaemon} ${SF_RO} - !InsertMacro SelectSection ${SecAllDrivesPlugin} - !InsertMacro SetSectionFlag ${SecAllDrivesPlugin} ${SF_RO} - !InsertMacro SelectSection ${SecWinBMRPlugin} - !InsertMacro SetSectionFlag ${SecWinBMRPlugin} ${SF_RO} - !InsertMacro SelectSection ${SecCDPPlugin} - !InsertMacro SetSectionFlag ${SecCDPPlugin} ${SF_RO} + ClearErrors + ${GetOptions} $CMDLINE "-ComponentFile" $TmpComponent + ${IfNot} ${Errors} + !InsertMacro SelectSection ${SecFileDaemon} + !InsertMacro SetSectionFlag ${SecFileDaemon} ${SF_RO} + ${Else} + !InsertMacro UnselectSection ${SecFileDaemon} + !InsertMacro ClearSectionFlag ${SecFileDaemon} ${SF_RO} + ${EndIf} ClearErrors ${GetOptions} $CMDLINE "-ComponentStorage" $TmpComponent ${IfNot} ${Errors} @@ -1220,6 +1220,33 @@ Function SilentSelectComponents !InsertMacro ClearSectionFlag ${SecTrayMonitor} ${SF_RO} ${EndIf} ClearErrors + ${GetOptions} $CMDLINE "-ComponentAllDrivesPlugin" $TmpComponent + ${IfNot} ${Errors} + !InsertMacro SelectSection ${SecAllDrivesPlugin} + !InsertMacro SetSectionFlag ${SecAllDrivesPlugin} ${SF_RO} + ${Else} + !InsertMacro UnselectSection ${SecAllDrivesPlugin} + !InsertMacro ClearSectionFlag ${SecAllDrivesPlugin} ${SF_RO} + ${EndIf} + ClearErrors + ${GetOptions} $CMDLINE "-ComponentWinBMRPlugin" $TmpComponent + ${IfNot} ${Errors} + !InsertMacro SelectSection ${SecWinBMRPlugin} + !InsertMacro SetSectionFlag ${SecWinBMRPlugin} ${SF_RO} + ${Else} + !InsertMacro UnselectSection ${SecWinBMRPlugin} + !InsertMacro ClearSectionFlag ${SecWinBMRPlugin} ${SF_RO} + ${EndIf} + ClearErrors + ${GetOptions} $CMDLINE "-ComponentCDPPlugin" $TmpComponent + ${IfNot} ${Errors} + !InsertMacro SelectSection ${SecCDPPlugin} + !InsertMacro SetSectionFlag ${SecCDPPlugin} ${SF_RO} + ${Else} + !InsertMacro UnselectSection ${SecCDPPlugin} + !InsertMacro ClearSectionFlag ${SecCDPPlugin} ${SF_RO} + ${EndIf} + ClearErrors FunctionEnd Function SelectPreviousComponents diff --git a/bacula/src/win32/win64_installer/winbacula.nsi b/bacula/src/win32/win64_installer/winbacula.nsi index 6d2abdf93..97eae763a 100644 --- a/bacula/src/win32/win64_installer/winbacula.nsi +++ b/bacula/src/win32/win64_installer/winbacula.nsi @@ -1113,15 +1113,15 @@ FunctionEnd ; in silent mode, we manually select or deselect modules, depending on cmdline parameter Function SilentSelectComponents - ; by default fd and plugins are selected - !InsertMacro SelectSection ${SecFileDaemon} - !InsertMacro SetSectionFlag ${SecFileDaemon} ${SF_RO} - !InsertMacro SelectSection ${SecAllDrivesPlugin} - !InsertMacro SetSectionFlag ${SecAllDrivesPlugin} ${SF_RO} - !InsertMacro SelectSection ${SecWinBMRPlugin} - !InsertMacro SetSectionFlag ${SecWinBMRPlugin} ${SF_RO} - !InsertMacro SelectSection ${SecCDPPlugin} - !InsertMacro SetSectionFlag ${SecCDPPlugin} ${SF_RO} + ClearErrors + ${GetOptions} $CMDLINE "-ComponentFile" $TmpComponent + ${IfNot} ${Errors} + !InsertMacro SelectSection ${SecFileDaemon} + !InsertMacro SetSectionFlag ${SecFileDaemon} ${SF_RO} + ${Else} + !InsertMacro UnselectSection ${SecFileDaemon} + !InsertMacro ClearSectionFlag ${SecFileDaemon} ${SF_RO} + ${EndIf} ClearErrors ${GetOptions} $CMDLINE "-ComponentStorage" $TmpComponent ${IfNot} ${Errors} @@ -1159,6 +1159,33 @@ Function SilentSelectComponents !InsertMacro ClearSectionFlag ${SecTrayMonitor} ${SF_RO} ${EndIf} ClearErrors + ${GetOptions} $CMDLINE "-ComponentAllDrivesPlugin" $TmpComponent + ${IfNot} ${Errors} + !InsertMacro SelectSection ${SecAllDrivesPlugin} + !InsertMacro SetSectionFlag ${SecAllDrivesPlugin} ${SF_RO} + ${Else} + !InsertMacro UnselectSection ${SecAllDrivesPlugin} + !InsertMacro ClearSectionFlag ${SecAllDrivesPlugin} ${SF_RO} + ${EndIf} + ClearErrors + ${GetOptions} $CMDLINE "-ComponentWinBMRPlugin" $TmpComponent + ${IfNot} ${Errors} + !InsertMacro SelectSection ${SecWinBMRPlugin} + !InsertMacro SetSectionFlag ${SecWinBMRPlugin} ${SF_RO} + ${Else} + !InsertMacro UnselectSection ${SecWinBMRPlugin} + !InsertMacro ClearSectionFlag ${SecWinBMRPlugin} ${SF_RO} + ${EndIf} + ClearErrors + ${GetOptions} $CMDLINE "-ComponentCDPPlugin" $TmpComponent + ${IfNot} ${Errors} + !InsertMacro SelectSection ${SecCDPPlugin} + !InsertMacro SetSectionFlag ${SecCDPPlugin} ${SF_RO} + ${Else} + !InsertMacro UnselectSection ${SecCDPPlugin} + !InsertMacro ClearSectionFlag ${SecCDPPlugin} ${SF_RO} + ${EndIf} + ClearErrors FunctionEnd Function SelectPreviousComponents