Run a virtual iPhone on an Apple Silicon Mac.
Swift
Rework Launchpad sheets, tables and New Machine; version 2.9.1
Lakr2c3b818e0dc7
diff --git a/VPhoneExecutable/VPhoneVirtualization/Resources/Info.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/Info.plistindex fc918928..3162cfc6 100644--- a/VPhoneExecutable/VPhoneVirtualization/Resources/Info.plist+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/Info.plist@@ -9,9 +9,9 @@<key>CFBundlePackageType</key><string>BNDL</string><key>CFBundleVersion</key>- <string>36</string>+ <string>37</string><key>CFBundleShortVersionString</key>- <string>2.9.0</string>+ <string>2.9.1</string><key>NSMicrophoneUsageDescription</key><string>Shares this Mac's microphone with the virtual iPhone so apps running inside it can record.</string></dict>diff --git a/VPhoneLaunchpad/Configuration/Version.xcconfig b/VPhoneLaunchpad/Configuration/Version.xcconfigindex 5973746c..46b643f8 100644--- a/VPhoneLaunchpad/Configuration/Version.xcconfig+++ b/VPhoneLaunchpad/Configuration/Version.xcconfig@@ -1,4 +1,4 @@-MARKETING_VERSION = 2.9.0+MARKETING_VERSION = 2.9.1// Bump whenever the helper changes. The app blesses the helper again when the// installed helper's version or bytes differ from the copy it embeds.CURRENT_PROJECT_VERSION = 16diff --git a/VPhoneLaunchpad/Resources/VPhoneLaunchpad.Info.plist b/VPhoneLaunchpad/Resources/VPhoneLaunchpad.Info.plistindex cc17d1cd..251bc7de 100644--- a/VPhoneLaunchpad/Resources/VPhoneLaunchpad.Info.plist+++ b/VPhoneLaunchpad/Resources/VPhoneLaunchpad.Info.plist@@ -49,6 +49,59 @@guest records. Same arrangement as the location descriptions above. --><key>NSMicrophoneUsageDescription</key><string>Shares this Mac's microphone with the virtual iPhone so apps running inside it can record.</string>+ <!-- A machine exported by Launchpad: a gnutar of the machine folder,+ zstd compressed, the same archive `vphone-cli vm export` writes.+ Launchpad owns the type, so opening one in Finder imports it. -->+ <key>UTExportedTypeDeclarations</key>+ <array>+ <dict>+ <key>UTTypeIdentifier</key>+ <string>com.vphone.exported-archive</string>+ <key>UTTypeDescription</key>+ <string>VPhone Exported Archive</string>+ <key>UTTypeConformsTo</key>+ <array>+ <string>public.data</string>+ <string>public.archive</string>+ </array>+ <key>UTTypeTagSpecification</key>+ <dict>+ <key>public.filename-extension</key>+ <array>+ <string>vpea</string>+ </array>+ </dict>+ </dict>+ </array>+ <key>CFBundleDocumentTypes</key>+ <array>+ <dict>+ <key>CFBundleTypeName</key>+ <string>VPhone Exported Archive</string>+ <key>CFBundleTypeRole</key>+ <string>Viewer</string>+ <key>LSHandlerRank</key>+ <string>Owner</string>+ <key>LSItemContentTypes</key>+ <array>+ <string>com.vphone.exported-archive</string>+ </array>+ </dict>+ <!-- An IPSW opened with Launchpad is copied into the IPSW cache.+ Alternate: Launchpad is offered in Open With, not made the default. -->+ <dict>+ <key>CFBundleTypeName</key>+ <string>IPSW</string>+ <key>CFBundleTypeRole</key>+ <string>Viewer</string>+ <key>LSHandlerRank</key>+ <string>Alternate</string>+ <key>LSItemContentTypes</key>+ <array>+ <string>com.apple.itunes.ipsw</string>+ </array>+ </dict>+ </array><key>SMPrivilegedExecutables</key><dict><key>com.vphone.launchpad.helper</key>diff --git a/VPhoneLaunchpad/Tests/IPSWCacheTests.swift b/VPhoneLaunchpad/Tests/IPSWCacheTests.swiftindex 7fba39ce..7bbddf5a 100644--- a/VPhoneLaunchpad/Tests/IPSWCacheTests.swift+++ b/VPhoneLaunchpad/Tests/IPSWCacheTests.swift@@ -47,7 +47,7 @@ struct IPSWCacheTests {expect(VPhoneLaunchpadIPSW.productTypes(in: "iPhoneOS_iPad16,1") == ["iPad16,1"], "tree name products")let beta = VPhoneLaunchpadIPSW(version: "26.4", build: "23E5207q", productTypes: [], deviceClasses: ["vresearch101ap"], fromManifest: true)- expect(beta.isBeta && beta.kind == .cloudOS, "cloudOS beta")+ expect(beta.kind == .cloudOS, "cloudOS beta")// The names `fw prepare` gave two real downloads (`VPhoneIPSWCache.cacheName`).let rc = URL(string: "https://updates.cdn-apple.com/2026FallFCS/2d0cd01d-b4f9-4a20-a1e8-f3be54570da7/iPhone17,3_27.0_24A435_Restore.ipsw")!@@ -354,7 +354,7 @@ struct IPSWCacheTests {expect(rows[0].title == "iOS 27.0 RC (24A435)" && rows[0].usedBy == ["phone (creating)"], "\(rows[0])")expect(rows[0].kindLabel == "iPhone" && rows[0].blockedReason != nil, "\(rows[0])")expect(rows[1].title == "iPadOS 26.6.2 (23G90)" && rows[1].usedBy == ["ipad-mini-01"] && rows[1].blockedReason == nil, "\(rows[1])")- expect(rows[2].kindLabel == "cloudOS · beta" && rows[2].title == "cloudOS 26.4 (23E5207q)", "\(rows[2])")+ expect(rows[2].kindLabel == "cloudOS" && rows[2].title == "cloudOS 26.4 (23E5207q)", "\(rows[2])")expect(rows[2].usedBy == ["ipad-mini-01", "ipad-pro-13"], "\(rows[2].usedBy)")expect(rows[3].title == "mystery.ipsw" && rows[3].kindLabel == "Unknown", "\(rows[3])")diff --git a/VPhoneLaunchpad/Tests/TemplatesTests.swift b/VPhoneLaunchpad/Tests/TemplatesTests.swiftindex 759e8013..d847861c 100644--- a/VPhoneLaunchpad/Tests/TemplatesTests.swift+++ b/VPhoneLaunchpad/Tests/TemplatesTests.swift@@ -58,7 +58,7 @@ struct TemplatesTests {var languages = VPhoneLaunchpadSlimming()languages.keptLanguages = " en , ja ,"- precondition(languages.arguments == ["--keep-languages", "en,ja", "--accounts-off"], "Languages: \(languages.arguments)")+ precondition(languages.arguments == ["--keep-languages", "en,ja", "--accounts-off"], "Languages: \(languages.arguments)")precondition(languages.setupArguments == ["--accounts-off"], "Setup leaves the languages to the trim")precondition(languages.trimArguments == ["--tier", "standard", "--keep-languages", "en,ja"], "Trim with languages")languages.keptLanguages = "en,zh-Hans,zh"@@ -212,9 +212,17 @@ struct TemplatesTests {// MARK: - Planstatic func creationPlan() {- let alone = VPhoneLaunchpadCreationPlan(name: "lab-01", buildName: nil, slimming: VPhoneLaunchpadSlimming())+ var unslimmed = VPhoneLaunchpadSlimming()+ unslimmed.slim = false+ let alone = VPhoneLaunchpadCreationPlan(name: "lab-01", buildName: nil, slimming: unslimmed)precondition(alone.steps == [.create, .prepare, .patch, .bootDFU, .waitDFU, .restore, .stopDFU, .installCFW, .firstBoot],"Without a template: \(alone.steps)")+ // Slimmed without a template: trimmed and set up on the machine itself.+ let slimmedAlone = VPhoneLaunchpadCreationPlan(name: "lab-01", buildName: nil, slimming: VPhoneLaunchpadSlimming())+ let expected: [VPhoneLaunchpadCreationStep] = [.create, .prepare, .patch, .bootDFU, .waitDFU, .restore, .stopDFU, .installCFW]+ + (VPhoneLaunchpadSlimming().trimArguments != nil ? [.trimTemplate] : []) + [.setUpTemplate, .firstBoot]+ precondition(slimmedAlone.steps == expected, "Slimmed without a template: \(slimmedAlone.steps)")+ precondition(slimmedAlone.machineName(for: .setUpTemplate) == "lab-01", "Set up on the machine itself")precondition(alone.machineName(for: .create) == "lab-01" && alone.machineName(for: .installCFW) == "lab-01", "One machine")let build = VPhoneLaunchpadCreationPlan.newBuildName()diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadApp.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadApp.swiftindex 791634bb..643769c4 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadApp.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadApp.swift@@ -27,8 +27,17 @@ struct VPhoneLaunchpadApp: App {.restorationBehavior(.disabled).commands {CommandGroup(replacing: .newItem) {- Button("Downloaded IPSWs…") { model.present(.ipswCache) }- Button("Templates…") { model.present(.templates) }+ Button("New…") { model.machineSheetRequest = .newMachine }+ .keyboardShortcut("n")+ .disabled(model.bundles.defaultVersion == nil)+ Button("Import…") { model.machines.chooseImport() }+ .keyboardShortcut("o")+ .disabled(model.machines.globalActivity != nil)+ Divider()+ Button("Downloaded Firmware…") { model.present(.ipswCache) }+ if model.machines.hasTemplates {+ Button("Templates…") { model.present(.templates) }+ }}CommandGroup(after: .appSettings) {Button("Host Setup…") { model.present(.hostSetup) }@@ -54,7 +63,12 @@ struct VPhoneLaunchpadApp: App {/// then asks first.@MainActorfinal class VPhoneLaunchpadAppDelegate: NSObject, NSApplicationDelegate {- weak var model: VPhoneLaunchpadModel?+ weak var model: VPhoneLaunchpadModel? {+ didSet { importOpened() }+ }++ /// Archives opened from Finder before the window gave us the model.+ private var opened: [URL] = []private let dockPolicy = VPhoneLaunchpadDockPolicy()/// Set once the user confirms closing the last window while a machine is/// being created, so the terminate path that follows does not ask again.@@ -64,6 +78,28 @@ final class VPhoneLaunchpadAppDelegate: NSObject, NSApplicationDelegate {dockPolicy.start()}+ /// A `.vpea` opened in Finder, or dropped on the Dock icon, is imported+ /// into the default library, as Import… would; an IPSW is added to the+ /// IPSW cache.+ func application(_: NSApplication, open urls: [URL]) {+ opened += urls.filter(\.isFileURL)+ importOpened()+ }++ private func importOpened() {+ guard let model, !opened.isEmpty else {+ return+ }+ let archives = opened.filter { !VPhoneLaunchpadIPSWImport.isIPSW($0) }+ model.ipswImport.register(opened, model: model)+ opened = []+ Task {+ for archive in archives {+ await model.machines.importArchive(archive)+ }+ }+ }+/// In menu bar mode the app stays behind in the menu bar. Closing the/// window while a machine is being created is refused in/// `windowShouldClose`, so this is not asked until the window is gone.diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadMenuBar.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadMenuBar.swiftindex eaed06fd..1e76d349 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadMenuBar.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadMenuBar.swift@@ -20,11 +20,7 @@ struct VPhoneLaunchpadMenuBarMenu: View {@Environment(\.openWindow) private var openWindowvar body: some View {- Button("Open Launchpad") {- NSApp.setActivationPolicy(.regular)- openWindow(id: "main")- NSApp.activate()- }+ Button("Open Launchpad", action: openLaunchpad)Divider()if model.machines.machines.isEmpty {Text("No Machines")@@ -32,17 +28,7 @@ struct VPhoneLaunchpadMenuBarMenu: View {ForEach(model.machines.machines) { machine inlet state = model.machines.state(of: machine.path)Menu {- switch state {- case .running:- Button("Stop") {- Task { await model.machines.stop(machine.path) }- }- case .stopped:- Button("Start") { Task { await model.machines.start(machine.path) } }- Button("Start Headless") { Task { await model.machines.start(machine.path, headless: true) } }- case let .busy(activity):- Text(activity)- }+ VPhoneLaunchpadMachineActions(machines: [machine], willRequest: openLaunchpad)} label: {Label(machine.name, systemImage: state == .running ? "circle.fill" : "circle")}@@ -53,6 +39,12 @@ struct VPhoneLaunchpadMenuBarMenu: View {}.keyboardShortcut("q")}++ private func openLaunchpad() {+ NSApp.setActivationPolicy(.regular)+ openWindow(id: "main")+ NSApp.activate()+ }}// MARK: - Dock icondiff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadModel.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadModel.swiftindex a808708d..0bc7ff6b 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadModel.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadModel.swift@@ -24,7 +24,7 @@ final class VPhoneLaunchpadModel {case .hostSetup: String(localized: "Host Setup")case .coreBundle: String(localized: "Core Bundle")case .bundleInstall: String(localized: "Core Bundle Install")- case .ipswCache: String(localized: "Downloaded IPSWs")+ case .ipswCache: String(localized: "Downloaded Firmware")case .templates: String(localized: "Templates")}}@@ -37,6 +37,8 @@ final class VPhoneLaunchpadModel {let bundles: VPhoneLaunchpadCoreBundlelet machines: VPhoneLaunchpadMachineLibrarylet leases: VPhoneLaunchpadLeases+ /// IPSWs dropped on the window or opened with Launchpad, copied into the cache.+ let ipswImport = VPhoneLaunchpadIPSWImport()var panel: Panel?/// The panel to open once the sheet on screen has closed.@@ -49,7 +51,7 @@ final class VPhoneLaunchpadModel {bundles = VPhoneLaunchpadCoreBundle(helper: helper, history: history)machines = VPhoneLaunchpadMachineLibrary(bundles: bundles, helper: helper)leases = VPhoneLaunchpadLeases(bundles: bundles, machines: machines, helper: helper)- bundles.boundMachines = { [machines] version in machines.machineNames(boundTo: version) }+ bundles.activeMachines = { [machines] version in machines.activeMachineNames(boundTo: version) }}// MARK: - Panels@@ -142,7 +144,6 @@ final class VPhoneLaunchpadModel {}}await bundles.fetchReleases()- await bundles.fetchArtifacts()}// MARK: - Command line@@ -169,6 +170,13 @@ final class VPhoneLaunchpadModel {await leases.refresh()}+ // MARK: - Machine requests++ /// A sheet or a delete confirmation the shared actions menu asked for,+ /// possibly from the menu bar. The machine list presents it and clears it.+ var machineSheetRequest: VPhoneLaunchpadMachinesView.Sheet?+ var deletionRequest: [VPhoneLaunchpadMachinePath] = []+// MARK: - Bundle install/// An install shows its progress in a sheet of its own, which replaces@@ -181,12 +189,6 @@ final class VPhoneLaunchpadModel {await machines.refresh()}- func installArtifact(_ artifact: VPhoneLaunchpadArtifact) async {- revealInstall()- await bundles.installArtifact(artifact)- await machines.refresh()- }-func installLocalBundle(_ source: URL, keepsDefault: Bool = false) async {revealInstall()await bundles.installLocal(source, keepsDefault: keepsDefault)@@ -202,10 +204,6 @@ final class VPhoneLaunchpadModel {present(.bundleInstall)}- // MARK: - Inspector-- var showsInspector = true-/// Refused while a machine is bound to the version; the error lands in/// `bundles.actionError`.func removeBundle(_ version: String) async {diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadPreview.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadPreview.swiftindex af4e3328..9d4c0ff2 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadPreview.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadPreview.swift@@ -15,8 +15,6 @@}static let sheetNotification = Notification.Name("VPhoneLaunchpadPreviewSheet")- /// The source a Core Bundle sheet opens on.- static var coreBundleSource = VPhoneLaunchpadCoreBundleView.Source.releases/// The pages New Machine and machine settings open on.static var newMachinePage = VPhoneLaunchpadNewMachineView.Page.basicstatic var machineSettingsPage = VPhoneLaunchpadMachineSettingsView.Page.general@@ -66,9 +64,6 @@model.bundles.applyPreview(installing: false)await panel(model, .coreBundle, "03-core-bundle", suffix)- coreBundleSource = .actions- await panel(model, .coreBundle, "03b-core-bundle-actions", suffix)- coreBundleSource = .releasesmodel.leases.applyPreview(orphans: 119)await panel(model, .hostSetup, "04-host-setup-passed", suffix)@@ -84,9 +79,6 @@model.machines.applyPreview(removing: labMachine)await shot("05c-machines-after-delete", suffix)model.machines.applyPreview(creation: creation)- model.showsInspector = false- await shot("05a-machines-no-inspector", suffix)- model.showsInspector = trueif let machine = model.machines.selected {await standalone("05b-machine-inspector", suffix, size: NSSize(width: 380, height: 1500)) {VPhoneLaunchpadMachineInspector(machine: machine, onShowProgress: { _ in }, onOpenConsole: { _ in })@@ -104,7 +96,7 @@await sheet(.newMachine, "07-new-machine-firmware", suffix)newMachinePage = .storageawait sheet(.newMachine, "07-new-machine-storage", suffix)- newMachinePage = .firmware+ newMachinePage = .patches// One boot-chain and one guest patch off: the guest one is// applied to the clone, not built into the template.newMachinePatches = VPhoneLaunchpadPatchSelection(blocked: ["ibss-cfw-serial_label", "dyld-cfw-camera"])@@ -113,8 +105,8 @@newMachinePage = .basicawait sheet(.newMachine, "07d-new-machine-changed", suffix)newMachinePatches = VPhoneLaunchpadPatchSelection()- newMachinePage = .system- await sheet(.newMachine, "07b-new-machine-system", suffix)+ newMachinePage = .slimming+ await sheet(.newMachine, "07b-new-machine-slimming", suffix)newMachinePage = .basicawait sheet(.creation(path("ios27-rc")), "08-creation-progress", suffix)creation.applyPreview(.downloading(0.42))@@ -289,27 +281,6 @@return (try? VPhoneLaunchpadMachineSnapshot.list(from: Data(json.utf8))) ?? []}()- static let artifacts: [VPhoneLaunchpadArtifact] = [- artifact(1, "cd013c2a5e8f41b7d09c3e6a2f14b85d7c90e3a1", "2026-09-28T02:14:00Z"),- artifact(2, "374a2c5f0b1e9d8c7a6b5d4e3f2a1b0c9d8e7f6a", "2026-09-27T16:40:00Z"),- ]-- private static func artifact(_ id: Int64, _ commit: String, _ date: String) -> VPhoneLaunchpadArtifact {- let created = ISO8601DateFormatter().date(from: date) ?? Date()- return VPhoneLaunchpadArtifact(- id: id,- name: "vphone-release-\(commit)",- commit: commit,- branch: "main",- runID: id,- createdAt: created,- expiresAt: created.addingTimeInterval(7 * 86400),- size: 20_564_139,- sha256: String(repeating: "0", count: 64),- downloadURL: URL(string: "https://example.invalid/\(id).zip")!,- )- }-static let machines: [VPhoneLaunchpadMachine] = {let json = """[@@ -403,7 +374,7 @@return scan}()- /// The row the Downloaded IPSWs sheet opens with selected.+ /// The row the Downloaded Firmware sheet opens with selected.static var ipswSelection: String?static let creationOptions = VPhoneLaunchpadCreationPipeline.Options(diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadRootView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadRootView.swiftindex 9eac3984..67df3c4e 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadRootView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadRootView.swift@@ -9,26 +9,11 @@ struct VPhoneLaunchpadRootView: View {@Bindable var bundles = model.bundlesVPhoneLaunchpadMachinesView().frame(maxWidth: .infinity, maxHeight: .infinity)- .toolbar {- ToolbarItemGroup(placement: .navigation) {- panelButton(.hostSetup, systemImage: "checklist", needsAttention: model.hostNeedsAttention)- panelButton(.coreBundle, systemImage: "shippingbox", needsAttention: model.bundleNeedsAttention)- }- }.navigationTitle("Machines").task { await model.start() }- // Free space changes as machines restore and IPSWs download; the- // Host Setup row follows it.- .task {- while !Task.isCancelled {- try? await Task.sleep(for: .seconds(5))- host.refreshDiskSpace()- }- }// Coming back from Settings, with or without Host Setup open..onReceive(NotificationCenter.default.publisher(for: NSApplication.didBecomeActiveNotification)) { _ inhost.refreshDeveloperTools()- host.refreshDiskSpace()}.sheet(item: $model.panel, onDismiss: model.panelDidDismiss) { panel inGroup {@@ -47,29 +32,29 @@ struct VPhoneLaunchpadRootView: View {}.environment(model)}+ // Over whatever sheet is open: the copy can start from Finder.+ .sheet(isPresented: Binding(get: { model.ipswImport.copy != nil }, set: { _ in })) {+ VPhoneLaunchpadIPSWImportView()+ .environment(model)+ }+ .alert(+ model.ipswImport.outcome?.title ?? "",+ isPresented: Binding(get: { model.ipswImport.outcome != nil }, set: {+ if !$0 {+ model.ipswImport.outcome = nil+ }+ }),+ presenting: model.ipswImport.outcome,+ ) { _ in+ Button("OK") {}+ } message: { outcome in+ Text(verbatim: outcome.message)+ }// A sheet shows its own errors; these cover work done with none// open, such as the helper update on launch..errorAlert($host.actionError, isEnabled: model.panel == nil).errorAlert($bundles.actionError, isEnabled: model.panel == nil)}-- private func panelButton(_ panel: VPhoneLaunchpadModel.Panel, systemImage: String, needsAttention: Bool) -> some View {- Button {- model.present(panel)- } label: {- Label {- Text(panel.title)- } icon: {- if needsAttention {- Image(systemName: "exclamationmark.triangle.fill")- .foregroundStyle(.yellow)- } else {- Image(systemName: systemImage)- }- }- }- .help(needsAttention ? "\(panel.title) needs attention" : panel.title)- }}extension View {diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadSheet.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadSheet.swiftindex c8c2f3d6..77345519 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadSheet.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadSheet.swift@@ -5,6 +5,7 @@ import SwiftUI/// buttons along the bottom and shows no title, so the sheet had no head.struct VPhoneLaunchpadSheet<Content: View, Accessory: View, Actions: View>: View {let title: Text+ let width: CGFloat@ViewBuilder let content: Content/// Secondary buttons or status, on the leading side of the footer.@ViewBuilder let accessory: Accessory@@ -13,11 +14,13 @@ struct VPhoneLaunchpadSheet<Content: View, Accessory: View, Actions: View>: Viewinit(_ title: Text,+ width: CGFloat = VPhoneLaunchpadSheetSize.width,@ViewBuilder content: () -> Content,@ViewBuilder accessory: () -> Accessory,@ViewBuilder actions: () -> Actions,) {self.title = title+ self.width = widthself.content = content()self.accessory = accessory()self.actions = actions()@@ -50,12 +53,18 @@ struct VPhoneLaunchpadSheet<Content: View, Accessory: View, Actions: View>: View.padding(.horizontal, 16).padding(.vertical, 12)}+ .frame(width: width)}}-// MARK: - Height+// MARK: - Size-enum VPhoneLaunchpadSheetHeight {+enum VPhoneLaunchpadSheetSize {+ /// Every sheet is this wide, so moving from one to the next keeps its+ /// edges. Tables in a sheet size their columns to fit it.+ static let width: CGFloat = 520+ /// The one exception: the patch table, whose columns need the room.+ static let wide: CGFloat = 800/// The tallest a form sheet grows, title and buttons included: a/// 1440×900 screen keeps the buttons in reach below the menu bar, the/// window's toolbar and the Dock.@@ -120,3 +129,24 @@ extension VPhoneLaunchpadSheet where Accessory == EmptyView {self.init(title, content: content, accessory: { EmptyView() }, actions: actions)}}++// MARK: - Table focus++extension View {+ /// Gives a table the keyboard when it appears. Unfocused, AppKit draws+ /// its selection in gray rather than in the accent color, and the arrow+ /// keys and ⌘A do nothing until it is clicked.+ func vphoneFocusedOnAppear() -> some View {+ modifier(VPhoneLaunchpadFocusOnAppear())+ }+}++private struct VPhoneLaunchpadFocusOnAppear: ViewModifier {+ @FocusState private var isFocused: Bool++ func body(content: Content) -> some View {+ content+ .focused($isFocused)+ .onAppear { isFocused = true }+ }+}diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Command/VPhoneLaunchpadCommandHistoryView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Command/VPhoneLaunchpadCommandHistoryView.swiftindex da2688c2..ad354162 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Command/VPhoneLaunchpadCommandHistoryView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Command/VPhoneLaunchpadCommandHistoryView.swift@@ -6,9 +6,11 @@ struct VPhoneLaunchpadCommandHistoryView: View {@Environment(VPhoneLaunchpadModel.self) private var model@Environment(\.dismiss) private var dismiss@State private var selection: Set<UUID> = []+ /// Newest first until a header click replaces it.+ @State private var sortOrder = [KeyPathComparator(\VPhoneLaunchpadCommandHistory.Entry.date, order: .reverse)]private var entries: [VPhoneLaunchpadCommandHistory.Entry] {- model.history.entries.reversed()+ model.history.entries.sorted(using: sortOrder)}var body: some View {@@ -25,23 +27,23 @@ struct VPhoneLaunchpadCommandHistoryView: View {Button("Done") { dismiss() }.keyboardShortcut(.defaultAction)}- .frame(width: 760, height: 460)+ .frame(height: 460)}/// The icon and time keep fixed widths, so the command gets the rest.private var table: some View {- Table(entries, selection: $selection) {- TableColumn("") { entry in+ Table(entries, selection: $selection, sortOrder: $sortOrder) {+ TableColumn("", value: \.statusOrder) { entry inVPhoneLaunchpadStatusIcon(status: entry.status.map { $0 == 0 ? .passed : .failed } ?? .running).help(entry.status.map { String(localized: "Exit status \($0)") } ?? "")}.width(16)- TableColumn("Started") { entry in+ TableColumn("Started", value: \.date) { entry inText(entry.date.formatted(date: .omitted, time: .standard)).monospacedDigit()}.width(64)- TableColumn("Command") { entry in+ TableColumn("Command", value: \.text) { entry inText(verbatim: entry.text).font(.system(.body, design: .monospaced)).lineLimit(1)@@ -57,6 +59,7 @@ struct VPhoneLaunchpadCommandHistoryView: View {let text = commands(selection)return text.isEmpty ? [] : [NSItemProvider(object: text as NSString)]}+ .vphoneFocusedOnAppear()}/// The selected commands, one per line, in the order the table shows them.@@ -69,3 +72,11 @@ struct VPhoneLaunchpadCommandHistoryView: View {NSPasteboard.general.setString(commands(ids), forType: .string)}}++extension VPhoneLaunchpadCommandHistory.Entry {+ /// The status column's order: running, then succeeded, then failed by+ /// exit status.+ var statusOrder: Int {+ status.map { Int($0) } ?? -1+ }+}diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Command/VPhoneLaunchpadCommandLine.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Command/VPhoneLaunchpadCommandLine.swiftindex 97708b1f..0d09beb2 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Command/VPhoneLaunchpadCommandLine.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Command/VPhoneLaunchpadCommandLine.swift@@ -72,7 +72,7 @@ nonisolated struct VPhoneLaunchpadCommandResult: Sendable {@MainActor@Observablefinal class VPhoneLaunchpadCommandHistory {- struct Entry: Identifiable {+ nonisolated struct Entry: Identifiable, Sendable {let id = UUID()let date = Date()let text: Stringdiff --git a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadArtifact.swift b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadArtifact.swiftdeleted file mode 100644index 988d2f8f..00000000--- a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadArtifact.swift+++ /dev/null@@ -1,189 +0,0 @@-import Foundation-import Security--/// A `vphone-release-<commit>` artifact from the package workflow. It holds-/// `VPhone-<commit>.zip` next to the Launchpad zip. GitHub records a SHA-256-/// digest for the artifact, which the download is checked against; the-/// bundle zip inside it then goes through the helper like a local build.-///-/// Listing works without a token. Downloading an artifact does not, even from-/// a public repository, so the user supplies one with Actions read access.-nonisolated struct VPhoneLaunchpadArtifact: Identifiable, Hashable, Codable, Sendable {- let id: Int64- let name: String- let commit: String- let branch: String- let runID: Int64- let createdAt: Date- let expiresAt: Date- let size: Int64- let sha256: String- let downloadURL: URL-- static let namePrefix = "vphone-release-"- static let endpoint = URL(string: "https://api.github.com/repos/Lakr233/vphone-cli/actions/artifacts?per_page=50")!-- var shortCommit: String {- String(commit.prefix(7))- }-- /// The store name suffix, after the bundle's own version.- var versionSuffix: String {- "-ci.\(shortCommit)"- }-- var runURL: URL {- URL(string: "https://github.com/Lakr233/vphone-cli/actions/runs/\(runID)")!- }-- // MARK: - Listing-- static func fetch(token: String?) async throws -> [VPhoneLaunchpadArtifact] {- let (data, response) = try await URLSession.shared.data(for: request(endpoint, token: token))- guard let http = response as? HTTPURLResponse, http.statusCode == 200 else {- throw VPhoneLaunchpadError(String(localized: "Unable to load GitHub Actions builds. Try again later."))- }- let decoder = JSONDecoder()- decoder.dateDecodingStrategy = .iso8601- let payload = try decoder.decode(Payload.self, from: data)- return payload.artifacts.compactMap { artifact in- guard artifact.name.hasPrefix(namePrefix), !artifact.expired,- let digest = artifact.digest, digest.hasPrefix("sha256:"),- let run = artifact.workflow_run,- run.head_sha.range(of: "^[0-9a-f]{40}$", options: .regularExpression) != nil- else {- return nil- }- return VPhoneLaunchpadArtifact(- id: artifact.id,- name: artifact.name,- commit: run.head_sha,- branch: run.head_branch ?? "",- runID: run.id,- createdAt: artifact.created_at,- expiresAt: artifact.expires_at,- size: artifact.size_in_bytes,- sha256: String(digest.dropFirst("sha256:".count)),- downloadURL: artifact.archive_download_url,- )- }- .sorted { $0.createdAt > $1.createdAt }- }-- private struct Payload: Decodable {- struct Artifact: Decodable {- struct Run: Decodable {- let id: Int64- let head_branch: String?- let head_sha: String- }-- let id: Int64- let name: String- let size_in_bytes: Int64- let archive_download_url: URL- let expired: Bool- let digest: String?- let created_at: Date- let expires_at: Date- let workflow_run: Run?- }-- let artifacts: [Artifact]- }-- private static func request(_ url: URL, token: String?) -> URLRequest {- var request = URLRequest(url: url)- request.setValue("application/vnd.github+json", forHTTPHeaderField: "Accept")- request.setValue("vphone-launchpad", forHTTPHeaderField: "User-Agent")- if let token, !token.isEmpty {- request.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization")- }- return request- }-- // MARK: - Download-- /// Downloads the artifact zip. Returns the file and its hex SHA-256.- @concurrent func download(token: String, progress: @escaping @Sendable (Int64) -> Void) async throws -> (URL, String) {- let name = name- return try await VPhoneLaunchpadDownload.fetch(- Self.request(downloadURL, token: token),- as: "\(name).zip",- refused: { status in- switch status {- case 401, 403:- VPhoneLaunchpadError(String(localized: "GitHub refused the token. Check that it can read Actions for Lakr233/vphone-cli."))- case 404, 410:- VPhoneLaunchpadError(String(localized: "This build has expired on GitHub. Choose a newer one."))- default:- VPhoneLaunchpadError(String(localized: "Unable to download \(name). Check your connection and try again."))- }- },- progress: progress,- )- }-- /// Unpacks the artifact next to itself and returns the bundle zip in it.- @concurrent static func bundleArchive(in artifact: URL) async throws -> URL {- let directory = artifact.deletingLastPathComponent().appendingPathComponent("artifact", isDirectory: true)- let process = Process()- process.executableURL = URL(fileURLWithPath: "/usr/bin/ditto")- process.arguments = ["-x", "-k", artifact.path, directory.path]- process.standardInput = FileHandle.nullDevice- process.standardOutput = FileHandle.nullDevice- process.standardError = FileHandle.nullDevice- try process.run()- process.waitUntilExit()- let names = (try? FileManager.default.contentsOfDirectory(atPath: directory.path)) ?? []- guard process.terminationStatus == 0,- let name = names.first(where: { $0.range(of: "^VPhone-.+\\.zip$", options: .regularExpression) != nil })- else {- throw VPhoneLaunchpadError(String(localized: "This build does not contain VPhone.bundle. Choose another build."))- }- return directory.appendingPathComponent(name)- }-}--// MARK: - Token--/// The GitHub token for downloading artifacts, kept in the login keychain.-nonisolated enum VPhoneLaunchpadGitHubToken {- private static var query: [CFString: Any] {- [- kSecClass: kSecClassGenericPassword,- kSecAttrService: "com.vphone.launchpad.github",- kSecAttrAccount: "actions",- ]- }-- static func load() -> String? {- var query = query- query[kSecReturnData] = true- query[kSecMatchLimit] = kSecMatchLimitOne- var result: CFTypeRef?- guard SecItemCopyMatching(query as CFDictionary, &result) == errSecSuccess,- let data = result as? Data- else {- return nil- }- return String(data: data, encoding: .utf8)- }-- static func save(_ token: String) throws {- SecItemDelete(query as CFDictionary)- var item = query- item[kSecValueData] = Data(token.utf8)- let status = SecItemAdd(item as CFDictionary, nil)- guard status == errSecSuccess else {- throw VPhoneLaunchpadError(- String(localized: "Unable to save the token in the keychain."),- detail: SecCopyErrorMessageString(status, nil) as String?,- )- }- }-- static func delete() {- SecItemDelete(query as CFDictionary)- }-}diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundle.swift b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundle.swiftindex 3a5dbe5d..cdff8bfe 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundle.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundle.swift@@ -55,7 +55,6 @@ final class VPhoneLaunchpadCoreBundle {/// relaunch, when the downloaded files are gone.enum InstallSource: Codable {case release(VPhoneLaunchpadRelease)- case artifact(VPhoneLaunchpadArtifact)case local(path: String)}@@ -95,14 +94,6 @@ final class VPhoneLaunchpadCoreBundle {plan = [.prepare, .install, .policy, .preflight]}- /// The version is read from the bundle once the artifact is unpacked.- init(artifact: VPhoneLaunchpadArtifact) {- source = .artifact(artifact)- name = artifact.name- size = artifact.size- plan = [.download, .verify, .prepare, .install, .policy, .preflight]- }-func status(_ step: InstallStep) -> VPhoneLaunchpadStatus {steps[step] ?? .pending}@@ -140,9 +131,7 @@ final class VPhoneLaunchpadCoreBundle {private(set) var installed: [Installed] = []private(set) var releases: [VPhoneLaunchpadRelease] = []private(set) var releasesError: String?- private(set) var artifacts: [VPhoneLaunchpadArtifact] = []- private(set) var artifactsError: String?- private(set) var hasGitHubToken = VPhoneLaunchpadGitHubToken.load() != nil+ private(set) var isFetchingReleases = falseprivate(set) var progress: InstallProgress? {didSet { Self.saveProgress(progress) }}@@ -355,7 +344,6 @@ final class VPhoneLaunchpadCoreBundle {func refresh() async {await checkDefault()await fetchReleases()- await fetchArtifacts()}/// Rereads the store and checks the default bundle again. A bundle that@@ -382,6 +370,8 @@ final class VPhoneLaunchpadCoreBundle {}func fetchReleases() async {+ isFetchingReleases = true+ defer { isFetchingReleases = false }do {releases = try await VPhoneLaunchpadRelease.fetch()releasesError = nil@@ -390,31 +380,6 @@ final class VPhoneLaunchpadCoreBundle {}}- func fetchArtifacts() async {- do {- artifacts = try await VPhoneLaunchpadArtifact.fetch(token: VPhoneLaunchpadGitHubToken.load())- artifactsError = nil- } catch {- artifactsError = error.localizedDescription- }- }-- /// An empty token removes the saved one.- func setGitHubToken(_ token: String) {- let token = token.trimmingCharacters(in: .whitespacesAndNewlines)- do {- if token.isEmpty {- VPhoneLaunchpadGitHubToken.delete()- } else {- try VPhoneLaunchpadGitHubToken.save(token)- }- } catch {- actionError = error as? VPhoneLaunchpadError- ?? VPhoneLaunchpadError(String(localized: "Unable to save the token in the keychain."), detail: error.localizedDescription)- }- hasGitHubToken = VPhoneLaunchpadGitHubToken.load() != nil- }-private func loadInstalled() {let names = (try? FileManager.default.contentsOfDirectory(atPath: VPhoneLaunchpadBundleStore.root.path)) ?? []let receipts = names@@ -561,58 +526,6 @@ final class VPhoneLaunchpadCoreBundle {}}- /// Installs the bundle inside a GitHub Actions artifact as- /// `<version>-ci.<commit>`. The artifact is checked against the digest- /// GitHub published; the bundle zip inside it is then handed over like a- /// local build.- func installArtifact(_ artifact: VPhoneLaunchpadArtifact, keepsDefault: Bool = false) async {- progress = InstallProgress(artifact: artifact)- progress?.keepsDefault = keepsDefault- var archive: URL?- var work: URL?- defer {- if let archive {- try? FileManager.default.removeItem(at: archive.deletingLastPathComponent())- }- if let work {- try? FileManager.default.removeItem(at: work)- }- }- do {- guard let token = VPhoneLaunchpadGitHubToken.load() else {- throw VPhoneLaunchpadError(String(localized: "Add a GitHub token to download builds from GitHub Actions."))- }- set(.download, .running)- let (file, digest) = try await artifact.download(token: token) { received in- DispatchQueue.main.async {- MainActor.assumeIsolated { self.progress?.received = received }- }- }- archive = file- set(.download, .passed)-- set(.verify, .running)- guard digest == artifact.sha256.lowercased() else {- throw VPhoneLaunchpadError(- String(localized: "The download could not be verified. Try again."),- detail: String(localized: "Expected \(artifact.sha256)\nReceived \(digest)"),- )- }- set(.verify, .passed)-- set(.prepare, .running)- let bundleArchive = try await VPhoneLaunchpadArtifact.bundleArchive(in: file)- let local = try await VPhoneLaunchpadLocalBundle.prepare(bundleArchive, suffix: artifact.versionSuffix)- work = local.workDirectory- progress?.version = local.version- set(.prepare, .passed)-- try await installAndVerify(version: local.version, archive: local.archive, sha256: local.sha256)- } catch {- fail(error)- }- }-/// The steps every source shares: the helper installs the archive as/// root, then the new version becomes the default, unless the install/// keeps it, and is checked. Machines bound to other versions stay on@@ -693,8 +606,6 @@ final class VPhoneLaunchpadCoreBundle {switch progress.source {case let .release(release):await install(release, keepsDefault: keepsDefault)- case let .artifact(artifact):- await installArtifact(artifact, keepsDefault: keepsDefault)case let .local(path):await installLocal(URL(fileURLWithPath: path), keepsDefault: keepsDefault)}@@ -772,18 +683,19 @@ final class VPhoneLaunchpadCoreBundle {await verify(version)}- /// The machines bound to a version, by name. The model connects this to- /// the machine library, which knows the bindings.- var boundMachines: @MainActor (String) -> [String] = { _ in [] }+ /// The machines bound to a version that are running or busy, by name. The+ /// model connects this to the machine library, which knows the bindings.+ var activeMachines: @MainActor (String) -> [String] = { _ in [] }- /// Refuses a version a machine is bound to: removing it would leave the- /// machine with no `vphone-vm` to start it.+ /// Refuses a version a running or busy machine uses, since its files are+ /// in use. Stopped machines bound to it are left damaged until they are+ /// given another Core Bundle.func remove(_ version: String) async {- let bound = boundMachines(version)- guard bound.isEmpty else {+ let active = activeMachines(version)+ guard active.isEmpty else {actionError = VPhoneLaunchpadError(String(localized: "Unable to Remove VPhone.bundle \(version)"),- detail: String(localized: "These machines use it: \(bound.joined(separator: ", ")). Choose another Core Bundle for them first."),+ detail: String(localized: "These machines are running from it: \(active.joined(separator: ", ")). Stop them first."),)return}@@ -803,8 +715,6 @@ final class VPhoneLaunchpadCoreBundle {extension VPhoneLaunchpadCoreBundle {func applyPreview(installing: Bool) {releases = VPhoneLaunchpadPreview.releases- artifacts = VPhoneLaunchpadPreview.artifacts- hasGitHubToken = falseif installing {installed = []var progress = InstallProgress(release: releases[0])diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundleView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundleView.swiftindex 2c599ef0..9d0d0ab4 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundleView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundleView.swift@@ -2,16 +2,9 @@ import SwiftUIimport UniformTypeIdentifiersstruct VPhoneLaunchpadCoreBundleView: View {- enum Source: Hashable {- case releases- case actions- }-@Environment(VPhoneLaunchpadModel.self) private var model@Environment(\.dismiss) private var dismiss@State private var removal: String?- @State private var source = Source.releases- @State private var token = ""private var bundles: VPhoneLaunchpadCoreBundle {model.bundles@@ -48,7 +41,7 @@ struct VPhoneLaunchpadCoreBundleView: View {Button("Done") { dismiss() }.keyboardShortcut(.defaultAction)}- .frame(width: 640, height: 520)+ .frame(height: 520).errorAlert($bundles.actionError).confirmationDialog("Remove VPhone.bundle \(removal ?? "")?",@@ -64,15 +57,13 @@ struct VPhoneLaunchpadCoreBundleView: View {}}} message: {- Text("Machines are not affected. You can install this version again later.")- }- #if DEBUG- .onAppear {- if VPhoneLaunchpadPreview.isActive {- source = VPhoneLaunchpadPreview.coreBundleSource+ let users = removal.map(model.machines.machineNames(boundTo:)) ?? []+ if users.isEmpty {+ Text("Machines are not affected. You can install this version again later.")+ } else {+ Text("\(users.formatted(.list(type: .and))) use this version and will be marked Damaged until you choose another Core Bundle for them or install it again.")}}- #endif}// MARK: - Installed@@ -147,10 +138,8 @@ struct VPhoneLaunchpadCoreBundleView: View {NSWorkspace.shared.activateFileViewerSelecting([VPhoneLaunchpadBundleStore.bundle(version: bundle.version)])}Divider()- // The store refuses too; saying so here spares a failed attempt.Button("Remove…", role: .destructive) { removal = bundle.version }- .disabled(bundles.isInstalling || !users.isEmpty)- .help(users.isEmpty ? "" : "Choose another Core Bundle for its machines first.")+ .disabled(bundles.isInstalling)} label: {Image(systemName: "ellipsis")}@@ -216,47 +205,24 @@ struct VPhoneLaunchpadCoreBundleView: View {private var availableSection: some View {Section {- Picker("Source", selection: $source) {- Text("Releases").tag(Source.releases)- Text("GitHub Actions").tag(Source.actions)- }- .pickerStyle(.segmented)- switch source {- case .releases:- if let error = bundles.releasesError, bundles.releases.isEmpty {- Label(error, systemImage: "exclamationmark.triangle")- .foregroundStyle(.secondary)- } else if bundles.releases.isEmpty {- loadingRow("Loading releases…")- } else if notInstalled.isEmpty {- Text("Every release is installed.")- .foregroundStyle(.secondary)- } else {- ForEach(notInstalled) { release in- releaseRow(release, prominent: release == bundles.availableUpdate)- }- }- case .actions:- tokenRow- if let error = bundles.artifactsError, bundles.artifacts.isEmpty {- Label(error, systemImage: "exclamationmark.triangle")- .foregroundStyle(.secondary)- } else if bundles.artifacts.isEmpty {- Text("No GitHub Actions builds are available.")- .foregroundStyle(.secondary)- } else {- ForEach(bundles.artifacts) { artifact in- artifactRow(artifact)- }+ if let error = bundles.releasesError, bundles.releases.isEmpty {+ Label(error, systemImage: "exclamationmark.triangle")+ .foregroundStyle(.secondary)+ } else if bundles.releases.isEmpty, bundles.isFetchingReleases {+ loadingRow("Loading releases…")+ } else if bundles.releases.isEmpty {+ Text("No versions available.")+ .foregroundStyle(.secondary)+ } else if notInstalled.isEmpty {+ Text("Every release is installed.")+ .foregroundStyle(.secondary)+ } else {+ ForEach(notInstalled) { release in+ releaseRow(release, prominent: release == bundles.availableUpdate)}}} header: {Text("Available")- } footer: {- if source == .actions {- Text("Builds from GitHub Actions, kept for 7 days. To download them, add a token that can read Actions for Lakr233/vphone-cli. The token is stored in your keychain.")- .foregroundStyle(.secondary)- }}}@@ -267,70 +233,6 @@ struct VPhoneLaunchpadCoreBundleView: View {}}- // MARK: - GitHub Actions-- @ViewBuilder- private var tokenRow: some View {- if bundles.hasGitHubToken {- LabeledContent("GitHub Token") {- HStack {- Text("Saved in the keychain")- .foregroundStyle(.secondary)- Button("Remove") {- bundles.setGitHubToken("")- }- }- }- } else {- LabeledContent("GitHub Token") {- HStack {- SecureField("GitHub Token", text: $token, prompt: Text(verbatim: "github_pat_…"))- .labelsHidden()- .onSubmit(saveToken)- Button("Save", action: saveToken)- .disabled(token.trimmingCharacters(in: .whitespaces).isEmpty)- }- }- }- }-- private func saveToken() {- bundles.setGitHubToken(token)- token = ""- Task { await bundles.fetchArtifacts() }- }-- private func artifactRow(_ artifact: VPhoneLaunchpadArtifact) -> some View {- let isInstalled = bundles.installed.contains { $0.version.hasSuffix(artifact.versionSuffix) }- let canInstall = model.canInstallBundles && bundles.hasGitHubToken- return HStack(alignment: .firstTextBaseline) {- VStack(alignment: .leading, spacing: 2) {- HStack(alignment: .firstTextBaseline, spacing: 6) {- Text(verbatim: "VPhone.bundle")- Link(destination: artifact.runURL) {- Text(verbatim: artifact.branch.isEmpty ? artifact.shortCommit : "\(artifact.branch) @ \(artifact.shortCommit)")- .monospaced()- }- .help("Open the workflow run on GitHub")- }- Text("\(artifact.createdAt.formatted(date: .abbreviated, time: .shortened)) · \(Self.size(artifact.size)) · Expires \(artifact.expiresAt.formatted(.relative(presentation: .named)))")- .font(.caption)- .foregroundStyle(.secondary)- }- Spacer()- if isInstalled {- Text("Installed")- .foregroundStyle(.secondary)- } else {- Button("Download and Install") { Task { await model.installArtifact(artifact) } }- .disabled(!canInstall)- }- }- .help(canInstall || isInstalled ? ""- : model.canInstallBundles ? "Add a GitHub token to download builds from GitHub Actions."- : "Installing needs the privileged helper and Developer Tools access.")- }-private func releaseRow(_ release: VPhoneLaunchpadRelease, prominent: Bool) -> some View {HStack(alignment: .firstTextBaseline) {VStack(alignment: .leading, spacing: 2) {diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadDownload.swift b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadDownload.swiftindex 84ed0abc..01d3cd4b 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadDownload.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadDownload.swift@@ -2,7 +2,7 @@ import CryptoKitimport Foundation/// Streams one file from GitHub into a fresh temporary directory, hashing as-/// it goes. Release assets and Actions artifacts both redirect to storage on+/// it goes. Release assets redirect to storage on/// another host, which gets the request without the token.nonisolated enum VPhoneLaunchpadDownload {/// Returns the file and its hex SHA-256. The caller removes the file'sdiff --git a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadInstallView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadInstallView.swiftindex 0a3a0f71..b0a444b7 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadInstallView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadInstallView.swift@@ -37,6 +37,7 @@ struct VPhoneLaunchpadInstallView: View {}}.formStyle(.grouped)+ .vphoneFittedHeight(limit: VPhoneLaunchpadSheetSize.maximum - VPhoneLaunchpadSheetSize.chrome)} accessory: {if let progress = bundles.progress, !bundles.isInstalling {if progress.canSkip {@@ -63,7 +64,7 @@ struct VPhoneLaunchpadInstallView: View {.keyboardShortcut(.defaultAction)}}- .frame(width: 480, height: 420)+ .fixedSize(horizontal: false, vertical: true).interactiveDismissDisabled(bundles.isInstalling)}diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadLocalBundle.swift b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadLocalBundle.swiftindex 6f3c93fb..ae02aea2 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadLocalBundle.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadLocalBundle.swift@@ -33,12 +33,8 @@ nonisolated struct VPhoneLaunchpadLocalBundle: Sendable {// MARK: - Prepare/// Reads the version from the bundle's Info.plist and produces the zip- /// and digest the helper expects. A GitHub Actions build passes its own- /// suffix in place of `-local.<build>`.- @concurrent static func prepare(- _ source: URL,- suffix: String? = nil,- ) async throws -> VPhoneLaunchpadLocalBundle {+ /// and digest the helper expects.+ @concurrent static func prepare(_ source: URL) async throws -> VPhoneLaunchpadLocalBundle {let values = try? source.resourceValues(forKeys: [.isDirectoryKey])let isDirectory = values?.isDirectory ?? falselet fileManager = FileManager.default@@ -89,7 +85,7 @@ nonisolated struct VPhoneLaunchpadLocalBundle: Sendable {let version = try version(from: infoPlist,source: source,- suffix: suffix ?? localSuffix(seal: seal, archiveDigest: digest),+ suffix: localSuffix(seal: seal, archiveDigest: digest),)return VPhoneLaunchpadLocalBundle(version: version,diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetup.swift b/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetup.swiftindex 4618a650..3c305bd8 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetup.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetup.swift@@ -14,14 +14,10 @@ struct VPhoneLaunchpadHostCheck: Identifiable, Equatable {case libraryVolumecase developerToolscase helper- case diskSpace- case resources- case network}let kind: Kindlet title: String- let isRequired: Boolvar status: VPhoneLaunchpadStatus = .pendingvar detail = ""@@ -32,21 +28,18 @@ struct VPhoneLaunchpadHostCheck: Identifiable, Equatable {// MARK: - Host setup-/// The first stage. Required checks gate the Core Bundle section; advisory-/// ones only warn.+/// The first stage. Every check must pass, or be skipped, before a Core+/// Bundle can be installed.@MainActor@Observablefinal class VPhoneLaunchpadHostSetup {private(set) var checks: [VPhoneLaunchpadHostCheck] = [- .init(kind: .appleSilicon, title: String(localized: "Apple silicon"), isRequired: true),- .init(kind: .macOS, title: String(localized: "macOS 15 or later"), isRequired: true),- .init(kind: .physicalMac, title: String(localized: "Physical Mac"), isRequired: true),- .init(kind: .libraryVolume, title: String(localized: "Library on APFS"), isRequired: true),- .init(kind: .developerTools, title: String(localized: "Developer Tools access"), isRequired: true),- .init(kind: .helper, title: String(localized: "Privileged helper"), isRequired: true),- .init(kind: .diskSpace, title: String(localized: "Free disk space"), isRequired: false),- .init(kind: .resources, title: String(localized: "CPU and memory"), isRequired: false),- .init(kind: .network, title: String(localized: "Network"), isRequired: false),+ .init(kind: .appleSilicon, title: String(localized: "Apple silicon")),+ .init(kind: .macOS, title: String(localized: "macOS 15 or later")),+ .init(kind: .physicalMac, title: String(localized: "Physical Mac")),+ .init(kind: .libraryVolume, title: String(localized: "Library on APFS")),+ .init(kind: .developerTools, title: String(localized: "Developer Tools access")),+ .init(kind: .helper, title: String(localized: "Privileged helper")),]private(set) var isChecking = falsevar actionError: VPhoneLaunchpadError?@@ -63,20 +56,12 @@ final class VPhoneLaunchpadHostSetup {checkLocally()}- var required: [VPhoneLaunchpadHostCheck] {- checks.filter(\.isRequired)- }-- var advisory: [VPhoneLaunchpadHostCheck] {- checks.filter { !$0.isRequired }- }-var requiredPassed: Bool {- required.allSatisfy(isSatisfied)+ checks.allSatisfy(isSatisfied)}- var passedRequiredCount: Int {- required.count(where: isSatisfied)+ var passedCount: Int {+ checks.count(where: isSatisfied)}func isSatisfied(_ check: VPhoneLaunchpadHostCheck) -> Bool {@@ -134,17 +119,13 @@ final class VPhoneLaunchpadHostSetup {defer { isChecking = false }checkLocally()- if checks.first(where: { $0.kind == .network })?.status == .pending {- update(.network, (.running, String(localized: "Checking…")))- }- // The helper and network rows keep their last result until these- // answer, so a recheck does not blank them.+ // The helper row keeps its last result until the helper answers, so a+ // recheck does not blank it.await helper.refresh()update(.helper, helperStatus())- await update(.network, Self.network())}- /// The checks that need no helper or network. They run at init, so the+ /// The checks that need no helper. They run at init, so the/// first frame already shows them.private func checkLocally() {update(.appleSilicon, Self.appleSilicon())@@ -153,21 +134,6 @@ final class VPhoneLaunchpadHostSetup {update(.libraryVolume, Self.libraryVolume(libraryRoot))update(.developerTools, developerTools())update(.helper, helperStatus())- update(.diskSpace, Self.diskSpace(libraryRoot))- update(.resources, Self.resources())- }-- /// Re-reads the free space alone. The window does so every few seconds,- /// so a restore or a download filling the volume shows without a recheck.- /// An unchanged amount leaves the row alone.- func refreshDiskSpace() {- let result = Self.diskSpace(libraryRoot)- guard let check = checks.first(where: { $0.kind == .diskSpace }),- check.status != result.0 || check.detail != result.1- else {- return- }- update(.diskSpace, result)}/// Re-reads Developer Tools access alone, for when the app comes back@@ -200,6 +166,32 @@ final class VPhoneLaunchpadHostSetup {string: "x-apple.systempreferences:com.apple.preference.security?Privacy_DevTools",)!+ /// Quits and opens this copy of Launchpad again. A shell waits for this+ /// process to exit first, so the new one can take the control socket, and+ /// gives up after 10 seconds in case the quit was cancelled. An open sheet+ /// makes AppKit refuse to terminate, so sheets are ended first.+ static func relaunch() {+ let process = Process()+ process.executableURL = URL(fileURLWithPath: "/bin/sh")+ process.arguments = [+ "-c", "i=0; while kill -0 \"$1\" 2>/dev/null; do i=$((i+1)); [ $i -gt 50 ] && exit 0; sleep 0.2; done; exec /usr/bin/open \"$2\"",+ "relaunch", String(getpid()), Bundle.main.bundlePath,+ ]+ do {+ try process.run()+ } catch {+ return+ }+ for window in NSApp.windows {+ if let sheet = window.attachedSheet {+ window.endSheet(sheet)+ }+ }+ DispatchQueue.main.async {+ NSApp.terminate(nil)+ }+ }+func installHelper() async {update(.helper, (.running, String(localized: "Waiting for administrator approval…")))do {@@ -313,43 +305,6 @@ final class VPhoneLaunchpadHostSetup {: (.failed, String(localized: "\(abbreviated(root)) is on \(type), not APFS"))}- private nonisolated static func diskSpace(_ root: URL) -> (VPhoneLaunchpadStatus, String) {- var url = existingAncestor(of: root)- // The URL may be the library root itself, which keeps what it read.- url.removeAllCachedResourceValues()- let values = try? url.resourceValues(forKeys: [.volumeAvailableCapacityForImportantUsageKey])- guard let available = values?.volumeAvailableCapacityForImportantUsage else {- return (.warning, String(localized: "Unknown"))- }- let gigabytes = available / 1_000_000_000- return gigabytes >= 100- ? (.passed, String(localized: "\(gigabytes) GB free"))- : (.warning, String(localized: "\(gigabytes) GB free, 100 GB recommended"))- }-- private nonisolated static func resources() -> (VPhoneLaunchpadStatus, String) {- let cores = ProcessInfo.processInfo.activeProcessorCount- let memory = ProcessInfo.processInfo.physicalMemory / (1 << 30)- let text = String(localized: "\(cores) cores, \(memory) GB")- return cores >= 8 && memory >= 16 ? (.passed, text) : (.warning, String(localized: "\(text); 8 cores, 16 GB recommended"))- }-- private nonisolated static func network() async -> (VPhoneLaunchpadStatus, String) {- let hosts = ["updates.cdn-apple.com", "api.github.com"]- var unreachable: [String] = []- for host in hosts {- var request = URLRequest(url: URL(string: "https://\(host)/")!)- request.httpMethod = "HEAD"- request.timeoutInterval = 6- if await (try? URLSession.shared.data(for: request)) == nil {- unreachable.append(host)- }- }- return unreachable.isEmpty- ? (.passed, hosts.joined(separator: ", "))- : (.warning, String(localized: "Cannot reach \(unreachable.joined(separator: ", "))"))- }-nonisolated static func existingAncestor(of url: URL) -> URL {var candidate = urlwhile !FileManager.default.fileExists(atPath: candidate.path), candidate.path != "/" {@@ -372,9 +327,6 @@ final class VPhoneLaunchpadHostSetup {update(.libraryVolume, (.passed, "~/.vphone/machines"))update(.developerTools, blocked ? (.pending, String(localized: "Not requested")) : (.passed, String(localized: "Allowed")))update(.helper, blocked ? (.pending, String(localized: "Not installed")) : (.passed, String(localized: "Version \("1")")))- update(.diskSpace, (.warning, String(localized: "\(84) GB free, 100 GB recommended")))- update(.resources, (.passed, String(localized: "\(12) cores, \(UInt64(36)) GB")))- update(.network, (.passed, "updates.cdn-apple.com, api.github.com"))}}#endifdiff --git a/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetupView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetupView.swiftindex 15446a79..add4eacc 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetupView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetupView.swift@@ -1,3 +1,4 @@+import AppKitimport SwiftUIstruct VPhoneLaunchpadHostSetupView: View {@@ -5,7 +6,6 @@ struct VPhoneLaunchpadHostSetupView: View {@Environment(\.dismiss) private var dismiss@AppStorage(VPhoneLaunchpadMenuBar.key) private var showsInMenuBar = false@State private var showsSkillInstall = false- @State private var confirmsRelease = falseprivate var host: VPhoneLaunchpadHostSetup {model.host@@ -13,7 +13,6 @@ struct VPhoneLaunchpadHostSetupView: View {var body: some View {@Bindable var host = host- @Bindable var leases = model.leasesVPhoneLaunchpadSheet(Text("Host Setup")) {form} accessory: {@@ -34,78 +33,39 @@ struct VPhoneLaunchpadHostSetupView: View {.keyboardShortcut(.defaultAction)}}- .frame(width: 600, height: 600)+ .fixedSize(horizontal: false, vertical: true).sheet(isPresented: $showsSkillInstall) {VPhoneLaunchpadSkillInstallView()}.errorAlert($host.actionError)- .errorAlert($leases.actionError)- .task { await model.leases.refresh() }- .confirmationDialog(- "Release \(model.leases.orphans.count) Addresses?",- isPresented: $confirmsRelease,- ) {- Button("Release") {- Task { await model.leases.releaseFromUI() }- }- } message: {- Text("Their leases have run out and no machine in your libraries has their MAC. A guest that comes back with one of these MACs gets a new address.")- }}private var form: some View {Form {Section {- ForEach(host.required) { check in+ ForEach(host.checks) { check inrow(check)}} header: {HStack {- Text("Required")+ Text("Checks")Spacer()- Text("\(host.passedRequiredCount) of \(host.required.count) passed")+ Text("\(host.passedCount) of \(host.checks.count) passed").foregroundStyle(.secondary)}} footer: {- if !host.requiredPassed {- VStack(alignment: .leading, spacing: 4) {- if host.checks.contains(where: { $0.kind == .developerTools && $0.status != .passed }) {- Text("Allow vphone-launchpad in Privacy & Security → Developer Tools, then come back to Launchpad.")- }- Text("A Core Bundle can be installed once every required check passes.")- }- .foregroundStyle(.secondary)+ if host.checks.contains(where: { $0.kind == .developerTools && $0.status != .passed }) {+ Text("Allow vphone-launchpad in Privacy & Security → Developer Tools.")+ .foregroundStyle(.secondary)}}- Section {- ForEach(host.advisory) { check in- row(check)- }- } header: {- Text("Advisory")- } footer: {- Text("Advisory checks do not block setup.")- .foregroundStyle(.secondary)- }-- Section {- leasesRow- } header: {- Text("NAT Network")- } footer: {- Text("The Mac’s DHCP server keeps an address for every guest MAC it has seen, even after the lease runs out. Release frees the addresses of iOS guests no machine uses any more, such as deleted machines. It needs an administrator.")- .foregroundStyle(.secondary)- }-Section {Toggle("Keep in Menu Bar", isOn: $showsInMenuBar)- } footer: {- Text("Closing the window keeps Launchpad in the menu bar, where you can start and stop machines. The Dock icon appears only while a window or the menu is open.")- .foregroundStyle(.secondary)}}.formStyle(.grouped)+ .vphoneFittedHeight(limit: VPhoneLaunchpadSheetSize.maximum - VPhoneLaunchpadSheetSize.chrome)}/// Icon, title, then detail and any action pinned to the trailing edge.@@ -132,10 +92,20 @@ struct VPhoneLaunchpadHostSetupView: View {@ViewBuilderprivate func action(for check: VPhoneLaunchpadHostCheck) -> some View {switch check.kind {+ case .libraryVolume where VPhoneLaunchpadMachineLocations.environmentRoot == nil:+ HStack {+ skipButton(check)+ Button("Change…") { chooseLibrary() }+ .help("Choose the folder new machines are created in")+ }case .developerTools where check.status != .passed:if host.canRequestDeveloperTools {- Button("Open Settings") {- Task { await host.requestDeveloperTools() }+ HStack {+ Button("Open Settings") {+ Task { await host.requestDeveloperTools() }+ }+ Button("Relaunch") { VPhoneLaunchpadHostSetup.relaunch() }+ .help("Quit and open Launchpad again, if access granted in Settings does not show here")}}case .helper where check.status == .pending:@@ -146,55 +116,80 @@ struct VPhoneLaunchpadHostSetupView: View {}}default:- if host.isSkipped(check) {- Button("Don’t Skip") { host.setSkipped(check.kind, false) }- } else if host.canSkip(check) {- Button("Skip") { host.setSkipped(check.kind, true) }- .help("Continue without this check. The Core Bundle still runs its own checks.")- }+ skipButton(check)}}- // MARK: - NAT leases+ @ViewBuilder+ private func skipButton(_ check: VPhoneLaunchpadHostCheck) -> some View {+ if host.isSkipped(check) {+ Button("Don’t Skip") { host.setSkipped(check.kind, false) }+ } else if host.canSkip(check) {+ Button("Skip") { host.setSkipped(check.kind, true) }+ .help("Continue without this check. The Core Bundle still runs its own checks.")+ }+ }- private var leasesRow: some View {- let leases = model.leases- let (status, detail) = leasesStatus- return HStack(spacing: 8) {- VPhoneLaunchpadStatusIcon(status: status)- Text("Addresses held by old guests")- .layoutPriority(1)- Spacer(minLength: 16)- Text(detail)- .foregroundStyle(.secondary)- .lineLimit(1)- .truncationMode(.middle)- .help(detail)- if !leases.orphans.isEmpty {- Button("Release…") { confirmsRelease = true }- .disabled(leases.isReleasing || !model.canReleaseLeases)- .fixedSize()+ // MARK: - Library++ /// Makes another folder the default library from the next launch. The+ /// machines are not moved: the alert says to move them, and Launchpad+ /// relaunches to list the new library.+ private func chooseLibrary() {+ let current = host.libraryRoot+ let panel = NSOpenPanel()+ panel.title = String(localized: "Choose a Library")+ panel.message = String(localized: "New machines are created in this folder. Machines already in the current library are not moved.")+ panel.prompt = String(localized: "Use as Library")+ panel.canChooseFiles = false+ panel.canChooseDirectories = true+ panel.canCreateDirectories = true+ panel.allowsMultipleSelection = false+ panel.directoryURL = current+ panel.present { url in+ let root = VPhoneLaunchpadMachineLocations.canonical(url)+ guard root != VPhoneLaunchpadMachineLocations.canonical(current) else {+ return+ }+ let failure = String(localized: "Unable to Use \(VPhoneLaunchpadHostSetup.abbreviated(url))")+ if let problem = VPhoneLaunchpadMachineLocations.problem(with: root) {+ host.actionError = VPhoneLaunchpadError(failure, detail: problem)+ return+ }+ guard VPhoneLaunchpadMachineLocations.supportsCloning(root) || confirmWithoutCloning(url) else {+ return}+ do {+ try VPhoneLaunchpadMachineLocations.rememberLibrary(url)+ } catch {+ host.actionError = VPhoneLaunchpadError(failure, detail: error.localizedDescription)+ return+ }+ announceChange(from: current, to: url)}}- private var leasesStatus: (VPhoneLaunchpadStatus, String) {- let leases = model.leases- if leases.isReleasing {- return (.running, String(localized: "Waiting for administrator approval…"))- }- switch leases.state {- case .unknown, .checking:- return (.running, String(localized: "Checking…"))- case let .unavailable(reason):- return (.pending, reason)- case let .failed(reason):- return (.warning, reason)- case .listed:- let count = leases.orphans.count- return count == 0- ? (.passed, String(localized: "None"))- : (.warning, String(localized: "\(count) addresses no machine uses"))+ /// Templates, clones and snapshots are APFS clones: without them every+ /// one is a full copy.+ private func confirmWithoutCloning(_ url: URL) -> Bool {+ let alert = NSAlert()+ alert.alertStyle = .warning+ alert.messageText = String(localized: "This Volume Cannot Clone Files")+ alert.informativeText = String(localized: "Machines in \(VPhoneLaunchpadHostSetup.abbreviated(url)) are slower to create from templates, clone and snapshot, because each copy writes the whole disk instead of sharing it, and they take much more space.")+ alert.addButton(withTitle: String(localized: "Use Anyway"))+ alert.addButton(withTitle: String(localized: "Cancel"))+ return alert.runModal() == .alertFirstButtonReturn+ }++ private func announceChange(from old: URL, to new: URL) {+ let alert = NSAlert()+ alert.messageText = String(localized: "Library Changed")+ alert.informativeText = String(localized: "New machines are created in \(VPhoneLaunchpadHostSetup.abbreviated(new)). Launchpad does not move machines: to keep using the ones in \(VPhoneLaunchpadHostSetup.abbreviated(old)), quit Launchpad and move their folders into the new library yourself. Launchpad relaunches to use the new library.")+ alert.addButton(withTitle: String(localized: "Relaunch"))+ alert.addButton(withTitle: String(localized: "Show Current Library"))+ if alert.runModal() == .alertSecondButtonReturn {+ NSWorkspace.shared.activateFileViewerSelecting([old])}+ VPhoneLaunchpadHostSetup.relaunch()}}diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadSkillInstallView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadSkillInstallView.swiftindex a5a57a5b..64971a98 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadSkillInstallView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadSkillInstallView.swift@@ -75,6 +75,6 @@ struct VPhoneLaunchpadSkillInstallView: View {Button("Done") { dismiss() }.keyboardShortcut(.defaultAction)}- .frame(width: 520, height: 460)+ .frame(height: 460)}}diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSW.swift b/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSW.swiftindex 0c176aff..8176262c 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSW.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSW.swift@@ -49,11 +49,6 @@ nonisolated struct VPhoneLaunchpadIPSW: Hashable, Sendable {return .unknown}- /// Apple's beta and seed builds end in a lowercase letter (`23E5207q`).- var isBeta: Bool {- build.last.map(\.isLowercase) ?? false- }-/// `iOS 26.6.2 (23G90)`; nil for a kind it cannot name.var title: String? {kind.systemName.map { "\($0) \(version) (\(build))" }diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWCacheView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWCacheView.swiftindex 2d68043a..a1cf3498 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWCacheView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWCacheView.swift@@ -1,6 +1,7 @@+import AppKitimport SwiftUI-// MARK: - Downloaded IPSWs+// MARK: - Downloaded Firmware/// The IPSWs `fw prepare` has downloaded, with Delete. The files are those in/// the shared IPSW cache and in the `ipsws` folder beside each library,@@ -14,8 +15,11 @@ struct VPhoneLaunchpadIPSWCacheView: View {/// Nil until the first scan answers.@State private var scan: VPhoneLaunchpadIPSWCache.Scan?@State private var catalog: VPhoneLaunchpadIPSWCatalogNames?- @State private var selection: VPhoneLaunchpadIPSWRow.ID?- @State private var deletion: VPhoneLaunchpadIPSWRow?+ @State private var selection: Set<VPhoneLaunchpadIPSWRow.ID> = []+ /// Empty keeps the order the rows are built in; a header click replaces it.+ @State private var sortOrder: [KeyPathComparator<VPhoneLaunchpadIPSWRow>] = []+ /// The rows the delete confirmation is for; empty when it is closed.+ @State private var deletion: [VPhoneLaunchpadIPSWRow] = []@State private var isDeleting = false@State private var actionError: VPhoneLaunchpadError?@@ -28,18 +32,24 @@ struct VPhoneLaunchpadIPSWCacheView: View {return []}return VPhoneLaunchpadIPSWRows.rows(scan.ipsws, catalog: catalog, uses: uses(scan), isCreating: library.hasActiveCreation)+ .sorted(using: sortOrder)}- private var selected: VPhoneLaunchpadIPSWRow? {- rows.first { $0.id == selection }+ private var selected: [VPhoneLaunchpadIPSWRow] {+ rows.filter { selection.contains($0.id) }+ }++ /// Why the selection cannot be deleted, for the first row that cannot.+ private var blockedReason: String? {+ selected.lazy.compactMap(\.blockedReason).first}var body: some View {- VPhoneLaunchpadSheet(Text("Downloaded IPSWs")) {+ VPhoneLaunchpadSheet(Text("Downloaded Firmware")) {VStack(spacing: 0) {list.frame(maxWidth: .infinity, maxHeight: .infinity)- if let reason = selected?.blockedReason {+ if let reason = blockedReason {Divider()Label(reason, systemImage: "info.circle").font(.callout)@@ -51,13 +61,13 @@ struct VPhoneLaunchpadIPSWCacheView: View {}} accessory: {Button("Delete…") { confirmDeletion() }- .disabled(selected == nil || selected?.blockedReason != nil || isDeleting)- .help(selected?.blockedReason ?? String(localized: "Delete the selected IPSW from the IPSW cache."))+ .disabled(selected.isEmpty || blockedReason != nil || isDeleting)+ .help(blockedReason ?? String(localized: "Delete the selected IPSWs from the IPSW cache."))} actions: {Button("Done") { dismiss() }.keyboardShortcut(.defaultAction)}- .frame(width: 760, height: 440)+ .frame(height: 440)// Again whenever the machines or creations change, and every few// seconds while a creation runs, since its download grows..task(id: scanKey) {@@ -69,19 +79,19 @@ struct VPhoneLaunchpadIPSWCacheView: View {}.task(id: model.bundles.defaultVersion) { await loadCatalog() }.confirmationDialog(- deletion.map { String(localized: "Delete \($0.title)?") } ?? "",- isPresented: Binding(get: { deletion != nil }, set: {+ deletion.count == 1 ? String(localized: "Delete \(deletion[0].title)?") : String(localized: "Delete \(deletion.count) IPSWs?"),+ isPresented: Binding(get: { !deletion.isEmpty }, set: {if !$0 {- deletion = nil+ deletion = []}}),presenting: deletion,- ) { row in- Button(String(localized: "Delete \(Self.size(row.size))"), role: .destructive) {- Task { await delete(row) }+ ) { rows in+ Button(String(localized: "Delete \(Self.size(rows.reduce(0) { $0 + $1.size }))"), role: .destructive) {+ Task { await delete(rows) }}- } message: { row in- Text(VPhoneLaunchpadIPSWRows.deletionMessage(row))+ } message: { rows in+ Text(rows.map(VPhoneLaunchpadIPSWRows.deletionMessage).joined(separator: "\n\n"))}.errorAlert($actionError)}@@ -95,7 +105,7 @@ struct VPhoneLaunchpadIPSWCacheView: View {.controlSize(.small)} else if rows.isEmpty {ContentUnavailableView {- Label("No Downloaded IPSWs", systemImage: "externaldrive")+ Label("No Downloaded Firmware", systemImage: "briefcase")} description: {Text("The IPSWs a machine is created from are downloaded into the IPSW cache and listed here.")}@@ -105,41 +115,59 @@ struct VPhoneLaunchpadIPSWCacheView: View {}private var table: some View {- Table(rows, selection: $selection) {- TableColumn("Image") { row in- VStack(alignment: .leading, spacing: 2) {- Text(verbatim: row.title)- .lineLimit(1)- .truncationMode(.middle)- Text(row.isDownloading ? String(localized: "\(row.fileName) (partial download)") : row.fileName)- .font(.caption)- .foregroundStyle(.secondary)- .lineLimit(1)- .truncationMode(.middle)- }- .help(row.fileName)+ Table(rows, selection: $selection, sortOrder: $sortOrder) {+ TableColumn("Image", value: \.title) { row in+ Text(row.isDownloading ? String(localized: "\(row.title) (partial download)") : row.title)+ .lineLimit(1)+ .truncationMode(.middle)+ .help(row.fileName)}- .width(min: 200, ideal: 320)- TableColumn("Kind") { row in+ .width(min: 140, ideal: 230)+ TableColumn("Kind", value: \.kindLabel) { row inText(verbatim: row.kindLabel)}- .width(min: 60, ideal: 80, max: 120)- TableColumn("Size") { row in+ .width(min: 60, ideal: 80)+ TableColumn("Size", value: \.size) { row inText(verbatim: Self.size(row.size)).monospacedDigit()}- .width(min: 60, ideal: 80, max: 100)+ .width(min: 56, ideal: 64).alignment(.numeric)- TableColumn("Used By") { row in- let names = row.usedBy.joined(separator: ", ")- Text(verbatim: names.isEmpty ? "—" : names)- .foregroundStyle(names.isEmpty ? .secondary : .primary)- .lineLimit(1)- .truncationMode(.tail)- .help(names)+ TableColumn(Text(verbatim: "")) { row in+ Button {+ showInFinder(row)+ } label: {+ Image(systemName: "arrow.up.right.circle.fill")+ .foregroundStyle(.secondary)+ }+ .buttonStyle(.borderless)+ .help("Show in Finder")+ }+ .width(20)+ }+ .contextMenu(forSelectionType: VPhoneLaunchpadIPSWRow.ID.self) { ids in+ Button("Show in Finder") { showInFinder(ids) }+ .disabled(ids.isEmpty)+ Divider()+ Button("Delete…", role: .destructive) {+ selection = ids+ confirmDeletion()}+ .disabled(ids.isEmpty || isDeleting)}.onDeleteCommand { confirmDeletion() }+ .vphoneFocusedOnAppear()+ }++ private func showInFinder(_ row: VPhoneLaunchpadIPSWRow) {+ showInFinder([row.id])+ }++ private func showInFinder(_ ids: Set<VPhoneLaunchpadIPSWRow.ID>) {+ let urls = (scan?.ipsws ?? []).filter { ids.contains($0.id) }.map(\.url)+ if !urls.isEmpty {+ NSWorkspace.shared.activateFileViewerSelecting(urls)+ }}static func size(_ bytes: Int64) -> String {@@ -163,7 +191,9 @@ struct VPhoneLaunchpadIPSWCacheView: View {#if DEBUGif VPhoneLaunchpadPreview.isActive {scan = VPhoneLaunchpadPreview.ipswScan- selection = selection ?? VPhoneLaunchpadPreview.ipswSelection+ if selection.isEmpty, let preview = VPhoneLaunchpadPreview.ipswSelection {+ selection = [preview]+ }return}#endif@@ -173,9 +203,7 @@ struct VPhoneLaunchpadIPSWCacheView: View {machineFolders: library.machines.map(\.path.url),)self.scan = scan- if let selection, !scan.ipsws.contains(where: { $0.id == selection }) {- self.selection = nil- }+ selection.formIntersection(scan.ipsws.map(\.id))} catch {// Cancelled: the sheet closed or the machines changed again.}@@ -243,35 +271,43 @@ struct VPhoneLaunchpadIPSWCacheView: View {// MARK: - Deleting- /// A row that cannot go says why at once; any other asks first.+ /// A selection with a row that cannot go says why at once; any other+ /// asks first.private func confirmDeletion() {- guard let row = selected, !isDeleting else {+ let rows = selected+ guard !rows.isEmpty, !isDeleting else {return}- if let reason = row.blockedReason {+ if let row = rows.first(where: { $0.blockedReason != nil }), let reason = row.blockedReason {actionError = VPhoneLaunchpadError(String(localized: "Unable to Delete \(row.title)"), detail: reason)} else {- deletion = row+ deletion = rows}}- /// Checks the IPSW again at the moment of deletion: a creation may have- /// started since the list was read.- private func delete(_ row: VPhoneLaunchpadIPSWRow) async {- guard !isDeleting, let scan, let file = scan.ipsws.first(where: { $0.id == row.id }) else {- return- }- let failure = String(localized: "Unable to Delete \(row.title)")- if let reason = VPhoneLaunchpadIPSWRows.deletionBlock(file, uses: uses(scan), isCreating: library.hasActiveCreation) {- actionError = VPhoneLaunchpadError(failure, detail: reason)+ /// Checks each IPSW again at the moment of deletion: a creation may have+ /// started since the list was read. Stops at the first that fails.+ private func delete(_ rows: [VPhoneLaunchpadIPSWRow]) async {+ guard !isDeleting, let scan else {return}isDeleting = truedefer { isDeleting = false }- do {- try await VPhoneLaunchpadIPSWCache.removeIPSW(file.url, cacheDirectories: scan.cacheDirectories)- } catch {- actionError = VPhoneLaunchpadError(failure, detail: error.localizedDescription)+ for row in rows {+ guard let file = scan.ipsws.first(where: { $0.id == row.id }) else {+ continue+ }+ let failure = String(localized: "Unable to Delete \(row.title)")+ if let reason = VPhoneLaunchpadIPSWRows.deletionBlock(file, uses: uses(scan), isCreating: library.hasActiveCreation) {+ actionError = VPhoneLaunchpadError(failure, detail: reason)+ break+ }+ do {+ try await VPhoneLaunchpadIPSWCache.removeIPSW(file.url, cacheDirectories: scan.cacheDirectories)+ } catch {+ actionError = VPhoneLaunchpadError(failure, detail: error.localizedDescription)+ break+ }}await rescan()}diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWImport.swift b/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWImport.swiftnew file mode 100644index 00000000..51794293--- /dev/null+++ b/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWImport.swift@@ -0,0 +1,192 @@+import Foundation+import Observation+import SwiftUI++// MARK: - Import++/// Puts an IPSW the user already has into the shared IPSW cache, dropped on+/// the window or opened with Launchpad, so New Machine uses it rather than+/// downloading it.+///+/// `fw prepare` finds a cached IPSW only under the name it gives the file it+/// downloads from a catalog URL (`VPhoneLaunchpadIPSW.cacheName`), so the+/// IPSW is matched to the default Core Bundle's `fw catalog` by its manifest:+/// the same build, and a product type in common or, for cloudOS, a catalog+/// cloudOS. It is copied to a `.partial` file first, as a download is, and+/// renamed once complete; a cancelled or failed copy leaves nothing behind.+@MainActor+@Observable+final class VPhoneLaunchpadIPSWImport {+ struct Copy: Identifiable {+ let id = UUID()+ let fileName: String+ var fraction: Double = 0+ }++ struct Outcome: Identifiable {+ let id = UUID()+ let title: String+ let message: String+ }++ /// The copy under way; the progress sheet shows while it is set.+ private(set) var copy: Copy?+ /// What the last import did, for the alert that follows it.+ var outcome: Outcome?+ private var task: Task<Void, Never>?+ private var queue: [URL] = []++ static func isIPSW(_ url: URL) -> Bool {+ url.isFileURL && url.pathExtension.lowercased() == "ipsw"+ }++ /// Imports the IPSWs one after another, after any already waiting.+ func register(_ files: [URL], model: VPhoneLaunchpadModel) {+ queue += files.filter(Self.isIPSW)+ guard task == nil else {+ return+ }+ task = Task {+ while !queue.isEmpty {+ let file = queue.removeFirst()+ outcome = await importIPSW(file, model: model)+ // The next waits for this one's alert to be read.+ while outcome != nil, !Task.isCancelled {+ try? await Task.sleep(for: .milliseconds(200))+ }+ }+ task = nil+ }+ }++ /// Stops the copy and drops the IPSWs waiting after it.+ func cancel() {+ queue = []+ task?.cancel()+ }++ // MARK: Steps++ private func importIPSW(_ file: URL, model: VPhoneLaunchpadModel) async -> Outcome? {+ let failure = String(localized: "Unable to Add \(file.lastPathComponent)")+ let facts: VPhoneLaunchpadIPSW+ do {+ facts = try await Self.read(file)+ } catch {+ return Outcome(title: failure, message: String(localized: "It is not an IPSW, or its BuildManifest cannot be read."))+ }+ let title = facts.title ?? file.lastPathComponent+ guard let catalog = await VPhoneLaunchpadNewMachineView.catalog(model) else {+ return Outcome(title: failure, message: String(localized: "The firmware catalog could not be read. Install a Core Bundle in Core Bundle, then try again."))+ }+ guard let source = Self.catalogURL(for: facts, named: file.lastPathComponent, in: catalog) else {+ return Outcome(title: failure, message: String(localized: "\(title) is not in the firmware catalog, so New Machine cannot use it from the IPSW cache. Choose it as a custom IPSW in New Machine instead."))+ }+ let directory = VPhoneLaunchpadIPSWCache.sharedDirectory+ let destination = directory.appendingPathComponent(VPhoneLaunchpadIPSW.cacheName(for: source))+ if FileManager.default.fileExists(atPath: destination.path) {+ return Outcome(title: String(localized: "\(title) Is Already Downloaded"), message: String(localized: "New Machine uses the copy in the IPSW cache."))+ }+ copy = Copy(fileName: file.lastPathComponent)+ defer { copy = nil }+ do {+ try await Self.copy(file, to: destination, in: directory) { [weak self] fraction in+ Task { @MainActor in self?.copy?.fraction = fraction }+ }+ } catch is CancellationError {+ return nil+ } catch {+ return Outcome(title: failure, message: error.localizedDescription)+ }+ return Outcome(title: String(localized: "\(title) Added"), message: String(localized: "New Machine uses it from the IPSW cache without downloading it."))+ }++ @concurrent+ private static func read(_ file: URL) async throws -> VPhoneLaunchpadIPSW {+ try VPhoneLaunchpadIPSW.read(file)+ }++ /// The catalog URL whose download this IPSW is: one with the same file+ /// name, else one whose name gives the same build and a product type in+ /// common, or a catalog cloudOS of the same build for a cloudOS IPSW.+ nonisolated static func catalogURL(+ for facts: VPhoneLaunchpadIPSW,+ named fileName: String,+ in catalog: VPhoneLaunchpadFirmwareCatalog,+ ) -> URL? {+ let pairings = catalog.guests.flatMap(\.pairings)+ let images = facts.kind == .cloudOS ? pairings.map(\.recommendedCloudOS) : pairings.map(\.ios)+ let urls = images.compactMap { URL(string: $0.url) }+ if let same = urls.first(where: { $0.lastPathComponent == fileName }) {+ return same+ }+ return urls.first { url in+ guard let named = VPhoneLaunchpadIPSW(fileName: url.lastPathComponent), named.build == facts.build else {+ return false+ }+ return facts.kind == .cloudOS || named.productTypes.isEmpty+ || !Set(named.productTypes).isDisjoint(with: facts.productTypes)+ }+ }++ /// Copies in 8 MB pieces, checking for cancellation between them.+ @concurrent+ private static func copy(+ _ file: URL,+ to destination: URL,+ in directory: URL,+ progress: @escaping @Sendable (Double) -> Void,+ ) async throws {+ let fm = FileManager.default+ try fm.createDirectory(at: directory, withIntermediateDirectories: true)+ try? fm.setAttributes([.posixPermissions: 0o777], ofItemAtPath: directory.path)+ let pending = directory.appendingPathComponent(".\(destination.lastPathComponent).\(UUID().uuidString).partial")+ guard fm.createFile(atPath: pending.path, contents: nil) else {+ throw CocoaError(.fileWriteUnknown)+ }+ defer { try? fm.removeItem(at: pending) }+ let input = try FileHandle(forReadingFrom: file)+ defer { try? input.close() }+ let output = try FileHandle(forWritingTo: pending)+ defer { try? output.close() }+ let total = try max(1, input.seekToEnd())+ try input.seek(toOffset: 0)+ var done: UInt64 = 0+ while true {+ try Task.checkCancellation()+ guard let chunk = try input.read(upToCount: 8 << 20), !chunk.isEmpty else {+ break+ }+ try output.write(contentsOf: chunk)+ done += UInt64(chunk.count)+ progress(Double(done) / Double(total))+ }+ try output.synchronize()+ try fm.moveItem(at: pending, to: destination)+ try? fm.setAttributes([.posixPermissions: 0o777], ofItemAtPath: destination.path)+ }+}++// MARK: - Progress++/// The copy's progress, with Cancel.+struct VPhoneLaunchpadIPSWImportView: View {+ @Environment(VPhoneLaunchpadModel.self) private var model++ var body: some View {+ let importer = model.ipswImport+ VPhoneLaunchpadSheet(Text("Adding IPSW")) {+ VStack(alignment: .leading, spacing: 8) {+ Text("Copying \(importer.copy?.fileName ?? "") into the IPSW cache…")+ .lineLimit(2)+ .truncationMode(.middle)+ ProgressView(value: importer.copy?.fraction ?? 0)+ }+ .padding(16)+ } actions: {+ Button("Cancel") { importer.cancel() }+ .keyboardShortcut(.cancelAction)+ }+ .fixedSize(horizontal: false, vertical: true)+ }+}diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWRows.swift b/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWRows.swiftindex a9d1d185..3e2f7283 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWRows.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWRows.swift@@ -2,7 +2,7 @@ import Foundation// MARK: - Rows-/// One IPSW in the Downloaded IPSWs table.+/// One IPSW in the Downloaded Firmware table.nonisolated struct VPhoneLaunchpadIPSWRow: Identifiable, Hashable, Sendable {var id: Stringvar title: String@@ -111,7 +111,7 @@ nonisolated enum VPhoneLaunchpadIPSWRows {title: title(file, catalogName: catalogName),fileName: file.name,kind: kind,- kindLabel: kindLabel(kind, beta: facts?.isBeta == true || catalogName?.localizedCaseInsensitiveContains("beta") == true),+ kindLabel: kindLabel(kind),size: file.size,usedBy: uses.filter { $0.uses(file) }.map { use inuse.isCreating ? String(localized: "\(use.machine) (creating)") : use.machine@@ -148,14 +148,13 @@ nonisolated enum VPhoneLaunchpadIPSWRows {return file.facts?.title ?? file.name}- static func kindLabel(_ kind: VPhoneLaunchpadIPSW.Kind, beta: Bool) -> String {- let name = switch kind {+ static func kindLabel(_ kind: VPhoneLaunchpadIPSW.Kind) -> String {+ switch kind {case .iPhone: String(localized: "iPhone")case .iPad: String(localized: "iPad")case .cloudOS: String(localized: "cloudOS")case .unknown: String(localized: "Unknown")}- return beta ? String(localized: "\(name) · beta") : name}// MARK: Deletingdiff --git a/VPhoneLaunchpad/VPhoneLaunchpad/InfoPlist.xcstrings b/VPhoneLaunchpad/VPhoneLaunchpad/InfoPlist.xcstringsindex 8950f1a7..7bd769f7 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/InfoPlist.xcstrings+++ b/VPhoneLaunchpad/VPhoneLaunchpad/InfoPlist.xcstrings@@ -210,6 +210,15 @@}}}+ },+ "VPhone Exported Archive" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "VPhone Exported Archive" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "VPhone 書き出しアーカイブ" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "VPhone 내보낸 아카이브" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Bản lưu trữ xuất VPhone" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "VPhone 导出归档" } }+ }}},"version" : "1.3"diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Localizable.xcstrings b/VPhoneLaunchpad/VPhoneLaunchpad/Localizable.xcstringsindex f998da85..6fc7431b 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Localizable.xcstrings+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Localizable.xcstrings@@ -851,40 +851,6 @@}}},- "Create from a template" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Create from a template"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "テンプレートから作成"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "템플릿에서 생성"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Tạo từ mẫu"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "从模板创建"- }- }- }- },"Create machine from template" : {"localizations" : {"en" : {@@ -1225,40 +1191,6 @@}}},- "Delete the selected template. Machines created from it keep working." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Delete the selected template. Machines created from it keep working."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "選択したテンプレートを削除します。そこから作成したマシンは引き続き動作します。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "선택한 템플릿을 삭제합니다. 이 템플릿에서 만든 머신은 계속 동작합니다."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Xóa mẫu đã chọn. Các máy ảo tạo từ mẫu vẫn hoạt động."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "删除所选模板。从它创建的虚拟机仍可正常使用。"- }- }- }- },"Delete the unfinished template build?" : {"localizations" : {"en" : {@@ -2721,40 +2653,6 @@}}},- "Service profile and removed system apps" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Service profile and removed system apps"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "サービスプロファイルと削除したシステム App"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "서비스 프로필 및 제거된 시스템 앱"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Cấu hình dịch vụ và ứng dụng hệ thống đã gỡ"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "服务配置和已移除的系统 App"- }- }- }- },"Service profile: %@" : {"localizations" : {"en" : {@@ -2891,40 +2789,6 @@}}},- "Set up template" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Set up template"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "テンプレートをセットアップ"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "템플릿 설정"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Thiết lập mẫu"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "设置模板"- }- }- }- },"Show Templates" : {"localizations" : {"en" : {@@ -3435,40 +3299,6 @@}}},- "The machine is restored on its own, with keys of its own. It is not slimmed, and starts at Setup Assistant." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "The machine is restored on its own, with keys of its own. It is not slimmed, and starts at Setup Assistant."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "マシンは単独で復元され、独自の鍵を持ちます。軽量化されず、設定アシスタントから始まります。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "머신이 단독으로 복원되며 고유한 키를 가집니다. 간소화되지 않으며 설정 지원에서 시작합니다."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Máy ảo được khôi phục riêng, với khóa riêng. Máy ảo không được tinh gọn và bắt đầu ở Trợ lý thiết lập."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "虚拟机将单独恢复,拥有独立的密钥。不会精简,并从设置助理开始。"- }- }- }- },"The next machine with its options builds a new template, which takes a restore." : {"localizations" : {"en" : {@@ -3537,40 +3367,6 @@}}},- "The template keeps every file, service and app. Setup Assistant is still skipped." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "The template keeps every file, service and app. Setup Assistant is still skipped."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "テンプレートはすべてのファイル、サービス、App を保持します。設定アシスタントはスキップされます。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "템플릿은 모든 파일, 서비스, 앱을 유지합니다. 설정 지원은 계속 건너뜁니다."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Mẫu giữ lại mọi tệp, dịch vụ và ứng dụng. Trợ lý thiết lập vẫn được bỏ qua."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "模板保留所有文件、服务和 App。仍会跳过设置助理。"- }- }- }- },"The template's setup boot removed these and kept a backup in the guest. A restored app returns to the Home Screen after SpringBoard restarts." : {"localizations" : {"en" : {@@ -4353,78 +4149,6 @@}}},- "NAT Network" : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "NAT Network" } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "NAT ネットワーク" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "NAT 네트워크" } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "Mạng NAT" } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "NAT 网络" } }- }- },- "The Mac’s DHCP server keeps an address for every guest MAC it has seen, even after the lease runs out. Release frees the addresses of iOS guests no machine uses any more, such as deleted machines. It needs an administrator." : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "The Mac’s DHCP server keeps an address for every guest MAC it has seen, even after the lease runs out. Release frees the addresses of iOS guests no machine uses any more, such as deleted machines. It needs an administrator." } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "Mac の DHCP サーバーは、一度見たゲストの MAC ごとにアドレスを確保し、リースが切れても手放しません。「解放」は、削除したマシンなど、どのマシンも使っていない iOS ゲストのアドレスを解放します。管理者の承認が必要です。" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "Mac의 DHCP 서버는 한 번 본 게스트 MAC마다 주소를 잡아 두며, 임대가 만료된 뒤에도 놓지 않습니다. 해제는 삭제한 머신처럼 더 이상 어떤 머신도 쓰지 않는 iOS 게스트의 주소를 풀어 줍니다. 관리자 승인이 필요합니다." } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "Máy chủ DHCP của Mac giữ một địa chỉ cho mỗi MAC máy khách từng thấy, kể cả khi hợp đồng thuê đã hết hạn. Giải phóng sẽ thu hồi địa chỉ của các máy khách iOS không còn máy nào dùng, chẳng hạn máy đã xoá. Cần quyền quản trị viên." } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "Mac 的 DHCP 服务器会为见过的每个客户机 MAC 保留一个地址,租约到期后也不放手。“释放”会收回已经没有机器使用的 iOS 客户机的地址,例如已删除的机器。需要管理员权限。" } }- }- },- "Addresses held by old guests" : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "Addresses held by old guests" } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "古いゲストが保持しているアドレス" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "이전 게스트가 점유한 주소" } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "Địa chỉ do máy khách cũ giữ" } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "旧客户机占用的地址" } }- }- },- "Release…" : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "Release…" } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "解放…" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "해제…" } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "Giải phóng…" } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "释放…" } }- }- },- "Release %lld Addresses?" : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "Release %lld Addresses?" } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "%lld 個のアドレスを解放しますか?" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "주소 %lld개를 해제하시겠습니까?" } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "Giải phóng %lld địa chỉ?" } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "释放 %lld 个地址?" } }- }- },- "Release" : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "Release" } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "解放" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "해제" } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "Giải phóng" } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "释放" } }- }- },- "Their leases have run out and no machine in your libraries has their MAC. A guest that comes back with one of these MACs gets a new address." : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "Their leases have run out and no machine in your libraries has their MAC. A guest that comes back with one of these MACs gets a new address." } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "これらのリースは期限切れで、ライブラリのどのマシンもその MAC を使っていません。これらの MAC で戻ってきたゲストには新しいアドレスが割り当てられます。" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "이 임대는 만료되었고 라이브러리의 어떤 머신도 해당 MAC을 쓰지 않습니다. 이 MAC으로 다시 나타나는 게스트는 새 주소를 받습니다." } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "Các hợp đồng thuê này đã hết hạn và không máy nào trong thư viện dùng MAC của chúng. Máy khách quay lại với một trong các MAC này sẽ nhận địa chỉ mới." } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "这些租约已经到期,资料库中也没有机器使用对应的 MAC。之后若有客户机以这些 MAC 回来,会分配到新地址。" } }- }- },- "%lld addresses no machine uses" : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "%lld addresses no machine uses" } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "どのマシンも使っていないアドレス %lld 個" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "어떤 머신도 쓰지 않는 주소 %lld개" } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "%lld địa chỉ không máy nào dùng" } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "%lld 个地址无机器使用" } }- }- },"Needs a Core Bundle" : {"localizations" : {"en" : { "stringUnit" : { "state" : "translated", "value" : "Needs a Core Bundle" } },@@ -4508,40 +4232,6 @@},"" : {- },- "%@ · %@ · Expires %@" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "%@ · %@ · Expires %@"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "%1$@ · %2$@ · %3$@に期限切れ"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "%1$@ · %2$@ · %3$@ 만료"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "%1$@ · %2$@ · Hết hạn %3$@"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "%1$@ · %2$@ · 将于 %3$@ 过期"- }- }- }},"%@ Console" : {"localizations" : {@@ -5088,40 +4778,6 @@}}},- "%@; 8 cores, 16 GB recommended" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "%@; 8 cores, 16 GB recommended"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "%@、8 コア・16 GB を推奨"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "%@, 8코어·16GB 권장"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "%@; khuyến nghị 8 lõi, 16 GB"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "%@;建议 8 核、16 GB"- }- }- }- },"%lld cores" : {"localizations" : {"en" : {@@ -5168,148 +4824,46 @@}}},- "%lld cores, %llu GB" : {+ "%lld Machines Selected" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "%lld cores, %llu GB"+ "value" : "%lld Machines Selected"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "%1$lld コア、%2$llu GB"+ "value" : "%lld 台のマシンを選択中"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "%1$lld코어, %2$lluGB"+ "value" : "머신 %lld대 선택됨"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "%1$lld lõi, %2$llu GB"+ "value" : "Đã chọn %lld máy"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "%1$lld 核,%2$llu GB"+ "value" : "已选择 %lld 台虚拟机"}}}},- "%lld GB free" : {+ "%lld of %lld on" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "%lld GB free"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "空き %lld GB"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "%lldGB 사용 가능"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Còn trống %lld GB"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "可用 %lld GB"- }- }- }- },- "%lld GB free, 100 GB recommended" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "%lld GB free, 100 GB recommended"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "空き %lld GB、100 GB を推奨"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "%lldGB 사용 가능, 100GB 권장"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Còn trống %lld GB, khuyến nghị 100 GB"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "可用 %lld GB,建议 100 GB"- }- }- }- },- "%lld Machines Selected" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "%lld Machines Selected"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "%lld 台のマシンを選択中"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "머신 %lld대 선택됨"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Đã chọn %lld máy"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "已选择 %lld 台虚拟机"- }- }- }- },- "%lld of %lld on" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "%1$lld of %2$lld on"+ "value" : "%1$lld of %2$lld on"}},"ja" : {@@ -5440,40 +4994,6 @@}}},- "A Core Bundle can be installed once every required check passes." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "A Core Bundle can be installed once every required check passes."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "必須項目がすべて合格すると、コアバンドルをインストールできます。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "모든 필수 검사를 통과하면 코어 번들을 설치할 수 있습니다."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Có thể cài đặt Bundle lõi khi mọi mục kiểm tra bắt buộc đều đạt."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "所有必需检查通过后,即可安装核心 Bundle。"- }- }- }- },"A folder with this name already exists in this location." : {"localizations" : {"en" : {@@ -5576,108 +5096,6 @@}}},- "Add a GitHub token to download builds from GitHub Actions." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Add a GitHub token to download builds from GitHub Actions."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "GitHub Actions からビルドをダウンロードするには、GitHub トークンを追加してください。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "GitHub Actions에서 빌드를 다운로드하려면 GitHub 토큰을 추가하십시오."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Thêm token GitHub để tải bản dựng từ GitHub Actions."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "添加 GitHub 令牌即可从 GitHub Actions 下载构建版本。"- }- }- }- },- "Advisory" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Advisory"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "推奨"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "권장 사항"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Khuyến nghị"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "建议"- }- }- }- },- "Advisory checks do not block setup." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Advisory checks do not block setup."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "推奨項目はセットアップを妨げません。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "권장 사항 검사는 설정을 막지 않습니다."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Các mục khuyến nghị không chặn quá trình thiết lập."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "建议项不会阻止设置。"- }- }- }- },"All" : {"localizations" : {"en" : {@@ -5746,40 +5164,6 @@}}},- "Allow vphone-launchpad in Privacy & Security → Developer Tools, then come back to Launchpad." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Allow vphone-launchpad in Privacy & Security → Developer Tools, then come back to Launchpad."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "「プライバシーとセキュリティ」→「デベロッパツール」で vphone-launchpad を許可してから、Launchpad に戻ってください。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "개인정보 보호 및 보안 → 개발자 도구에서 vphone-launchpad를 허용한 후 Launchpad로 돌아오십시오."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Hãy cho phép vphone-launchpad trong Quyền riêng tư & Bảo mật → Công cụ dành cho nhà phát triển, rồi quay lại Launchpad."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "在“隐私与安全性”→“开发者工具”中允许 vphone-launchpad,然后回到 Launchpad。"- }- }- }- },"Allowed" : {"localizations" : {"en" : {@@ -6052,154 +5436,86 @@}}},- "Builds from GitHub Actions, kept for 7 days. To download them, add a token that can read Actions for Lakr233/vphone-cli. The token is stored in your keychain." : {+ "Cancel" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Builds from GitHub Actions, kept for 7 days. To download them, add a token that can read Actions for Lakr233/vphone-cli. The token is stored in your keychain."+ "value" : "Cancel"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Actions のビルドで、7 日間保持されます。ダウンロードするには、Lakr233/vphone-cli の Actions を読み取れるトークンを追加してください。トークンはキーチェーンに保存されます。"+ "value" : "キャンセル"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Actions의 빌드로, 7일간 보관됩니다. 다운로드하려면 Lakr233/vphone-cli의 Actions를 읽을 수 있는 토큰을 추가하십시오. 토큰은 키체인에 저장됩니다."+ "value" : "취소"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Các bản dựng từ GitHub Actions, được lưu giữ trong 7 ngày. Để tải xuống, hãy thêm token có quyền đọc Actions của Lakr233/vphone-cli. Token được lưu trong chuỗi khóa của bạn."+ "value" : "Hủy"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "来自 GitHub Actions 的构建版本,保留 7 天。如需下载,请添加一个可读取 Lakr233/vphone-cli 的 Actions 的令牌。令牌存储在你的钥匙串中。"+ "value" : "取消"}}}},- "Cancel" : {+ "Cancel Export" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Cancel"+ "value" : "Cancel Export"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "キャンセル"+ "value" : "書き出しをキャンセル"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "취소"+ "value" : "내보내기 취소"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Hủy"+ "value" : "Hủy xuất"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "取消"+ "value" : "取消导出"}}}},- "Cancel Export" : {+ "Cannot read the volume of %@" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Cancel Export"+ "value" : "Cannot read the volume of %@"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "書き出しをキャンセル"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "내보내기 취소"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Hủy xuất"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "取消导出"- }- }- }- },- "Cannot reach %@" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Cannot reach %@"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "%@ に接続できません"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "%@에 연결할 수 없습니다"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Không thể kết nối tới %@"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "无法访问 %@"- }- }- }- },- "Cannot read the volume of %@" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Cannot read the volume of %@"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "%@ のボリュームを読み取れません"+ "value" : "%@ のボリュームを読み取れません"}},"ko" : {@@ -6489,74 +5805,6 @@}}},- "Choose" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Choose"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "選択"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "선택"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Chọn"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "选取"- }- }- }- },- "Choose a Location" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Choose a Location"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "場所を選択"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "위치 선택"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Chọn vị trí"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "选取位置"- }- }- }- },"Choose a VPhone.bundle folder or a .zip that contains one." : {"localizations" : {"en" : {@@ -6591,40 +5839,6 @@}}},- "Choose an exported machine archive (.tzst or .txz)." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Choose an exported machine archive (.tzst or .txz)."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "書き出したマシンのアーカイブ(.tzst または .txz)を選択してください。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "내보낸 머신 아카이브(.tzst 또는 .txz)를 선택하십시오."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Chọn tệp lưu trữ máy đã xuất (.tzst hoặc .txz)."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "选择导出的虚拟机归档(.tzst 或 .txz)。"- }- }- }- },"Choose Location…" : {"localizations" : {"en" : {@@ -6931,40 +6145,6 @@}}},- "Closing the window keeps Launchpad in the menu bar, where you can start and stop machines. The Dock icon appears only while a window or the menu is open." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Closing the window keeps Launchpad in the menu bar, where you can start and stop machines. The Dock icon appears only while a window or the menu is open."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "ウインドウを閉じても Launchpad はメニューバーに残り、メニューバーからマシンを開始・停止できます。Dock アイコンは、ウインドウかメニューが開いているときだけ表示されます。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "윈도우를 닫아도 Launchpad가 메뉴 막대에 남아 있으며, 메뉴 막대에서 머신을 시작하고 중지할 수 있습니다. Dock 아이콘은 윈도우나 메뉴가 열려 있을 때만 표시됩니다."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Khi đóng cửa sổ, Launchpad vẫn nằm trên thanh menu, nơi bạn có thể khởi động và dừng máy. Biểu tượng trong Dock chỉ hiện khi có cửa sổ hoặc menu đang mở."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "关闭窗口后,Launchpad 会保留在菜单栏中,你可以从菜单栏启动和停止虚拟机。只有在窗口或菜单打开时,Dock 中才会显示图标。"- }- }- }- },"cloudOS" : {"localizations" : {"en" : {@@ -7441,40 +6621,6 @@}}},- "CPU and memory" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "CPU and memory"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "CPU とメモリ"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "CPU 및 메모리"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "CPU và bộ nhớ"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "CPU 和内存"- }- }- }- },"CPU: %lld cores" : {"localizations" : {"en" : {@@ -7657,342 +6803,206 @@}}},- "Creates a .tzst archive for each machine in the folder you choose." : {+ "Creating %@" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Creates a .tzst archive for each machine in the folder you choose."+ "value" : "Creating %@"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "選択したフォルダに、マシンごとの .tzst アーカイブを作成します。"+ "value" : "%@ を作成中"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "선택한 폴더에 머신마다 .tzst 아카이브를 만듭니다."+ "value" : "%@ 생성 중"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Tạo một bản lưu trữ .tzst cho mỗi máy trong thư mục bạn chọn."+ "value" : "Đang tạo %@"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "在你选择的文件夹中为每台虚拟机创建一个 .tzst 归档。"+ "value" : "正在创建 %@"}}}},- "Creates a .tzst archive." : {+ "Creating: %@" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Creates a .tzst archive."+ "value" : "Creating: %@"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : ".tzst アーカイブを作成します。"+ "value" : "作成中: %@"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : ".tzst 아카이브를 만듭니다."+ "value" : "생성 중: %@"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Tạo tệp lưu trữ .tzst."+ "value" : "Đang tạo: %@"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "生成 .tzst 归档。"+ "value" : "正在创建:%@"}}}},- "Creates a smaller .txz archive. Export takes much longer." : {+ "Creation continues if you close this window." : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Creates a smaller .txz archive. Export takes much longer."+ "value" : "Creation continues if you close this window."}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "より小さい .txz アーカイブを作成します。書き出しにかなり時間がかかります。"+ "value" : "このウインドウを閉じても作成は続行されます。"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "더 작은 .txz 아카이브를 만듭니다. 내보내기에 훨씬 오래 걸립니다."+ "value" : "이 윈도우를 닫아도 생성은 계속됩니다."}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Tạo tệp lưu trữ .txz nhỏ hơn. Quá trình xuất sẽ lâu hơn nhiều."+ "value" : "Quá trình tạo vẫn tiếp tục nếu bạn đóng cửa sổ này."}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "生成更小的 .txz 归档。导出耗时会长得多。"+ "value" : "关闭此窗口后,创建仍会继续。"}}}},- "Creating %@" : {+ "Creation stopped" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Creating %@"+ "value" : "Creation stopped"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "%@ を作成中"+ "value" : "作成が停止しました"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "%@ 생성 중"+ "value" : "생성이 중지됨"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Đang tạo %@"+ "value" : "Đã dừng tạo"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "正在创建 %@"+ "value" : "创建已停止"}}}},- "Creating: %@" : {+ "Custom firmware installation on this machine did not complete, so it cannot boot. Choose Install Custom Firmware from the machine's menu, then start it again." : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Creating: %@"+ "value" : "Custom firmware installation on this machine did not complete, so it cannot boot. Choose Install Custom Firmware from the machine's menu, then start it again."}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "作成中: %@"+ "value" : "このマシンのカスタムファームウェアのインストールが完了していないため、起動できません。マシンのメニューから「カスタムファームウェアをインストール」を選択してから、もう一度起動してください。"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "생성 중: %@"+ "value" : "이 머신의 커스텀 펌웨어 설치가 완료되지 않아 부팅할 수 없습니다. 머신 메뉴에서 '커스텀 펌웨어 설치'를 선택한 다음 다시 시작하십시오."}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Đang tạo: %@"+ "value" : "Việc cài firmware tùy chỉnh trên máy này chưa hoàn tất nên máy không thể khởi động. Chọn Cài firmware tùy chỉnh trong menu của máy, rồi khởi động lại."}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "正在创建:%@"+ "value" : "这台虚拟机的自定义固件没有安装完成,无法启动。请在虚拟机菜单中选择“安装自定义固件”,然后再启动。"}}}},- "Creation continues if you close this window." : {+ "Custom IPSWs" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Creation continues if you close this window."+ "value" : "Custom IPSWs"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "このウインドウを閉じても作成は続行されます。"+ "value" : "カスタム IPSW"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "이 윈도우를 닫아도 생성은 계속됩니다."+ "value" : "사용자 지정 IPSW"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Quá trình tạo vẫn tiếp tục nếu bạn đóng cửa sổ này."+ "value" : "IPSW tùy chỉnh"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "关闭此窗口后,创建仍会继续。"- }- }- }- },- "Creation stopped" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Creation stopped"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "作成が停止しました"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "생성이 중지됨"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Đã dừng tạo"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "创建已停止"- }- }- }- },- "Custom firmware installation on this machine did not complete, so it cannot boot. Choose Install Custom Firmware from the machine's menu, then start it again." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Custom firmware installation on this machine did not complete, so it cannot boot. Choose Install Custom Firmware from the machine's menu, then start it again."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "このマシンのカスタムファームウェアのインストールが完了していないため、起動できません。マシンのメニューから「カスタムファームウェアをインストール」を選択してから、もう一度起動してください。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "이 머신의 커스텀 펌웨어 설치가 완료되지 않아 부팅할 수 없습니다. 머신 메뉴에서 '커스텀 펌웨어 설치'를 선택한 다음 다시 시작하십시오."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Việc cài firmware tùy chỉnh trên máy này chưa hoàn tất nên máy không thể khởi động. Chọn Cài firmware tùy chỉnh trong menu của máy, rồi khởi động lại."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "这台虚拟机的自定义固件没有安装完成,无法启动。请在虚拟机菜单中选择“安装自定义固件”,然后再启动。"- }- }- }- },- "Custom Firmware Not Installed" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Custom Firmware Not Installed"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "カスタムファームウェア未インストール"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "커스텀 펌웨어 미설치"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Chưa cài firmware tùy chỉnh"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "自定义固件未安装"- }- }- }- },- "Custom IPSWs" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Custom IPSWs"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "カスタム IPSW"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "사용자 지정 IPSW"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "IPSW tùy chỉnh"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "自定义 IPSW"+ "value" : "自定义 IPSW"}}}@@ -8712,40 +7722,6 @@}}},- "Experimental Custom Firmware" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Experimental Custom Firmware"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "実験的カスタムファームウェア"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "실험적 커스텀 펌웨어"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Firmware tùy chỉnh thử nghiệm"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "实验性自定义固件"- }- }- }- },"Export" : {"localizations" : {"en" : {@@ -9061,534 +8037,364 @@"zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "在安装虚拟机时应用" } }}},- "Free disk space" : {+ "GitHub Actions build · Installed %@ · SHA-256 %@" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Free disk space"+ "value" : "GitHub Actions build · Installed %@ · SHA-256 %@"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "ディスクの空き容量"+ "value" : "GitHub Actions ビルド · %1$@ にインストール · SHA-256 %2$@"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "여유 디스크 공간"+ "value" : "GitHub Actions 빌드 · %1$@에 설치됨 · SHA-256 %2$@"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Dung lượng trống"+ "value" : "Bản dựng GitHub Actions · Cài đặt %1$@ · SHA-256 %2$@"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "可用磁盘空间"+ "value" : "GitHub Actions 构建版本 · 安装于 %1$@ · SHA-256 %2$@"}}}},- "GitHub Actions" : {+ "Hardware" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Actions"+ "value" : "Hardware"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Actions"+ "value" : "ハードウェア"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Actions"+ "value" : "하드웨어"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Actions"+ "value" : "Phần cứng"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Actions"+ "value" : "硬件"}}}},- "GitHub Actions build · Installed %@ · SHA-256 %@" : {+ "Hide" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Actions build · Installed %@ · SHA-256 %@"+ "value" : "Hide"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Actions ビルド · %1$@ にインストール · SHA-256 %2$@"+ "value" : "隠す"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Actions 빌드 · %1$@에 설치됨 · SHA-256 %2$@"+ "value" : "숨기기"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Bản dựng GitHub Actions · Cài đặt %1$@ · SHA-256 %2$@"+ "value" : "Ẩn"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Actions 构建版本 · 安装于 %1$@ · SHA-256 %2$@"+ "value" : "隐藏"}}}},- "GitHub refused the token. Check that it can read Actions for Lakr233/vphone-cli." : {+ "Host only" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub refused the token. Check that it can read Actions for Lakr233/vphone-cli."+ "value" : "Host only"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub がトークンを拒否しました。Lakr233/vphone-cli の Actions を読み取れるか確認してください。"+ "value" : "ホストのみ"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub가 토큰을 거부했습니다. Lakr233/vphone-cli의 Actions를 읽을 수 있는지 확인하십시오."+ "value" : "호스트 전용"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub đã từ chối token. Hãy kiểm tra token có quyền đọc Actions của Lakr233/vphone-cli."+ "value" : "Chỉ máy chủ"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub 拒绝了此令牌。请确认它可以读取 Lakr233/vphone-cli 的 Actions。"+ "value" : "仅主机"}}}},- "GitHub Token" : {+ "Host preflight" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Token"+ "value" : "Host preflight"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Token"+ "value" : "ホストの事前チェック"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Token"+ "value" : "호스트 사전 점검"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Token"+ "value" : "Kiểm tra trước máy chủ"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "GitHub Token"+ "value" : "主机预检"}}}},- "Hardware" : {+ "Host preflight failed. Fix the issue and retry, or skip to use this version anyway." : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Hardware"+ "value" : "Host preflight failed. Fix the issue and retry, or skip to use this version anyway."}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "ハードウェア"+ "value" : "ホストの事前チェックに合格しませんでした。問題を解決して再試行するか、スキップしてこのバージョンをそのまま使用してください。"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "하드웨어"+ "value" : "호스트 사전 점검에 실패했습니다. 문제를 해결한 후 다시 시도하거나, 건너뛰고 이 버전을 그대로 사용하십시오."}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Phần cứng"+ "value" : "Kiểm tra trước máy chủ không đạt. Hãy khắc phục sự cố rồi thử lại, hoặc bỏ qua để vẫn dùng phiên bản này."}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "硬件"+ "value" : "主机预检未通过。请修复问题后重试,或跳过以继续使用此版本。"}}}},- "Hide" : {+ "Host Setup" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Hide"+ "value" : "Host Setup"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "隠す"+ "value" : "ホスト設定"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "숨기기"+ "value" : "호스트 설정"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Ẩn"+ "value" : "Thiết lập máy chủ"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "隐藏"+ "value" : "主机设置"}}}},- "Hide the inspector" : {+ "Host Setup…" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Hide the inspector"+ "value" : "Host Setup…"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "インスペクタを隠す"+ "value" : "ホスト設定…"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "속성 패널 가리기"+ "value" : "호스트 설정…"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Ẩn bảng kiểm tra"+ "value" : "Thiết lập máy chủ…"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "隐藏检查器"+ "value" : "主机设置…"}}}},- "Host only" : {+ "Identity" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Host only"+ "value" : "Identity"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "ホストのみ"+ "value" : "識別情報"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "호스트 전용"+ "value" : "신원"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Chỉ máy chủ"+ "value" : "Danh tính"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "仅主机"+ "value" : "身份"}}}},- "Host preflight" : {+ "Import Machine" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Host preflight"+ "value" : "Import Machine"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "ホストの事前チェック"+ "value" : "マシンを読み込む"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "호스트 사전 점검"+ "value" : "머신 가져오기"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Kiểm tra trước máy chủ"+ "value" : "Nhập máy ảo"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "主机预检"+ "value" : "导入虚拟机"}}}},- "Host preflight failed. Fix the issue and retry, or skip to use this version anyway." : {+ "Import…" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Host preflight failed. Fix the issue and retry, or skip to use this version anyway."+ "value" : "Import…"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "ホストの事前チェックに合格しませんでした。問題を解決して再試行するか、スキップしてこのバージョンをそのまま使用してください。"+ "value" : "読み込む…"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "호스트 사전 점검에 실패했습니다. 문제를 해결한 후 다시 시도하거나, 건너뛰고 이 버전을 그대로 사용하십시오."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Kiểm tra trước máy chủ không đạt. Hãy khắc phục sự cố rồi thử lại, hoặc bỏ qua để vẫn dùng phiên bản này."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "主机预检未通过。请修复问题后重试,或跳过以继续使用此版本。"- }- }- }- },- "Host Setup" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Host Setup"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "ホスト設定"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "호스트 설정"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Thiết lập máy chủ"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "主机设置"- }- }- }- },- "Host Setup…" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Host Setup…"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "ホスト設定…"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "호스트 설정…"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Thiết lập máy chủ…"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "主机设置…"- }- }- }- },- "Identity" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Identity"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "識別情報"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "신원"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Danh tính"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "身份"- }- }- }- },- "Import Machine" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Import Machine"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "マシンを読み込む"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "머신 가져오기"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Nhập máy ảo"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "导入虚拟机"- }- }- }- },- "Import…" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Import…"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "読み込む…"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "가져오기…"+ "value" : "가져오기…"}},"vi" : {@@ -9707,40 +8513,6 @@}}},- "Inspector" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Inspector"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "インスペクタ"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "속성 패널"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Bảng kiểm tra"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "检查器"- }- }- }- },"Install" : {"localizations" : {"en" : {@@ -10977,40 +9749,6 @@}}},- "Maximum compression" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Maximum compression"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "最大圧縮"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "최대 압축"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Nén tối đa"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "最高压缩率"- }- }- }- },"Memory" : {"localizations" : {"en" : {@@ -11385,40 +10123,6 @@}}},- "No GitHub Actions builds are available." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "No GitHub Actions builds are available."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "利用可能な GitHub Actions ビルドがありません。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "사용 가능한 GitHub Actions 빌드가 없습니다."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Không có bản dựng GitHub Actions nào."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "没有可用的 GitHub Actions 构建版本。"- }- }- }- },"No install to show." : {"localizations" : {"en" : {@@ -12167,46 +10871,12 @@}}},- "Open the workflow run on GitHub" : {+ "Options" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Open the workflow run on GitHub"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "GitHub でワークフローの実行を開く"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "GitHub에서 워크플로 실행 열기"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Mở lần chạy quy trình trên GitHub"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "在 GitHub 上打开工作流程运行"- }- }- }- },- "Options" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Options"+ "value" : "Options"}},"ja" : {@@ -12235,40 +10905,6 @@}}},- "Other…" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Other…"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "その他…"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "기타…"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Khác…"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "其他…"- }- }- }- },"Passed" : {"localizations" : {"en" : {@@ -12881,40 +11517,6 @@}}},- "Releases" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Releases"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "リリース"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "릴리스"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Bản phát hành"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "发行版"- }- }- }- },"Reload releases and builds, and run host preflight again." : {"localizations" : {"en" : {@@ -13221,74 +11823,6 @@}}},- "Required" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Required"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "必須"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "필수"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Bắt buộc"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "必需"- }- }- }- },- "Required to boot" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Required to boot"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "起動に必須"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "부팅에 필수"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Bắt buộc để khởi động"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "启动必需"- }- }- }- },"Requires VPhone.bundle %@ or newer." : {"localizations" : {"en" : {@@ -13663,40 +12197,6 @@}}},- "Saved in the keychain" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Saved in the keychain"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "キーチェーンに保存済み"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "키체인에 저장됨"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Đã lưu trong chuỗi khóa"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "已存储在钥匙串中"- }- }- }- },"Saving settings…" : {"localizations" : {"en" : {@@ -13731,40 +12231,6 @@}}},- "Search machines" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Search machines"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "マシンを検索"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "머신 검색"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Tìm máy ảo"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "搜索虚拟机"- }- }- }- },"See the machine's console." : {"localizations" : {"en" : {@@ -14105,40 +12571,6 @@}}},- "Show the inspector" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Show the inspector"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "インスペクタを表示"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "속성 패널 보기"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Hiện bảng kiểm tra"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "显示检查器"- }- }- }- },"Skip" : {"localizations" : {"en" : {@@ -14310,40 +12742,6 @@}}},- "Standard Custom Firmware" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Standard Custom Firmware"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "標準カスタムファームウェア"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "표준 커스텀 펌웨어"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Firmware tùy chỉnh tiêu chuẩn"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "标准自定义固件"- }- }- }- },"Start" : {"localizations" : {"en" : {@@ -14582,46 +12980,12 @@}}},- "Stop %@" : {+ "Stop Creating" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Stop %@"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "%@ を停止"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "%@ 중지"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Dừng %@"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "停止 %@"- }- }- }- },- "Stop Creating" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Stop Creating"+ "value" : "Stop Creating"}},"ja" : {@@ -15161,40 +13525,6 @@}}},- "The machine is created in a folder with its name inside the folder you choose." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "The machine is created in a folder with its name inside the folder you choose."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "マシンは、選択したフォルダの中にマシン名のフォルダとして作成されます。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "머신은 선택한 폴더 안에 머신 이름으로 된 폴더로 생성됩니다."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Máy ảo được tạo trong một thư mục mang tên của nó, bên trong thư mục bạn chọn."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "虚拟机会创建在你所选文件夹中以其名称命名的子文件夹里。"- }- }- }- },"The machine may not boot without %@." : {"localizations" : {"en" : {@@ -15467,40 +13797,6 @@}}},- "This build has expired on GitHub. Choose a newer one." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "This build has expired on GitHub. Choose a newer one."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "このビルドは GitHub 上で期限切れです。より新しいビルドを選択してください。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "이 빌드는 GitHub에서 만료되었습니다. 더 최신 빌드를 선택하십시오."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Bản dựng này đã hết hạn trên GitHub. Hãy chọn bản mới hơn."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "此构建版本已在 GitHub 上过期。请选择更新的构建版本。"- }- }- }- },"This build has no signing team. Rebuild and sign the app with your team, then try again." : {"localizations" : {"en" : {@@ -15875,40 +14171,6 @@}}},- "Unable to load GitHub Actions builds. Try again later." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Unable to load GitHub Actions builds. Try again later."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "GitHub Actions のビルドを読み込めません。しばらくしてからもう一度お試しください。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "GitHub Actions 빌드를 불러올 수 없습니다. 나중에 다시 시도하십시오."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Không thể tải các bản dựng GitHub Actions. Hãy thử lại sau."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "无法载入 GitHub Actions 构建版本。请稍后重试。"- }- }- }- },"Unable to load releases from GitHub. Try again later." : {"localizations" : {"en" : {@@ -16045,40 +14307,6 @@}}},- "Unable to save the token in the keychain." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Unable to save the token in the keychain."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "トークンをキーチェーンに保存できません。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "토큰을 키체인에 저장할 수 없습니다."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Không thể lưu token vào chuỗi khóa."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "无法将令牌存储到钥匙串中。"- }- }- }- },"Unable to Start %@" : {"localizations" : {"en" : {@@ -16147,40 +14375,6 @@}}},- "Unknown Firmware" : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Unknown Firmware"- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "不明なファームウェア"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "알 수 없는 펌웨어"- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Firmware không xác định"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "未知固件"- }- }- }- },"Update the privileged helper in Host Setup, then run preflight again." : {"localizations" : {"en" : {@@ -17182,15 +15376,6 @@"zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "正在检查核心 Bundle…" } }}},- "Choose another Core Bundle for its machines first." : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "Choose another Core Bundle for its machines first." } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "先に、このバージョンを使うマシンに別のコアバンドルを選択してください。" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "먼저 이 버전을 사용하는 머신에 다른 코어 번들을 선택하세요." } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "Hãy chọn Bundle lõi khác cho các máy đang dùng phiên bản này trước." } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "请先为使用此版本的机器选择其他核心 Bundle。" } }- }- },"Current" : {"localizations" : {"en" : { "stringUnit" : { "state" : "translated", "value" : "Current" } },@@ -17579,15 +15764,6 @@"zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "主机程序与客户机环境来自不同的核心 Bundle。请更新客户机环境以保持一致。" } }}},- "These machines use it: %@. Choose another Core Bundle for them first." : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "These machines use it: %@. Choose another Core Bundle for them first." } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "次のマシンが使用しています:%@。先に別のコアバンドルを選択してください。" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "다음 머신이 사용 중입니다: %@. 먼저 다른 코어 번들을 선택하세요." } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "Các máy sau đang dùng: %@. Hãy chọn Bundle lõi khác cho chúng trước." } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "以下机器正在使用:%@。请先为它们选择其他核心 Bundle。" } }- }- },"Unable to Change the Core Bundle of %@" : {"localizations" : {"en" : { "stringUnit" : { "state" : "translated", "value" : "Unable to Change the Core Bundle of %@" } },@@ -17948,33 +16124,6 @@"zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "系统" } }}},- "Downloaded IPSWs…" : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "Downloaded IPSWs…" } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "ダウンロード済みの IPSW…" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "다운로드한 IPSW…" } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "IPSW đã tải xuống…" } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "已下载的 IPSW…" } }- }- },- "Downloaded IPSWs" : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "Downloaded IPSWs" } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "ダウンロード済みの IPSW" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "다운로드한 IPSW" } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "IPSW đã tải xuống" } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "已下载的 IPSW" } }- }- },- "No Downloaded IPSWs" : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "No Downloaded IPSWs" } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "ダウンロード済みの IPSW はありません" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "다운로드한 IPSW 없음" } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "Chưa có IPSW nào được tải xuống" } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "没有已下载的 IPSW" } }- }- },"The IPSWs a machine is created from are downloaded into the IPSW cache and listed here." : {"localizations" : {"en" : { "stringUnit" : { "state" : "translated", "value" : "The IPSWs a machine is created from are downloaded into the IPSW cache and listed here." } },@@ -18011,15 +16160,6 @@"zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "大小" } }}},- "Used By" : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "Used By" } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "使用しているマシン" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "사용 중인 머신" } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "Máy ảo sử dụng" } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "使用它的虚拟机" } }- }- },"iPhone" : {"localizations" : {"en" : { "stringUnit" : { "state" : "translated", "value" : "iPhone" } },@@ -18038,15 +16178,6 @@"zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "iPad" } }}},- "%@ · beta" : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "%@ · beta" } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "%@ · ベータ" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "%@ · 베타" } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "%@ · beta" } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "%@ · 测试版" } }- }- },"%@ (creating)" : {"localizations" : {"en" : { "stringUnit" : { "state" : "translated", "value" : "%@ (creating)" } },@@ -18065,15 +16196,6 @@"zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "%@(未完成的下载)" } }}},- "Delete the selected IPSW from the IPSW cache." : {- "localizations" : {- "en" : { "stringUnit" : { "state" : "translated", "value" : "Delete the selected IPSW from the IPSW cache." } },- "ja" : { "stringUnit" : { "state" : "translated", "value" : "選択した IPSW を IPSW キャッシュから削除します。" } },- "ko" : { "stringUnit" : { "state" : "translated", "value" : "선택한 IPSW를 IPSW 캐시에서 삭제합니다." } },- "vi" : { "stringUnit" : { "state" : "translated", "value" : "Xóa IPSW đã chọn khỏi bộ nhớ đệm IPSW." } },- "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "从 IPSW 缓存中删除所选的 IPSW。" } }- }- },"Delete %@" : {"localizations" : {"en" : { "stringUnit" : { "state" : "translated", "value" : "Delete %@" } },@@ -18189,472 +16311,234 @@}}},- "Basic Settings" : {+ "^[%lld setting](inflect: true) changed" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Basic Settings"+ "value" : "^[%lld setting](inflect: true) changed"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "基本設定"+ "value" : "%lld 項目を変更"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "기본 설정"+ "value" : "%lld개 항목 변경됨"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Cài đặt cơ bản"+ "value" : "Đã thay đổi %lld mục"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "基本设置"+ "value" : "已更改 %lld 项"}}}},- "System" : {+ "%lld cores · %lld GB memory · %lld GB disk" : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "System"+ "value" : "%1$lld cores · %2$lld GB memory · %3$lld GB disk"}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "システム"+ "value" : "%1$lld コア · メモリ %2$lld GB · ディスク %3$lld GB"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "시스템"+ "value" : "%1$lld코어 · 메모리 %2$lld GB · 디스크 %3$lld GB"}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Hệ thống"+ "value" : "%1$lld lõi · %2$lld GB bộ nhớ · %3$lld GB ổ đĩa"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "系统"+ "value" : "%1$lld 核 · %2$lld GB 内存 · %3$lld GB 磁盘"}}}},- "Firmware & Patches" : {+ "Recommended firmware pairings for %@, with %@." : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Firmware & Patches"+ "value" : "Recommended firmware pairings for %1$@, with %2$@."}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "ファームウェアとパッチ"+ "value" : "%1$@ の推奨ファームウェアの組み合わせです。%2$@ と組み合わせます。"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "펌웨어 및 패치"+ "value" : "%1$@의 권장 펌웨어 조합이며 %2$@와 함께 사용합니다."}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Firmware và bản vá"+ "value" : "Các cặp firmware khuyến nghị cho %1$@, đi kèm %2$@."}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "固件与补丁"+ "value" : "%1$@ 的推荐固件组合,搭配 %2$@。"}}}},- "Storage & Network" : {+ "Choose an iPhone IPSW and a cloudOS IPSW in Advanced Options." : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Storage & Network"+ "value" : "Choose an iPhone IPSW and a cloudOS IPSW in Advanced Options."}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "保存先とネットワーク"+ "value" : "「詳細オプション」で iPhone IPSW と cloudOS IPSW を選択してください。"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "저장 위치 및 네트워크"+ "value" : "고급 옵션에서 iPhone IPSW와 cloudOS IPSW를 선택하십시오."}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Lưu trữ và mạng"+ "value" : "Chọn IPSW iPhone và IPSW cloudOS trong Tùy chọn nâng cao."}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "存储与网络"+ "value" : "请在“高级选项”中选择 iPhone IPSW 和 cloudOS IPSW。"}}}},- "^[%lld setting](inflect: true) changed" : {+ "These two files replace the device and version chosen on the basic page." : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "^[%lld setting](inflect: true) changed"+ "value" : "These two files replace the device and version chosen on the basic page."}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "%lld 項目を変更"+ "value" : "この 2 つのファイルが、基本設定で選んだデバイスとバージョンの代わりに使われます。"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "%lld개 항목 변경됨"+ "value" : "이 두 파일이 기본 설정에서 선택한 기기와 버전을 대신합니다."}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Đã thay đổi %lld mục"+ "value" : "Hai tệp này thay cho thiết bị và phiên bản đã chọn trong cài đặt cơ bản."}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "已更改 %lld 项"+ "value" : "这两个文件会取代基本设置中选择的设备和版本。"}}}},- "%lld cores · %lld GB memory · %lld GB disk" : {+ "The device and version are chosen on the basic page; cloudOS goes with them." : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "%1$lld cores · %2$lld GB memory · %3$lld GB disk"+ "value" : "The device and version are chosen on the basic page; cloudOS goes with them."}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "%1$lld コア · メモリ %2$lld GB · ディスク %3$lld GB"+ "value" : "デバイスとバージョンは基本設定で選択し、cloudOS はそれに合わせて決まります。"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "%1$lld코어 · 메모리 %2$lld GB · 디스크 %3$lld GB"+ "value" : "기기와 버전은 기본 설정에서 선택하며, cloudOS는 그에 맞춰 정해집니다."}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "%1$lld lõi · %2$lld GB bộ nhớ · %3$lld GB ổ đĩa"+ "value" : "Thiết bị và phiên bản được chọn trong cài đặt cơ bản; cloudOS đi kèm theo đó."}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "%1$lld 核 · %2$lld GB 内存 · %3$lld GB 磁盘"+ "value" : "设备和版本在基本设置中选择,cloudOS 随之匹配。"}}}},- "Recommended firmware pairings for %@, with %@." : {+ "Slim System is off, so the template keeps every file, service and app." : {"localizations" : {"en" : {"stringUnit" : {"state" : "translated",- "value" : "Recommended firmware pairings for %1$@, with %2$@."+ "value" : "Slim System is off, so the template keeps every file, service and app."}},"ja" : {"stringUnit" : {"state" : "translated",- "value" : "%1$@ の推奨ファームウェアの組み合わせです。%2$@ と組み合わせます。"+ "value" : "「システムを軽量化」がオフのため、テンプレートはすべてのファイル、サービス、App を保持します。"}},"ko" : {"stringUnit" : {"state" : "translated",- "value" : "%1$@의 권장 펌웨어 조합이며 %2$@와 함께 사용합니다."+ "value" : "시스템 간소화가 꺼져 있으므로 템플릿은 모든 파일, 서비스, 앱을 유지합니다."}},"vi" : {"stringUnit" : {"state" : "translated",- "value" : "Các cặp firmware khuyến nghị cho %1$@, đi kèm %2$@."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "%1$@ 的推荐固件组合,搭配 %2$@。"- }- }- }- },- "Choose an iPhone IPSW and a cloudOS IPSW in Advanced Options." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Choose an iPhone IPSW and a cloudOS IPSW in Advanced Options."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "「詳細オプション」で iPhone IPSW と cloudOS IPSW を選択してください。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "고급 옵션에서 iPhone IPSW와 cloudOS IPSW를 선택하십시오."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Chọn IPSW iPhone và IPSW cloudOS trong Tùy chọn nâng cao."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "请在“高级选项”中选择 iPhone IPSW 和 cloudOS IPSW。"- }- }- }- },- "Without a template the machine is not slimmed. Turn templates on in Advanced Options." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Without a template the machine is not slimmed. Turn templates on in Advanced Options."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "テンプレートを使わない場合、マシンは軽量化されません。「詳細オプション」でテンプレートをオンにしてください。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "템플릿 없이 만든 머신은 간소화되지 않습니다. 고급 옵션에서 템플릿을 켜십시오."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Không có mẫu thì máy ảo không được tinh gọn. Hãy bật mẫu trong Tùy chọn nâng cao."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "不使用模板时,虚拟机不会精简。请在“高级选项”中开启模板。"- }- }- }- },- "Cloned from a shared template that trims system files, unneeded services and system apps once. Setup Assistant is skipped." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Cloned from a shared template that trims system files, unneeded services and system apps once. Setup Assistant is skipped."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "システムファイル、不要なサービス、システム App を一度だけ削減した共有テンプレートから複製します。設定アシスタントはスキップされます。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "시스템 파일, 불필요한 서비스, 시스템 앱을 한 번 정리한 공유 템플릿에서 복제합니다. 설정 지원은 건너뜁니다."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Nhân bản từ một mẫu dùng chung đã cắt giảm tệp hệ thống, dịch vụ không cần và ứng dụng hệ thống một lần. Trợ lý thiết lập được bỏ qua."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "从共享模板克隆,模板只裁剪一次系统文件、不需要的服务和系统 App。会跳过设置助理。"- }- }- }- },- "The machine is created in a folder named after it inside this location." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "The machine is created in a folder named after it inside this location."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "マシンは、この場所の中にマシン名のフォルダとして作成されます。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "머신은 이 위치 안에 머신 이름으로 된 폴더로 생성됩니다."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Máy ảo được tạo trong một thư mục mang tên của nó, bên trong vị trí này."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "虚拟机会创建在此位置下以其名称命名的文件夹里。"- }- }- }- },- "These two files replace the device and version chosen on the basic page." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "These two files replace the device and version chosen on the basic page."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "この 2 つのファイルが、基本設定で選んだデバイスとバージョンの代わりに使われます。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "이 두 파일이 기본 설정에서 선택한 기기와 버전을 대신합니다."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Hai tệp này thay cho thiết bị và phiên bản đã chọn trong cài đặt cơ bản."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "这两个文件会取代基本设置中选择的设备和版本。"- }- }- }- },- "The device and version are chosen on the basic page; cloudOS goes with them." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "The device and version are chosen on the basic page; cloudOS goes with them."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "デバイスとバージョンは基本設定で選択し、cloudOS はそれに合わせて決まります。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "기기와 버전은 기본 설정에서 선택하며, cloudOS는 그에 맞춰 정해집니다."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Thiết bị và phiên bản được chọn trong cài đặt cơ bản; cloudOS đi kèm theo đó."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "设备和版本在基本设置中选择,cloudOS 随之匹配。"- }- }- }- },- "Slim System is off, so the template keeps every file, service and app." : {- "localizations" : {- "en" : {- "stringUnit" : {- "state" : "translated",- "value" : "Slim System is off, so the template keeps every file, service and app."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "「システムを軽量化」がオフのため、テンプレートはすべてのファイル、サービス、App を保持します。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "시스템 간소화가 꺼져 있으므로 템플릿은 모든 파일, 서비스, 앱을 유지합니다."- }- },- "vi" : {- "stringUnit" : {- "state" : "translated",- "value" : "Tinh gọn hệ thống đang tắt, nên mẫu giữ lại mọi tệp, dịch vụ và ứng dụng."+ "value" : "Tinh gọn hệ thống đang tắt, nên mẫu giữ lại mọi tệp, dịch vụ và ứng dụng."}},"zh-Hans" : {@@ -18868,6 +16752,582 @@}}}+ },+ "Allow vphone-launchpad in Privacy & Security → Developer Tools." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Allow vphone-launchpad in Privacy & Security → Developer Tools." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "「プライバシーとセキュリティ」→「デベロッパツール」で vphone-launchpad を許可してください。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "개인정보 보호 및 보안 → 개발자 도구에서 vphone-launchpad를 허용하십시오." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Hãy cho phép vphone-launchpad trong Quyền riêng tư & Bảo mật → Công cụ dành cho nhà phát triển." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "在“隐私与安全性”→“开发者工具”中允许 vphone-launchpad。" } }+ }+ },+ "Checks" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Checks" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "チェック" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "확인 항목" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Kiểm tra" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "检查项" } }+ }+ },+ "No versions available." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "No versions available." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "利用可能なバージョンはありません。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "사용 가능한 버전이 없습니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Không có phiên bản nào." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "无可用版本。" } }+ }+ },+ "Quit and open Launchpad again, if access granted in Settings does not show here" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Quit and open Launchpad again, if access granted in Settings does not show here" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "設定で許可しても反映されない場合は、Launchpad を終了して開き直します" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "설정에서 허용한 접근이 여기에 표시되지 않으면 Launchpad를 종료하고 다시 엽니다" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Thoát và mở lại Launchpad nếu quyền đã cấp trong Cài đặt chưa hiển thị ở đây" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "如果在设置中授予的权限没有在这里显示,退出并重新打开 Launchpad" } }+ }+ },+ "Relaunch" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Relaunch" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "再起動" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "다시 실행" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Khởi chạy lại" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "重新启动" } }+ }+ },+ "%@ use this version and will be marked Damaged until you choose another Core Bundle for them or install it again." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "%@ use this version and will be marked Damaged until you choose another Core Bundle for them or install it again." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "%@ はこのバージョンを使用しています。別の Core Bundle を選ぶか再インストールするまで「破損」と表示されます。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "%@에서 이 버전을 사용합니다. 다른 Core Bundle을 선택하거나 다시 설치할 때까지 '손상됨'으로 표시됩니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "%@ đang dùng phiên bản này và sẽ bị đánh dấu Hỏng cho đến khi bạn chọn Core Bundle khác hoặc cài lại." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "%@ 正在使用此版本。在为它们选择其他核心 Bundle 或重新安装之前,它们将标记为“已损坏”。" } }+ }+ },+ "Damaged" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Damaged" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "破損" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "손상됨" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Hỏng" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "已损坏" } }+ }+ },+ "Its Core Bundle is not installed. Choose Change Core Bundle… to run it with another version." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Its Core Bundle is not installed. Choose Change Core Bundle… to run it with another version." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "この Core Bundle はインストールされていません。「Core Bundle を変更…」で別のバージョンを選ぶと実行できます。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "해당 Core Bundle이 설치되어 있지 않습니다. 'Core Bundle 변경…'에서 다른 버전을 선택하면 실행할 수 있습니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Core Bundle của máy chưa được cài đặt. Chọn Thay đổi Core Bundle… để chạy bằng phiên bản khác." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "它的核心 Bundle 未安装。选择“更改核心 Bundle…”以使用其他版本运行。" } }+ }+ },+ "These machines are running from it: %@. Stop them first." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "These machines are running from it: %@. Stop them first." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "次のマシンがこのバージョンで動作中です: %@。先に停止してください。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "다음 머신이 이 버전으로 실행 중입니다: %@. 먼저 중지하십시오." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Các máy sau đang chạy từ phiên bản này: %@. Hãy dừng chúng trước." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "以下机器正在使用此版本运行:%@。请先停止它们。" } }+ }+ },+ "Available once the machine is created." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Available once the machine is created." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "マシンの作成後に利用できます。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "머신이 생성된 후 사용할 수 있습니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Có sẵn sau khi máy được tạo." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "机器创建完成后可用。" } }+ }+ },+ "Page" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Page" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "ページ" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "페이지" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Trang" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "页面" } }+ }+ },+ "Force stopping…" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Force stopping…" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "強制停止中…" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "강제 중지 중…" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Đang buộc dừng…" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "正在强制停止…" } }+ }+ },+ "Stop %@. Hold Option to force stop." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Stop %@. Hold Option to force stop." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "%@ を停止します。Option キーを押しながらクリックすると強制停止します。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "%@을(를) 중지합니다. Option 키를 누른 채 클릭하면 강제 중지합니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Dừng %@. Giữ Option để buộc dừng." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "停止“%@”。按住 Option 键点按可强制停止。" } }+ }+ },+ "Unable to Force Stop %@" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Unable to Force Stop %@" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "%@ を強制停止できません" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "%@을(를) 강제 중지할 수 없음" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Không thể buộc dừng %@" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "无法强制停止“%@”" } }+ }+ },+ "Update the guest environment to match the host programs" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Update the guest environment to match the host programs" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "ゲスト環境をホストプログラムに合わせて更新します" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "호스트 프로그램에 맞게 게스트 환경을 업데이트합니다" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Cập nhật môi trường máy khách cho khớp với chương trình máy chủ" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "更新客户机环境,使其与主机程序一致" } }+ }+ },+ "New…" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "New…" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "新規…" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "새로 만들기…" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Mới…" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "新建…" } }+ }+ },+ "Loading…" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Loading…" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "読み込み中…" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "로드 중…" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Đang tải…" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "正在载入…" } }+ }+ },+ "Downloaded Firmware" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Downloaded Firmware" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "ダウンロード済みのファームウェア" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "다운로드한 펌웨어" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Firmware đã tải về" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "已下载的固件" } }+ }+ },+ "Downloaded Firmware…" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Downloaded Firmware…" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "ダウンロード済みのファームウェア…" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "다운로드한 펌웨어…" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Firmware đã tải về…" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "已下载的固件…" } }+ }+ },+ "No Downloaded Firmware" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "No Downloaded Firmware" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "ダウンロード済みのファームウェアはありません" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "다운로드한 펌웨어 없음" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Không có firmware đã tải về" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "没有已下载的固件" } }+ }+ },+ "Choose an exported machine archive (.vpea)." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Choose an exported machine archive (.vpea)." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "書き出したマシンのアーカイブ(.vpea)を選択してください。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "내보낸 머신 아카이브(.vpea)를 선택하세요." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Chọn một bản lưu trữ máy đã xuất (.vpea)." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "选择导出的虚拟机归档(.vpea)。" } }+ }+ },+ "Creates a .vpea archive for each machine in the folder you choose." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Creates a .vpea archive for each machine in the folder you choose." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "選択したフォルダに、マシンごとの .vpea アーカイブを作成します。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "선택한 폴더에 머신마다 .vpea 아카이브를 만듭니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Tạo một bản lưu trữ .vpea cho mỗi máy trong thư mục bạn chọn." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "在你选择的文件夹中为每台虚拟机创建一个 .vpea 归档。" } }+ }+ },+ "Creates a .vpea archive." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Creates a .vpea archive." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : ".vpea アーカイブを作成します。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : ".vpea 아카이브를 만듭니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Tạo một bản lưu trữ .vpea." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "创建一个 .vpea 归档。" } }+ }+ },+ "Delete %lld IPSWs?" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Delete %lld IPSWs?" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "%lld 個の IPSW を削除しますか?" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "IPSW %lld개를 삭제하겠습니까?" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Xóa %lld IPSW?" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "删除 %lld 个 IPSW?" } }+ }+ },+ "Delete %lld Snapshots?" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Delete %lld Snapshots?" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "%lld 個のスナップショットを削除しますか?" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "스냅샷 %lld개를 삭제하겠습니까?" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Xóa %lld bản chụp nhanh?" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "删除 %lld 个快照?" } }+ }+ },+ "Delete %lld Templates?" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Delete %lld Templates?" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "%lld 個のテンプレートを削除しますか?" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "템플릿 %lld개를 삭제하겠습니까?" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Xóa %lld mẫu?" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "删除 %lld 个模板?" } }+ }+ },+ "Delete the selected IPSWs from the IPSW cache." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Delete the selected IPSWs from the IPSW cache." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "選択した IPSW を IPSW キャッシュから削除します。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "선택한 IPSW를 IPSW 캐시에서 삭제합니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Xóa các IPSW đã chọn khỏi bộ nhớ đệm IPSW." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "从 IPSW 缓存中删除所选的 IPSW。" } }+ }+ },+ "Delete the selected templates. Machines created from them keep working." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Delete the selected templates. Machines created from them keep working." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "選択したテンプレートを削除します。そこから作成したマシンは引き続き動作します。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "선택한 템플릿을 삭제합니다. 이 템플릿으로 만든 머신은 계속 작동합니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Xóa các mẫu đã chọn. Các máy tạo từ chúng vẫn hoạt động." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "删除所选模板。从它们创建的虚拟机仍可正常使用。" } }+ }+ },+ "Their files are removed. The machine itself is not changed. This cannot be undone." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Their files are removed. The machine itself is not changed. This cannot be undone." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "それらのファイルは削除されます。マシン自体は変更されません。この操作は取り消せません。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "해당 파일이 제거됩니다. 머신 자체는 변경되지 않습니다. 이 작업은 실행 취소할 수 없습니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Các tệp của chúng sẽ bị xóa. Bản thân máy không thay đổi. Không thể hoàn tác." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "它们的文件会被移除,虚拟机本身不受影响。此操作无法撤销。" } }+ }+ },+ "Turn Off" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Turn Off" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "オフにする" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "끄기" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Tắt" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "关闭" } }+ }+ },+ "Turn On" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Turn On" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "オンにする" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "켜기" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Bật" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "打开" } }+ }+ },+ "^[%lld patch](inflect: true) selected. Control-click to turn them on or off together." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "^[%lld patch](inflect: true) selected. Control-click to turn them on or off together." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "%lld 個のパッチを選択中。Control キーを押しながらクリックすると、まとめてオン/オフできます。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "패치 %lld개 선택됨. Control-클릭하여 한꺼번에 켜거나 끌 수 있습니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Đã chọn %lld bản vá. Control-click để bật hoặc tắt cùng lúc." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "已选择 %lld 个补丁。按住 Control 点按可一起打开或关闭。" } }+ }+ },+ "%@ Added" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "%@ Added" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "%@ を追加しました" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "%@ 추가됨" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Đã thêm %@" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "已添加 %@" } }+ }+ },+ "%@ Is Already Downloaded" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "%@ Is Already Downloaded" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "%@ はダウンロード済みです" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "%@은(는) 이미 다운로드되었습니다" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "%@ đã được tải về" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "%@ 已下载" } }+ }+ },+ "%@ is not in the firmware catalog, so New Machine cannot use it from the IPSW cache. Choose it as a custom IPSW in New Machine instead." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "%@ is not in the firmware catalog, so New Machine cannot use it from the IPSW cache. Choose it as a custom IPSW in New Machine instead." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "%@ はファームウェアカタログにないため、新規マシンは IPSW キャッシュから使用できません。代わりに新規マシンでカスタム IPSW として選択してください。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "%@은(는) 펌웨어 카탈로그에 없으므로 새 머신이 IPSW 캐시에서 사용할 수 없습니다. 대신 새 머신에서 사용자 지정 IPSW로 선택하세요." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "%@ không có trong danh mục firmware, nên Máy mới không thể dùng nó từ bộ nhớ đệm IPSW. Hãy chọn nó làm IPSW tùy chỉnh trong Máy mới." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "%@ 不在固件目录中,新建虚拟机无法从 IPSW 缓存使用它。请在新建虚拟机中将它选为自定 IPSW。" } }+ }+ },+ "Adding IPSW" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Adding IPSW" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "IPSW を追加中" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "IPSW 추가 중" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Đang thêm IPSW" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "正在添加 IPSW" } }+ }+ },+ "Copying %@ into the IPSW cache…" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Copying %@ into the IPSW cache…" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "%@ を IPSW キャッシュにコピーしています…" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "%@을(를) IPSW 캐시로 복사하는 중…" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Đang sao chép %@ vào bộ nhớ đệm IPSW…" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "正在将 %@ 拷贝到 IPSW 缓存…" } }+ }+ },+ "It is not an IPSW, or its BuildManifest cannot be read." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "It is not an IPSW, or its BuildManifest cannot be read." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "IPSW ではないか、BuildManifest を読み取れません。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "IPSW가 아니거나 BuildManifest를 읽을 수 없습니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Đây không phải IPSW, hoặc không đọc được BuildManifest của nó." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "它不是 IPSW,或无法读取其 BuildManifest。" } }+ }+ },+ "New Machine uses it from the IPSW cache without downloading it." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "New Machine uses it from the IPSW cache without downloading it." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "新規マシンはダウンロードせずに IPSW キャッシュから使用します。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "새 머신은 다운로드하지 않고 IPSW 캐시에서 사용합니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Máy mới dùng nó từ bộ nhớ đệm IPSW mà không cần tải về." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "新建虚拟机将直接从 IPSW 缓存使用它,无需下载。" } }+ }+ },+ "New Machine uses the copy in the IPSW cache." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "New Machine uses the copy in the IPSW cache." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "新規マシンは IPSW キャッシュ内のコピーを使用します。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "새 머신은 IPSW 캐시에 있는 사본을 사용합니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Máy mới dùng bản sao trong bộ nhớ đệm IPSW." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "新建虚拟机会使用 IPSW 缓存中的副本。" } }+ }+ },+ "The firmware catalog could not be read. Install a Core Bundle in Core Bundle, then try again." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "The firmware catalog could not be read. Install a Core Bundle in Core Bundle, then try again." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "ファームウェアカタログを読み取れませんでした。「Core Bundle」で Core Bundle をインストールしてから、もう一度お試しください。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "펌웨어 카탈로그를 읽을 수 없습니다. Core Bundle에서 Core Bundle을 설치한 후 다시 시도하세요." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Không đọc được danh mục firmware. Hãy cài Core Bundle trong Core Bundle rồi thử lại." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "无法读取固件目录。请先在“Core Bundle”中安装 Core Bundle,然后重试。" } }+ }+ },+ "Unable to Add %@" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Unable to Add %@" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "%@ を追加できません" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "%@을(를) 추가할 수 없음" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Không thể thêm %@" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "无法添加 %@" } }+ }+ },+ "Created %@" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Created %@" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "作成日 %@" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "생성일 %@" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Tạo lúc %@" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "创建于 %@" } }+ }+ },+ "Use Template" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Use Template" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "テンプレートを使用" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "템플릿 사용" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Dùng mẫu" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "使用模板" } }+ }+ },+ "Storage" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Storage" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "ストレージ" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "저장 공간" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Lưu trữ" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "存储" } }+ }+ },+ "The guest has no network device and stays offline." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "The guest has no network device and stays offline." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "ゲストにはネットワークデバイスがなく、オフラインのままです。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "게스트에 네트워크 장치가 없어 오프라인 상태로 유지됩니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Máy khách không có thiết bị mạng và luôn ngoại tuyến." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "客户机没有网络设备,始终离线。" } }+ }+ },+ "The guest joins the network of one of this Mac's interfaces with an address of its own, so other devices on that network can reach it." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "The guest joins the network of one of this Mac's interfaces with an address of its own, so other devices on that network can reach it." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "ゲストはこの Mac のいずれかのインターフェイスのネットワークに独自のアドレスで参加するため、そのネットワーク上の他のデバイスからアクセスできます。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "게스트는 이 Mac의 인터페이스 중 하나의 네트워크에 자체 주소로 참여하므로 해당 네트워크의 다른 기기가 접근할 수 있습니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Máy khách tham gia mạng của một giao diện trên Mac này với địa chỉ riêng, nên các thiết bị khác trên mạng đó có thể truy cập nó." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "客户机以自己的地址加入这台 Mac 某个网络接口所在的网络,该网络上的其他设备可以访问它。" } }+ }+ },+ "The guest shares this Mac's connection through Virtualization's built-in NAT. Its traffic skips a VPN on the Mac." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "The guest shares this Mac's connection through Virtualization's built-in NAT. Its traffic skips a VPN on the Mac." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "ゲストは Virtualization の内蔵 NAT を通じてこの Mac の接続を共有します。そのトラフィックは Mac の VPN を経由しません。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "게스트는 Virtualization의 내장 NAT를 통해 이 Mac의 연결을 공유합니다. 트래픽은 Mac의 VPN을 거치지 않습니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Máy khách dùng chung kết nối của Mac này qua NAT tích hợp của Virtualization. Lưu lượng của nó không đi qua VPN trên Mac." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "客户机通过 Virtualization 内建的 NAT 共享这台 Mac 的网络连接,其流量不经过 Mac 上的 VPN。" } }+ }+ },+ "No template is available for this firmware. Turning this on saves a sample of the machine in the template library." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "No template is available for this firmware. Turning this on saves a sample of the machine in the template library." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "このファームウェアに使えるテンプレートはありません。オンにすると、仮想マシンのサンプルがテンプレートライブラリに保存されます。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "이 펌웨어에 사용할 수 있는 템플릿이 없습니다. 켜면 가상 머신의 샘플이 템플릿 라이브러리에 저장됩니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Không có mẫu nào cho firmware này. Bật tùy chọn này sẽ lưu một bản mẫu của máy ảo vào thư viện mẫu." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "此固件没有可用的模板。打开此项会将虚拟机的样本存入模板库。" } }+ }+ },+ "Set up and slim system" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Set up and slim system" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "システムをセットアップして精簡" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "시스템 설정 및 슬림화" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Thiết lập và tinh gọn hệ thống" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "设置并精简系统" } }+ }+ },+ "The machine is restored on its own, with keys of its own." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "The machine is restored on its own, with keys of its own." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "マシンは独自のキーで個別に復元されます。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "머신은 자체 키로 개별 복원됩니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Máy được khôi phục riêng, với khóa của riêng nó." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "虚拟机单独恢复,使用自己的密钥。" } }+ }+ },+ "The machine is restored on its own, with keys of its own. It starts at Setup Assistant." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "The machine is restored on its own, with keys of its own. It starts at Setup Assistant." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "マシンは独自のキーで個別に復元され、設定アシスタントから始まります。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "머신은 자체 키로 개별 복원되며 설정 지원에서 시작합니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Máy được khôi phục riêng, với khóa của riêng nó, và bắt đầu ở Trợ lý thiết lập." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "虚拟机单独恢复,使用自己的密钥,并从设置助理开始。" } }+ }+ },+ "Without a template the machine is slimmed on its own, with a setup boot of its own. Setup Assistant is skipped." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Without a template the machine is slimmed on its own, with a setup boot of its own. Setup Assistant is skipped." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "テンプレートを使わない場合、マシンは自身のセットアップ起動で個別に精簡されます。設定アシスタントはスキップされます。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "템플릿 없이 머신은 자체 설정 부팅으로 개별적으로 슬림화됩니다. 설정 지원은 건너뜁니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Không dùng mẫu, máy được tinh gọn riêng với một lần khởi động thiết lập của chính nó. Trợ lý thiết lập được bỏ qua." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "不使用模板时,虚拟机会通过自己的一次设置启动单独精简,并跳过设置助理。" } }+ }+ },+ "Choose a Library" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Choose a Library" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "ライブラリを選択" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "보관함 선택" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Chọn thư viện" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "选择资料库" } }+ }+ },+ "Choose the folder new machines are created in" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Choose the folder new machines are created in" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "新しいマシンを作成するフォルダを選択します" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "새 머신을 만들 폴더를 선택합니다" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Chọn thư mục để tạo máy mới" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "选择新虚拟机的创建位置" } }+ }+ },+ "Library Changed" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Library Changed" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "ライブラリを変更しました" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "보관함이 변경됨" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Đã đổi thư viện" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "资料库已更改" } }+ }+ },+ "Machines in %@ are slower to create from templates, clone and snapshot, because each copy writes the whole disk instead of sharing it, and they take much more space." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Machines in %@ are slower to create from templates, clone and snapshot, because each copy writes the whole disk instead of sharing it, and they take much more space." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "%@ のマシンは、コピーのたびにディスク全体を書き込むため、テンプレートからの作成、複製、スナップショットが遅くなり、必要な容量も大幅に増えます。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "%@의 머신은 복사할 때마다 디스크 전체를 기록하므로 템플릿에서 만들기, 복제, 스냅샷이 느려지고 훨씬 많은 공간을 차지합니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Các máy trong %@ sẽ tạo từ mẫu, nhân bản và chụp nhanh chậm hơn, vì mỗi bản sao ghi toàn bộ ổ đĩa thay vì dùng chung, và chiếm nhiều dung lượng hơn." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "%@ 中的虚拟机从模板创建、克隆和快照都会更慢,因为每次复制都会写入整个磁盘而不是共享,占用的空间也会多得多。" } }+ }+ },+ "New machines are created in %@. Launchpad does not move machines: to keep using the ones in %@, quit Launchpad and move their folders into the new library yourself. Launchpad relaunches to use the new library." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "New machines are created in %1$@. Launchpad does not move machines: to keep using the ones in %2$@, quit Launchpad and move their folders into the new library yourself. Launchpad relaunches to use the new library." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "新しいマシンは %1$@ に作成されます。Launchpad はマシンを移動しません。%2$@ にあるマシンを引き続き使うには、Launchpad を終了し、そのフォルダを自分で新しいライブラリに移動してください。Launchpad は新しいライブラリを使うために再起動します。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "새 머신은 %1$@에 만들어집니다. Launchpad는 머신을 이동하지 않습니다. %2$@에 있는 머신을 계속 사용하려면 Launchpad를 종료하고 해당 폴더를 직접 새 보관함으로 옮기세요. Launchpad는 새 보관함을 사용하기 위해 다시 실행됩니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Máy mới sẽ được tạo trong %1$@. Launchpad không di chuyển máy: để tiếp tục dùng các máy trong %2$@, hãy thoát Launchpad và tự chuyển thư mục của chúng vào thư viện mới. Launchpad sẽ khởi chạy lại để dùng thư viện mới." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "新虚拟机将创建在 %1$@。Launchpad 不会移动虚拟机:如需继续使用 %2$@ 中的虚拟机,请退出 Launchpad,自行将它们的文件夹移到新资料库中。Launchpad 将重新启动以使用新资料库。" } }+ }+ },+ "New machines are created in this folder. Machines already in the current library are not moved." : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "New machines are created in this folder. Machines already in the current library are not moved." } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "新しいマシンはこのフォルダに作成されます。現在のライブラリにあるマシンは移動されません。" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "새 머신은 이 폴더에 만들어집니다. 현재 보관함에 있는 머신은 이동되지 않습니다." } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Máy mới sẽ được tạo trong thư mục này. Các máy đã có trong thư viện hiện tại không bị di chuyển." } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "新虚拟机会创建在此文件夹中。当前资料库中的虚拟机不会被移动。" } }+ }+ },+ "Show Current Library" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Show Current Library" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "現在のライブラリを表示" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "현재 보관함 보기" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Hiện thư viện hiện tại" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "显示当前资料库" } }+ }+ },+ "This Volume Cannot Clone Files" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "This Volume Cannot Clone Files" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "このボリュームはファイルを複製(クローン)できません" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "이 볼륨은 파일을 복제할 수 없습니다" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Ổ đĩa này không thể nhân bản tệp" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "此宗卷不支持文件克隆" } }+ }+ },+ "Unable to Use %@" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Unable to Use %@" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "%@ を使用できません" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "%@을(를) 사용할 수 없음" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Không thể dùng %@" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "无法使用 %@" } }+ }+ },+ "Use Anyway" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Use Anyway" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "このまま使用" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "그래도 사용" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Vẫn dùng" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "仍然使用" } }+ }+ },+ "Use as Library" : {+ "localizations" : {+ "en" : { "stringUnit" : { "state" : "translated", "value" : "Use as Library" } },+ "ja" : { "stringUnit" : { "state" : "translated", "value" : "ライブラリとして使用" } },+ "ko" : { "stringUnit" : { "state" : "translated", "value" : "보관함으로 사용" } },+ "vi" : { "stringUnit" : { "state" : "translated", "value" : "Dùng làm thư viện" } },+ "zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "用作资料库" } }+ }}},"version" : "1.0"diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadChangeBundleView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadChangeBundleView.swiftindex 597248f4..a61fd7b1 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadChangeBundleView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadChangeBundleView.swift@@ -64,7 +64,6 @@ struct VPhoneLaunchpadChangeBundleView: View {.keyboardShortcut(.defaultAction).disabled(!canApply)}- .frame(width: 460).fixedSize(horizontal: false, vertical: true).onAppear {// The machines' own version when they share one, else the default.diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadConsoleView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadConsoleView.swiftindex d97fe12f..cd305492 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadConsoleView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadConsoleView.swift@@ -9,7 +9,7 @@ struct VPhoneLaunchpadConsoleView: View {var body: some View {VPhoneLaunchpadSheet(Text(title)) {VPhoneLaunchpadLogTerminal(url: url)- .frame(minWidth: 900, maxWidth: .infinity, minHeight: 560, maxHeight: .infinity)+ .frame(maxWidth: .infinity, minHeight: 560, maxHeight: .infinity).padding(.horizontal, 16).padding(.vertical, 12)} actions: {diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPipeline.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPipeline.swiftindex e7c3cf70..0e8b06cd 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPipeline.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPipeline.swift@@ -529,6 +529,12 @@ final class VPhoneLaunchpadCreationPipeline {}defer { setupStage = nil }_ = try await runReporting(VPhoneLaunchpadTemplateCommands.setup(name, options.slimming) + library, onLine: stage)+ // Slimmed without a template: the record the setup boot wrote is+ // for adopting, which this machine is not, so it goes and the+ // machine is an ordinary one, as a clone is.+ if !plan.usesTemplate {+ try? FileManager.default.removeItem(at: target.url.appendingPathComponent("Template.plist"))+ }case .adoptTemplate:try await adoptTemplate(target, runReporting, commandLine: commandLine)diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPlan.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPlan.swiftindex 2144d150..a0f7ff5d 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPlan.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPlan.swift@@ -14,9 +14,11 @@ nonisolated enum VPhoneLaunchpadCreationStep: Int, CaseIterable, Identifiable, Ccase restorecase stopDFUcase installCFW- /// `vm template trim` on the stopped template build.+ /// `vm template trim` on the stopped template build, or on the machine+ /// itself when it is slimmed without a template.case trimTemplate- /// `vm template setup`: the template's one boot, headless.+ /// `vm template setup`: the template's one boot, headless; or the+ /// machine's, slimming it without a template.case setUpTemplate/// `vm template adopt`: the build becomes the frozen template.case adoptTemplate@@ -47,7 +49,7 @@ nonisolated enum VPhoneLaunchpadCreationStep: Int, CaseIterable, Identifiable, Ccase .stopDFU: String(localized: "Stop machine")case .installCFW: String(localized: "Install custom firmware")case .trimTemplate: String(localized: "Trim system files")- case .setUpTemplate: String(localized: "Set up template")+ case .setUpTemplate: String(localized: "Set up and slim system")case .adoptTemplate: String(localized: "Save template")case .cloneTemplate: String(localized: "Create machine from template")case .applyGuestPatches: String(localized: "Apply guest patches")@@ -111,7 +113,12 @@ nonisolated struct VPhoneLaunchpadCreationPlan: Hashable, Sendable {var steps: [VPhoneLaunchpadCreationStep] {let restore: [VPhoneLaunchpadCreationStep] = [.create, .prepare, .patch, .bootDFU, .waitDFU, .restore, .stopDFU, .installCFW]guard usesTemplate else {- return restore + [.firstBoot]+ // Slimmed on its own: the same trim and setup boot a template+ // build runs, on the machine itself, which is then not adopted.+ guard slimming.slim else {+ return restore + [.firstBoot]+ }+ return restore + (slimming.trimArguments != nil ? [.trimTemplate] : []) + [.setUpTemplate, .firstBoot]}let machine: [VPhoneLaunchpadCreationStep] = [.cloneTemplate] + (appliesGuestPatches ? [.applyGuestPatches] : []) + [.firstBoot]if foundTemplate == true {diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadDiskUsage.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadDiskUsage.swiftindex 4e6291f5..90e01303 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadDiskUsage.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadDiskUsage.swift@@ -262,6 +262,14 @@ actor VPhoneLaunchpadDiskMeter {return files}+ /// Whether a library's `.templates` holds a `.building-…` folder: a+ /// template build under way, or one that stopped before it finished.+ nonisolated static func hasTemplateBuilds(in libraryRoot: String) -> Bool {+ let templates = URL(fileURLWithPath: libraryRoot, isDirectory: true).appendingPathComponent(".templates", isDirectory: true)+ let names = (try? FileManager.default.contentsOfDirectory(atPath: templates.path)) ?? []+ return names.contains { $0.hasPrefix(".building-") }+ }+/// The template folders of a library: `.templates/<12 hex>`. Builds/// (`.building-…`) are left out; they are written while they exist.nonisolated static func templateFolders(in libraryRoot: String) -> [String] {diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadGuestSystemView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadGuestSystemView.swiftindex 8a54c706..a3aff3c5 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadGuestSystemView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadGuestSystemView.swift@@ -89,7 +89,6 @@ struct VPhoneLaunchpadGuestSystemView: View {Button("Done") { dismiss() }.keyboardShortcut(.defaultAction)}- .frame(width: 480).fixedSize(horizontal: false, vertical: true).task(id: isRunning) {if isRunning {diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachine.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachine.swiftindex 1367907a..a7c0bdb6 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachine.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachine.swift@@ -70,18 +70,6 @@ nonisolated struct VPhoneLaunchpadMachine: Decodable, Hashable, Identifiable, Selet cloudOS: OSVersionlet variant: String?let device: String?-- /// The firmware this machine was restored with, named after the patch sets- /// it carries. `variant` itself is the value recorded at restore time and- /// keeps its old spelling, so a machine built before the rename still reads- /// correctly and needs no rebuild.- var firmwareName: String {- switch variant {- case "jb": String(localized: "Standard Custom Firmware")- case "exp": String(localized: "Experimental Custom Firmware")- default: String(localized: "Unknown Firmware")- }- }}let name: String@@ -119,16 +107,6 @@ nonisolated struct VPhoneLaunchpadMachine: Decodable, Hashable, Identifiable, SesyncsHostLocation, template, templateMatch}- /// The inspector's firmware line. A restore whose CFW install never- /// finished cannot boot, which matters more than which set it was meant for.- var firmwareName: String? {- guard let restoreInfo else { return nil }- if customFirmwareInstalled == false {- return String(localized: "Custom Firmware Not Installed")- }- return restoreInfo.firmwareName- }-/// Read from disk at launch time rather than from the last `vm list`, so a/// machine that was just installed is not refused on stale data. Mirrors/// `vm launch`: restore-info.json with no variant is an unfinished install.diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineActions.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineActions.swiftnew file mode 100644index 00000000..e7f08e61--- /dev/null+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineActions.swift@@ -0,0 +1,194 @@+import AppKit+import SwiftUI+import UniformTypeIdentifiers++/// The actions for one or more machines, shared by the toolbar's Actions+/// menu, the table's context menu and each machine's menu in the menu bar.+/// Several machines get the batch actions: one settings edit, export and+/// delete, which need every machine stopped, then start and stop.+///+/// Sheets and the delete confirmation belong to the machine list, so those+/// items leave a request on the model that the list presents. The menu bar+/// passes `willRequest` to open the window first.+struct VPhoneLaunchpadMachineActions: View {+ let machines: [VPhoneLaunchpadMachine]+ var willRequest: () -> Void = {}+ @Environment(VPhoneLaunchpadModel.self) private var model++ private var library: VPhoneLaunchpadMachineLibrary {+ model.machines+ }++ var body: some View {+ // Only while one of them is exporting or waiting to.+ let exporting = machines.filter { library.exports[$0.path] != nil }+ if !exporting.isEmpty {+ Button("Cancel Export") {+ for machine in exporting {+ library.cancelExport(machine.path)+ }+ }+ Divider()+ }+ if machines.count > 1 {+ let stopped = machines.filter { library.state(of: $0.path) == .stopped }+ let running = machines.filter { library.state(of: $0.path) == .running }+ let allStopped = stopped.count == machines.count+ Button("Settings…") { request(.settings(machines)) }+ .disabled(!allStopped)+ changeBundleButton+ Button("Export…") { request(.export(machines.map(\.path))) }+ .disabled(!allStopped)+ Button("Delete…", role: .destructive) { requestDeletion(machines.map(\.path)) }+ .disabled(!allStopped)+ Divider()+ Button("Start") { library.start(stopped) }+ .disabled(stopped.isEmpty)+ Button("Start Headless") { library.start(stopped, headless: true) }+ .disabled(stopped.isEmpty)+ Button("Stop") { library.stop(running) }+ .disabled(running.isEmpty)+ Divider()+ Button("Show in Finder") {+ NSWorkspace.shared.activateFileViewerSelecting(machines.map(\.path.url))+ }+ } else if let machine = machines.first {+ let state = library.state(of: machine.path)+ let isStopped = state == .stopped+ switch state {+ case .running:+ Button("Stop") { library.stop([machine]) }+ case .stopped:+ Button("Start") { library.start([machine]) }+ Button("Start Headless") { library.start([machine], headless: true) }+ case let .busy(activity):+ Text(activity)+ }+ Divider()+ Button("Settings…") { request(.settings([machine])) }+ .disabled(!isStopped)+ // It works on the running guest, and says so when it is not.+ Button("Guest System…") { request(.guestSystem(machine.path)) }+ .disabled(library.creation(for: machine.path)?.isRunning == true)+ changeBundleButton+ Button("Rename…") { request(.rename(machine.path)) }+ .disabled(!isStopped)+ Button("Clone…") { request(.clone(machine.path)) }+ .disabled(!isStopped)+ Button("Export…") { request(.export([machine.path])) }+ .disabled(!isStopped)+ // Open while the machine runs too, to read the list; taking,+ // reverting and deleting wait for it to stop.+ Button("Snapshots…") { request(.snapshots(machine.path)) }+ .disabled(library.creation(for: machine.path)?.isRunning == true)+ Button("Install Custom Firmware") {+ Task { await library.installCustomFirmware(machine.path) }+ }+ // Only for an unfinished install: that is when the restore tree it+ // reads is still there. A finished one removes it.+ .disabled(!isStopped || machine.customFirmwareInstalled != false)+ // The finished-install counterpart: redeploys the machine's own+ // bundle's guest resources without the restore tree.+ Button("Update Guest Environment") {+ Task { await library.updateGuestEnvironment(machine.path) }+ }+ .disabled(!isStopped || machine.restoreInfo == nil || machine.customFirmwareInstalled == false)+ Divider()+ Button("Show in Finder") {+ NSWorkspace.shared.activateFileViewerSelecting([machine.path.url])+ }+ Button("Open Console") { request(.console(machine.path)) }+ Button("Recent Commands") { request(.commands) }+ Button("Show Console Log") {+ NSWorkspace.shared.open(VPhoneLaunchpadMachineLibrary.consoleLog(machine.path))+ }+ Button("Show Patch Log") {+ NSWorkspace.shared.open(VPhoneLaunchpadMachineLibrary.consoleLog(machine.path, suffix: "-patch"))+ }+ .disabled(!FileManager.default.fileExists(atPath: VPhoneLaunchpadMachineLibrary.consoleLog(machine.path, suffix: "-patch").path))+ Divider()+ Button("Delete…", role: .destructive) { requestDeletion([machine.path]) }+ .disabled(!isStopped)+ }+ }++ /// Rebinding applies at the next start, so running machines may change+ /// too. A machine still being created gets its bundle from the pipeline.+ private var changeBundleButton: some View {+ Button("Change Core Bundle…") { request(.changeBundle(machines)) }+ .disabled(model.bundles.selectableVersions.isEmpty+ || machines.contains { library.creation(for: $0.path)?.isRunning == true })+ }++ private func request(_ sheet: VPhoneLaunchpadMachinesView.Sheet) {+ willRequest()+ model.machineSheetRequest = sheet+ }++ private func requestDeletion(_ paths: [VPhoneLaunchpadMachinePath]) {+ willRequest()+ model.deletionRequest = paths+ }+}++// MARK: - Start and stop++extension VPhoneLaunchpadMachineLibrary {+ /// Starts the machines one after another, without waiting.+ func start(_ machines: [VPhoneLaunchpadMachine], headless: Bool = false) {+ Task {+ for machine in machines {+ await start(machine.path, headless: headless)+ }+ }+ }++ /// Stops the machines together, without waiting. With Option held at the+ /// click, every Stop button force stops instead.+ func stop(_ machines: [VPhoneLaunchpadMachine]) {+ let force = NSEvent.modifierFlags.contains(.option)+ Task {+ await withTaskGroup(of: Void.self) { group in+ for machine in machines {+ group.addTask { force ? await self.forceStop(machine.path) : await self.stop(machine.path) }+ }+ }+ }+ }+}++// MARK: - Import++extension VPhoneLaunchpadMachineLibrary {+ /// File > Import… and the empty list's Import…: one archive at a time.+ func chooseImport() {+ let panel = NSOpenPanel()+ panel.title = String(localized: "Import Machine")+ panel.message = String(localized: "Choose an exported machine archive (.vpea).")+ panel.allowedContentTypes = Self.importableTypes+ panel.canChooseDirectories = false+ panel.allowsMultipleSelection = false+ panel.present { url in+ Task { await self.importArchive(url) }+ }+ }++ /// Imports the dropped files Import… would accept, one after another.+ /// False when there are none, so the drop is refused.+ func importDropped(_ urls: [URL]) -> Bool {+ let archives = urls.filter { url in+ url.isFileURL && Self.importableTypes.contains { type in+ UTType(filenameExtension: url.pathExtension)?.conforms(to: type) == true+ }+ }+ guard !archives.isEmpty, globalActivity == nil else {+ return false+ }+ Task {+ for archive in archives {+ await importArchive(archive)+ }+ }+ return true+ }+}diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swiftindex f685b547..38c5b1f0 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swift@@ -9,10 +9,13 @@ struct VPhoneLaunchpadMachineStateLabel: View {/// An export's or a creation's IPSW download progress, shown as a bar in/// place of the activity text, which becomes its help tag.var progress: Double?+ /// A stopped machine whose Core Bundle is not installed.+ var isDamaged = falsevar body: some View {let (status, text): (VPhoneLaunchpadStatus, String) = switch state {case .running: (.passed, String(localized: "Running"))+ case .stopped where isDamaged: (.failed, String(localized: "Damaged"))case .stopped: (.pending, String(localized: "Stopped"))case let .busy(activity): (.running, activity)}@@ -31,6 +34,7 @@ struct VPhoneLaunchpadMachineStateLabel: View {} icon: {VPhoneLaunchpadStatusIcon(status: status)}+ .help(isDamaged && state == .stopped ? String(localized: "Its Core Bundle is not installed. Choose Change Core Bundle… to run it with another version.") : "")}}}@@ -76,10 +80,7 @@ struct VPhoneLaunchpadMachineInspector: View {let machine: VPhoneLaunchpadMachinelet onShowProgress: (VPhoneLaunchpadMachinePath) -> Voidlet onOpenConsole: (VPhoneLaunchpadMachinePath) -> Void- var onChangeBundle: (VPhoneLaunchpadMachine) -> Void = { _ in }- var onOpenGuestSystem: (VPhoneLaunchpadMachinePath) -> Void = { _ in }@Environment(VPhoneLaunchpadModel.self) private var model- @State private var showsCommands = false@State private var patchCatalog: VPhoneLaunchpadPatchCatalog?@State private var patchCatalogError: String?/// The machine the catalogue above was read for, so another machine's@@ -89,6 +90,15 @@ struct VPhoneLaunchpadMachineInspector: View {@State private var editedPatches: VPhoneLaunchpadPatchSelection?/// Bumped after a save or an update, so the patches are read again.@State private var patchRevision = 0+ /// The page under the state summary. It stays as the selection moves to+ /// another machine.+ @State private var page = Page.general++ enum Page: Hashable {+ case general+ case hardware+ case patches+ }private var library: VPhoneLaunchpadMachineLibrary {model.machines@@ -104,117 +114,39 @@ struct VPhoneLaunchpadMachineInspector: View {VPhoneLaunchpadMachineStateLabel(state: library.state(of: machine.path),progress: library.progress(of: machine.path),+ isDamaged: library.isDamaged(machine.path),)}if let started = library.startedAt[machine.path] {LabeledContent("Started", value: started.formatted(date: .omitted, time: .shortened))}- if let firmwareName = machine.firmwareName {- LabeledContent("Firmware", value: firmwareName)- }- } header: {- Text(machine.name)- .font(.headline)- }-- Section("Firmware") {- if let info = machine.restoreInfo {- LabeledContent(machine.osName, value: "\(info.ios.version) (\(info.ios.build))")- LabeledContent("cloudOS", value: "\(info.cloudOS.version) (\(info.cloudOS.build))")- } else {- Text("Not restored").foregroundStyle(.secondary)- }- }-- coreBundleSection-- patchesSection-- Section("Hardware") {- LabeledContent("CPU", value: String(localized: "\(machine.cpuCount) cores"))- LabeledContent("Memory", value: VPhoneLaunchpadMachinesView.memory(machine.memoryMB))- LabeledContent("Disk", value: VPhoneLaunchpadMachinesView.disk(machine.diskSizeBytes))- if let usage = library.diskUsage[machine.path] {- if let exclusive = usage.exclusive {- LabeledContent("Exclusive") {- Text(VPhoneLaunchpadDiskUsage.format(exclusive))- .help(String(localized: "The blocks no other machine or template holds: what deleting it frees, once no local Time Machine snapshot keeps them. The rest is shared with its template or clones."))- }- }- LabeledContent("Allocated") {- Text(VPhoneLaunchpadDiskUsage.format(usage.allocated))- .help(String(localized: "Every block the machine's files hold, shared or not."))- }- }- LabeledContent("Network", value: machine.networkDescription)- if let address = machine.addressDescription {- LabeledContent("IPv4 Address", value: address)- }- if !machine.network.macAddress.isEmpty {- LabeledContent("MAC Address", value: machine.network.macAddress)- }- if let name = machine.network.localHostName {- LabeledContent("mDNS Name", value: "\(name).local")- }- ForEach(machine.network.portForwards ?? [], id: \.self) { forward in- LabeledContent("Port Forward", value: "\(forward.transport.uppercased()) \(forward.hostAddress ?? "127.0.0.1"):\(forward.hostPort) → \(forward.guestPort)")- }- if machine.unlocksAtStartup == true {- LabeledContent("Unlock at Startup", value: String(localized: "On"))- }- if machine.syncsHostLocation == true {- LabeledContent("Sync Host Location", value: String(localized: "On"))- }- }-- Section("Identity") {- if let udid = machine.udid {- value("UDID", udid)- }- if let origin = machine.templateOrigin {- LabeledContent("Template") {- templateLabel(origin)- .textSelection(.enabled)- }- }- value(- "Location",- VPhoneLaunchpadHostSetup.abbreviated(machine.path.url),- )- }-- Section {HStack {- Text("Service profile and removed system apps")- .foregroundStyle(.secondary)+ Picker("Page", selection: $page) {+ Text("General").tag(Page.general)+ Text("Hardware").tag(Page.hardware)+ Text("Patches").tag(Page.patches)+ }+ .pickerStyle(.segmented)+ .labelsHidden()Spacer()- Button("Guest System…") { onOpenGuestSystem(machine.path) }- .disabled(library.creation(for: machine.path)?.isRunning == true)+ Button("Open Console") { onOpenConsole(machine.path) }+ .fixedSize()}} header: {- Text("Guest System")+ Text(machine.name)+ .font(.headline)}- Section("Console") {- HStack {- Button {- onOpenConsole(machine.path)- } label: {- Label("Open Console", systemImage: "arrow.up.right")- }- Spacer()- Button("Recent Commands") { showsCommands = true }- }+ switch page {+ case .general: generalPage+ case .hardware: hardwarePage+ case .patches: patchesPage}}.formStyle(.grouped).task(id: patchReadKey) {await loadPatches()}- .sheet(isPresented: $showsCommands) {- VPhoneLaunchpadCommandHistoryView()- .environment(model)- }.sheet(item: $editedPatches) { initial inlet path = machine.pathVPhoneLaunchpadPatchSettingsView(@@ -231,6 +163,61 @@ struct VPhoneLaunchpadMachineInspector: View {}}+ // MARK: - Pages++ @ViewBuilder+ private var generalPage: some View {+ Section("Firmware") {+ if let info = machine.restoreInfo {+ LabeledContent(machine.osName, value: "\(info.ios.version) (\(info.ios.build))")+ LabeledContent("cloudOS", value: "\(info.cloudOS.version) (\(info.cloudOS.build))")+ } else {+ Text("Not restored").foregroundStyle(.secondary)+ }+ }++ coreBundleSection+ }++ @ViewBuilder+ private var hardwarePage: some View {+ Section("Hardware") {+ statGrid(hardwareStats)+ }++ Section("Network") {+ LabeledContent("Mode", value: machine.networkDescription)+ if let address = machine.addressDescription {+ LabeledContent("IPv4 Address", value: address)+ }+ if !machine.network.macAddress.isEmpty {+ LabeledContent("MAC Address", value: machine.network.macAddress)+ }+ if let name = machine.network.localHostName {+ LabeledContent("mDNS Name", value: "\(name).local")+ }+ ForEach(machine.network.portForwards ?? [], id: \.self) { forward in+ LabeledContent("Port Forward", value: "\(forward.transport.uppercased()) \(forward.hostAddress ?? "127.0.0.1"):\(forward.hostPort) → \(forward.guestPort)")+ }+ }++ Section("Identity") {+ if let udid = machine.udid {+ value("UDID", udid)+ }+ if let origin = machine.templateOrigin {+ LabeledContent("Template") {+ templateLabel(origin)+ .textSelection(.enabled)+ }+ }+ value(+ "Location",+ VPhoneLaunchpadHostSetup.abbreviated(machine.path.url),+ )+ }+ }+static var mixedHelp: String {String(localized: "The host programs and the guest environment come from different Core Bundles. Update the guest environment to match.")}@@ -262,10 +249,19 @@ struct VPhoneLaunchpadMachineInspector: View {binding?.bootChain ?? String(localized: "Unknown"),help: String(localized: "The Core Bundle that built the boot chain when the machine was created."),)- HStack {- Spacer()- Button("Change…") { onChangeBundle(machine) }- .disabled(model.bundles.selectableVersions.isEmpty || library.creation(for: machine.path)?.isRunning == true)+ // Only while the guest environment lags the host programs and an+ // update can run now; changing the version is in the actions menu.+ if binding?.hasMixedVersions == true, isInstalled,+ library.state(of: machine.path) == .stopped,+ machine.restoreInfo != nil, machine.customFirmwareInstalled != false+ {+ HStack {+ Spacer()+ Button("Update…") {+ Task { await library.updateGuestEnvironment(machine.path) }+ }+ .help("Update the guest environment to match the host programs")+ }}}}@@ -297,7 +293,7 @@ struct VPhoneLaunchpadMachineInspector: View {/// Apply to Guest updates the guest environment, which is what brings/// guest patches in line. Boot-chain patches only a restore changes.@ViewBuilder- private var patchesSection: some View {+ private var patchesPage: some View {if library.creation(for: machine.path)?.isRunning != true {Section("Patches") {if let catalog = patchCatalog, patchCatalogMachine == machine.path {@@ -374,6 +370,11 @@ struct VPhoneLaunchpadMachineInspector: View {.frame(maxWidth: .infinity)}}+ } else {+ Section("Patches") {+ Text("Available once the machine is created.")+ .foregroundStyle(.secondary)+ }}}@@ -449,6 +450,74 @@ struct VPhoneLaunchpadMachineInspector: View {}}+ // MARK: - Hardware grid++ private struct Stat {+ let title: LocalizedStringKey+ let value: String+ var help = ""+ }++ private var hardwareStats: [Stat] {+ var stats = [+ Stat(title: "CPU", value: String(localized: "\(machine.cpuCount) cores")),+ Stat(title: "Memory", value: VPhoneLaunchpadMachinesView.memory(machine.memoryMB)),+ Stat(title: "Disk", value: VPhoneLaunchpadMachinesView.disk(machine.diskSizeBytes)),+ ]+ if let usage = library.diskUsage[machine.path] {+ if let exclusive = usage.exclusive {+ stats.append(Stat(+ title: "Exclusive",+ value: VPhoneLaunchpadDiskUsage.format(exclusive),+ help: String(localized: "The blocks no other machine or template holds: what deleting it frees, once no local Time Machine snapshot keeps them. The rest is shared with its template or clones."),+ ))+ }+ stats.append(Stat(+ title: "Allocated",+ value: VPhoneLaunchpadDiskUsage.format(usage.allocated),+ help: String(localized: "Every block the machine's files hold, shared or not."),+ ))+ }+ if machine.unlocksAtStartup == true {+ stats.append(Stat(title: "Unlock at Startup", value: String(localized: "On")))+ }+ if machine.syncsHostLocation == true {+ stats.append(Stat(title: "Sync Host Location", value: String(localized: "On")))+ }+ return stats+ }++ /// Short values two to a row, each a caption over its value, so the+ /// section takes half the height of one row per value.+ private func statGrid(_ stats: [Stat]) -> some View {+ Grid(alignment: .leading, horizontalSpacing: 16, verticalSpacing: 10) {+ ForEach(Array(stride(from: 0, to: stats.count, by: 2)), id: \.self) { index in+ GridRow {+ statCell(stats[index])+ if index + 1 < stats.count {+ statCell(stats[index + 1])+ } else {+ Color.clear.gridCellUnsizedAxes([.horizontal, .vertical])+ }+ }+ }+ }+ .frame(maxWidth: .infinity, alignment: .leading)+ }++ private func statCell(_ stat: Stat) -> some View {+ VStack(alignment: .leading, spacing: 2) {+ Text(stat.title)+ .font(.caption)+ .foregroundStyle(.secondary)+ Text(stat.value)+ .monospacedDigit()+ .lineLimit(1)+ }+ .frame(maxWidth: .infinity, alignment: .leading)+ .help(stat.help)+ }+private func value(_ title: LocalizedStringKey, _ value: String) -> some View {LabeledContent(title) {Text(value)diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swiftindex f54c6ceb..0f24f28d 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift@@ -1,5 +1,6 @@import Foundationimport Observation+import UniformTypeIdentifiers/// The third stage: the VM library, driven entirely through `vphone-cli vm`.///@@ -333,6 +334,17 @@ final class VPhoneLaunchpadMachineLibrary {machines.filter { bundleVersion(for: $0.path) == version }.map(\.name)}+ /// Names of the machines bound to `version` that are not stopped.+ func activeMachineNames(boundTo version: String) -> [String] {+ machines.filter { bundleVersion(for: $0.path) == version && state(of: $0.path) != .stopped }.map(\.name)+ }++ /// True when the machine's Core Bundle is not installed, so it cannot+ /// run until it is given another one.+ func isDamaged(_ machine: Path) -> Bool {+ bundleVersion(for: machine).map { !bundles.selectableVersions.contains($0) } ?? false+ }+/// The binding on disk, or the listed copy when the file cannot be read.private func currentBinding(of machine: Path) -> VPhoneLaunchpadMachineBinding? {VPhoneLaunchpadMachineBinding.load(machine) ?? bindings[machine]@@ -678,6 +690,31 @@ final class VPhoneLaunchpadMachineLibrary {launched[machine]?.interrupt()}+ /// Kills the machine's VM processes, `vphone-vm` and Virtualization's VM+ /// service, without asking the guest or `vphone-cli`: for a guest that+ /// hangs or ignores a stop. They run as this user, so no helper is+ /// needed. The `vphone-cli` that launched it exits once they are gone.+ func forceStop(_ machine: Path) async {+ activities[machine] = String(localized: "Force stopping…")+ defer { activities[machine] = nil }+ let holders = await Task.detached {+ Self.diskHolders([machine])[machine, default: []].filter(\.runsMachine)+ }.value+ let refused = holders.filter { kill($0.pid, SIGKILL) != 0 && errno != ESRCH }+ if !refused.isEmpty {+ actionError = VPhoneLaunchpadError(+ String(localized: "Unable to Force Stop \(machine.name)"),+ detail: refused.map(\.description).joined(separator: "\n"),+ )+ }+ launched[machine]?.terminate()+ let deadline = Date().addingTimeInterval(5)+ while Date() < deadline, await isMachineRunning(machine) {+ try? await Task.sleep(for: .milliseconds(200))+ }+ await refresh()+ }+/// How long a guest gets to shut down before `vm stop` takes over.private static let guestShutdownTimeout: TimeInterval = 30@@ -844,7 +881,7 @@ final class VPhoneLaunchpadMachineLibrary {}let libraryRoots = roots.filter { $0 == libraryRoot || VPhoneLaunchpadMachineLocations.isAvailable($0) }let meter = diskMeter- let templatesMayOpen = self.templatesMayOpen+ let templatesMayOpen = templatesMayOpenlet mayOpenNow: @Sendable (String) async -> Bool = { [weak self] folder inawait self?.mayOpenDisk(inFolder: folder) ?? false}@@ -859,6 +896,7 @@ final class VPhoneLaunchpadMachineLibrary {)diskUsage = measured.usagetemplateUsage = measured.templates+ hasTemplates = measured.hasTemplatesdiskUsageMeasured = Date()isMeasuringDiskUsage = falseif isDiskUsageRequested {@@ -917,13 +955,15 @@ final class VPhoneLaunchpadMachineLibrary {templatesMayOpen: Bool,meter: VPhoneLaunchpadDiskMeter,mayOpenNow: @escaping @Sendable (String) async -> Bool,- ) async -> (usage: [Path: VPhoneLaunchpadDiskUsage], templates: [String: VPhoneLaunchpadDiskUsage]) {+ ) async -> (usage: [Path: VPhoneLaunchpadDiskUsage], templates: [String: VPhoneLaunchpadDiskUsage], hasTemplates: Bool) {// Templates are keyed as `usage(of:)` looks them up.var templateKeys: [String: String] = [:]+ var hasBuilds = falsefor root in libraryRoots {for folder in VPhoneLaunchpadDiskMeter.templateFolders(in: root) {templateKeys[folder] = URL(fileURLWithPath: folder).lastPathComponent + "@" + root}+ hasBuilds = hasBuilds || VPhoneLaunchpadDiskMeter.hasTemplateBuilds(in: root)}let folders = machineFolders + templateKeys.keys.sorted().map { VPhoneLaunchpadDiskMeter.Folder(path: $0, mayOpen: templatesMayOpen) }let measured = await meter.measure(folders, mayOpenNow: mayOpenNow)@@ -935,7 +975,7 @@ final class VPhoneLaunchpadMachineLibrary {for (folder, key) in templateKeys {templates[key] = measured[folder]}- return (usage, templates)+ return (usage, templates, !templateKeys.isEmpty || hasBuilds)}// MARK: - Templates@@ -950,6 +990,11 @@ final class VPhoneLaunchpadMachineLibrary {/// with the machines.private(set) var templateUsage: [String: VPhoneLaunchpadDiskUsage] = [:]+ /// Whether any library holds a template or a left-over build, from the+ /// disk meter's scan of `.templates` and from `refreshTemplates`. The+ /// Templates menu item is shown only then.+ private(set) var hasTemplates = false+func refreshTemplates() async {guard let commandLine = bundles.commandLine() else {templatesError = String(localized: "No Core Bundle version is installed. Install one in Core Bundle.")@@ -975,6 +1020,9 @@ final class VPhoneLaunchpadMachineLibrary {templates = found.sorted { $0.created > $1.created }templateBuilds = buildstemplatesError = errors.first+ if errors.isEmpty {+ hasTemplates = !found.isEmpty || !builds.isEmpty+ }refreshDiskUsage(force: true)}@@ -1062,7 +1110,7 @@ final class VPhoneLaunchpadMachineLibrary {/// Exports each machine to its destination file, one at a time: each/// export reads a whole disk image.- func export(_ items: [(machine: Path, destination: URL)], densest: Bool, includeIPSW: Bool) async {+ func export(_ items: [(machine: Path, destination: URL)], includeIPSW: Bool) async {for item in items {exports[item.machine] = Export()}@@ -1072,7 +1120,7 @@ final class VPhoneLaunchpadMachineLibrary {continue}let task = Task {- await runExport(item.machine, to: item.destination, densest: densest, includeIPSW: includeIPSW)+ await runExport(item.machine, to: item.destination, includeIPSW: includeIPSW)}exports[item.machine]?.task = taskawait task.value@@ -1092,11 +1140,9 @@ final class VPhoneLaunchpadMachineLibrary {}}- private func runExport(_ machine: Path, to destination: URL, densest: Bool, includeIPSW: Bool) async {+ private func runExport(_ machine: Path, to destination: URL, includeIPSW: Bool) async {+ // zstd, the default: Launchpad does not offer xz.var arguments = ["vm", "export", machine.name, "--out", destination.path] + machine.libraryArguments- if densest {- arguments.append("--max")- }if includeIPSW {arguments.append("--include-ipsw")}@@ -1110,6 +1156,12 @@ final class VPhoneLaunchpadMachineLibrary {}}+ /// What Import accepts: `.vpea`, and the `.tzst` and `.txz` names exports+ /// had before it. `vm import` detects the compressor, not the name.+ static var importableTypes: [UTType] {+ [.vphoneExportedArchive] + ["tzst", "txz"].compactMap { UTType(filenameExtension: $0) }+ }+func importArchive(_ archive: URL) async {await perform(String(localized: "Importing \(archive.lastPathComponent)"),diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLocations.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLocations.swiftindex 68012b8e..27788e50 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLocations.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLocations.swift@@ -3,22 +3,65 @@ import Darwinimport Foundation/// The folders machines live in. The default library (`VPHONE_LIBRARY_ROOT`,-/// else ~/.vphone/machines) is always one; New Machine can add others. Each-/// is passed to vphone-cli as `--library-root`.+/// else the folder chosen in Host Setup, else ~/.vphone/machines) is always+/// one; New Machine can add others. Each is passed to vphone-cli as+/// `--library-root`.////// Roots are canonical: the helper refuses a library path with a symbolic/// link in it, and comparing canonical paths keeps one folder from being/// listed twice under two spellings.nonisolated enum VPhoneLaunchpadMachineLocations {static let defaultRoot: String = {- let environment = ProcessInfo.processInfo.environment["VPHONE_LIBRARY_ROOT"].flatMap { $0.isEmpty ? nil : $0 }+ let environment = environmentRoot.map { URL(fileURLWithPath: $0, isDirectory: true) }return canonical(- environment.map { URL(fileURLWithPath: $0, isDirectory: true) }+ environment ?? chosenLibrary()?? FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent(".vphone/machines", isDirectory: true),)}()+ /// `VPHONE_LIBRARY_ROOT`, which Host Setup cannot change.+ static let environmentRoot = ProcessInfo.processInfo.environment["VPHONE_LIBRARY_ROOT"].flatMap { $0.isEmpty ? nil : $0 }++ // MARK: Chosen library++ private static let libraryBookmarkKey = "VPhoneLaunchpadLibraryBookmark"++ /// The folder chosen in Host Setup, kept as a bookmark: it is found+ /// again after it is moved or renamed, and access to it survives a+ /// relaunch. A stale bookmark is written again.+ private static func chosenLibrary() -> URL? {+ guard let data = UserDefaults.standard.data(forKey: libraryBookmarkKey) else {+ return nil+ }+ var isStale = false+ guard let url = (try? URL(resolvingBookmarkData: data, options: [.withSecurityScope], bookmarkDataIsStale: &isStale))+ ?? (try? URL(resolvingBookmarkData: data, options: [], bookmarkDataIsStale: &isStale))+ else {+ return nil+ }+ _ = url.startAccessingSecurityScopedResource()+ if isStale {+ try? rememberLibrary(url)+ }+ return url+ }++ /// Makes `url` the default library from the next launch. Nothing is+ /// moved: the machines stay in the folder they are in.+ static func rememberLibrary(_ url: URL) throws {+ let data = try (try? url.bookmarkData(options: [.withSecurityScope]))+ ?? url.bookmarkData()+ UserDefaults.standard.set(data, forKey: libraryBookmarkKey)+ }++ /// Whether the volume holding `root` makes copy-on-write clones, which+ /// templates, clones and snapshots rely on to share a disk image.+ static func supportsCloning(_ root: String) -> Bool {+ let url = VPhoneLaunchpadHostSetup.existingAncestor(of: URL(fileURLWithPath: root, isDirectory: true))+ return (try? url.resourceValues(forKeys: [.volumeSupportsFileCloningKey]))?.volumeSupportsFileCloning ?? false+ }+/// The resolved path of an existing folder, else the standardized path.static func canonical(_ url: URL) -> String {let path = url.standardizedFileURL.pathdiff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineSheets.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineSheets.swiftindex 72957f39..12de71d9 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineSheets.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineSheets.swift@@ -1,5 +1,6 @@import AppKitimport SwiftUI+import UniformTypeIdentifiers// MARK: - Settings@@ -148,7 +149,6 @@ struct VPhoneLaunchpadMachineSettingsView: View {.keyboardShortcut(.defaultAction).disabled(!canSave)}- .frame(width: 480).fixedSize(horizontal: false, vertical: true).onChange(of: cpu) { edited.insert(.cpu) }.onChange(of: memoryMB) { edited.insert(.memory) }@@ -215,23 +215,21 @@ struct VPhoneLaunchpadMachineSettingsView: View {if network == "bridged" {TextField("Interface", text: $bridgeInterface, prompt: Text("First available"))}- if network == "tunnel" {- Text("Traffic leaves through this Mac's own connections, so it follows the Mac's VPN.")- .foregroundStyle(.secondary)- }- if dropsForwards {- Text("This mode cannot forward ports, so saving removes the port forwards.")- .foregroundStyle(.secondary)- }} header: {if !single {Text("Network")}} footer: {- if machines.count > 1 {- Text("Only the settings you change are applied to each machine.")- .foregroundStyle(.secondary)+ VStack(alignment: .leading, spacing: 4) {+ Text(VPhoneLaunchpadNewMachineAdvancedView.networkDescription(network))+ if dropsForwards {+ Text("This mode cannot forward ports, so saving removes the port forwards.")+ }+ if machines.count > 1 {+ Text("Only the settings you change are applied to each machine.")+ }}+ .foregroundStyle(.secondary)}}@@ -473,7 +471,6 @@ struct VPhoneLaunchpadNameSheet<Options: View>: View {.keyboardShortcut(.defaultAction).disabled(!isValid)}- .frame(width: 420).fixedSize(horizontal: false, vertical: true).onAppear { name = initial }}@@ -522,13 +519,18 @@ struct VPhoneLaunchpadCloneSheet: View {// MARK: - Export+extension UTType {+ /// `<name>.vpea`: a machine as `vm export` writes it, a gnutar of its+ /// folder compressed with zstd. Declared in Info.plist.+ static let vphoneExportedArchive = UTType(exportedAs: "com.vphone.exported-archive")+}+/// One machine offers the archive options. Several are written with the-/// defaults, one `<name>.tzst` each, into a folder chosen once.+/// defaults, one `<name>.vpea` each, into a folder chosen once.struct VPhoneLaunchpadExportView: View {let machines: [VPhoneLaunchpadMachinePath]@Environment(VPhoneLaunchpadModel.self) private var model@Environment(\.dismiss) private var dismiss- @State private var densest = false@State private var includeIPSW = falseprivate var title: Text {@@ -540,21 +542,18 @@ struct VPhoneLaunchpadExportView: View {Form {if machines.count == 1 {Section {- Toggle("Maximum compression", isOn: $densest)Toggle("Include the restore IPSW directory", isOn: $includeIPSW)} footer: {- Text(densest- ? "Creates a smaller .txz archive. Export takes much longer."- : "Creates a .tzst archive.")+ Text("Creates a .vpea archive.").foregroundStyle(.secondary)}} else {Section {ForEach(machines, id: \.self) { machine in- Text(verbatim: "\(machine.name).tzst")+ Text(verbatim: Self.fileName(machine))}} footer: {- Text("Creates a .tzst archive for each machine in the folder you choose.")+ Text("Creates a .vpea archive for each machine in the folder you choose.").foregroundStyle(.secondary)}}@@ -566,21 +565,24 @@ struct VPhoneLaunchpadExportView: View {Button("Choose Location…") { choose() }.keyboardShortcut(.defaultAction)}- .frame(width: 420).fixedSize(horizontal: false, vertical: true)}+ private static func fileName(_ machine: VPhoneLaunchpadMachinePath) -> String {+ "\(machine.name).vpea"+ }+private func choose() {let library = model.machinesif machines.count == 1 {let machine = machines[0]let panel = NSSavePanel()panel.title = String(localized: "Export \(machine.name)")- panel.nameFieldStringValue = "\(machine.name).\(densest ? "txz" : "tzst")"- let densest = densest+ panel.allowedContentTypes = [.vphoneExportedArchive]+ panel.nameFieldStringValue = Self.fileName(machine)let includeIPSW = includeIPSWpanel.present { url in- Task { await library.export([(machine, url)], densest: densest, includeIPSW: includeIPSW) }+ Task { await library.export([(machine, url)], includeIPSW: includeIPSW) }dismiss()}return@@ -593,8 +595,8 @@ struct VPhoneLaunchpadExportView: View {panel.canCreateDirectories = truelet machines = machinespanel.present { folder in- let items = machines.map { ($0, folder.appendingPathComponent("\($0.name).tzst")) }- Task { await library.export(items, densest: false, includeIPSW: false) }+ let items = machines.map { ($0, folder.appendingPathComponent(Self.fileName($0))) }+ Task { await library.export(items, includeIPSW: false) }dismiss()}}diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swiftindex e3d91cc1..ffdd638a 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift@@ -15,6 +15,7 @@ struct VPhoneLaunchpadMachinesView: View {case snapshots(MachinePath)case console(MachinePath)case guestSystem(MachinePath)+ case commandsvar id: String {switch self {@@ -28,6 +29,7 @@ struct VPhoneLaunchpadMachinesView: View {case let .snapshots(machine): "snapshots-\(machine.url.path)"case let .console(machine): "console-\(machine.url.path)"case let .guestSystem(machine): "guest-system-\(machine.url.path)"+ case .commands: "commands"}}}@@ -36,9 +38,8 @@ struct VPhoneLaunchpadMachinesView: View {@State private var sheet: Sheet?/// The machines the delete confirmation is for; empty when it is closed.@State private var deletion: [MachinePath] = []- @State private var filter = ""/// Empty keeps the order `vm list` returns; a header click replaces it.- @State private var sortOrder: [KeyPathComparator<VPhoneLaunchpadMachine>] = []+ @State private var sortOrder: [KeyPathComparator<VPhoneLaunchpadMachineRow>] = []/// The table appears only once `vm list` returns, after the window has/// picked its first responder, so nothing focuses it by itself. Unfocused,/// AppKit draws the library's automatic selection in gray, not in the@@ -49,41 +50,45 @@ struct VPhoneLaunchpadMachinesView: View {model.machines}- /// The machines the table shows: those matching the search, in the- /// header's order.- private var rows: [VPhoneLaunchpadMachine] {- let needle = filter.trimmingCharacters(in: .whitespaces)- let matching = needle.isEmpty ? library.machines : library.machines.filter { Self.matches($0, needle) }- return matching.sorted(using: sortOrder)+ /// The machines in the header's order.+ private var rows: [VPhoneLaunchpadMachineRow] {+ library.machines.map { machine in+ let state = switch library.state(of: machine.path) {+ case .running: 0+ case .busy: 1+ case .stopped: 2+ }+ return VPhoneLaunchpadMachineRow(+ machine: machine,+ bundle: library.bundleVersion(for: machine.path) ?? "",+ state: state,+ exclusive: library.diskUsage[machine.path]?.exclusive ?? -1,+ )+ }+ .sorted(using: sortOrder)}var body: some View {@Bindable var library = library@Bindable var model = model- Group {- if library.machines.isEmpty {- emptyState- } else if rows.isEmpty {- ContentUnavailableView.search(text: filter)- } else {- table(selection: $library.selection)+ HStack(spacing: 0) {+ Group {+ if library.machines.isEmpty {+ emptyState+ } else {+ table(selection: $library.selection)+ }}- }- // A hidden machine stays out of the selection, so Start, Delete and- // the inspector act only on rows the table shows.- .onChange(of: filter) {- let visible = Set(rows.map(\.path))- library.selection.formIntersection(visible)- }- .inspector(isPresented: $model.showsInspector) {+ .frame(maxWidth: .infinity, maxHeight: .infinity)+ // Up through the toolbar, as a split view's divider runs.+ Divider()+ .ignoresSafeArea(.container, edges: .top)Group {if let machine = library.selected {VPhoneLaunchpadMachineInspector(machine: machine,onShowProgress: { path in sheet = .creation(path) },onOpenConsole: { path in sheet = .console(path) },- onChangeBundle: { machine in sheet = .changeBundle([machine]) },- onOpenGuestSystem: { path in sheet = .guestSystem(path) },)} else if library.selection.count > 1 {ContentUnavailableView("\(library.selection.count) Machines Selected", systemImage: "iphone")@@ -91,107 +96,145 @@ struct VPhoneLaunchpadMachinesView: View {ContentUnavailableView("No Selection", systemImage: "iphone")}}- .inspectorColumnWidth(min: 300, ideal: 360, max: 520)- // The toggle belongs to the inspector's own toolbar section. Put in- // the content's toolbar, the section and its background were set up- // at launch but not again after the inspector was hidden and shown.- .toolbar { inspectorToolbar }+ .frame(width: 360)+ .frame(maxHeight: .infinity)}.toolbar { toolbar }- #if DEBUG- .onReceive(NotificationCenter.default.publisher(for: VPhoneLaunchpadPreview.sheetNotification)) { note in- sheet = note.object as? Sheet+ // An exported machine dropped on the window is imported, as Import…+ // does; an IPSW is added to the IPSW cache.+ .dropDestination(for: URL.self) { urls, _ in+ let ipsws = urls.filter(VPhoneLaunchpadIPSWImport.isIPSW)+ model.ipswImport.register(ipsws, model: model)+ return library.importDropped(urls) || !ipsws.isEmpty+ }+ // Sheets and deletions asked for by the shared actions menu, here or+ // from the menu bar.+ .onChange(of: model.machineSheetRequest?.id, initial: true) {+ if let request = model.machineSheetRequest {+ model.machineSheetRequest = nil+ sheet = request}- #endif- .sheet(item: $sheet) { sheet in- sheetContent(sheet)- .environment(model)+ }+ // So New Machine opens on the catalog rather than loading it.+ .task(id: model.bundles.defaultVersion) { await VPhoneLaunchpadNewMachineView.prefetchCatalog(model) }+ .onChange(of: model.deletionRequest, initial: true) {+ if !model.deletionRequest.isEmpty {+ deletion = model.deletionRequest+ model.deletionRequest = []}- .confirmationDialog(- deletion.count == 1 ? "Delete \(deletion[0].name)?" : "Delete \(deletion.count) Machines?",- isPresented: Binding(get: { !deletion.isEmpty }, set: {- if !$0 {- deletion = []- }- }),- ) {- Button("Delete", role: .destructive) {- let machines = deletion- Task {- for machine in machines {- await library.delete(machine)- }- }- }- } message: {- if deletion.count == 1 {- Text("The machine's disk, firmware and settings are removed. This cannot be undone.")- } else {- Text("Their disks, firmware and settings are removed. This cannot be undone.")+ }+ #if DEBUG+ .onReceive(NotificationCenter.default.publisher(for: VPhoneLaunchpadPreview.sheetNotification)) { note in+ sheet = note.object as? Sheet+ }+ #endif+ .sheet(item: $sheet) { sheet in+ sheetContent(sheet)+ .environment(model)+ }+ .confirmationDialog(+ deletion.count == 1 ? "Delete \(deletion[0].name)?" : "Delete \(deletion.count) Machines?",+ isPresented: Binding(get: { !deletion.isEmpty }, set: {+ if !$0 {+ deletion = []}- }- .alert(- library.actionError?.message ?? "",- isPresented: Binding(get: { library.actionError != nil }, set: {- if !$0 {- library.actionError = nil+ }),+ ) {+ Button("Delete", role: .destructive) {+ let machines = deletion+ Task {+ for machine in machines {+ await library.delete(machine)}- }),- presenting: library.actionError,- ) { _ in- Button("OK") {}- } message: { error in- Text(error.detail ?? "")+ }}- // `vm delete` of the last machine cloned from a template keeps- // the template and says so; so does this.- .alert(- String(localized: "Template No Longer Used"),- isPresented: Binding(get: { library.templateNotice != nil && library.actionError == nil }, set: {- if !$0 {- library.templateNotice = nil- }- }),- presenting: library.templateNotice,- ) { _ in- Button("Show Templates") { model.present(.templates) }- Button("OK", role: .cancel) {}- } message: { notice in- Text("No machine uses template \(notice.id) any more. It stays, taking about \(notice.size), so the next machine with its options is created in seconds. Delete it in Templates once it is no longer needed.")+ } message: {+ if deletion.count == 1 {+ Text("The machine's disk, firmware and settings are removed. This cannot be undone.")+ } else {+ Text("Their disks, firmware and settings are removed. This cannot be undone.")}+ }+ .alert(+ library.actionError?.message ?? "",+ isPresented: Binding(get: { library.actionError != nil }, set: {+ if !$0 {+ library.actionError = nil+ }+ }),+ presenting: library.actionError,+ ) { _ in+ Button("OK") {}+ } message: { error in+ Text(error.detail ?? "")+ }+ // `vm delete` of the last machine cloned from a template keeps+ // the template and says so; so does this.+ .alert(+ String(localized: "Template No Longer Used"),+ isPresented: Binding(get: { library.templateNotice != nil && library.actionError == nil }, set: {+ if !$0 {+ library.templateNotice = nil+ }+ }),+ presenting: library.templateNotice,+ ) { _ in+ Button("Show Templates") { model.present(.templates) }+ Button("OK", role: .cancel) {}+ } message: { notice in+ Text("No machine uses template \(notice.id) any more. It stays, taking about \(notice.size), so the next machine with its options is created in seconds. Delete it in Templates once it is no longer needed.")+ }}// MARK: - Toolbar- /// The machine list's own tools. Host Setup and Core Bundle hold the- /// leading edge; the space pushes New Machine and the search field to the- /// list's trailing edge. What acts on the selection is in the inspector.+ /// The machine list's own tools. New Machine leads, in one group with+ /// Host Setup while a check fails (the app menu opens it otherwise); Core+ /// Bundle and Downloaded Firmware follow in a second group. The space+ /// pushes Start or Stop and the actions menu+ /// for the selection to the trailing edge.@ToolbarContentBuilderprivate var toolbar: some ToolbarContent {- flexibleSpace- ToolbarItem(placement: .automatic) {- Menu {- Button("New Machine…") { sheet = .newMachine }- Button("Import…") { chooseImport() }- .disabled(library.globalActivity != nil)- Divider()- Button("Templates…") { model.present(.templates) }+ ToolbarItemGroup(placement: .navigation) {+ Button {+ sheet = .newMachine} label: {Label("New Machine", systemImage: "plus")}- .menuIndicator(.hidden).help("Create a machine").disabled(model.bundles.defaultVersion == nil)+ if model.hostNeedsAttention {+ panelButton(.hostSetup, systemImage: "checklist", needsAttention: true)+ }}- // Without it, macOS 26 draws New Machine and the search field in- // one glass capsule.+ // Without it, macOS 26 draws both groups in one glass capsule.if #available(macOS 26, *) {ToolbarSpacer(.fixed)}- ToolbarItem(placement: .automatic) {- VPhoneLaunchpadSearchField(text: $filter, prompt: String(localized: "Search machines"))- .frame(width: 200)+ ToolbarItemGroup(placement: .automatic) {+ panelButton(.coreBundle, systemImage: "shippingbox", needsAttention: model.bundleNeedsAttention)+ panelButton(.ipswCache, systemImage: "briefcase", needsAttention: false)+ }+ flexibleSpace+ selectionToolbar+ }++ private func panelButton(_ panel: VPhoneLaunchpadModel.Panel, systemImage: String, needsAttention: Bool) -> some View {+ Button {+ model.present(panel)+ } label: {+ Label {+ Text(panel.title)+ } icon: {+ if needsAttention {+ Image(systemName: "exclamationmark.triangle.fill")+ .foregroundStyle(.yellow)+ } else {+ Image(systemName: systemImage)+ }+ }}+ .help(needsAttention ? "\(panel.title) needs attention" : panel.title)}/// Space that pushes what follows to the trailing edge. On macOS 26 a@@ -209,180 +252,50 @@ struct VPhoneLaunchpadMachinesView: View {}}- /// The inspector toggle, then Start or Stop for the selection beside the- /// actions menu at the window's trailing edge. Those two go away with the- /// inspector; the context menu and a double-click still reach them.+ /// Start or Stop for the selection beside the actions menu.@ToolbarContentBuilder- private var inspectorToolbar: some ToolbarContent {+ private var selectionToolbar: some ToolbarContent {let selected = library.selectedMachineslet stopped = selected.filter { library.state(of: $0.path) == .stopped }let running = selected.filter { library.state(of: $0.path) == .running }- ToolbarItem(placement: .automatic) {- inspectorToggle- }- if model.showsInspector {- flexibleSpace- ToolbarItemGroup(placement: .automatic) {- if stopped.isEmpty, !running.isEmpty {- Button {- stop(running)- } label: {- Label("Stop", systemImage: "stop.fill")- }- .help("Stop \(running.map(\.name).joined(separator: ", "))")- } else {- Button {- start(stopped)- } label: {- Label("Start", systemImage: "play.fill")- }- .help("Start the selected machine")- .disabled(stopped.isEmpty)- }- Menu {- machineActions(selected)+ ToolbarItemGroup(placement: .automatic) {+ if stopped.isEmpty, !running.isEmpty {+ Button {+ library.stop(running)} label: {- Label("Actions", systemImage: "ellipsis")+ Label("Stop", systemImage: "stop.fill")}- .disabled(selected.isEmpty)- // A menu with its arrow gets a capsule of its own; without it- // the menu shares Start's.- .menuIndicator(.hidden)- }- }- }-- private func start(_ machines: [VPhoneLaunchpadMachine], headless: Bool = false) {- Task {- for machine in machines {- await library.start(machine.path, headless: headless)- }- }- }-- private func stop(_ machines: [VPhoneLaunchpadMachine]) {- Task {- await withTaskGroup(of: Void.self) { group in- for machine in machines {- group.addTask { await library.stop(machine.path) }- }- }- }- }-- private var inspectorToggle: some View {- Button {- model.showsInspector.toggle()- } label: {- Label("Inspector", systemImage: "sidebar.trailing")- }- .help(model.showsInspector ? "Hide the inspector" : "Show the inspector")- }-- /// The same actions in the toolbar menu and the table's context menu.- /// Several machines get the batch actions: one settings edit, export and- /// delete, which need every machine stopped, then start and stop.- @ViewBuilder- private func machineActions(_ machines: [VPhoneLaunchpadMachine]) -> some View {- // Only while one of them is exporting or waiting to.- let exporting = machines.filter { library.exports[$0.path] != nil }- if !exporting.isEmpty {- Button("Cancel Export") {- for machine in exporting {- library.cancelExport(machine.path)+ .help("Stop \(running.map(\.name).joined(separator: ", ")). Hold Option to force stop.")+ } else {+ Button {+ library.start(stopped)+ } label: {+ Label("Start", systemImage: "play.fill")}- }- Divider()- }- if machines.count > 1 {- let stopped = machines.filter { library.state(of: $0.path) == .stopped }- let running = machines.filter { library.state(of: $0.path) == .running }- let allStopped = stopped.count == machines.count- Button("Settings…") { sheet = .settings(machines) }- .disabled(!allStopped)- changeBundleButton(machines)- Button("Export…") { sheet = .export(machines.map(\.path)) }- .disabled(!allStopped)- Button("Delete…", role: .destructive) { deletion = machines.map(\.path) }- .disabled(!allStopped)- Divider()- Button("Start") { start(stopped) }+ .help("Start the selected machine").disabled(stopped.isEmpty)- Button("Start Headless") { start(stopped, headless: true) }- .disabled(stopped.isEmpty)- Button("Stop") { stop(running) }- .disabled(running.isEmpty)- Divider()- Button("Show in Finder") {- NSWorkspace.shared.activateFileViewerSelecting(machines.map(\.path.url))}- } else if let machine = machines.first {- let isStopped = library.state(of: machine.path) == .stopped- Button("Start Headless") { Task { await library.start(machine.path, headless: true) } }- .disabled(!isStopped)- Divider()- Button("Settings…") { sheet = .settings([machine]) }- .disabled(!isStopped)- // It works on the running guest, and says so when it is not.- Button("Guest System…") { sheet = .guestSystem(machine.path) }- .disabled(library.creation(for: machine.path)?.isRunning == true)- changeBundleButton([machine])- Button("Rename…") { sheet = .rename(machine.path) }- .disabled(!isStopped)- Button("Clone…") { sheet = .clone(machine.path) }- .disabled(!isStopped)- Button("Export…") { sheet = .export([machine.path]) }- .disabled(!isStopped)- // Open while the machine runs too, to read the list; taking,- // reverting and deleting wait for it to stop.- Button("Snapshots…") { sheet = .snapshots(machine.path) }- .disabled(library.creation(for: machine.path)?.isRunning == true)- Button("Install Custom Firmware") {- Task { await library.installCustomFirmware(machine.path) }- }- // Only for an unfinished install: that is when the restore tree it- // reads is still there. A finished one removes it.- .disabled(!isStopped || machine.customFirmwareInstalled != false)- // The finished-install counterpart: redeploys the machine's own- // bundle's guest resources without the restore tree.- Button("Update Guest Environment") {- Task { await library.updateGuestEnvironment(machine.path) }- }- .disabled(!isStopped || machine.restoreInfo == nil || machine.customFirmwareInstalled == false)- Divider()- Button("Show in Finder") {- NSWorkspace.shared.activateFileViewerSelecting([machine.path.url])- }- Button("Open Console") { sheet = .console(machine.path) }- Button("Show Console Log") {- NSWorkspace.shared.open(VPhoneLaunchpadMachineLibrary.consoleLog(machine.path))- }- Button("Show Patch Log") {- NSWorkspace.shared.open(VPhoneLaunchpadMachineLibrary.consoleLog(machine.path, suffix: "-patch"))+ Menu {+ VPhoneLaunchpadMachineActions(machines: selected)+ } label: {+ Label("Actions", systemImage: "ellipsis")}- .disabled(!FileManager.default.fileExists(atPath: VPhoneLaunchpadMachineLibrary.consoleLog(machine.path, suffix: "-patch").path))- Divider()- Button("Delete…", role: .destructive) { deletion = [machine.path] }- .disabled(!isStopped)+ .disabled(selected.isEmpty)+ // A menu with its arrow gets a capsule of its own; without it+ // the menu shares Start's.+ .menuIndicator(.hidden)}}- /// Rebinding applies at the next start, so running machines may change- /// too. A machine still being created gets its bundle from the pipeline.- private func changeBundleButton(_ machines: [VPhoneLaunchpadMachine]) -> some View {- Button("Change Core Bundle…") { sheet = .changeBundle(machines) }- .disabled(model.bundles.selectableVersions.isEmpty- || machines.contains { library.creation(for: $0.path)?.isRunning == true })- }-// MARK: - Tableprivate func table(selection: Binding<Set<MachinePath>>) -> some View {Table(rows, selection: selection, sortOrder: $sortOrder) {- TableColumn("Name", value: \.name)- .width(min: 90, ideal: 110)+ TableColumn("Name", value: \.machine.name)+ .width(min: 90, ideal: 140)if library.spansLibraries {- TableColumn("Location", value: \.libraryRoot) { machine in+ TableColumn("Location", value: \.machine.libraryRoot) { row in+ let machine = row.machineText(verbatim: VPhoneLaunchpadMachineLocations.volumeName(machine.libraryRoot)).lineLimit(1).truncationMode(.middle)@@ -391,60 +304,49 @@ struct VPhoneLaunchpadMachinesView: View {.width(min: 80, ideal: 110)}// Standard comparison orders 18.10 after 18.9.- TableColumn("OS", value: \.iosVersion) { machine in+ TableColumn("OS", value: \.machine.iosVersion) { row in+ let machine = row.machineText(verbatim: machine.restoreInfo.map { "\(machine.osName) \($0.ios.version) (\($0.ios.build))" } ?? "—")}- .width(min: 140, ideal: 160)- TableColumn("Core Bundle") { machine in+ .width(min: 130, ideal: 150)+ TableColumn("Core Bundle", value: \.bundle) { row in+ let machine = row.machine// Each cell is a hosting view of its own. When its row leaves// the table, the cell is updated once more with an empty// environment, where reading the model is a fatal error.VPhoneLaunchpadMachineBundleLabel(machine: machine.path).environment(model)}- .width(min: 70, ideal: 90)- TableColumn("State") { machine in+ .width(min: 60, ideal: 70)+ TableColumn("State", value: \.state) { row in+ let machine = row.machineVPhoneLaunchpadMachineStateLabel(state: library.state(of: machine.path),progress: library.progress(of: machine.path),+ isDamaged: library.isDamaged(machine.path),)}- .width(min: 150, ideal: 160)- TableColumn("CPU", value: \.cpuCount) { machine in- Text(verbatim: "\(machine.cpuCount)").monospacedDigit()- }- .width(40)- TableColumn("Memory", value: \.memoryMB) { machine in- Text(Self.memory(machine.memoryMB)).monospacedDigit()- }- .width(64)- TableColumn("Disk", value: \.diskSizeBytes) { machine in- Text(Self.disk(machine.diskSizeBytes)).monospacedDigit()- }- .width(64)+ .width(min: 100, ideal: 120)// What deleting the machine frees: a clone of a template// shares the rest.- TableColumn("Exclusive") { machine in+ TableColumn("Exclusive", value: \.exclusive) { row in+ let machine = row.machinelet usage = library.diskUsage[machine.path]Text(verbatim: usage?.exclusive.map { VPhoneLaunchpadDiskUsage.format($0) } ?? "—").monospacedDigit().foregroundStyle(usage?.exclusive == nil ? .secondary : .primary).help(usage.map { String(localized: "\(VPhoneLaunchpadDiskUsage.format($0.allocated)) allocated; the rest is shared with its template or clones.") } ?? "")}- .width(min: 64, ideal: 76)+ .width(min: 70, ideal: 80)}.contextMenu(forSelectionType: MachinePath.self) { paths in- machineActions(library.machines.filter { paths.contains($0.path) })+ VPhoneLaunchpadMachineActions(machines: library.machines.filter { paths.contains($0.path) })} primaryAction: { paths in- start(library.machines.filter { paths.contains($0.path) && library.state(of: $0.path) == .stopped })+ library.start(library.machines.filter { paths.contains($0.path) && library.state(of: $0.path) == .stopped })}.focused($tableIsFocused).onAppear {- // The table comes back when a search matches again; the search- // field keeps the keyboard then.- if !(NSApp.keyWindow?.firstResponder is NSText) {- tableIsFocused = true- }+ tableIsFocused = true}}@@ -469,7 +371,7 @@ struct VPhoneLaunchpadMachinesView: View {} actions: {Button("New Machine…") { sheet = .newMachine }.buttonStyle(.borderedProminent)- Button("Import…") { chooseImport() }+ Button("Import…") { library.chooseImport() }}}}@@ -507,35 +409,11 @@ struct VPhoneLaunchpadMachinesView: View {VPhoneLaunchpadConsoleView(title: "\(path.name) Console", url: VPhoneLaunchpadMachineLibrary.consoleLog(path))case let .guestSystem(path):VPhoneLaunchpadGuestSystemView(machine: path)+ case .commands:+ VPhoneLaunchpadCommandHistoryView()}}- private func chooseImport() {- let panel = NSOpenPanel()- panel.title = String(localized: "Import Machine")- panel.message = String(localized: "Choose an exported machine archive (.tzst or .txz).")- panel.canChooseDirectories = false- panel.allowsMultipleSelection = false- panel.present { url in- Task { await library.importArchive(url) }- }- }-- // MARK: - Search-- private static func matches(_ machine: VPhoneLaunchpadMachine, _ needle: String) -> Bool {- [- machine.name,- machine.restoreInfo?.ios.version,- machine.restoreInfo?.ios.build,- machine.guestProductType,- machine.udid,- VPhoneLaunchpadMachineLocations.volumeName(machine.libraryRoot),- ]- .compactMap(\.self)- .contains { $0.localizedCaseInsensitiveContains(needle) }- }-// MARK: - Formattingstatic func memory(_ megabytes: Int) -> String {@@ -547,3 +425,19 @@ struct VPhoneLaunchpadMachinesView: View {"\(bytes / 1_000_000_000) GB"}}++/// One row of the machine table: the machine, with the values its other+/// columns show, so every column sorts.+struct VPhoneLaunchpadMachineRow: Identifiable {+ let machine: VPhoneLaunchpadMachine+ /// The Core Bundle version it runs with.+ let bundle: String+ /// Running, then busy, then stopped.+ let state: Int+ /// Bytes only it holds; -1 while unknown.+ let exclusive: Int64++ var id: VPhoneLaunchpadMachinePath {+ machine.path+ }+}diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineAdvancedView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineAdvancedView.swiftindex 31ae3f52..064cc380 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineAdvancedView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineAdvancedView.swift@@ -1,7 +1,7 @@import SwiftUI-/// The patch sections of New Machine's Firmware & Patches page, and the-/// network and restore options of its Storage & Network page, as sections+/// The patch sections of New Machine's Patches tab, the network section of+/// its Hardware tab and the restore options of its Storage tab, as sections/// of New Machine's form. It edits New Machine's own state.struct VPhoneLaunchpadNewMachineAdvancedView: View {var page: VPhoneLaunchpadNewMachineView.Page@@ -31,23 +31,35 @@ struct VPhoneLaunchpadNewMachineAdvancedView: View {]}+ /// What `mode` does, for the footer under its picker.+ static func networkDescription(_ mode: String) -> String {+ switch mode {+ case "nat": String(localized: "The guest shares this Mac's connection through Virtualization's built-in NAT. Its traffic skips a VPN on the Mac.")+ case "bridged": String(localized: "The guest joins the network of one of this Mac's interfaces with an address of its own, so other devices on that network can reach it.")+ case "tunnel": String(localized: "Traffic leaves through this Mac's own connections, so it follows the Mac's VPN.")+ case "none": String(localized: "The guest has no network device and stays offline.")+ default: ""+ }+ }+var body: some View {switch page {- case .firmware:+ case .patches:patchSection- case .storage:- Section("Network") {+ case .hardware:+ Section {Picker("Mode", selection: $network) {ForEach(Self.networkModes, id: \.tag) { mode inText(verbatim: mode.title).tag(mode.tag)}}- if network == "tunnel" {- Text("Traffic leaves through this Mac's own connections, so it follows the Mac's VPN.")- .foregroundStyle(.secondary)- }+ } header: {+ Text("Network")+ } footer: {+ Text(Self.networkDescription(network))+ .foregroundStyle(.secondary)}-+ case .storage:Section {Toggle("Keep prepared restore files", isOn: $keepArtifacts).disabled(usesTemplate)diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swiftindex 85f079e0..2d3e74ed 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift@@ -1,17 +1,19 @@import AppKitimport SwiftUI-/// The name, guest device and firmware pairing from `fw catalog`, and Slim-/// System on the basic page; hardware, the template and its slimming, the-/// Core Bundle, custom IPSWs, patches, location and network on four advanced-/// pages behind one row that sums them up. Every setting has a default, so-/// Create works from any page. Create hands off to the pipeline sheet.+/// The name, guest device and firmware pairing from `fw catalog` on the+/// basic page; hardware and network, the template, its slimming, the Core+/// Bundle and custom IPSWs, patches, and restore files on six tabs of an Advanced+/// Options sheet over it, behind one row that sums them up.+/// Every setting has a default, so Create works without opening it. Create+/// hands off to the pipeline sheet.struct VPhoneLaunchpadNewMachineView: View {let onCreate: (VPhoneLaunchpadMachinePath) -> Void@Environment(VPhoneLaunchpadModel.self) private var model@Environment(\.dismiss) private var dismiss- static let defaultCPU = 8+ /// Half the host's cores, at least two.+ static let defaultCPU = max(2, ProcessInfo.processInfo.activeProcessorCount / 2)static let defaultMemoryMB = 8192static let defaultDiskSizeGB = 64static let defaultNetwork = "nat"@@ -21,13 +23,11 @@ struct VPhoneLaunchpadNewMachineView: View {@State private var chosenVersion: String?/// The canonical library the machine is created in.@State private var location = VPhoneLaunchpadMachineLocations.defaultRoot- /// The location the sheet opened with, which Advanced Options counts- /// a change from.- @State private var openingLocation: String?- /// A folder chosen with Other… that is not one of the library's locations.- @State private var chosenLocation: String?@State private var catalog: VPhoneLaunchpadFirmwareCatalog?@State private var catalogError: String?+ /// The names of the IPSWs already in an IPSW cache, to mark the releases+ /// that need no download.+ @State private var downloaded: Set<String> = []/// The guest device's product type.@State private var guest: String?@State private var pairing: String?@@ -45,13 +45,13 @@ struct VPhoneLaunchpadNewMachineView: View {/// Clone the machine from a template, built first when there is none.@State private var usesTemplate = true@State private var slimming = VPhoneLaunchpadSlimming()- @State private var page = Page.basic- /// The advanced page Advanced Options opens on: the one last shown.- @State private var advancedPage = Page.hardware+ /// The page the Advanced Options sheet shows: the one last shown.+ @State private var page = Page.hardware+ @State private var showsAdvanced = false/// The basic page, then the advanced ones.enum Page: Hashable {- case basic, hardware, system, firmware, storage+ case basic, hardware, template, slimming, firmware, patches, storage}private var selectedGuest: VPhoneLaunchpadFirmwareCatalog.Device? {@@ -95,13 +95,27 @@ struct VPhoneLaunchpadNewMachineView: View {|| FileManager.default.fileExists(atPath: machine.url.path)}- /// The first `pcc-research-NN` free in `root`, filled into the field when- /// the sheet opens.+ /// A fruit no machine in `root` is named after yet, at random, filled into+ /// the field when the sheet opens. Once all are taken, `<fruit>-2`, then+ /// `-3` and on.private func suggestedName(in root: String) -> String {- let names = (1 ... 99).lazy.map { String(format: "pcc-research-%02d", $0) }- return names.first { !isTaken(VPhoneLaunchpadMachinePath(libraryRoot: root, name: $0)) } ?? "pcc-research"+ let suffixes = [""] + (2 ... 99).map { "-\($0)" }+ for suffix in suffixes {+ let free = Self.fruits.map { $0 + suffix }.filter { !isTaken(VPhoneLaunchpadMachinePath(libraryRoot: root, name: $0)) }+ if let name = free.randomElement() {+ return name+ }+ }+ return "machine"}+ private static let fruits = [+ "Apple", "Apricot", "Avocado", "Banana", "Blackberry", "Blueberry", "Cherry", "Coconut",+ "Cranberry", "Date", "Durian", "Fig", "Grape", "Guava", "Kiwi", "Kumquat",+ "Lemon", "Lime", "Lychee", "Mango", "Melon", "Mulberry", "Nectarine", "Olive",+ "Orange", "Papaya", "Peach", "Pear", "Persimmon", "Pineapple", "Plum", "Pomegranate",+ ]+private var nameProblem: String? {if !VPhoneLaunchpadNames.isValidMachineName(effectiveName) {return String(localized: "Use letters, numbers, periods, hyphens, and underscores.")@@ -137,43 +151,32 @@ struct VPhoneLaunchpadNewMachineView: View {if let problem = locationProblem ?? templatePathProblem {return (.storage, problem)}- if usesTemplate, let problem = slimming.problem {- return (.system, problem)+ if let problem = slimming.problem {+ return (.slimming, problem)}return nil}+ /// Whether a current template was built from the chosen device and+ /// release; nil for custom IPSWs and until the template list is read.+ private var templateAvailable: Bool? {+ guard !usesCustomSources, let guest, let pairing = selectedPairing, let templates = model.machines.templates else {+ return nil+ }+ return templates.contains { !$0.stale && $0.key.device == guest && $0.key.iOSBuild == pairing.build }+ }+private var canCreate: Bool {nameProblem == nil && advancedProblem == nil && sources != nil && bundleVersion != nil}var body: some View {VPhoneLaunchpadSheet(Text("New Machine")) {- VStack(spacing: 0) {- if page != .basic {- advancedBar- }- Form {- switch page {- case .basic:- basicPage- case .hardware:- hardwarePage- case .system:- VPhoneLaunchpadSlimmingSections(usesTemplate: $usesTemplate, slimming: $slimming)- case .firmware:- bundleSection- firmwareSourceSection- advancedSections(.firmware)- case .storage:- locationSection- advancedSections(.storage)- }- }- .formStyle(.grouped)- .vphoneFittedHeight(limit: VPhoneLaunchpadSheetHeight.maximum - VPhoneLaunchpadSheetHeight.chrome- - (page == .basic ? 0 : VPhoneLaunchpadSheetHeight.pages))+ Form {+ basicPage}+ .formStyle(.grouped)+ .vphoneFittedHeight(limit: VPhoneLaunchpadSheetSize.maximum - VPhoneLaunchpadSheetSize.chrome)} actions: {Button("Cancel") { dismiss() }.keyboardShortcut(.cancelAction)@@ -181,15 +184,30 @@ struct VPhoneLaunchpadNewMachineView: View {.keyboardShortcut(.defaultAction).disabled(!canCreate)}- .frame(width: 560).fixedSize(horizontal: false, vertical: true)+ // A second sheet over this one, so the basic settings stay put behind it.+ .sheet(isPresented: $showsAdvanced) {+ advancedSheet+ .environment(model)+ }// Each bundle version has its own firmware pairings and patch sets..task(id: bundleVersion) { await loadCatalog() }.task(id: bundleVersion) { await loadPatchCatalog() }+ .task { await loadDownloaded() }+ .task { await model.machines.refreshTemplates() }+ // Off when there is no template to clone; it can still be turned on+ // to build one.+ .onChange(of: templateAvailable, initial: true) {+ if let templateAvailable {+ usesTemplate = templateAvailable+ }+ }.onAppear {+ if let version = bundleVersion, let known = Self.catalogs[version] {+ apply(known)+ }let root = model.machines.preferredRootlocation = root- openingLocation = rootname = suggestedName(in: root)#if DEBUGif VPhoneLaunchpadPreview.isActive {@@ -200,13 +218,57 @@ struct VPhoneLaunchpadNewMachineView: View {}}+ /// Opens the Advanced Options sheet on `target`; `.basic` closes it.private func open(_ target: Page) {- page = target- if target != .basic {- advancedPage = target+ if target == .basic {+ showsAdvanced = false+ } else {+ page = target+ showsAdvanced = true}}+ // MARK: - Advanced Options++ private var advancedSheet: some View {+ VPhoneLaunchpadSheet(Text("Advanced Options")) {+ VStack(spacing: 0) {+ advancedBar+ Form {+ switch page {+ case .basic, .hardware:+ hardwarePage+ advancedSections(.hardware)+ case .template:+ VPhoneLaunchpadSlimmingSections(part: .template, usesTemplate: $usesTemplate, templateAvailable: templateAvailable, slimming: $slimming)+ case .slimming:+ VPhoneLaunchpadSlimmingSections(part: .slimming, usesTemplate: $usesTemplate, templateAvailable: templateAvailable, slimming: $slimming)+ case .firmware:+ bundleSection+ firmwareSourceSection+ case .patches:+ advancedSections(.patches)+ case .storage:+ // The machine goes in the default location; when that cannot+ // hold it, this says why.+ if let problem = locationProblem ?? templatePathProblem {+ Section {+ Text(problem).foregroundStyle(.red)+ }+ }+ advancedSections(.storage)+ }+ }+ .formStyle(.grouped)+ }+ } actions: {+ Button("Done") { showsAdvanced = false }+ .keyboardShortcut(.defaultAction)+ }+ // One height for every page; the form scrolls.+ .frame(height: 500)+ }+// MARK: - Basic@ViewBuilder@@ -229,8 +291,6 @@ struct VPhoneLaunchpadNewMachineView: View {}}- slimSection-advancedSection}@@ -244,30 +304,55 @@ struct VPhoneLaunchpadNewMachineView: View {}}} else if let catalog {- if catalog.guests.count > 1 {- Picker("Device", selection: Binding(- get: { guest },- set: { choose($0) },- )) {- ForEach(catalog.guests) { guest in- Text(verbatim: guest.name).tag(Optional(guest.id))- }+ Picker("Device", selection: Binding(+ get: { guest },+ set: { choose($0) },+ )) {+ ForEach(catalog.guests) { guest in+ let count = guest.pairings.count(where: isDownloaded)+ Text(verbatim: count > 0 ? "\(guest.name) (\(count))" : guest.name).tag(Optional(guest.id))}+ } currentValueLabel: {+ // The count is for choosing; the closed menu names the device.+ Text(verbatim: selectedGuest?.name ?? "")}Picker(selectedGuest?.isPad == true ? "iPadOS" : "iOS", selection: $pairing) {ForEach((selectedGuest?.pairings ?? []).reversed()) { pairing in- Text(verbatim: "\(pairing.ios.name) (\(pairing.build))").tag(Optional(pairing.id))+ let title = "\(pairing.ios.name) (\(pairing.build))"+ Text(verbatim: isDownloaded(pairing) ? "\(title) ✓" : title).tag(Optional(pairing.id))}+ } currentValueLabel: {+ Text(verbatim: selectedPairing.map { "\($0.ios.name) (\($0.build))" + (isDownloaded($0) ? " ✓" : "") } ?? "")}- } else if let catalogError {- Label(catalogError, systemImage: "exclamationmark.triangle")- .foregroundStyle(.secondary)} else {- HStack {- ProgressView().controlSize(.small)- Text("Loading firmware catalog…").foregroundStyle(.secondary)- }+ // The same rows as a loaded catalog, so the sheet keeps its+ // size when it arrives; the footer says what is happening.+ placeholderPicker("Device")+ placeholderPicker("iOS")+ }+ }++ /// Whether the pairing's iOS or iPadOS IPSW is downloaded, under the name+ /// `fw prepare` gives it or its own.+ private func isDownloaded(_ pairing: VPhoneLaunchpadFirmwareCatalog.Pairing) -> Bool {+ guard let url = URL(string: pairing.ios.url) else {+ return false+ }+ return downloaded.contains(VPhoneLaunchpadIPSW.cacheName(for: url)) || downloaded.contains(url.lastPathComponent)+ }++ private func loadDownloaded() async {+ guard let scan = try? await VPhoneLaunchpadIPSWCache.scan(libraryRoots: model.machines.roots, machineFolders: []) else {+ return+ }+ downloaded = Set(scan.ipsws.filter { !$0.isDownloading }.map(\.name))+ }++ private func placeholderPicker(_ title: LocalizedStringKey) -> some View {+ Picker(title, selection: .constant(0)) {+ Text(catalogError == nil ? "Loading…" : "Unavailable").tag(0)}+ .disabled(true)}@ViewBuilder@@ -284,6 +369,10 @@ struct VPhoneLaunchpadNewMachineView: View {} else if let selectedGuest, let cloudOS = selectedPairing?.recommendedCloudOS.name {Text("Recommended firmware pairings for \(selectedGuest.detailedName), with \(cloudOS).").foregroundStyle(.secondary)+ } else if catalog == nil, let catalogError {+ Text(catalogError).foregroundStyle(.red)+ } else if catalog == nil {+ Text("Loading firmware catalog…").foregroundStyle(.secondary)}}@@ -292,31 +381,12 @@ struct VPhoneLaunchpadNewMachineView: View {return url?.lastPathComponent ?? source}- /// The master switch. The parts are on the System page.- private var slimSection: some View {- Section {- Toggle("Slim System", isOn: $slimming.slim)- .disabled(!usesTemplate)- } footer: {- Group {- if !usesTemplate {- Text("Without a template the machine is not slimmed. Turn templates on in Advanced Options.")- } else if slimming.slim {- Text("Cloned from a shared template that trims system files, unneeded services and system apps once. Setup Assistant is skipped.")- } else {- Text("The template keeps every file, service and app. Setup Assistant is still skipped.")- }- }- .foregroundStyle(.secondary)- }- }-/// One row that opens the advanced pages: what they are set to, how many/// settings differ from the defaults, and anything that stops Create.private var advancedSection: some View {Section {Button {- open(advancedProblem?.page ?? advancedPage)+ open(advancedProblem?.page ?? page)} label: {LabeledContent {HStack(spacing: 6) {@@ -358,19 +428,17 @@ struct VPhoneLaunchpadNewMachineView: View {/// The advanced settings that differ from what the sheet opened with.private var changedCount: Int {- var defaultSlimming = VPhoneLaunchpadSlimming()- // Slim System is on the basic page.- defaultSlimming.slim = slimming.slim+ let defaultSlimming = VPhoneLaunchpadSlimming()return [cpu != Self.defaultCPU,memoryMB != Self.defaultMemoryMB,diskSizeGB != Self.defaultDiskSizeGB,- !usesTemplate,- usesTemplate && slimming != defaultSlimming,+ // Off is the default when no template exists to clone.+ usesTemplate != (templateAvailable ?? true),+ slimming != defaultSlimming,chosenVersion != nil && bundleVersion != model.bundles.defaultVersion,usesCustomSources,patches != VPhoneLaunchpadPatchSelection(),- openingLocation != nil && location != openingLocation,network != Self.defaultNetwork,!usesTemplate && keepArtifacts,].count(where: \.self)@@ -381,18 +449,13 @@ struct VPhoneLaunchpadNewMachineView: View {/// Back to the basic page, and the advanced pages.private var advancedBar: some View {HStack(spacing: 12) {- Button {- open(.basic)- } label: {- Label("Basic Settings", systemImage: "chevron.left")- }- .buttonStyle(.borderless)- .padding(.top, 16)VPhoneLaunchpadSheetPages(selection: Binding(get: { page }, set: { open($0) })) {Text("Hardware").tag(Page.hardware)- Text("System").tag(Page.system)- Text("Firmware & Patches").tag(Page.firmware)- Text("Storage & Network").tag(Page.storage)+ Text("Template").tag(Page.template)+ Text("Slimming").tag(Page.slimming)+ Text("Firmware").tag(Page.firmware)+ Text("Patches").tag(Page.patches)+ Text("Storage").tag(Page.storage)}.frame(maxWidth: .infinity)}@@ -467,82 +530,6 @@ struct VPhoneLaunchpadNewMachineView: View {)}- // MARK: - Location-- private var locationSection: some View {- Section {- locationPicker- } footer: {- if let problem = locationProblem ?? templatePathProblem {- Text(problem).foregroundStyle(.red)- } else {- Text("The machine is created in a folder named after it inside this location.")- .foregroundStyle(.secondary)- }- }- }-- /// The library's locations that are mounted, the default one first, and- /// a folder chosen with Other….- private var locations: [String] {- var roots = model.machines.roots.filter { $0 == model.machines.libraryRoot || VPhoneLaunchpadMachineLocations.isAvailable($0) }- for root in [chosenLocation, location].compactMap(\.self) where !roots.contains(root) {- roots.append(root)- }- return roots- }-- private var locationPicker: some View {- Picker("Location", selection: Binding(- get: { location },- set: { root in- if root.isEmpty {- // Let the menu close before the open panel runs.- Task { @MainActor in chooseLocation() }- } else {- location = root- }- },- )) {- ForEach(locations, id: \.self) { root in- Text(verbatim: VPhoneLaunchpadHostSetup.abbreviated(URL(fileURLWithPath: root, isDirectory: true)))- .tag(root)- }- Divider()- // Library roots are absolute, so an empty tag cannot be one.- Text("Other…").tag("")- }- .help(location)- }-- private func chooseLocation() {- let panel = NSOpenPanel()- panel.title = String(localized: "Choose a Location")- panel.message = String(localized: "The machine is created in a folder with its name inside the folder you choose.")- panel.prompt = String(localized: "Choose")- panel.canChooseFiles = false- panel.canChooseDirectories = true- panel.canCreateDirectories = true- panel.allowsMultipleSelection = false- panel.directoryURL = URL(fileURLWithPath: location, isDirectory: true)- panel.present { url in- useLocation(url)- }- }-- private func useLocation(_ url: URL) {- let root = VPhoneLaunchpadMachineLocations.canonical(url)- if !model.machines.roots.contains(root) {- chosenLocation = root- }- location = root- // Machines already in the folder join the list; a folder that cannot- // hold machines is only shown here, with the reason.- if VPhoneLaunchpadMachineLocations.problem(with: root) == nil {- model.machines.addLocation(root)- }- }-// MARK: - Firmwareprivate var firmwareSourceSection: some View {@@ -618,6 +605,39 @@ struct VPhoneLaunchpadNewMachineView: View {// MARK: - Actions+ /// Each Core Bundle version's catalog, read once per session, so the+ /// sheet opens on the same rows it shows after loading.+ private static var catalogs: [String: VPhoneLaunchpadFirmwareCatalog] = [:]++ /// The default version's catalog, read once per session.+ static func catalog(_ model: VPhoneLaunchpadModel) async -> VPhoneLaunchpadFirmwareCatalog? {+ await prefetchCatalog(model)+ return model.bundles.defaultVersion.flatMap { catalogs[$0] }+ }++ /// Reads the default version's catalog ahead of the sheet.+ static func prefetchCatalog(_ model: VPhoneLaunchpadModel) async {+ guard let version = model.bundles.defaultVersion, catalogs[version] == nil,+ let commandLine = model.bundles.commandLine(version: version),+ let catalog = try? await fetchCatalog(commandLine)+ else {+ return+ }+ catalogs[version] = catalog+ }++ private struct CatalogFailure: LocalizedError {+ var errorDescription: String?+ }++ private static func fetchCatalog(_ commandLine: VPhoneLaunchpadCommandLine) async throws -> VPhoneLaunchpadFirmwareCatalog {+ let result = try await commandLine.run(["fw", "catalog", "--json"], recordInHistory: false)+ guard result.succeeded, let data = result.jsonData else {+ throw CatalogFailure(errorDescription: result.tail)+ }+ return try JSONDecoder().decode(VPhoneLaunchpadFirmwareCatalog.self, from: data)+ }+private func loadCatalog() async {#if DEBUGif VPhoneLaunchpadPreview.isActive {@@ -626,34 +646,36 @@ struct VPhoneLaunchpadNewMachineView: View {return}#endif- let version = bundleVersion- guard let commandLine = version.flatMap(model.bundles.commandLine(version:)) else {+ guard let version = bundleVersion, let commandLine = model.bundles.commandLine(version: version) else {+ return+ }+ if let known = Self.catalogs[version] {+ apply(known)return}do {- let result = try await commandLine.run(["fw", "catalog", "--json"], recordInHistory: false)+ let catalog = try await Self.fetchCatalog(commandLine)+ Self.catalogs[version] = catalog// Another version may have been chosen meanwhile.- guard version == bundleVersion else {- return- }- guard result.succeeded, let data = result.jsonData else {- catalogError = result.tail- return- }- let catalog = try JSONDecoder().decode(VPhoneLaunchpadFirmwareCatalog.self, from: data)- self.catalog = catalog- // The guest and pairing chosen under the previous version stay- // when this one offers them too.- if !catalog.guests.contains(where: { $0.id == guest }) {- choose(catalog.guests.first?.id)- } else if selectedGuest?.pairings.contains(where: { $0.id == pairing }) != true {- pairing = selectedGuest?.defaultPairing?.id+ if version == bundleVersion {+ apply(catalog)}} catch {- guard version == bundleVersion else {- return+ if version == bundleVersion {+ catalogError = error.localizedDescription}- catalogError = error.localizedDescription+ }+ }++ /// The guest and pairing chosen under the previous version stay when+ /// this one offers them too.+ private func apply(_ catalog: VPhoneLaunchpadFirmwareCatalog) {+ self.catalog = catalog+ catalogError = nil+ if !catalog.guests.contains(where: { $0.id == guest }) {+ choose(catalog.guests.first?.id)+ } else if selectedGuest?.pairings.contains(where: { $0.id == pairing }) != true {+ pairing = selectedGuest?.defaultPairing?.id}}@@ -792,7 +814,7 @@ struct VPhoneLaunchpadCreationView: View {.formStyle(.grouped)// A template build lists fourteen steps: the form scrolls in a// sheet that fits a laptop screen instead of growing past it.- .vphoneFittedHeight(limit: VPhoneLaunchpadSheetHeight.maximum - VPhoneLaunchpadSheetHeight.chrome)+ .vphoneFittedHeight(limit: VPhoneLaunchpadSheetSize.maximum - VPhoneLaunchpadSheetSize.chrome).task(id: creation.isFinished && creation.builtTemplate) {guard creation.isFinished, creation.builtTemplate, !offersIPSWs else {return@@ -814,7 +836,6 @@ struct VPhoneLaunchpadCreationView: View {Button("Close") { dismiss() }.keyboardShortcut(.cancelAction)}- .frame(width: 720).fixedSize(horizontal: false, vertical: true).sheet(isPresented: $showsLog) {VPhoneLaunchpadConsoleView(title: "\(creation.options.name) Creation Log", url: creation.logFile)@@ -918,7 +939,7 @@ struct VPhoneLaunchpadTemplateIPSWOffer: View {}}} header: {- Text("Downloaded IPSWs")+ Text("Downloaded Firmware")} footer: {if !deleted {Text("Machines from this template need neither IPSW. A machine with other options downloads them again.")diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadPatchSettingsView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadPatchSettingsView.swiftindex 25ce2b60..837d5b72 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadPatchSettingsView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadPatchSettingsView.swift@@ -38,9 +38,9 @@ struct VPhoneLaunchpadPatchSettingsView: View {@State private var filter = ""/// Empty keeps the order the bundle applies the patches in; a header click/// replaces it.- @State private var sortOrder: [KeyPathComparator<Catalog.Patch>] = []- /// The row whose summary the detail pane reads.- @State private var highlighted: String?+ @State private var sortOrder: [KeyPathComparator<VPhoneLaunchpadPatchRow>] = []+ /// The selected rows; the detail pane reads the summary of one.+ @State private var highlighted: Set<String> = []@State private var confirmsBootEssential = false/// What was on when the editor opened, so the status line can count what/// an edit to an existing machine changes. Taken from the first read.@@ -64,7 +64,7 @@ struct VPhoneLaunchpadPatchSettingsView: View {}var body: some View {- VPhoneLaunchpadSheet(Text("Patches")) {+ VPhoneLaunchpadSheet(Text("Patches"), width: VPhoneLaunchpadSheetSize.wide) {VStack(spacing: 0) {headerDivider()@@ -88,14 +88,12 @@ struct VPhoneLaunchpadPatchSettingsView: View {.keyboardShortcut(.defaultAction).disabled(catalog == nil)}- .frame(width: 920, height: 680)+ .frame(height: 680)// A hidden patch leaves the selection, so the detail pane reads only// a row the table shows..onChange(of: filter) {- if let catalog, let highlighted,- !catalog.patches(matching: filter).contains(where: { $0.identifier == highlighted })- {- self.highlighted = nil+ if let catalog {+ highlighted.formIntersection(catalog.patches(matching: filter).map(\.identifier))}}.confirmationDialog(@@ -114,8 +112,7 @@ struct VPhoneLaunchpadPatchSettingsView: View {private var header: some View {VStack(alignment: .leading, spacing: 6) {HStack(spacing: 8) {- // Sized to its content, so the label sits against the menu- // and lines up with the summary under it.+ // Sized to its content, so the label sits against the menu.Picker("Preset", selection: presetBinding) {ForEach(catalog?.presets ?? []) { preset inText(verbatim: preset.displayTitle).tag(preset.identifier)@@ -130,12 +127,6 @@ struct VPhoneLaunchpadPatchSettingsView: View {VPhoneLaunchpadSearchField(text: $filter, prompt: String(localized: "Filter patches")).frame(width: 220)}- if let summary = catalog?.preset(selection.preset)?.displaySummary, !summary.isEmpty {- Text(verbatim: summary)- .font(.callout)- .foregroundStyle(.secondary)- .fixedSize(horizontal: false, vertical: true)- }}.padding(.horizontal, 16).padding(.vertical, 12)@@ -162,7 +153,9 @@ struct VPhoneLaunchpadPatchSettingsView: View {@ViewBuilderprivate var list: some View {if let catalog {- let rows = catalog.patches(matching: filter).sorted(using: sortOrder)+ let rows = catalog.patches(matching: filter)+ .map { VPhoneLaunchpadPatchRow(patch: $0, on: selection.isOn($0) ? 1 : 0) }+ .sorted(using: sortOrder)if rows.isEmpty {ContentUnavailableView.search(text: filter)} else {@@ -185,9 +178,10 @@ struct VPhoneLaunchpadPatchSettingsView: View {/// A flat table sorted by the order the bundle applies the patches, which/// already runs one set after another. A header click regroups it; sections/// were tried first and make AppKit report a reentrant table delegate.- private func table(_ rows: [Catalog.Patch]) -> some View {+ private func table(_ rows: [VPhoneLaunchpadPatchRow]) -> some View {Table(rows, selection: $highlighted, sortOrder: $sortOrder) {- TableColumn("On") { patch in+ TableColumn("On", value: \.on) { row in+ let patch = row.patchToggle("On", isOn: Binding(get: { selection.isOn(patch) },set: { selection.set(patch, on: $0) },@@ -196,14 +190,16 @@ struct VPhoneLaunchpadPatchSettingsView: View {}.width(36)- TableColumn("Component", value: \.component) { patch in+ TableColumn("Component", value: \.patch.component) { row in+ let patch = row.patchText(verbatim: patch.component).font(.system(.callout, design: .monospaced)).lineLimit(1)}.width(min: 80, ideal: 130)- TableColumn("Effect", value: \.effect) { patch in+ TableColumn("Effect", value: \.patch.effect) { row in+ let patch = row.patchText(verbatim: patch.effect).font(.system(.callout, design: .monospaced)).foregroundStyle(.secondary)@@ -211,18 +207,20 @@ struct VPhoneLaunchpadPatchSettingsView: View {}.width(min: 40, ideal: 50)- TableColumn("Name", value: \.name) { patch in+ TableColumn("Name", value: \.patch.name) { row in+ let patch = row.patchText(verbatim: patch.name).font(.system(.callout, design: .monospaced)).lineLimit(1).truncationMode(.middle).help(patch.identifier)}- .width(min: 140, ideal: 240)+ .width(min: 140, ideal: 220)// Most patches are boot-essential, so a mark on each would say// nothing. It shows only on one that is off.- TableColumn("Patch", value: \.title) { patch in+ TableColumn("Patch", value: \.patch.title) { row in+ let patch = row.patchHStack(spacing: 4) {Text(verbatim: patch.title).lineLimit(1)@@ -236,7 +234,8 @@ struct VPhoneLaunchpadPatchSettingsView: View {}.width(min: 140, ideal: 200)- TableColumn("Applies To", value: \.applicability) { patch in+ TableColumn("Applies To", value: \.patch.applicability) { row in+ let patch = row.patchif patch.isVersionGated {Text(verbatim: patch.applicability).lineLimit(1)} else {@@ -245,6 +244,18 @@ struct VPhoneLaunchpadPatchSettingsView: View {}.width(min: 80, ideal: 110)}+ .contextMenu(forSelectionType: String.self) { ids in+ Button("Turn On") { set(ids, on: true) }+ Button("Turn Off") { set(ids, on: false) }+ }+ .vphoneFocusedOnAppear()+ }++ /// Turns each of the patches with these identifiers on or off.+ private func set(_ ids: Set<String>, on: Bool) {+ for patch in catalog?.patches ?? [] where ids.contains(patch.identifier) {+ selection.set(patch, on: on)+ }}// MARK: - Detail@@ -259,10 +270,14 @@ struct VPhoneLaunchpadPatchSettingsView: View {Image(systemName: "exclamationmark.triangle.fill")}.foregroundStyle(.orange)- .font(.callout)}detail+ .foregroundStyle(.secondary)}+ // The footer's font and edges. As tall as the text: the table gives+ // up the room.+ .font(.caption)+ .fixedSize(horizontal: false, vertical: true).frame(maxWidth: .infinity, alignment: .leading).padding(.horizontal, 16).padding(.vertical, 12)@@ -270,37 +285,15 @@ struct VPhoneLaunchpadPatchSettingsView: View {@ViewBuilderprivate var detail: some View {- if let patch = catalog?.patch(highlighted) {- VStack(alignment: .leading, spacing: 2) {- Text(verbatim: patch.title).font(.headline)- Text(verbatim: patch.summary)- .lineLimit(2)- .fixedSize(horizontal: false, vertical: true)- Text(verbatim: facts(patch).joined(separator: " · "))- .font(.caption)- .foregroundStyle(.secondary)- }- .frame(height: 62, alignment: .topLeading)+ if highlighted.count == 1, let patch = catalog?.patch(highlighted.first) {+ Text(verbatim: patch.summary)+ } else if highlighted.count > 1 {+ Text("^[\(highlighted.count) patch](inflect: true) selected. Control-click to turn them on or off together.")} else {Text("Select a patch to see what it changes.")- .foregroundStyle(.secondary)- .frame(height: 62, alignment: .topLeading)}}- /// The line under a patch's summary: where it comes from, what it- /// applies to, and whether the machine boots without it.- private func facts(_ patch: Catalog.Patch) -> [String] {- var facts = [patch.patchSetName, patch.target]- if patch.isVersionGated {- facts.append(patch.applicability)- }- if patch.bootEssential {- facts.append(String(localized: "Required to boot"))- }- return facts- }-/// What is on, what differs from the preset, and when the choice takes effect.private var status: String {guard let catalog else {@@ -353,7 +346,9 @@ struct VPhoneLaunchpadPatchSettingsView: View {self.catalog = catalog// The detail pane reserves its space either way, so it starts with// something to read rather than a gap.- highlighted = highlighted ?? catalog.patches.first?.identifier+ if highlighted.isEmpty, let first = catalog.patches.first {+ highlighted = [first.identifier]+ }loadError = nil} catch {loadError = VPhoneLaunchpadError.message(for: error)@@ -373,3 +368,15 @@ struct VPhoneLaunchpadPatchSettingsView: View {dismiss()}}++/// One row of the patch table: the patch, with whether it is on, so the On+/// column sorts like the others.+struct VPhoneLaunchpadPatchRow: Identifiable {+ let patch: VPhoneLaunchpadPatchCatalog.Patch+ /// 1 when on.+ let on: Int++ var id: String {+ patch.identifier+ }+}diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSlimmingView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSlimmingView.swiftindex 9e7ace86..c719e5bf 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSlimmingView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSlimmingView.swift@@ -1,35 +1,61 @@import SwiftUI-/// New Machine's System page: whether the machine is cloned from a-/// template, and how that template is slimmed. The switches are part of the-/// template's key: other switches make another template, and both stay.-/// Slim System itself is on the basic page.+/// New Machine's Template and Slimming pages: whether the machine is cloned+/// from a template, and how that template is slimmed. The switches are part+/// of the template's key: other switches make another template, and both+/// stay.struct VPhoneLaunchpadSlimmingSections: View {+ enum Part {+ case template, slimming+ }++ let part: Part@Binding var usesTemplate: Bool+ /// Whether a template exists for the chosen firmware; nil for custom+ /// IPSWs, which the list cannot be matched against.+ var templateAvailable: Bool?@Binding var slimming: VPhoneLaunchpadSlimming@State private var choosesApps = falsevar body: some View {+ switch part {+ case .template:+ templateSection+ case .slimming:+ Section {+ Toggle("Slim System", isOn: $slimming.slim)+ } footer: {+ if !usesTemplate, slimming.slim {+ Text("Without a template the machine is slimmed on its own, with a setup boot of its own. Setup Assistant is skipped.")+ .foregroundStyle(.secondary)+ }+ }+ filesSection+ servicesSection+ }+ }++ private var templateSection: some View {Section {- Toggle("Create from a template", isOn: $usesTemplate)+ Toggle("Use Template", isOn: $usesTemplate)} header: {Text("Template")} footer: {VStack(alignment: .leading, spacing: 4) {+ if templateAvailable == false {+ Text("No template is available for this firmware. Turning this on saves a sample of the machine in the template library.")+ }Text(usesTemplate? "Machines from one template share its SEP root secret and Data volume keys. Turn this off for a machine that needs keys of its own."- : "The machine is restored on its own, with keys of its own. It is not slimmed, and starts at Setup Assistant.")+ : slimming.slim+ ? "The machine is restored on its own, with keys of its own."+ : "The machine is restored on its own, with keys of its own. It starts at Setup Assistant.")if usesTemplate, !slimming.slim {Text("Slim System is off, so the template keeps every file, service and app.")}}.foregroundStyle(.secondary)}-- if usesTemplate {- filesSection- servicesSection- }}// MARK: - Filesdiff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSnapshotsView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSnapshotsView.swiftindex 5452365e..ac625746 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSnapshotsView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSnapshotsView.swift@@ -13,10 +13,13 @@ struct VPhoneLaunchpadSnapshotsView: View {/// Nil until the first list answers.@State private var snapshots: [VPhoneLaunchpadMachineSnapshot]?@State private var listError: String?- @State private var selection: VPhoneLaunchpadMachineSnapshot.ID?+ @State private var selection: Set<VPhoneLaunchpadMachineSnapshot.ID> = []+ /// Empty keeps the order `vm snapshot list` returns; a header click replaces it.+ @State private var sortOrder: [KeyPathComparator<VPhoneLaunchpadMachineSnapshot>] = []@State private var takesSnapshot = false@State private var reversion: VPhoneLaunchpadMachineSnapshot?- @State private var deletion: VPhoneLaunchpadMachineSnapshot?+ /// The snapshots the delete confirmation is for; empty when it is closed.+ @State private var deletion: [VPhoneLaunchpadMachineSnapshot] = []@State private var actionError: VPhoneLaunchpadError?private var library: VPhoneLaunchpadMachineLibrary {@@ -31,8 +34,13 @@ struct VPhoneLaunchpadSnapshotsView: View {state == .stopped}- private var selected: VPhoneLaunchpadMachineSnapshot? {- snapshots?.first { $0.id == selection }+ private var selected: [VPhoneLaunchpadMachineSnapshot] {+ (snapshots ?? []).filter { selection.contains($0.id) }+ }++ /// Revert takes exactly one.+ private var single: VPhoneLaunchpadMachineSnapshot? {+ selected.count == 1 ? selected[0] : nil}var body: some View {@@ -54,15 +62,15 @@ struct VPhoneLaunchpadSnapshotsView: View {Button("Take Snapshot…") { takesSnapshot = true }.disabled(!isStopped || snapshots == nil).help("Save the machine's disk, SEP storage and NVRAM as they are now.")- Button("Revert…") { reversion = selected }- .disabled(!isStopped || selected == nil)+ Button("Revert…") { reversion = single }+ .disabled(!isStopped || single == nil)Button("Delete…") { deletion = selected }- .disabled(!isStopped || selected == nil)+ .disabled(!isStopped || selected.isEmpty)} actions: {Button("Done") { dismiss() }.keyboardShortcut(.defaultAction)}- .frame(width: 640, height: 420)+ .frame(height: 420).task { await reload() }.sheet(isPresented: $takesSnapshot) {VPhoneLaunchpadTakeSnapshotSheet(@@ -70,7 +78,7 @@ struct VPhoneLaunchpadSnapshotsView: View {taken: Set((snapshots ?? []).map(\.name)),) { name, note inrun { try await library.createSnapshot(of: machine, name: name, note: note) }- selection = name+ selection = [name]}}.confirmationDialog(@@ -89,19 +97,27 @@ struct VPhoneLaunchpadSnapshotsView: View {Text("The machine's current disk, SEP storage and NVRAM are replaced with the snapshot's. Anything changed since then is lost unless you take a snapshot first.")}.confirmationDialog(- "Delete Snapshot “\(deletion?.name ?? "")”?",- isPresented: Binding(get: { deletion != nil }, set: {+ deletion.count == 1 ? Text("Delete Snapshot “\(deletion[0].name)”?") : Text("Delete \(deletion.count) Snapshots?"),+ isPresented: Binding(get: { !deletion.isEmpty }, set: {if !$0 {- deletion = nil+ deletion = []}}),presenting: deletion,- ) { snapshot in+ ) { snapshots inButton("Delete", role: .destructive) {- run { try await library.deleteSnapshot(of: machine, name: snapshot.name) }+ run {+ for snapshot in snapshots {+ try await library.deleteSnapshot(of: machine, name: snapshot.name)+ }+ }+ }+ } message: { snapshots in+ if snapshots.count == 1 {+ Text("The snapshot's files are removed. The machine itself is not changed. This cannot be undone.")+ } else {+ Text("Their files are removed. The machine itself is not changed. This cannot be undone.")}- } message: { _ in- Text("The snapshot's files are removed. The machine itself is not changed. This cannot be undone.")}.errorAlert($actionError)}@@ -135,20 +151,20 @@ struct VPhoneLaunchpadSnapshotsView: View {}private func table(_ snapshots: [VPhoneLaunchpadMachineSnapshot]) -> some View {- Table(snapshots, selection: $selection) {- TableColumn("Name") { snapshot in+ Table(snapshots.sorted(using: sortOrder), selection: $selection, sortOrder: $sortOrder) {+ TableColumn("Name", value: \.name) { snapshot inText(verbatim: snapshot.name).lineLimit(1).truncationMode(.middle).help(snapshot.name)}- .width(min: 100, ideal: 140, max: 180)- TableColumn("Date Created") { snapshot in+ .width(min: 90, ideal: 120, max: 160)+ TableColumn("Date Created", value: \.created) { snapshot inText(snapshot.created.formatted(date: .abbreviated, time: .shortened)).monospacedDigit()}- .width(min: 140, ideal: 170, max: 190)- TableColumn("Note") { snapshot in+ .width(min: 120, ideal: 150, max: 170)+ TableColumn("Note", value: \.noteOrder) { snapshot inText(verbatim: snapshot.note ?? "").lineLimit(1).truncationMode(.tail)@@ -156,12 +172,18 @@ struct VPhoneLaunchpadSnapshotsView: View {}}.contextMenu(forSelectionType: VPhoneLaunchpadMachineSnapshot.ID.self) { names in- let snapshot = names.count == 1 ? snapshots.first { names.contains($0.id) } : nil- Button("Revert…") { reversion = snapshot }- .disabled(!isStopped || snapshot == nil)- Button("Delete…", role: .destructive) { deletion = snapshot }- .disabled(!isStopped || snapshot == nil)+ let chosen = snapshots.filter { names.contains($0.id) }+ Button("Revert…") { reversion = chosen.first }+ .disabled(!isStopped || chosen.count != 1)+ Button("Delete…", role: .destructive) { deletion = chosen }+ .disabled(!isStopped || chosen.isEmpty)+ }+ .onDeleteCommand {+ if isStopped, !selected.isEmpty {+ deletion = selected+ }}+ .vphoneFocusedOnAppear()}/// What the actions are waiting for: the command under way, or the@@ -188,7 +210,7 @@ struct VPhoneLaunchpadSnapshotsView: View {#if DEBUGif VPhoneLaunchpadPreview.isActive {snapshots = VPhoneLaunchpadPreview.snapshots- selection = snapshots?.last?.id+ selection = Set(snapshots?.last.map { [$0.id] } ?? [])return}#endif@@ -196,9 +218,7 @@ struct VPhoneLaunchpadSnapshotsView: View {let loaded = try await library.snapshots(of: machine)snapshots = loadedlistError = nil- if let selection, !loaded.contains(where: { $0.id == selection }) {- self.selection = nil- }+ selection.formIntersection(loaded.map(\.id))} catch {listError = VPhoneLaunchpadError.message(for: error)}@@ -272,8 +292,14 @@ struct VPhoneLaunchpadTakeSnapshotSheet: View {.keyboardShortcut(.defaultAction).disabled(!isValid)}- .frame(width: 420).fixedSize(horizontal: false, vertical: true).onAppear { name = VPhoneLaunchpadMachineSnapshot.defaultName(at: Date(), taken: taken) }}}++extension VPhoneLaunchpadMachineSnapshot {+ /// The Note column's order: snapshots without one first.+ var noteOrder: String {+ note ?? ""+ }+}diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadTemplatesView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadTemplatesView.swiftindex 0a2d130d..7d82f271 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadTemplatesView.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadTemplatesView.swift@@ -1,3 +1,4 @@+import AppKitimport SwiftUI// MARK: - Templates@@ -9,8 +10,11 @@ import SwiftUIstruct VPhoneLaunchpadTemplatesView: View {@Environment(VPhoneLaunchpadModel.self) private var model@Environment(\.dismiss) private var dismiss- @State private var selection: VPhoneLaunchpadTemplate.ID?- @State private var deletion: VPhoneLaunchpadTemplate?+ @State private var selection: Set<VPhoneLaunchpadTemplate.ID> = []+ /// Empty keeps the order `vm template list` returns; a header click replaces it.+ @State private var sortOrder: [KeyPathComparator<VPhoneLaunchpadTemplate>] = []+ /// The templates the delete confirmation is for; empty when it is closed.+ @State private var deletion: [VPhoneLaunchpadTemplate] = []@State private var buildDeletion: (libraryRoot: String, name: String)?@State private var isDeleting = false@State private var actionError: VPhoneLaunchpadError?@@ -20,11 +24,11 @@ struct VPhoneLaunchpadTemplatesView: View {}private var templates: [VPhoneLaunchpadTemplate] {- library.templates ?? []+ (library.templates ?? []).sorted(using: sortOrder)}- private var selected: VPhoneLaunchpadTemplate? {- templates.first { $0.id == selection }+ private var selected: [VPhoneLaunchpadTemplate] {+ templates.filter { selection.contains($0.id) }}/// Builds no create holds any more.@@ -37,9 +41,9 @@ struct VPhoneLaunchpadTemplatesView: View {VStack(spacing: 0) {list.frame(maxWidth: .infinity, maxHeight: .infinity)- if let selected {+ if selected.count == 1 {Divider()- detail(selected)+ detail(selected[0])}ForEach(leftovers, id: \.build.path) { leftover inDivider()@@ -59,28 +63,34 @@ struct VPhoneLaunchpadTemplatesView: View {}} accessory: {Button("Delete…") { deletion = selected }- .disabled(selected == nil || isDeleting)- .help(String(localized: "Delete the selected template. Machines created from it keep working."))+ .disabled(selected.isEmpty || isDeleting)+ .help(String(localized: "Delete the selected templates. Machines created from them keep working."))} actions: {Button("Done") { dismiss() }.keyboardShortcut(.defaultAction)}- .frame(width: 980, height: 480)+ .frame(height: 480).task { await reload() }.confirmationDialog(- deletion.map { String(localized: "Delete template \($0.id)?") } ?? "",- isPresented: Binding(get: { deletion != nil }, set: {+ deletion.count == 1 ? String(localized: "Delete template \(deletion[0].id)?") : String(localized: "Delete \(deletion.count) Templates?"),+ isPresented: Binding(get: { !deletion.isEmpty }, set: {if !$0 {- deletion = nil+ deletion = []}}),presenting: deletion,- ) { template in+ ) { templates inButton("Delete", role: .destructive) {- Task { await delete(template.id, in: template.libraryRoot) }+ Task {+ for template in templates {+ guard await delete(template.id, in: template.libraryRoot) else {+ break+ }+ }+ }}- } message: { template in- Text(deletionMessage(template))+ } message: { templates in+ Text(templates.map(deletionMessage).joined(separator: "\n\n"))}.confirmationDialog(String(localized: "Delete the unfinished template build?"),@@ -123,8 +133,8 @@ struct VPhoneLaunchpadTemplatesView: View {}private var table: some View {- Table(templates, selection: $selection) {- TableColumn("Template") { template in+ Table(templates, selection: $selection, sortOrder: $sortOrder) {+ TableColumn("Template", value: \.key.device) { template inVStack(alignment: .leading, spacing: 2) {Text(verbatim: template.key.device)Text(verbatim: template.id)@@ -133,61 +143,58 @@ struct VPhoneLaunchpadTemplatesView: View {}.help(template.path)}- .width(min: 84, ideal: 96)- TableColumn("OS") { template in+ .width(min: 70, ideal: 84)+ TableColumn("OS", value: \.key.iOSVersion) { template inText(verbatim: "\(template.key.osName) \(template.key.iOSVersion) (\(template.key.iOSBuild))").help(Text(verbatim: "cloudOS \(template.key.cloudOSVersion) (\(template.key.cloudOSBuild))"))}- .width(min: 130, ideal: 150)- TableColumn("Preset") { template in+ .width(min: 100, ideal: 110)+ TableColumn("Preset", value: \.key.patchPreset) { template inText(verbatim: "\(template.key.patchPreset), \(template.key.diskSizeGB) GB")}- .width(min: 110, ideal: 120)- TableColumn("Slimming") { template in- Text(template.key.slimming.summary)- .lineLimit(1)- .help(slimmingHelp(template.key.slimming))- }- .width(min: 120, ideal: 150)- TableColumn("Size") { template in+ .width(min: 70, ideal: 84)+ TableColumn("Size", value: \.allocatedBytes) { template inText(verbatim: VPhoneLaunchpadDiskUsage.format(template.allocatedBytes)).monospacedDigit().help(sizeHelp(template))}- .width(min: 60, ideal: 70)+ .width(min: 50, ideal: 56).alignment(.numeric)- TableColumn("Machines") { template in+ TableColumn("Machines", value: \.machinesOrder) { template inText(verbatim: template.machines.isEmpty ? "—" : template.machines.joined(separator: ", ")).foregroundStyle(template.machines.isEmpty ? .secondary : .primary).lineLimit(1).truncationMode(.tail).help(template.machines.joined(separator: ", "))}- .width(min: 64, ideal: 86)- TableColumn("State") { template in+ .width(min: 50, ideal: 60)+ TableColumn("State", value: \.staleOrder) { template in+ // The icon alone: the detail below says what is outdated.if template.stale {- Label {- Text("Outdated")- } icon: {- VPhoneLaunchpadStatusIcon(status: .warning)- }- .help(template.staleReasons.joined(separator: "\n"))+ VPhoneLaunchpadStatusIcon(status: .warning)+ .help(String(localized: "Outdated") + "\n" + template.staleReasons.joined(separator: "\n"))} else {- Label {- Text("Current")- } icon: {- VPhoneLaunchpadStatusIcon(status: .passed)- }+ VPhoneLaunchpadStatusIcon(status: .passed)+ .help(String(localized: "Current"))}}- .width(min: 76, ideal: 84)- TableColumn("Created") { template in- Text(template.created, format: .dateTime.year().month(.defaultDigits).day())- .help(template.created.formatted(date: .long, time: .shortened))+ .width(40)+ }+ .contextMenu(forSelectionType: VPhoneLaunchpadTemplate.ID.self) { ids in+ Button("Show in Finder") {+ NSWorkspace.shared.activateFileViewerSelecting(templates.filter { ids.contains($0.id) }.map(\.url))}- .width(min: 70, ideal: 84)+ .disabled(ids.isEmpty)+ Divider()+ Button("Delete…", role: .destructive) { deletion = templates.filter { ids.contains($0.id) } }+ .disabled(ids.isEmpty || isDeleting)}- .onDeleteCommand { deletion = selected }+ .onDeleteCommand {+ if !isDeleting {+ deletion = selected+ }+ }+ .vphoneFocusedOnAppear()}/// The selected template's details that do not fit a column.@@ -200,6 +207,10 @@ struct VPhoneLaunchpadTemplatesView: View {Image(systemName: "exclamationmark.triangle.fill").foregroundStyle(.yellow)}}+ // Slimming and the date are here rather than in columns, which the+ // sheet has no room for.+ Text(verbatim: [template.key.slimming.summary, String(localized: "Created \(template.created.formatted(date: .abbreviated, time: .shortened))")].filter { !$0.isEmpty }.joined(separator: " · "))+ .help(slimmingHelp(template.key.slimming))if let sources = template.sources {Text("Built from \(URL(string: sources.iPhone)?.lastPathComponent ?? sources.iPhone) and cloudOS \(template.key.cloudOSVersion) (\(template.key.cloudOSBuild)).")}@@ -253,29 +264,46 @@ struct VPhoneLaunchpadTemplatesView: View {#if DEBUGif VPhoneLaunchpadPreview.isActive {library.applyPreviewTemplates()- selection = selection ?? VPhoneLaunchpadPreview.templates.first?.id+ if selection.isEmpty, let first = VPhoneLaunchpadPreview.templates.first {+ selection = [first.id]+ }return}#endifawait library.refreshTemplates()- if let selection, !templates.contains(where: { $0.id == selection }) {- self.selection = nil- }+ selection.formIntersection(templates.map(\.id))}- private func delete(_ name: String, in root: String) async {+ /// False when it failed, so a batch stops there.+ @discardableResult+ private func delete(_ name: String, in root: String) async -> Bool {guard !isDeleting else {- return+ return false}isDeleting = truedefer { isDeleting = false }do {try await library.deleteTemplate(name, in: root)} catch is CancellationError {- return+ return false} catch {actionError = VPhoneLaunchpadError(actionFailure: error)+ await reload()+ return false}await reload()+ return true+ }+}++extension VPhoneLaunchpadTemplate {+ /// The Machines column's order: unused templates first, then by the names.+ var machinesOrder: String {+ machines.joined(separator: ", ")+ }++ /// The State column's order: current, then outdated.+ var staleOrder: Int {+ stale ? 1 : 0}}