feat(bundler): configure WiX to add launch option, closes #3015 (#3043)

This commit is contained in:
Lucas Fernandes Nogueira
2021-12-09 01:27:11 -03:00
committed by GitHub
parent 151e629ebf
commit feb3a8f896
3 changed files with 15 additions and 0 deletions

5
.changes/wix-run-app.md Normal file
View File

@@ -0,0 +1,5 @@
---
"tauri-bundler": patch
---
Configure WiX to add an option to launch the application after finishing setup.

View File

@@ -330,6 +330,8 @@ fn run_light(
let mut args: Vec<String> = vec![
"-ext".to_string(),
"WixUIExtension".to_string(),
"-ext".to_string(),
"WixUtilExtension".to_string(),
"-o".to_string(),
output_path.display().to_string(),
];

View File

@@ -46,7 +46,15 @@
<Property Id="ARPNOREPAIR" Value="yes" Secure="yes" /> <!-- Remove repair -->
<SetProperty Id="ARPNOMODIFY" Value="1" After="InstallValidate" Sequence="execute"/>
<!-- launch app checkbox -->
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch {{{product_name}}}" />
<Property Id="WixShellExecTarget" Value="{{{app_exe_source}}}" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
<UI>
<!-- launch app checkbox -->
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
{{#unless license}}