Skip to content

Commit

Permalink
wizard: add link to CrystalFetch
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Jul 28, 2023
1 parent 8731e9e commit 44b5ea1
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Platform/Shared/VMWizardOSWindowsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,30 @@ struct VMWizardOSWindowsView: View {

if wizardState.isWindows10OrHigher {
Toggle("Import VHDX Image", isOn: $useVhdx)
#if os(macOS)
if useVhdx {
#if arch(arm64)
Link(destination: URL(string: "https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewARM64")!) {
Label("Download Windows 11 for ARM64 Preview VHDX", systemImage: "link")
}.buttonStyle(.borderless)
#endif
} else {
Button {
let downloadCrystalFetch = URL(string: "https://mac.getutm.app/crystalfetch/")!
if let crystalFetch = NSWorkspace.shared.urlForApplication(withBundleIdentifier: "llc.turing.CrystalFetch") {
NSWorkspace.shared.openApplication(at: crystalFetch, configuration: .init()) { _, error in
if error != nil {
NSWorkspace.shared.open(downloadCrystalFetch)
}
}
} else {
NSWorkspace.shared.open(downloadCrystalFetch)
}
} label: {
Label("Fetch latest Windows installer…", systemImage: "link")
}.buttonStyle(.link)
}
#endif
Link(destination: URL(string: "https://docs.getutm.app/guides/windows/")!) {
Label("Windows Install Guide", systemImage: "link")
}.buttonStyle(.borderless)
Expand Down

0 comments on commit 44b5ea1

Please sign in to comment.