Skip to content

Commit

Permalink
feat(core): set default value for minimum_system_version to 10.13 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Feb 18, 2022
1 parent 4bacea5 commit fce344b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changes/minimum-mac-version.md
@@ -0,0 +1,6 @@
---
"tauri-utils": patch
"tauri": patch
---

Changed the default value for `tauri > bundle > macOS > minimumSystemVersion` to `10.13`.
26 changes: 24 additions & 2 deletions core/tauri-utils/src/config.rs
Expand Up @@ -96,15 +96,18 @@ pub struct DebConfig {

/// Configuration for the macOS bundles.
#[skip_serializing_none]
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct MacConfig {
/// A list of strings indicating any macOS X frameworks that need to be bundled with the application.
///
/// If a name is used, ".framework" must be omitted and it will look for standard install locations. You may also use a path to a specific framework.
pub frameworks: Option<Vec<String>>,
/// A version string indicating the minimum macOS X version that the bundled application supports.
/// A version string indicating the minimum macOS X version that the bundled application supports. Defaults to `10.13`.
/// Setting it to `null` completely removes the `LSMinimumSystemVersion` field on the bundle's `Info.plist`
/// and the `MACOSX_DEPLOYMENT_TARGET` environment variable.
#[serde(default = "minimum_system_version")]
pub minimum_system_version: Option<String>,
/// Allows your application to communicate with the outside world.
/// It should be a lowercase, without port and protocol domain name.
Expand All @@ -122,6 +125,25 @@ pub struct MacConfig {
pub entitlements: Option<String>,
}

impl Default for MacConfig {
fn default() -> Self {
Self {
frameworks: None,
minimum_system_version: minimum_system_version(),
exception_domain: None,
license: None,
use_bootstrapper: false,
signing_identity: None,
provider_short_name: None,
entitlements: None,
}
}
}

fn minimum_system_version() -> Option<String> {
Some("10.13".into())
}

/// Configuration for a target language for the WiX build.
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
Expand Down
6 changes: 5 additions & 1 deletion tooling/cli/schema.json
Expand Up @@ -140,6 +140,7 @@
"icon": [],
"identifier": "",
"macOS": {
"minimumSystemVersion": "10.13",
"useBootstrapper": false
},
"windows": {
Expand Down Expand Up @@ -519,6 +520,7 @@
"macOS": {
"description": "Configuration for the macOS bundles.",
"default": {
"minimumSystemVersion": "10.13",
"useBootstrapper": false
},
"allOf": [
Expand Down Expand Up @@ -1082,7 +1084,8 @@
]
},
"minimumSystemVersion": {
"description": "A version string indicating the minimum macOS X version that the bundled application supports.",
"description": "A version string indicating the minimum macOS X version that the bundled application supports. Defaults to `10.13`. Setting it to `null` completely removes the `LSMinimumSystemVersion` field on the bundle's `Info.plist` and the `MACOSX_DEPLOYMENT_TARGET` environment variable.",
"default": "10.13",
"type": [
"string",
"null"
Expand Down Expand Up @@ -1563,6 +1566,7 @@
"icon": [],
"identifier": "",
"macOS": {
"minimumSystemVersion": "10.13",
"useBootstrapper": false
},
"windows": {
Expand Down

0 comments on commit fce344b

Please sign in to comment.