From e3496cb04d1fc8da86df4d7c9cd8882c82275743 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Fri, 4 Nov 2022 19:25:48 -0300 Subject: [PATCH 1/6] chore: force wix download --- tooling/bundler/src/bundle/windows/msi.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tooling/bundler/src/bundle/windows/msi.rs b/tooling/bundler/src/bundle/windows/msi.rs index fa008179d7b..fef5da98dc9 100644 --- a/tooling/bundler/src/bundle/windows/msi.rs +++ b/tooling/bundler/src/bundle/windows/msi.rs @@ -31,16 +31,7 @@ pub fn bundle_project(settings: &Settings, updater: bool) -> crate::Result Date: Fri, 4 Nov 2022 19:57:23 -0300 Subject: [PATCH 2/6] run on windows-2019 --- .github/workflows/artifacts-updater.yml | 4 ++-- tooling/bundler/src/bundle/windows/msi.rs | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/artifacts-updater.yml b/.github/workflows/artifacts-updater.yml index 0c6d5d5c7fc..c1f895c4ebb 100644 --- a/.github/workflows/artifacts-updater.yml +++ b/.github/workflows/artifacts-updater.yml @@ -27,7 +27,7 @@ jobs: strategy: fail-fast: false matrix: - platform: [ubuntu-latest, macos-latest, windows-latest] + platform: [ubuntu-latest, macos-latest, windows-2019] steps: - uses: actions/checkout@v2 @@ -97,7 +97,7 @@ jobs: name: linux-updater-artifacts path: ./examples/updater/src-tauri/target/release/bundle/appimage/updater-example_*.AppImage.* - uses: actions/upload-artifact@v2 - if: matrix.platform == 'windows-latest' + if: matrix.platform == 'windows-2019' with: name: windows-updater-artifacts path: ./examples/updater/src-tauri/target/release/bundle/msi/* diff --git a/tooling/bundler/src/bundle/windows/msi.rs b/tooling/bundler/src/bundle/windows/msi.rs index fef5da98dc9..fa008179d7b 100644 --- a/tooling/bundler/src/bundle/windows/msi.rs +++ b/tooling/bundler/src/bundle/windows/msi.rs @@ -31,7 +31,16 @@ pub fn bundle_project(settings: &Settings, updater: bool) -> crate::Result Date: Fri, 4 Nov 2022 20:19:23 -0300 Subject: [PATCH 3/6] extend env vars --- .github/workflows/artifacts-updater.yml | 4 ++-- tooling/bundler/src/bundle/windows/msi/wix.rs | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/artifacts-updater.yml b/.github/workflows/artifacts-updater.yml index c1f895c4ebb..c594260f2df 100644 --- a/.github/workflows/artifacts-updater.yml +++ b/.github/workflows/artifacts-updater.yml @@ -27,7 +27,7 @@ jobs: strategy: fail-fast: false matrix: - platform: [ubuntu-latest, macos-latest, windows-2019] + platform: [windows-latest] steps: - uses: actions/checkout@v2 @@ -97,7 +97,7 @@ jobs: name: linux-updater-artifacts path: ./examples/updater/src-tauri/target/release/bundle/appimage/updater-example_*.AppImage.* - uses: actions/upload-artifact@v2 - if: matrix.platform == 'windows-2019' + if: matrix.platform == 'windows-latest' with: name: windows-updater-artifacts path: ./examples/updater/src-tauri/target/release/bundle/msi/* diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index ec346a3f4ef..85d8d5ea4df 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -283,9 +283,20 @@ pub fn get_and_extract_wix(path: &Path) -> crate::Result<()> { fn clear_env_for_wix(cmd: &mut Command) { cmd.env_clear(); - let required_vars: Vec = - vec!["SYSTEMROOT".into(), "TMP".into(), "TEMP".into()]; + let required_vars: Vec = vec![ + "SYSTEMROOT".into(), + "TMP".into(), + "TEMP".into(), + "WINDIR".into(), + "ALLUSERSPROFILE".into(), + "APPDATA".into(), + "COMMONPROGRAMFILES".into(), + "HOMEDRIVE".into(), + "LOCALAPPDATA".into(), + "WINDIR".into(), + ]; for (k, v) in std::env::vars_os() { + println!("{:?} = {:?}", k, v); if required_vars.contains(&k) || k.to_string_lossy().starts_with("TAURI") { cmd.env(k, v); } From 739f6bb3f0b7996721ec3923991ed5e768812020 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Fri, 4 Nov 2022 20:36:49 -0300 Subject: [PATCH 4/6] uppercase env var --- tooling/bundler/src/bundle/windows/msi/wix.rs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index 85d8d5ea4df..23437c9f6cd 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -283,19 +283,10 @@ pub fn get_and_extract_wix(path: &Path) -> crate::Result<()> { fn clear_env_for_wix(cmd: &mut Command) { cmd.env_clear(); - let required_vars: Vec = vec![ - "SYSTEMROOT".into(), - "TMP".into(), - "TEMP".into(), - "WINDIR".into(), - "ALLUSERSPROFILE".into(), - "APPDATA".into(), - "COMMONPROGRAMFILES".into(), - "HOMEDRIVE".into(), - "LOCALAPPDATA".into(), - "WINDIR".into(), - ]; + let required_vars: Vec = + vec!["SYSTEMROOT".into(), "TMP".into(), "TEMP".into()]; for (k, v) in std::env::vars_os() { + let k = k.to_ascii_uppercase(); println!("{:?} = {:?}", k, v); if required_vars.contains(&k) || k.to_string_lossy().starts_with("TAURI") { cmd.env(k, v); From fa3d54e89d9e718629d85f762b1b4002e52b2bc6 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Fri, 4 Nov 2022 20:46:41 -0300 Subject: [PATCH 5/6] add change file, revert workflow change --- .changes/fix-wix-dll-load.md | 5 +++++ .github/workflows/artifacts-updater.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/fix-wix-dll-load.md diff --git a/.changes/fix-wix-dll-load.md b/.changes/fix-wix-dll-load.md new file mode 100644 index 00000000000..7d20dcf44ca --- /dev/null +++ b/.changes/fix-wix-dll-load.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": patch +--- + +Fix WiX DLL load on Windows Server. diff --git a/.github/workflows/artifacts-updater.yml b/.github/workflows/artifacts-updater.yml index c594260f2df..0c6d5d5c7fc 100644 --- a/.github/workflows/artifacts-updater.yml +++ b/.github/workflows/artifacts-updater.yml @@ -27,7 +27,7 @@ jobs: strategy: fail-fast: false matrix: - platform: [windows-latest] + platform: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v2 From 49cfcc33a2add8cd84b06a24516f904873ec730c Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Fri, 4 Nov 2022 20:52:37 -0300 Subject: [PATCH 6/6] remove println --- tooling/bundler/src/bundle/windows/msi/wix.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index 23437c9f6cd..3bb2bdab9ab 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -287,7 +287,6 @@ fn clear_env_for_wix(cmd: &mut Command) { vec!["SYSTEMROOT".into(), "TMP".into(), "TEMP".into()]; for (k, v) in std::env::vars_os() { let k = k.to_ascii_uppercase(); - println!("{:?} = {:?}", k, v); if required_vars.contains(&k) || k.to_string_lossy().starts_with("TAURI") { cmd.env(k, v); }