diff --git a/Mist/Views/List/InstallerExportView.swift b/Mist/Views/List/InstallerExportView.swift index cdee1aa..624dde9 100644 --- a/Mist/Views/List/InstallerExportView.swift +++ b/Mist/Views/List/InstallerExportView.swift @@ -16,7 +16,15 @@ struct InstallerExportView: View { private var exportISO: Bool = false @AppStorage("exportPackage") private var exportPackage: Bool = false + var installer: Installer @Binding var exports: [InstallerExportType] + private var isoCompatible: Bool { + guard let architecture: Architecture = Hardware.architecture else { + return false + } + + return architecture == .intel || (architecture == .appleSilicon && installer.bigSurOrNewer) + } var body: some View { VStack { @@ -28,12 +36,18 @@ struct InstallerExportView: View { .disabled(exports.count == 1 && exportApplication) InstallerExportViewItem(exportType: .diskImage, selected: $exportDiskImage) .disabled(exports.count == 1 && exportDiskImage) - InstallerExportViewItem(exportType: .iso, selected: $exportISO) - .disabled(exports.count == 1 && exportISO) + if isoCompatible { + InstallerExportViewItem(exportType: .iso, selected: $exportISO) + .disabled(exports.count == 1 && exportISO) + } InstallerExportViewItem(exportType: .package, selected: $exportPackage) .disabled(exports.count == 1 && exportPackage) Spacer() } + if !isoCompatible { + Text("**Note:** ISOs are unavailable for building **macOS Catalina 10.15 and older** on [Apple Silicon Macs](https://support.apple.com/en-us/HT211814).") + .padding(.top) + } } .padding() .onChange(of: exportApplication) { _ in @@ -79,6 +93,6 @@ struct InstallerExportView: View { struct InstallerExportView_Previews: PreviewProvider { static var previews: some View { - InstallerExportView(exports: .constant(InstallerExportType.allCases)) + InstallerExportView(installer: .example, exports: .constant(InstallerExportType.allCases)) } } diff --git a/Mist/Views/List/InstallerListRow.swift b/Mist/Views/List/InstallerListRow.swift index 3610fb6..1781c18 100644 --- a/Mist/Views/List/InstallerListRow.swift +++ b/Mist/Views/List/InstallerListRow.swift @@ -81,7 +81,7 @@ struct InstallerListRow: View { openPanel.canChooseDirectories = true openPanel.allowsMultipleSelection = false openPanel.prompt = "Save" - openPanel.accessoryView = NSHostingView(rootView: InstallerExportView(exports: $exports)) + openPanel.accessoryView = NSHostingView(rootView: InstallerExportView(installer: installer, exports: $exports)) openPanel.isAccessoryViewDisclosed = true Task { diff --git a/Mist/Views/Settings/SettingsISOsView.swift b/Mist/Views/Settings/SettingsISOsView.swift index 925ca45..b05209a 100644 --- a/Mist/Views/Settings/SettingsISOsView.swift +++ b/Mist/Views/Settings/SettingsISOsView.swift @@ -13,7 +13,7 @@ struct SettingsISOsView: View { private let imageName: String = "ISO" private let title: String = "ISOs" // swiftlint:disable:next line_length - private let description: String = "ISOs are Bootable macOS Installer Disk Images that can be restored on external USB drives, or used with virtualization software (ie. [Parallels Desktop](https://www.parallels.com/au/products/desktop/), [UTM](https://mac.getutm.app), [VMware Fusion](https://www.vmware.com/au/products/fusion.html), [VirtualBox](https://www.virtualbox.org)).\n\n**Note:** ISOs will fail to build when targeting **macOS Catalina 10.15 and older** on [Apple Silicon Macs](https://support.apple.com/en-us/HT211814)." + private let description: String = "ISOs are Bootable macOS Installer Disk Images that can be restored on external USB drives, or used with virtualization software (ie. [Parallels Desktop](https://www.parallels.com/au/products/desktop/), [UTM](https://mac.getutm.app), [VMware Fusion](https://www.vmware.com/au/products/fusion.html), [VirtualBox](https://www.virtualbox.org)).\n\n**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 { VStack(alignment: .leading) {