mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-17 23:51:43 +03:00
fix: sign nsis plugin DLLs
This commit is contained in:
parent
ff39ad93b7
commit
9e3ac6e311
5
.changes/nsis-sign-plugins.md
Normal file
5
.changes/nsis-sign-plugins.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri-bundler': 'patch:enhance'
|
||||
---
|
||||
|
||||
Sign nsis plugin files when bundling
|
@ -51,6 +51,13 @@ const NSIS_REQUIRED_FILES: &[&str] = &[
|
||||
"Include/nsDialogs.nsh",
|
||||
"Include/WinMessages.nsh",
|
||||
];
|
||||
const NSIS_PLUGIN_FILES: &[&str] = &[
|
||||
"NSISdl.dll",
|
||||
"StartMenu.dll",
|
||||
"System.dll",
|
||||
"nsDialogs.dll",
|
||||
"nsis_tauri_utils.dll",
|
||||
];
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
const NSIS_REQUIRED_FILES: &[&str] = &["Plugins/x86-unicode/nsis_tauri_utils.dll"];
|
||||
|
||||
@ -517,6 +524,14 @@ fn build_nsis_app_installer(
|
||||
));
|
||||
fs::create_dir_all(nsis_installer_path.parent().unwrap())?;
|
||||
|
||||
if settings.can_sign() {
|
||||
log::info!("Signing NSIS plugins");
|
||||
for dll in NSIS_PLUGIN_FILES {
|
||||
let path = _nsis_toolset_path.join("Plugins/x86-unicode").join(dll);
|
||||
try_sign(&path, settings)?;
|
||||
}
|
||||
}
|
||||
|
||||
log::info!(action = "Running"; "makensis.exe to produce {}", display_path(&nsis_installer_path));
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
|
Loading…
Reference in New Issue
Block a user