|
@@ -63,6 +63,30 @@ pub fn bundle_project(settings: Settings) -> crate::Result<Vec<Bundle>> {
|
|
warn!("Cross-platform compilation is experimental and does not support all features. Please use a matching host system for full compatibility.");
|
|
warn!("Cross-platform compilation is experimental and does not support all features. Please use a matching host system for full compatibility.");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ #[cfg(target_os = "windows")]
|
|
|
|
+ {
|
|
|
|
+ // Sign windows binaries before the bundling step in case neither wix and nsis bundles are enabled
|
|
|
|
+ for bin in settings.binaries() {
|
|
|
|
+ let bin_path = settings.binary_path(bin);
|
|
|
|
+ windows::sign::try_sign(&bin_path, &settings)?;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // Sign the sidecar binaries
|
|
|
|
+ for bin in settings.external_binaries() {
|
|
|
|
+ let path = bin?;
|
|
|
|
+ let skip = std::env::var("TAURI_SKIP_SIDECAR_SIGNATURE_CHECK").map_or(false, |v| v == "true");
|
|
|
|
+
|
|
|
|
+ if !skip && windows::sign::verify(&path)? {
|
|
|
|
+ info!(
|
|
|
|
+ "sidecar at \"{}\" already signed. Skipping...",
|
|
|
|
+ path.display()
|
|
|
|
+ )
|
|
|
|
+ } else {
|
|
|
|
+ windows::sign::try_sign(&path, &settings)?;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
for package_type in &package_types {
|
|
for package_type in &package_types {
|
|
// bundle was already built! e.g. DMG already built .app
|
|
// bundle was already built! e.g. DMG already built .app
|
|
if bundles.iter().any(|b| b.package_type == *package_type) {
|
|
if bundles.iter().any(|b| b.package_type == *package_type) {
|