From d806999f4c87cdeb8f7c4f441867417004edffe8 Mon Sep 17 00:00:00 2001 From: Trey Smith Date: Thu, 7 Sep 2023 10:45:13 -0400 Subject: [PATCH 1/7] sign frameworks and sidecar --- tooling/bundler/src/bundle/macos/sign.rs | 72 ++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 5 deletions(-) diff --git a/tooling/bundler/src/bundle/macos/sign.rs b/tooling/bundler/src/bundle/macos/sign.rs index 7b9e8ce5bfd6..465f48096ccb 100644 --- a/tooling/bundler/src/bundle/macos/sign.rs +++ b/tooling/bundler/src/bundle/macos/sign.rs @@ -14,7 +14,7 @@ use std::{ use crate::{bundle::common::CommandExt, Settings}; use anyhow::Context; -use log::info; +use log::{error, info}; use serde::Deserialize; const KEYCHAIN_ID: &str = "tauri-build.keychain"; @@ -152,6 +152,10 @@ pub fn sign( ) -> crate::Result<()> { info!(action = "Signing"; "{} with identity \"{}\"", path_to_sign.display(), identity); + // Remove extra attributes, which could cause codesign to fail + // https://developer.apple.com/library/archive/qa/qa1940/_index.html + remove_extra_attr(&path_to_sign)?; + let setup_keychain = if let (Some(certificate_encoded), Some(certificate_password)) = ( var_os("APPLE_CERTIFICATE"), var_os("APPLE_CERTIFICATE_PASSWORD"), @@ -164,6 +168,59 @@ pub fn sign( false }; + // Sign frameworks and sidecar binaries first, per apple, signing must be done inside out + // https://developer.apple.com/forums/thread/701514 + if is_an_executable { + // Sign any sidecar binaries + for src in settings.external_binaries() { + let src = src?; + let binary_path = path_to_sign.join( + src + .file_name() + .expect("failed to extract external binary filename") + .to_string_lossy() + .replace(&format!("-{}", settings.target()), ""), + ); + try_sign( + binary_path, + identity, + settings, + is_an_executable, + setup_keychain, + )?; + } + + if let Some(frameworks) = settings.macos().frameworks.as_ref() { + for framework in frameworks.iter() { + // If the framework ends with .framework, then its not a system framework. We don't want to sign system frameworks! + if framework.ends_with(".framework") { + let path = PathBuf::from(framework); + match path.file_name() { + Some(name) => { + let framework_path = path_to_sign.join("Contents/Frameworks").join(name); + info!("Signing framework: {:?}", framework_path); + try_sign( + framework_path, + identity, + settings, + is_an_executable, + setup_keychain, + )?; + } + None => { + error!( + "Failed to sign framework: {} because it has no filename", + framework + ); + } + } + } + } + } + } + + info!("Signing app bundle..."); + // Sign the app bundle let res = try_sign( path_to_sign, identity, @@ -205,10 +262,6 @@ fn try_sign( args.push("runtime"); } - if path_to_sign.is_dir() { - args.push("--deep"); - } - Command::new("codesign") .args(args) .arg(path_to_sign.to_string_lossy().to_string()) @@ -218,6 +271,15 @@ fn try_sign( Ok(()) } +fn remove_extra_attr(app_bundle_path: &PathBuf) -> crate::Result<()> { + Command::new("xattr") + .arg("-cr") + .arg(app_bundle_path) + .output_ok() + .context("failed to remove extra attributes from app bundle")?; + Ok(()) +} + #[derive(Deserialize)] struct NotarytoolSubmitOutput { id: String, From ac5ac0507ecf6ee4244c1bda63a5f537013eb314 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Fri, 15 Sep 2023 09:15:25 -0300 Subject: [PATCH 2/7] cleanup code, fix bin paths --- tooling/bundler/src/bundle/macos/app.rs | 87 +++++++++++++++--- tooling/bundler/src/bundle/macos/dmg.rs | 9 +- tooling/bundler/src/bundle/macos/sign.rs | 107 ++++++----------------- tooling/bundler/src/bundle/settings.rs | 11 ++- 4 files changed, 116 insertions(+), 98 deletions(-) diff --git a/tooling/bundler/src/bundle/macos/app.rs b/tooling/bundler/src/bundle/macos/app.rs index 809825e54f7d..48b88c8a51de 100644 --- a/tooling/bundler/src/bundle/macos/app.rs +++ b/tooling/bundler/src/bundle/macos/app.rs @@ -23,9 +23,9 @@ // files into the `Contents` directory of the bundle. use super::{ - super::common, + super::common::{self, CommandExt}, icon::create_icns_file, - sign::{notarize, notarize_auth, sign}, + sign::{notarize, notarize_auth, sign, SignTarget}, }; use crate::Settings; @@ -33,8 +33,10 @@ use anyhow::Context; use log::{info, warn}; use std::{ + ffi::OsStr, fs, path::{Path, PathBuf}, + process::Command, }; /// Bundles the project. @@ -65,6 +67,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { let resources_dir = bundle_directory.join("Resources"); let bin_dir = bundle_directory.join("MacOS"); + let mut sign_paths = Vec::new(); let bundle_icon_file: Option = { create_icns_file(&resources_dir, settings).with_context(|| "Failed to create app icon")? }; @@ -72,20 +75,52 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { create_info_plist(&bundle_directory, bundle_icon_file, settings) .with_context(|| "Failed to create Info.plist")?; - copy_frameworks_to_bundle(&bundle_directory, settings) + let framework_paths = copy_frameworks_to_bundle(&bundle_directory, settings) .with_context(|| "Failed to bundle frameworks")?; + sign_paths.extend( + framework_paths + .into_iter() + .filter(|p| { + let ext = p.extension(); + ext == Some(OsStr::new(".framework")) || ext == Some(OsStr::new(".dylib")) + }) + .map(|path| SignTarget { + path, + is_an_executable: false, + }), + ); settings.copy_resources(&resources_dir)?; - settings + let bin_paths = settings .copy_binaries(&bin_dir) .with_context(|| "Failed to copy external binaries")?; + sign_paths.extend(bin_paths.into_iter().map(|path| SignTarget { + path, + is_an_executable: true, + })); - copy_binaries_to_bundle(&bundle_directory, settings)?; + let bin_paths = copy_binaries_to_bundle(&bundle_directory, settings)?; + sign_paths.extend(bin_paths.into_iter().map(|path| SignTarget { + path, + is_an_executable: true, + })); if let Some(identity) = &settings.macos().signing_identity { + // Sign frameworks and sidecar binaries first, per apple, signing must be done inside out + // https://developer.apple.com/forums/thread/701514 + sign_paths.push(SignTarget { + path: app_bundle_path.clone(), + is_an_executable: true, + }); + + // Remove extra attributes, which could cause codesign to fail + // https://developer.apple.com/library/archive/qa/qa1940/_index.html + remove_extra_attr(&app_bundle_path)?; + // sign application - sign(app_bundle_path.clone(), identity, settings, true)?; + sign(sign_paths, identity, settings)?; + // notarization is required for distribution match notarize_auth() { Ok(auth) => { @@ -100,15 +135,30 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { Ok(vec![app_bundle_path]) } +fn remove_extra_attr(app_bundle_path: &Path) -> crate::Result<()> { + Command::new("xattr") + .arg("-cr") + .arg(app_bundle_path) + .output_ok() + .context("failed to remove extra attributes from app bundle")?; + Ok(()) +} + // Copies the app's binaries to the bundle. -fn copy_binaries_to_bundle(bundle_directory: &Path, settings: &Settings) -> crate::Result<()> { +fn copy_binaries_to_bundle( + bundle_directory: &Path, + settings: &Settings, +) -> crate::Result> { + let mut paths = Vec::new(); let dest_dir = bundle_directory.join("MacOS"); for bin in settings.binaries() { let bin_path = settings.binary_path(bin); - common::copy_file(&bin_path, &dest_dir.join(bin.name())) + let dest_path = dest_dir.join(bin.name()); + common::copy_file(&bin_path, &dest_path) .with_context(|| format!("Failed to copy binary from {:?}", bin_path))?; + paths.push(dest_path); } - Ok(()) + Ok(paths) } // Creates the Info.plist file. @@ -208,7 +258,12 @@ fn copy_framework_from(dest_dir: &Path, framework: &str, src_dir: &Path) -> crat } // Copies the macOS application bundle frameworks to the .app -fn copy_frameworks_to_bundle(bundle_directory: &Path, settings: &Settings) -> crate::Result<()> { +fn copy_frameworks_to_bundle( + bundle_directory: &Path, + settings: &Settings, +) -> crate::Result> { + let mut paths = Vec::new(); + let frameworks = settings .macos() .frameworks @@ -216,7 +271,7 @@ fn copy_frameworks_to_bundle(bundle_directory: &Path, settings: &Settings) -> cr .cloned() .unwrap_or_default(); if frameworks.is_empty() { - return Ok(()); + return Ok(paths); } let dest_dir = bundle_directory.join("Frameworks"); fs::create_dir_all(bundle_directory) @@ -227,7 +282,9 @@ fn copy_frameworks_to_bundle(bundle_directory: &Path, settings: &Settings) -> cr let src_name = src_path .file_name() .expect("Couldn't get framework filename"); - common::copy_dir(&src_path, &dest_dir.join(src_name))?; + let dest_path = dest_dir.join(src_name); + common::copy_dir(&src_path, &dest_path)?; + paths.push(dest_path); continue; } else if framework.ends_with(".dylib") { let src_path = PathBuf::from(framework); @@ -238,7 +295,9 @@ fn copy_frameworks_to_bundle(bundle_directory: &Path, settings: &Settings) -> cr ))); } let src_name = src_path.file_name().expect("Couldn't get library filename"); - common::copy_file(&src_path, &dest_dir.join(src_name))?; + let dest_path = dest_dir.join(src_name); + common::copy_file(&src_path, &dest_path)?; + paths.push(dest_path); continue; } else if framework.contains('/') { return Err(crate::Error::GenericError(format!( @@ -265,5 +324,5 @@ fn copy_frameworks_to_bundle(bundle_directory: &Path, settings: &Settings) -> cr framework ))); } - Ok(()) + Ok(paths) } diff --git a/tooling/bundler/src/bundle/macos/dmg.rs b/tooling/bundler/src/bundle/macos/dmg.rs index ba98c4e6555c..3748a5cfe6de 100644 --- a/tooling/bundler/src/bundle/macos/dmg.rs +++ b/tooling/bundler/src/bundle/macos/dmg.rs @@ -153,7 +153,14 @@ pub fn bundle_project(settings: &Settings, bundles: &[Bundle]) -> crate::Result< // Sign DMG if needed if let Some(identity) = &settings.macos().signing_identity { - super::sign::sign(dmg_path.clone(), identity, settings, false)?; + super::sign::sign( + vec![super::sign::SignTarget { + path: dmg_path.clone(), + is_an_executable: false, + }], + identity, + settings, + )?; } Ok(Bundled { diff --git a/tooling/bundler/src/bundle/macos/sign.rs b/tooling/bundler/src/bundle/macos/sign.rs index 465f48096ccb..d8fcdcf25ae8 100644 --- a/tooling/bundler/src/bundle/macos/sign.rs +++ b/tooling/bundler/src/bundle/macos/sign.rs @@ -14,7 +14,7 @@ use std::{ use crate::{bundle::common::CommandExt, Settings}; use anyhow::Context; -use log::{error, info}; +use log::info; use serde::Deserialize; const KEYCHAIN_ID: &str = "tauri-build.keychain"; @@ -144,17 +144,13 @@ pub fn delete_keychain() { .output_ok(); } -pub fn sign( - path_to_sign: PathBuf, - identity: &str, - settings: &Settings, - is_an_executable: bool, -) -> crate::Result<()> { - info!(action = "Signing"; "{} with identity \"{}\"", path_to_sign.display(), identity); +pub struct SignTarget { + pub path: PathBuf, + pub is_an_executable: bool, +} - // Remove extra attributes, which could cause codesign to fail - // https://developer.apple.com/library/archive/qa/qa1940/_index.html - remove_extra_attr(&path_to_sign)?; +pub fn sign(targets: Vec, identity: &str, settings: &Settings) -> crate::Result<()> { + info!(action = "Signing"; "with identity \"{}\"", identity); let setup_keychain = if let (Some(certificate_encoded), Some(certificate_password)) = ( var_os("APPLE_CERTIFICATE"), @@ -168,73 +164,24 @@ pub fn sign( false }; - // Sign frameworks and sidecar binaries first, per apple, signing must be done inside out - // https://developer.apple.com/forums/thread/701514 - if is_an_executable { - // Sign any sidecar binaries - for src in settings.external_binaries() { - let src = src?; - let binary_path = path_to_sign.join( - src - .file_name() - .expect("failed to extract external binary filename") - .to_string_lossy() - .replace(&format!("-{}", settings.target()), ""), - ); - try_sign( - binary_path, - identity, - settings, - is_an_executable, - setup_keychain, - )?; - } + info!("Signing app bundle..."); - if let Some(frameworks) = settings.macos().frameworks.as_ref() { - for framework in frameworks.iter() { - // If the framework ends with .framework, then its not a system framework. We don't want to sign system frameworks! - if framework.ends_with(".framework") { - let path = PathBuf::from(framework); - match path.file_name() { - Some(name) => { - let framework_path = path_to_sign.join("Contents/Frameworks").join(name); - info!("Signing framework: {:?}", framework_path); - try_sign( - framework_path, - identity, - settings, - is_an_executable, - setup_keychain, - )?; - } - None => { - error!( - "Failed to sign framework: {} because it has no filename", - framework - ); - } - } - } - } - } + for target in targets { + try_sign( + target.path, + identity, + settings, + target.is_an_executable, + setup_keychain, + )?; } - info!("Signing app bundle..."); - // Sign the app bundle - let res = try_sign( - path_to_sign, - identity, - settings, - is_an_executable, - setup_keychain, - ); - if setup_keychain { // delete the keychain again after signing delete_keychain(); } - res + Ok(()) } fn try_sign( @@ -244,6 +191,8 @@ fn try_sign( is_an_executable: bool, tauri_keychain: bool, ) -> crate::Result<()> { + info!(action = "Signing"; "{}", path_to_sign.display()); + let mut args = vec!["--force", "-s", identity]; if tauri_keychain { @@ -271,15 +220,6 @@ fn try_sign( Ok(()) } -fn remove_extra_attr(app_bundle_path: &PathBuf) -> crate::Result<()> { - Command::new("xattr") - .arg("-cr") - .arg(app_bundle_path) - .output_ok() - .context("failed to remove extra attributes from app bundle")?; - Ok(()) -} - #[derive(Deserialize)] struct NotarytoolSubmitOutput { id: String, @@ -322,7 +262,14 @@ pub fn notarize( // sign the zip file if let Some(identity) = &settings.macos().signing_identity { - sign(zip_path.clone(), identity, settings, false)?; + sign( + vec![SignTarget { + path: zip_path.clone(), + is_an_executable: false, + }], + identity, + settings, + )?; }; let notarize_args = vec![ diff --git a/tooling/bundler/src/bundle/settings.rs b/tooling/bundler/src/bundle/settings.rs index 46d67d8beeac..09936a74fb03 100644 --- a/tooling/bundler/src/bundle/settings.rs +++ b/tooling/bundler/src/bundle/settings.rs @@ -761,7 +761,11 @@ impl Settings { } /// Copies external binaries to a path. - pub fn copy_binaries(&self, path: &Path) -> crate::Result<()> { + /// + /// Returns the list of destination paths. + pub fn copy_binaries(&self, path: &Path) -> crate::Result> { + let mut paths = Vec::new(); + for src in self.external_binaries() { let src = src?; let dest = path.join( @@ -771,9 +775,10 @@ impl Settings { .to_string_lossy() .replace(&format!("-{}", self.target), ""), ); - common::copy_file(&src, dest)?; + common::copy_file(&src, &dest)?; + paths.push(dest); } - Ok(()) + Ok(paths) } /// Copies resources to a path. From 3f49a7ebbc12fe1029e60cf23ee6f879297bd58f Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Fri, 15 Sep 2023 09:17:55 -0300 Subject: [PATCH 3/7] change file --- .changes/bundler-xattr.md | 5 +++++ .changes/codesign-additional-files.md | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changes/bundler-xattr.md create mode 100644 .changes/codesign-additional-files.md diff --git a/.changes/bundler-xattr.md b/.changes/bundler-xattr.md new file mode 100644 index 000000000000..561bb20e7f71 --- /dev/null +++ b/.changes/bundler-xattr.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": patch:bug +--- + +Remove extended attributes on the macOS app bundle using `xattr -cr $PATH`. diff --git a/.changes/codesign-additional-files.md b/.changes/codesign-additional-files.md new file mode 100644 index 000000000000..17a972c802a8 --- /dev/null +++ b/.changes/codesign-additional-files.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": patch:bug +--- + +Code sign sidecars and frameworks on macOS. From 8e73f162dcff5eeca3b186b0f6879d41e8755c52 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Fri, 15 Sep 2023 09:23:36 -0300 Subject: [PATCH 4/7] fix extension check --- tooling/bundler/src/bundle/macos/app.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/bundler/src/bundle/macos/app.rs b/tooling/bundler/src/bundle/macos/app.rs index 48b88c8a51de..cae46785d6be 100644 --- a/tooling/bundler/src/bundle/macos/app.rs +++ b/tooling/bundler/src/bundle/macos/app.rs @@ -82,7 +82,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { .into_iter() .filter(|p| { let ext = p.extension(); - ext == Some(OsStr::new(".framework")) || ext == Some(OsStr::new(".dylib")) + ext == Some(OsStr::new("framework")) || ext == Some(OsStr::new("dylib")) }) .map(|path| SignTarget { path, From e5ad80d8d18cf0fc7a897b1a6406f9c3dc38b762 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Fri, 15 Sep 2023 09:57:54 -0300 Subject: [PATCH 5/7] remove to_string call --- tooling/bundler/src/bundle/macos/sign.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/bundler/src/bundle/macos/sign.rs b/tooling/bundler/src/bundle/macos/sign.rs index d8fcdcf25ae8..b16bb1d70137 100644 --- a/tooling/bundler/src/bundle/macos/sign.rs +++ b/tooling/bundler/src/bundle/macos/sign.rs @@ -213,7 +213,7 @@ fn try_sign( Command::new("codesign") .args(args) - .arg(path_to_sign.to_string_lossy().to_string()) + .arg(path_to_sign) .output_ok() .context("failed to sign app")?; From 1ddf2f506c9b63b9a45b1f2fa157d851c5c707dd Mon Sep 17 00:00:00 2001 From: Trey Smith Date: Fri, 15 Sep 2023 09:51:44 -0400 Subject: [PATCH 6/7] new framework --- .../frameworks/test.framework/Headers | 0 .../frameworks/test.framework/Modules | 1 + .../frameworks/test.framework/Resources | 0 .../test.framework/Versions/A/Headers/test.h | 19 ++- .../Versions/A/Modules/module.modulemap | 6 + .../Versions/A/Resources/Info.plist | 32 ++-- .../Versions/A/Resources/LICENSE | 1 - .../Versions/A/_CodeSignature/CodeResources | 142 ++++++++++++++++++ .../frameworks/test.framework/Versions/A/test | Bin 32 -> 35664 bytes .../test.framework/Versions/Current | 0 .../frameworks/test.framework/test | 0 11 files changed, 190 insertions(+), 11 deletions(-) mode change 100644 => 120000 core/tests/app-updater/frameworks/test.framework/Headers create mode 120000 core/tests/app-updater/frameworks/test.framework/Modules mode change 100644 => 120000 core/tests/app-updater/frameworks/test.framework/Resources create mode 100644 core/tests/app-updater/frameworks/test.framework/Versions/A/Modules/module.modulemap delete mode 100644 core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/LICENSE create mode 100644 core/tests/app-updater/frameworks/test.framework/Versions/A/_CodeSignature/CodeResources mode change 100644 => 100755 core/tests/app-updater/frameworks/test.framework/Versions/A/test mode change 100644 => 120000 core/tests/app-updater/frameworks/test.framework/Versions/Current mode change 100644 => 120000 core/tests/app-updater/frameworks/test.framework/test diff --git a/core/tests/app-updater/frameworks/test.framework/Headers b/core/tests/app-updater/frameworks/test.framework/Headers deleted file mode 100644 index a177d2a6b926..000000000000 --- a/core/tests/app-updater/frameworks/test.framework/Headers +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Headers \ No newline at end of file diff --git a/core/tests/app-updater/frameworks/test.framework/Headers b/core/tests/app-updater/frameworks/test.framework/Headers new file mode 120000 index 000000000000..a177d2a6b926 --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/core/tests/app-updater/frameworks/test.framework/Modules b/core/tests/app-updater/frameworks/test.framework/Modules new file mode 120000 index 000000000000..5736f3186e79 --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/core/tests/app-updater/frameworks/test.framework/Resources b/core/tests/app-updater/frameworks/test.framework/Resources deleted file mode 100644 index 953ee36f3bb7..000000000000 --- a/core/tests/app-updater/frameworks/test.framework/Resources +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Resources \ No newline at end of file diff --git a/core/tests/app-updater/frameworks/test.framework/Resources b/core/tests/app-updater/frameworks/test.framework/Resources new file mode 120000 index 000000000000..953ee36f3bb7 --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/Headers/test.h b/core/tests/app-updater/frameworks/test.framework/Versions/A/Headers/test.h index fed3381b210e..3539143d0dd8 100644 --- a/core/tests/app-updater/frameworks/test.framework/Versions/A/Headers/test.h +++ b/core/tests/app-updater/frameworks/test.framework/Versions/A/Headers/test.h @@ -1 +1,18 @@ -// Testing that a header can be included +// +// test.h +// test +// +// Created by Trey Smith on 9/15/23. +// + +#import + +//! Project version number for test. +FOUNDATION_EXPORT double testVersionNumber; + +//! Project version string for test. +FOUNDATION_EXPORT const unsigned char testVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/Modules/module.modulemap b/core/tests/app-updater/frameworks/test.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 000000000000..f1545257a73d --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module test { + umbrella header "test.h" + + export * + module * { export * } +} diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/Info.plist b/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/Info.plist index 593ddefdbab6..6f736f0a2b46 100644 --- a/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/Info.plist +++ b/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/Info.plist @@ -2,12 +2,14 @@ + BuildMachineOSBuild + 22D68 CFBundleDevelopmentRegion en CFBundleExecutable test CFBundleIdentifier - com.tauri.test.framework + com.tauri.test CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -15,18 +17,30 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.0 - CFBundleVersion - 1.0.0 - CFBundleSignature - ???? - LSMinimumSystemVersion - 10.15 + 1.0 CFBundleSupportedPlatforms MacOSX - NSPrincipalClass + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + DTPlatformName + macosx + DTPlatformVersion + 13.3 + DTSDKBuild + 22E245 + DTSDKName + macosx13.3 + DTXcode + 1431 + DTXcodeBuild + 14E300c + LSMinimumSystemVersion + 13.2 diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/LICENSE b/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/LICENSE deleted file mode 100644 index eb609b5b82ec..000000000000 --- a/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/LICENSE +++ /dev/null @@ -1 +0,0 @@ -Test that a LICENSE file can be included diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/_CodeSignature/CodeResources b/core/tests/app-updater/frameworks/test.framework/Versions/A/_CodeSignature/CodeResources new file mode 100644 index 000000000000..82d2063275e6 --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Versions/A/_CodeSignature/CodeResources @@ -0,0 +1,142 @@ + + + + + files + + Resources/Info.plist + + /aPV7Q20g0elr7OiZJoUNggTOcg= + + + files2 + + Headers/test.h + + hash2 + + 5RA6Mnq5sNoaC4wKcFe6zymVmEL5Vb44G4BGqFjgZMM= + + + Modules/module.modulemap + + hash2 + + C6uLLSnQu9M2qLElVCkeo2JpnvWMxtArinQzmlh3v2A= + + + Resources/Info.plist + + hash2 + + nPMotNIMgvMfHtkRdpeehzfBiCZLnksfiD3nldUPzTE= + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/test b/core/tests/app-updater/frameworks/test.framework/Versions/A/test old mode 100644 new mode 100755 index 5b0be073cc733e2548a8ad6af5f5d60cceadbdd2..687eb01d82bd2fcc1a41f20ed97a7a791ed1e9b9 GIT binary patch literal 35664 zcmeHQ2UJtb)=om`T@g@P07aCNlY}BjFDg<*0YyY0BnJp3fh05qg`ikKx%L7gMFg>4 z8;V^~K~zwR1w|21Kt%+lC>Q=Y0W^5M&;NhxfA_t&)|s`2nLV?oeP?FRo_%tLsxR+{ zq%asP1~?Jm<&cOF2D5e~hM5e=HsJmJJsrJ0k<1^Q&Ch9Jkc@cTXtuvU7mnk8=l!w1 zYU}TLNbE-%gU2KZa`^kxSWM3M3jeA;XtWSg9~jnOI%J&lfcN)zadLBZbZ{CQtIcSU zq|tDcc6T135#adXjb=-O&<1#A;78I&IBeLFRBi~73v;-JL2POS9Lr*d5f{U34g-vX zXv@z5WsESGB>po1l^}hmjMC63jo^vY9Rg@^5cY%c1ZYAM#NB~Moam@WcoCj|#;Jfp zNIUv=&KB-wq@e6#%0N+pmjW525rF594F^UmB+ZZWvBfSGnhEmw{Rbi9z}&*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v)`SZ_*_sJcVvo&SaTL3R8S>a{_T$#=LwSu`de_Z3 zVsWK+>gDgFzh6qE6CJYq*(G?wu@QqI6DT9AF_YA zS8<6C)3-`G{*2FFSVMDoyNh-p-Q>45`2q93L}T})2XE(G5ZlVTbv|=L+D^UcEQx`} zQeAHaQO$_t`C+j`*Jf|1P}1^MT2@%^qaP5-nAc&f-P-c7M{4PwE%}T0k!@|$QUZ%# zoeL4|Q`CU6L_$i!&ewU`{ImarhX11-^bd*viU5iLiU5iLiU5iLiU5iLiU5iLiU5iL wiU5iLiU5iLiU5iLiU5iLiU5iLiU5iLiU5iLiU5iLiU5iLiU5kh--p2e04Qyu?f?J) literal 32 ncmY#Z)GsYA(of3F(@)JSQz*{h;z~`<$X8IxNX^N~SK Date: Fri, 15 Sep 2023 11:58:58 -0300 Subject: [PATCH 7/7] remove test symlink --- core/tests/app-updater/frameworks/test.framework/test | 1 - core/tests/app-updater/tests/update.rs | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) delete mode 120000 core/tests/app-updater/frameworks/test.framework/test diff --git a/core/tests/app-updater/frameworks/test.framework/test b/core/tests/app-updater/frameworks/test.framework/test deleted file mode 120000 index 0ffb41cb962c..000000000000 --- a/core/tests/app-updater/frameworks/test.framework/test +++ /dev/null @@ -1 +0,0 @@ -Versions/Current \ No newline at end of file diff --git a/core/tests/app-updater/tests/update.rs b/core/tests/app-updater/tests/update.rs index aab49913671e..dd30243677ca 100644 --- a/core/tests/app-updater/tests/update.rs +++ b/core/tests/app-updater/tests/update.rs @@ -318,12 +318,12 @@ fn update_app() { .first() .unwrap() .1 - .join("Contents/Frameworks/test.framework/test"), + .join("Contents/Frameworks/test.framework/Modules"), ) - .expect("test.framework/test metadata"); + .expect("test.framework/Modules metadata"); assert!( meta.file_type().is_symlink(), - "test.framework/test should be a symlink" + "test.framework/Modules should be a symlink" ); }