Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/nsis-stock-plugins-embed-signed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri-bundler": "patch:bug"
---

Fix NSIS stock plugins (`NSISdl.dll`, `StartMenu.dll`, `System.dll`, `nsDialogs.dll`) being embedded in the final installer as unsigned despite the signing step succeeding. The signed local copies under `<output>/Plugins/x86-unicode/` were not on makensis' plugin search path, so makensis fell back to the unsigned DLLs from the NSIS toolset directory. The fix adds `!addplugindir` for the signed plugin directory before any plugin command is parsed in the script.
3 changes: 3 additions & 0 deletions crates/tauri-bundler/src/bundle/windows/nsis/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ ManifestDPIAwareness PerMonitorV2
!include "Win\COM.nsh"
!include "Win\Propkey.nsh"
!include "StrFunc.nsh"
{{#if signed_plugins_path}}
!addplugindir "{{signed_plugins_path}}"
{{/if}}
Comment thread
Legend-Master marked this conversation as resolved.
Resolved
${StrCase}
${StrLoc}

Expand Down
11 changes: 7 additions & 4 deletions crates/tauri-bundler/src/bundle/windows/nsis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,13 @@ fn build_nsis_app_installer(
to_json(&additional_plugins_path),
);

if let Some(plugin_copy_path) = &maybe_plugin_copy_path {
data.insert(
"signed_plugins_path",
to_json(plugin_copy_path.join("x86-unicode")),
Comment thread
Legend-Master marked this conversation as resolved.
Resolved
);
}

data.insert("arch", to_json(arch));
data.insert("bundle_id", to_json(bundle_id));
data.insert("manufacturer", to_json(manufacturer));
Expand Down Expand Up @@ -683,10 +690,6 @@ fn build_nsis_app_installer(
#[cfg(not(target_os = "windows"))]
let mut nsis_cmd = Command::new("makensis");

if let Some(plugins_path) = &maybe_plugin_copy_path {
nsis_cmd.env("NSISPLUGINS", plugins_path);
}

nsis_cmd
.args(["-INPUTCHARSET", "UTF8", "-OUTPUTCHARSET", "UTF8"])
.arg(match settings.log_level() {
Expand Down
Loading