mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-18 17:25:21 -04:00
Add ISO support for Lion + Mountain Lion (#101)
* Add support for Lion + Mountain Lion ISOs on Intel * Fix typo * Update compatibility logic
This commit is contained in:
parent
f17690b98b
commit
b72c3e29d4
2 changed files with 50 additions and 48 deletions
|
@ -433,6 +433,7 @@ class TaskManager: ObservableObject {
|
|||
let temporaryCDRURL: URL = temporaryDirectoryURL.appendingPathComponent("\(installer.id).cdr")
|
||||
let isoURL: URL = destinationURL.appendingPathComponent(filename.stringWithSubstitutions(name: installer.name, version: installer.version, build: installer.build))
|
||||
|
||||
if installer.mavericksOrNewer {
|
||||
return [
|
||||
MistTask(type: .create, description: "temporary Disk Image") {
|
||||
try await DiskImageCreator.create(temporaryImageURL, size: installer.isoSize)
|
||||
|
@ -472,6 +473,17 @@ class TaskManager: ObservableObject {
|
|||
try await FileMover.move(temporaryCDRURL, to: isoURL)
|
||||
}
|
||||
]
|
||||
} else {
|
||||
let installESDURL: URL = installer.temporaryInstallerURL.appendingPathComponent("/Contents/SharedSupport/InstallESD.dmg")
|
||||
return [
|
||||
MistTask(type: .convert, description: "Installer Disk Image to ISO") {
|
||||
try await ISOConverter.convert(installESDURL, destination: temporaryCDRURL)
|
||||
},
|
||||
MistTask(type: .save, description: "ISO to destination") {
|
||||
try await FileMover.move(temporaryCDRURL, to: isoURL)
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
// swiftlint:disable:next function_parameter_count
|
||||
|
|
|
@ -23,20 +23,10 @@ struct InstallerExportView: View {
|
|||
return false
|
||||
}
|
||||
|
||||
return (architecture == .intel && installer.mavericksOrNewer) || (architecture == .appleSilicon && installer.bigSurOrNewer)
|
||||
return architecture == .intel || (architecture == .appleSilicon && installer.bigSurOrNewer)
|
||||
}
|
||||
private var compatibilityMessage: String {
|
||||
|
||||
guard let architecture: Architecture = Hardware.architecture else {
|
||||
return ""
|
||||
}
|
||||
|
||||
switch architecture {
|
||||
case .appleSilicon:
|
||||
return "**Note:** ISOs are unavailable for building **macOS Catalina 10.15 and older** on [Apple Silicon Macs](https://support.apple.com/en-us/HT211814)."
|
||||
case .intel:
|
||||
return "**Note:** ISOs are unavailable for building **OS X Mountain Lion 10.8 and older** on Intel-based Macs."
|
||||
}
|
||||
"**Note:** ISOs are unavailable for building **macOS Catalina 10.15 and older** on [Apple Silicon Macs](https://support.apple.com/en-us/HT211814)."
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue