diff --git a/.changes/validate-wixtools.md b/.changes/validate-wixtools.md new file mode 100644 index 000000000000..deefc08e30f7 --- /dev/null +++ b/.changes/validate-wixtools.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": patch +--- + +Check if `$HOME\AppData\Local\tauri\WixTools` directory has all the required files and redownload WiX if something is missing. diff --git a/tooling/bundler/src/bundle/windows/msi.rs b/tooling/bundler/src/bundle/windows/msi.rs index 647fe672018c..b5772bbbf4a9 100644 --- a/tooling/bundler/src/bundle/windows/msi.rs +++ b/tooling/bundler/src/bundle/windows/msi.rs @@ -7,9 +7,23 @@ mod wix; pub use wix::{MSI_FOLDER_NAME, MSI_UPDATER_FOLDER_NAME}; use crate::Settings; +use log::warn; use std::{self, path::PathBuf}; +const WIX_REQUIRED_FILES: &[&str] = &[ + "candle.exe", + "candle.exe.config", + "darice.cub", + "light.exe", + "light.exe.config", + "wconsole.dll", + "winterop.dll", + "wix.dll", + "WixUIExtension.dll", + "WixUtilExtension.dll", +]; + /// Runs all of the commands to build the MSI installer. /// Returns a vector of PathBuf that shows where the MSI was created. pub fn bundle_project(settings: &Settings, updater: bool) -> crate::Result> { @@ -18,6 +32,13 @@ pub fn bundle_project(settings: &Settings, updater: bool) -> crate::Result