Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge app installer bundles for 10.13-10.15 #145

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Mist/Helpers/InstallerCreator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ enum InstallerCreator {
["installer", "-pkg", packageURL.path, "-target", mountPoint.path]
]

// workaround for macOS High Sierra
if installer.version.range(of: "^10\\.13\\.", options: .regularExpression) != nil {
// workaround for macOS High Sierra 10.13, macOS Mojave 10.14 and macOS Catalina 10.15
if installer.highSierraOrNewer, !installer.bigSurOrNewer {
argumentsArrays += [
["ditto", "/Applications/Install \(installer.name).app", "\(mountPoint.path)/Applications/Install \(installer.name).app"],
["rm", "-r", "/Applications/Install \(installer.name).app"]
]
}

// workaround for macOS Catalina 10.15 and newer
if installer.catalinaOrNewer {
argumentsArrays += [
["ditto", "\(mountPoint.path)Applications", "\(mountPoint.path)/Applications"],
Expand Down
4 changes: 4 additions & 0 deletions Mist/Model/Installer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,10 @@ struct Installer: Decodable, Hashable, Identifiable {
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 {
bigSurOrNewer || version.range(of: "^10\\.15\\.", options: .regularExpression) != nil
}
Expand Down