mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-29 06:25:32 -04:00
Merge app installer bundles for 10.13-10.15 (#145)
This commit is contained in:
parent
356cbe6312
commit
6358047ee9
2 changed files with 7 additions and 2 deletions
|
@ -41,14 +41,15 @@ enum InstallerCreator {
|
||||||
["installer", "-pkg", packageURL.path, "-target", mountPoint.path]
|
["installer", "-pkg", packageURL.path, "-target", mountPoint.path]
|
||||||
]
|
]
|
||||||
|
|
||||||
// workaround for macOS High Sierra
|
// workaround for macOS High Sierra 10.13, macOS Mojave 10.14 and macOS Catalina 10.15
|
||||||
if installer.version.range(of: "^10\\.13\\.", options: .regularExpression) != nil {
|
if installer.highSierraOrNewer, !installer.bigSurOrNewer {
|
||||||
argumentsArrays += [
|
argumentsArrays += [
|
||||||
["ditto", "/Applications/Install \(installer.name).app", "\(mountPoint.path)/Applications/Install \(installer.name).app"],
|
["ditto", "/Applications/Install \(installer.name).app", "\(mountPoint.path)/Applications/Install \(installer.name).app"],
|
||||||
["rm", "-r", "/Applications/Install \(installer.name).app"]
|
["rm", "-r", "/Applications/Install \(installer.name).app"]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// workaround for macOS Catalina 10.15 and newer
|
||||||
if installer.catalinaOrNewer {
|
if installer.catalinaOrNewer {
|
||||||
argumentsArrays += [
|
argumentsArrays += [
|
||||||
["ditto", "\(mountPoint.path)Applications", "\(mountPoint.path)/Applications"],
|
["ditto", "\(mountPoint.path)Applications", "\(mountPoint.path)/Applications"],
|
||||||
|
|
|
@ -769,6 +769,10 @@ struct Installer: Decodable, Hashable, Identifiable {
|
||||||
version.range(of: "^10\\.([7-9]|1[0-2])\\.", options: .regularExpression) != nil
|
version.range(of: "^10\\.([7-9]|1[0-2])\\.", options: .regularExpression) != nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var highSierraOrNewer: Bool {
|
||||||
|
bigSurOrNewer || version.range(of: "^10\\.1[3-5]\\.", options: .regularExpression) != nil
|
||||||
|
}
|
||||||
|
|
||||||
var catalinaOrNewer: Bool {
|
var catalinaOrNewer: Bool {
|
||||||
bigSurOrNewer || version.range(of: "^10\\.15\\.", options: .regularExpression) != nil
|
bigSurOrNewer || version.range(of: "^10\\.15\\.", options: .regularExpression) != nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue