File tree 2 files changed +23
-0
lines changed
crates/tauri-bundler/src/bundle/windows/nsis
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' tauri-bundler ' : ' patch:enhance'
3
+ ---
4
+
5
+ Sign nsis plugin files when bundling
Original file line number Diff line number Diff line change @@ -51,6 +51,16 @@ const NSIS_REQUIRED_FILES: &[&str] = &[
51
51
"Include/nsDialogs.nsh" ,
52
52
"Include/WinMessages.nsh" ,
53
53
] ;
54
+ #[ cfg( target_os = "windows" ) ]
55
+ const NSIS_PLUGIN_FILES : & [ & str ] = & [
56
+ "NSISdl.dll" ,
57
+ "StartMenu.dll" ,
58
+ "System.dll" ,
59
+ "nsDialogs.dll" ,
60
+ "nsis_tauri_utils.dll" ,
61
+ ] ;
62
+ #[ cfg( not( target_os = "windows" ) ) ]
63
+ const NSIS_PLUGIN_FILES : & [ & str ] = & [ ] ;
54
64
#[ cfg( not( target_os = "windows" ) ) ]
55
65
const NSIS_REQUIRED_FILES : & [ & str ] = & [ "Plugins/x86-unicode/nsis_tauri_utils.dll" ] ;
56
66
@@ -517,6 +527,14 @@ fn build_nsis_app_installer(
517
527
) ) ;
518
528
fs:: create_dir_all ( nsis_installer_path. parent ( ) . unwrap ( ) ) ?;
519
529
530
+ if settings. can_sign ( ) {
531
+ log:: info!( "Signing NSIS plugins" ) ;
532
+ for dll in NSIS_PLUGIN_FILES {
533
+ let path = _nsis_toolset_path. join ( "Plugins/x86-unicode" ) . join ( dll) ;
534
+ try_sign ( & path, settings) ?;
535
+ }
536
+ }
537
+
520
538
log:: info!( action = "Running" ; "makensis.exe to produce {}" , display_path( & nsis_installer_path) ) ;
521
539
522
540
#[ cfg( target_os = "windows" ) ]
You can’t perform that action at this time.
0 commit comments