|
@@ -281,6 +281,15 @@ pub fn get_and_extract_wix(path: &Path) -> crate::Result<()> {
|
|
|
extract_zip(&data, path)
|
|
|
}
|
|
|
|
|
|
+fn clear_env_for_wix(cmd: &mut Command) {
|
|
|
+ cmd.env_clear();
|
|
|
+ for (k, v) in std::env::vars_os() {
|
|
|
+ if ["SYSTEMROOT", "TMP", "TEMP"].contains(k) || k.to_string_lossy().starts_with("TAURI") {
|
|
|
+ cmd.env(k, v);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/// Runs the Candle.exe executable for Wix. Candle parses the wxs file and generates the code for building the installer.
|
|
|
fn run_candle(
|
|
|
settings: &Settings,
|
|
@@ -334,6 +343,7 @@ fn run_candle(
|
|
|
cmd.arg("-ext");
|
|
|
cmd.arg(ext);
|
|
|
}
|
|
|
+ clear_env_for_wix(&mut cmd);
|
|
|
cmd
|
|
|
.args(&args)
|
|
|
.current_dir(cwd)
|
|
@@ -369,6 +379,7 @@ fn run_light(
|
|
|
cmd.arg("-ext");
|
|
|
cmd.arg(ext);
|
|
|
}
|
|
|
+ clear_env_for_wix(&mut cmd);
|
|
|
cmd
|
|
|
.args(&args)
|
|
|
.current_dir(build_path)
|