#[non_exhaustive]pub struct MacOsConfig {Show 13 fields
pub frameworks: Option<Vec<String>>,
pub minimum_system_version: Option<String>,
pub exception_domain: Option<String>,
pub signing_identity: Option<String>,
pub signing_certificate: Option<OsString>,
pub signing_certificate_password: Option<OsString>,
pub notarization_credentials: Option<MacOsNotarizationCredentials>,
pub provider_short_name: Option<String>,
pub entitlements: Option<String>,
pub info_plist_path: Option<PathBuf>,
pub embedded_provisionprofile_path: Option<PathBuf>,
pub embedded_apps: Option<Vec<String>>,
pub background_app: bool,
}Expand description
The macOS configuration.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.frameworks: Option<Vec<String>>MacOS frameworks that need to be packaged with the app.
Each string can either be the name of a framework (without the .framework extension, e.g. "SDL2"),
in which case we will search for that framework in the standard install locations (~/Library/Frameworks/, /Library/Frameworks/, and /Network/Library/Frameworks/),
or a path to a specific framework bundle (e.g. ./data/frameworks/SDL2.framework). Note that this setting just makes cargo-packager copy the specified frameworks into the OS X app bundle
(under Foobar.app/Contents/Frameworks/); you are still responsible for:
-
arranging for the compiled binary to link against those frameworks (e.g. by emitting lines like
cargo:rustc-link-lib=framework=SDL2from yourbuild.rsscript) -
embedding the correct rpath in your binary (e.g. by running
install_name_tool -add_rpath "@executable_path/../Frameworks" path/to/binaryafter compiling)
minimum_system_version: Option<String>A version string indicating the minimum MacOS version that the packaged app supports (e.g. "10.11").
If you are using this config field, you may also want have your build.rs script emit cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.11.
exception_domain: Option<String>The exception domain to use on the macOS .app package.
This allows communication to the outside world e.g. a web server you’re shipping.
signing_identity: Option<String>Code signing identity.
This is typically of the form: "Developer ID Application: TEAM_NAME (TEAM_ID)".
signing_certificate: Option<OsString>Codesign certificate (base64 encoded of the p12 file).
Note: this field cannot be specified via a config file or Cargo package metadata.
signing_certificate_password: Option<OsString>Password of the codesign certificate.
Note: this field cannot be specified via a config file or Cargo package metadata.
notarization_credentials: Option<MacOsNotarizationCredentials>Notarization authentication credentials.
Note: this field cannot be specified via a config file or Cargo package metadata.
provider_short_name: Option<String>Provider short name for notarization.
entitlements: Option<String>Path to the entitlements.plist file.
info_plist_path: Option<PathBuf>Path to the Info.plist file for the package.
embedded_provisionprofile_path: Option<PathBuf>Path to the embedded.provisionprofile file for the package.
embedded_apps: Option<Vec<String>>Apps that need to be packaged within the app.
background_app: boolWhether this is a background application. If true, the app will not appear in the Dock.
Sets the LSUIElement flag in the macOS plist file.
Implementations§
Source§impl MacOsConfig
impl MacOsConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new MacOsConfig.
Sourcepub fn frameworks<I, S>(self, frameworks: I) -> Self
pub fn frameworks<I, S>(self, frameworks: I) -> Self
MacOS frameworks that need to be packaged with the app.
Each string can either be the name of a framework (without the .framework extension, e.g. "SDL2"),
in which case we will search for that framework in the standard install locations (~/Library/Frameworks/, /Library/Frameworks/, and /Network/Library/Frameworks/),
or a path to a specific framework bundle (e.g. ./data/frameworks/SDL2.framework). Note that this setting just makes cargo-packager copy the specified frameworks into the OS X app bundle
(under Foobar.app/Contents/Frameworks/); you are still responsible for:
-
arranging for the compiled binary to link against those frameworks (e.g. by emitting lines like
cargo:rustc-link-lib=framework=SDL2from yourbuild.rsscript) -
embedding the correct rpath in your binary (e.g. by running
install_name_tool -add_rpath "@executable_path/../Frameworks" path/to/binaryafter compiling)
Sourcepub fn minimum_system_version<S: Into<String>>(
self,
minimum_system_version: S,
) -> Self
pub fn minimum_system_version<S: Into<String>>( self, minimum_system_version: S, ) -> Self
A version string indicating the minimum MacOS version that the packaged app supports (e.g. "10.11").
If you are using this config field, you may also want have your build.rs script emit cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.11.
Sourcepub fn exception_domain<S: Into<String>>(self, exception_domain: S) -> Self
pub fn exception_domain<S: Into<String>>(self, exception_domain: S) -> Self
The exception domain to use on the macOS .app package.
This allows communication to the outside world e.g. a web server you’re shipping.
Sourcepub fn signing_identity<S: Into<String>>(self, signing_identity: S) -> Self
pub fn signing_identity<S: Into<String>>(self, signing_identity: S) -> Self
Code signing identity.
Sourcepub fn provider_short_name<S: Into<String>>(
self,
provider_short_name: S,
) -> Self
pub fn provider_short_name<S: Into<String>>( self, provider_short_name: S, ) -> Self
Provider short name for notarization.
Sourcepub fn entitlements<S: Into<String>>(self, entitlements: S) -> Self
pub fn entitlements<S: Into<String>>(self, entitlements: S) -> Self
Path to the entitlements.plist file.
Sourcepub fn info_plist_path<S: Into<PathBuf>>(self, info_plist_path: S) -> Self
pub fn info_plist_path<S: Into<PathBuf>>(self, info_plist_path: S) -> Self
Path to the Info.plist file for the package.
Sourcepub fn embedded_provisionprofile_path<S: Into<PathBuf>>(
self,
embedded_provisionprofile_path: S,
) -> Self
pub fn embedded_provisionprofile_path<S: Into<PathBuf>>( self, embedded_provisionprofile_path: S, ) -> Self
Path to the embedded.provisionprofile file for the package.
Sourcepub fn embedded_apps<I, S>(self, embedded_apps: I) -> Self
pub fn embedded_apps<I, S>(self, embedded_apps: I) -> Self
Apps that need to be packaged within the app.
Trait Implementations§
Source§impl Clone for MacOsConfig
impl Clone for MacOsConfig
Source§fn clone(&self) -> MacOsConfig
fn clone(&self) -> MacOsConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MacOsConfig
impl Debug for MacOsConfig
Source§impl Default for MacOsConfig
impl Default for MacOsConfig
Source§fn default() -> MacOsConfig
fn default() -> MacOsConfig
Source§impl<'de> Deserialize<'de> for MacOsConfig
impl<'de> Deserialize<'de> for MacOsConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for MacOsConfig
impl RefUnwindSafe for MacOsConfig
impl Send for MacOsConfig
impl Sync for MacOsConfig
impl Unpin for MacOsConfig
impl UnwindSafe for MacOsConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more