Skip to content

Commit 9835688

Browse files
cosmo0920edsiper
authored andcommitted
wix: windows: Introduce skipping service launching mechanism via env variables
Launching fluent-bit as service on installation is not preferable on ochestration cases. Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 060df7b commit 9835688

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

cpack/wix/WIX.template.in.cmakein

+8-3
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@
7777
<?include "properties.wxi"?>
7878
<?include "product_fragment.wxi"?>
7979

80+
<Property Id="LAUNCHSERVICE" Value="1"/>
81+
<SetProperty Id="LAUNCHSERVICE" Value="0" After="LaunchConditions" Sequence="first">
82+
<![CDATA[%NOT_FLB_SVC_LAUNCH <> ""]]>
83+
</SetProperty>
84+
8085
<Property Id="CreateFluentBitWinSvc" Value=" "/>
8186
<CustomAction Id="SetCreateFluentBitWinSvcCommand" Property="CreateFluentBitWinSvc" Value="&quot;sc.exe&quot; create @FLB_OUT_NAME@ binpath= &quot;\&quot;[INSTALL_ROOT]bin\@[email protected]\&quot; -c \&quot;[INSTALL_ROOT]conf\@[email protected]\&quot;&quot; start= delayed-auto" Execute="immediate" />
8287
<CustomAction Id="CreateFluentBitWinSvc" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" Impersonate="no" />
@@ -91,13 +96,13 @@
9196

9297
<Property Id="DeleteFluentBitWinSvc" Value=" "/>
9398
<CustomAction Id="SetDeleteFluentBitWinSvcCommand" Property="DeleteFluentBitWinSvc" Value="&quot;sc.exe&quot; delete @FLB_OUT_NAME@" Execute="immediate" />
94-
<CustomAction Id="DeleteFluentBitWinSvc" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no" />
99+
<CustomAction Id="DeleteFluentBitWinSvc" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" Impersonate="no" />
95100

96101
<InstallExecuteSequence>
97102
<Custom Action="SetCreateFluentBitWinSvcCommand" After="InstallFiles">NOT Installed</Custom>
98103
<Custom Action="CreateFluentBitWinSvc" After="SetCreateFluentBitWinSvcCommand">NOT Installed</Custom>
99-
<Custom Action="SetLaunchFluentBitWinSvcCommand" After="CreateFluentBitWinSvc">NOT Installed</Custom>
100-
<Custom Action="LaunchFluentBitWinSvc" After="SetLaunchFluentBitWinSvcCommand">NOT Installed</Custom>
104+
<Custom Action="SetLaunchFluentBitWinSvcCommand" After="CreateFluentBitWinSvc">LAUNCHSERVICE="1" AND NOT Installed</Custom>
105+
<Custom Action="LaunchFluentBitWinSvc" After="SetLaunchFluentBitWinSvcCommand">LAUNCHSERVICE="1" AND NOT Installed</Custom>
101106

102107
<Custom Action="SetStopFluentBitWinSvcCommand" After="InstallInitialize">REMOVE="ALL" AND NOT UPGRADINGPRODUCTCODE</Custom>
103108
<Custom Action="StopFluentBitWinSvc" After="SetStopFluentBitWinSvcCommand">REMOVE="ALL" AND NOT UPGRADINGPRODUCTCODE</Custom>

0 commit comments

Comments
 (0)