Skip to content

Commit f1f8c84

Browse files
cosmo0920edsiper
authored andcommitted
cmake: wix: windows: Use configured FLB_OUT_NAME value for fluent-bit executables' name
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent b891015 commit f1f8c84

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,9 +1110,11 @@ endif()
11101110
if(CPACK_GENERATOR MATCHES "WIX")
11111111
set(CPACK_WIX_UPGRADE_GUID cb6825fd-37e6-4596-a55d-6d490d4fe178)
11121112
configure_file(LICENSE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
1113+
configure_file(${CMAKE_SOURCE_DIR}/cpack/wix/WIX.template.in.cmakein
1114+
${CMAKE_CURRENT_BINARY_DIR}/WIX.template.in)
11131115
# Specify LICENSE file that has .txt extension
11141116
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
1115-
set(CPACK_WIX_TEMPLATE ${CMAKE_SOURCE_DIR}/cpack/wix/WIX.template.in)
1117+
set(CPACK_WIX_TEMPLATE ${CMAKE_CURRENT_BINARY_DIR}/WIX.template.in)
11161118
set(CPACK_WIX_LIGHT_EXTENSIONS "WixUtilExtension")
11171119
endif()
11181120

cpack/wix/WIX.template.in renamed to cpack/wix/WIX.template.in.cmakein

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,19 @@
7878
<?include "product_fragment.wxi"?>
7979

8080
<Property Id="CreateFluentBitWinSvc" Value=" "/>
81-
<CustomAction Id="SetCreateFluentBitWinSvcCommand" Property="CreateFluentBitWinSvc" Value="&quot;sc.exe&quot; create $(var.CPACK_PACKAGE_NAME) binpath= &quot;\&quot;[INSTALL_ROOT]bin\fluent-bit.exe\&quot; -c \&quot;[INSTALL_ROOT]conf\fluent-bit.conf\&quot;&quot; start= delayed-auto" Execute="immediate" />
81+
<CustomAction Id="SetCreateFluentBitWinSvcCommand" Property="CreateFluentBitWinSvc" Value="&quot;sc.exe&quot; create @FLB_OUT_NAME@ binpath= &quot;\&quot;[INSTALL_ROOT]bin\@FLB_OUT_NAME@.exe\&quot; -c \&quot;[INSTALL_ROOT]conf\@FLB_OUT_NAME@.conf\&quot;&quot; start= delayed-auto" Execute="immediate" />
8282
<CustomAction Id="CreateFluentBitWinSvc" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no" />
8383

8484
<Property Id="LaunchFluentBitWinSvc" Value=" "/>
85-
<CustomAction Id="SetLaunchFluentBitWinSvcCommand" Property="LaunchFluentBitWinSvc" Value="&quot;sc.exe&quot; start $(var.CPACK_PACKAGE_NAME)" Execute="immediate" />
85+
<CustomAction Id="SetLaunchFluentBitWinSvcCommand" Property="LaunchFluentBitWinSvc" Value="&quot;sc.exe&quot; start @FLB_OUT_NAME@" Execute="immediate" />
8686
<CustomAction Id="LaunchFluentBitWinSvc" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no" />
8787

8888
<Property Id="StopFluentBitWinSvc" Value=" "/>
89-
<CustomAction Id="SetStopFluentBitWinSvcCommand" Property="StopFluentBitWinSvc" Value="&quot;sc.exe&quot; stop $(var.CPACK_PACKAGE_NAME)" Execute="immediate" />
89+
<CustomAction Id="SetStopFluentBitWinSvcCommand" Property="StopFluentBitWinSvc" Value="&quot;sc.exe&quot; stop @FLB_OUT_NAME@" Execute="immediate" />
9090
<CustomAction Id="StopFluentBitWinSvc" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" Impersonate="no" />
9191

9292
<Property Id="DeleteFluentBitWinSvc" Value=" "/>
93-
<CustomAction Id="SetDeleteFluentBitWinSvcCommand" Property="DeleteFluentBitWinSvc" Value="&quot;sc.exe&quot; delete $(var.CPACK_PACKAGE_NAME)" Execute="immediate" />
93+
<CustomAction Id="SetDeleteFluentBitWinSvcCommand" Property="DeleteFluentBitWinSvc" Value="&quot;sc.exe&quot; delete @FLB_OUT_NAME@" Execute="immediate" />
9494
<CustomAction Id="DeleteFluentBitWinSvc" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no" />
9595

9696
<InstallExecuteSequence>

0 commit comments

Comments
 (0)