Add option to launch Supercell Wx after install is complete

This commit is contained in:
Dan Paulat 2024-03-17 09:17:16 -05:00
parent f9cc055f8e
commit b025b29161
2 changed files with 12 additions and 1 deletions

View file

@ -623,7 +623,7 @@ if (MSVC)
set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/res/images/scwx-banner.png")
set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/res/images/scwx-dialog.png")
set(CPACK_WIX_TEMPLATE "${CMAKE_CURRENT_SOURCE_DIR}/wix.template.in")
set(CPACK_WIX_EXTENSIONS WiXUtilExtension)
set(CPACK_WIX_EXTENSIONS WixUIExtension WiXUtilExtension)
set(CPACK_INSTALL_CMAKE_PROJECTS
"${CMAKE_CURRENT_BINARY_DIR};${CMAKE_PROJECT_NAME};supercell-wx;/")

View file

@ -44,6 +44,13 @@
<UIRef Id="$(var.CPACK_WIX_UI_REF)" />
<UIRef Id="WixUI_ErrorProgressText" />
<UI>
<Publish Dialog="ExitDialog"
Control="Finish"
Event="DoAction"
Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
</UI>
<util:CloseApplication
Id="CloseSupercellWx"
Target="supercell-wx.exe"
@ -51,6 +58,10 @@
PromptToContinue="yes"
Description="Supercell Wx should be closed before continuing the install."/>
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch Supercell Wx" />
<Property Id="WixShellExecTarget" Value="[#CM_FP_bin.supercell_wx.exe]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
<?include "properties.wxi"?>
<?include "product_fragment.wxi"?>
</Product>