]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
win32: Fix #7095 File deamon and plugins are not selected by default anymore
authorNorbert Bizet <norbert.bizet@baculasystems.com>
Thu, 3 Dec 2020 14:46:30 +0000 (09:46 -0500)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:28 +0000 (09:03 +0100)
bacula/src/win32/full_win32_installer/winbacula.nsi
bacula/src/win32/win32_installer/winbacula.nsi
bacula/src/win32/win64_installer/winbacula.nsi

index ed2249aebaef6365ad974b414794f5938a357499..acb463a8420a22b4431bb0f4c98e988766820e8f 100644 (file)
@@ -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
index 4750ed4c71a2657b08916de2c4e76c6bedff013b..71985fa5e6ab0de83ad4ebad244cd5299ce5efb2 100644 (file)
@@ -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
index 6d2abdf93d4f1dd8f99d48984d3d326d04945f18..97eae763a564c8d662b3a36ccc53cd022f3b64ca 100644 (file)
@@ -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