mirror of https://github.com/tauri-apps/tauri
feat(cli): use default macOS minimum system version when it is empty (#3658)
This commit is contained in:
parent
9258aed114
commit
c81534ebd8
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
"cli.rs": patch
|
||||||
|
"cli.js": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Remove `minimumSystemVersion: null` from the application template configuration.
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"tauri-utils": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Use the default value for `MacConfig.minimumSystemVersion` if the value is set to an empty string.
|
|
@ -99,6 +99,17 @@ pub struct DebConfig {
|
||||||
pub files: HashMap<PathBuf, PathBuf>,
|
pub files: HashMap<PathBuf, PathBuf>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn de_minimum_system_version<'de, D>(deserializer: D) -> Result<Option<String>, D::Error>
|
||||||
|
where
|
||||||
|
D: Deserializer<'de>,
|
||||||
|
{
|
||||||
|
let version = Option::<String>::deserialize(deserializer)?;
|
||||||
|
match version {
|
||||||
|
Some(v) if v.is_empty() => Ok(minimum_system_version()),
|
||||||
|
e => Ok(e),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Configuration for the macOS bundles.
|
/// Configuration for the macOS bundles.
|
||||||
#[skip_serializing_none]
|
#[skip_serializing_none]
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
|
@ -110,9 +121,15 @@ pub struct MacConfig {
|
||||||
/// 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.
|
/// 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>>,
|
pub frameworks: Option<Vec<String>>,
|
||||||
/// A version string indicating the minimum macOS X version that the bundled application supports. Defaults to `10.13`.
|
/// 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`
|
/// Setting it to `null` completely removes the `LSMinimumSystemVersion` field on the bundle's `Info.plist`
|
||||||
/// and the `MACOSX_DEPLOYMENT_TARGET` environment variable.
|
/// and the `MACOSX_DEPLOYMENT_TARGET` environment variable.
|
||||||
#[serde(default = "minimum_system_version")]
|
///
|
||||||
|
/// An empty string is considered an invalid value so the default value is used.
|
||||||
|
#[serde(
|
||||||
|
deserialize_with = "de_minimum_system_version",
|
||||||
|
default = "minimum_system_version"
|
||||||
|
)]
|
||||||
pub minimum_system_version: Option<String>,
|
pub minimum_system_version: Option<String>,
|
||||||
/// Allows your application to communicate with the outside world.
|
/// Allows your application to communicate with the outside world.
|
||||||
/// It should be a lowercase, without port and protocol domain name.
|
/// It should be a lowercase, without port and protocol domain name.
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": ""
|
"exceptionDomain": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": ""
|
"exceptionDomain": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": "",
|
"exceptionDomain": "",
|
||||||
"signingIdentity": null,
|
"signingIdentity": null,
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": ""
|
"exceptionDomain": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": ""
|
"exceptionDomain": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": ""
|
"exceptionDomain": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": ""
|
"exceptionDomain": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": ""
|
"exceptionDomain": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": ""
|
"exceptionDomain": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
"signingIdentity": null,
|
"signingIdentity": null,
|
||||||
"entitlements": "../entitlements.plist",
|
"entitlements": "../entitlements.plist",
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": ""
|
"exceptionDomain": ""
|
||||||
},
|
},
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": ""
|
"exceptionDomain": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": ""
|
"exceptionDomain": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": ""
|
"exceptionDomain": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -1145,7 +1145,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"minimumSystemVersion": {
|
"minimumSystemVersion": {
|
||||||
"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.",
|
"description": "A version string indicating the minimum macOS X version that the bundled application supports. Defaults to `10.13`.\n\nSetting it to `null` completely removes the `LSMinimumSystemVersion` field on the bundle's `Info.plist` and the `MACOSX_DEPLOYMENT_TARGET` environment variable.\n\nAn empty string is considered an invalid value so the default value is used.",
|
||||||
"default": "10.13",
|
"default": "10.13",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": "",
|
"exceptionDomain": "",
|
||||||
"signingIdentity": null,
|
"signingIdentity": null,
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": "",
|
"exceptionDomain": "",
|
||||||
"signingIdentity": null,
|
"signingIdentity": null,
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
|
||||||
"useBootstrapper": false,
|
"useBootstrapper": false,
|
||||||
"exceptionDomain": ""
|
"exceptionDomain": ""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue