Files
vphone-cli/Package.swift
T
zqxwceandClaude Opus 4.8 828be6dbc6 feat: add VPhoneCore library — VM bundle model + host primitives
The library the consolidated CLI is built on:
- bundle/library model (VPhoneBundle, VPhoneLibrary, VPhoneVirtualMachineManifest),
  bundle ops + reporting, restore helpers (VPhoneRestoreOps)
- host process primitives: VPhoneProcessRunner, VPhoneManagedProcess (spawn +
  stdout pattern-match + SIGKILL-escalating terminate), VPhoneLaunchLayout,
  VPhoneBootPatterns
- VPhoneResources: bundled-.app vs dev asset resolution, and Python resolution
  that provisions a per-user venv (~/.vphone/venv) on demand so the app is
  portable — never depends on the repo's .venv
- VPhoneVerbosity (quiet/info/debug/trace) and VPhoneVMPicker
Manifest moves out of the executable target into VPhoneCore. Full unit-test
suite under tests/VPhoneCoreTests.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Y4VDqWf5pVakcFLqB23CKe
2026-07-27 19:46:27 +03:00

65 lines
2.0 KiB
Swift

// swift-tools-version:6.0
import PackageDescription
let package = Package(
name: "vphone-cli",
platforms: [
.macOS(.v15),
],
products: [],
dependencies: [
.package(path: "vendor/swift-argument-parser"),
.package(path: "vendor/Dynamic"),
.package(path: "vendor/libcapstone-spm"),
.package(path: "vendor/libimg4-spm"),
.package(path: "vendor/MachOKit"),
],
targets: [
.target(
name: "FirmwarePatcher",
dependencies: [
.product(name: "Capstone", package: "libcapstone-spm"),
.product(name: "Img4tool", package: "libimg4-spm"),
.product(name: "MachOKit", package: "MachOKit"),
"VPhoneCore",
],
path: "sources/FirmwarePatcher"
),
.target(
name: "VPhoneCore",
path: "sources/VPhoneCore",
linkerSettings: [
.linkedFramework("Virtualization"),
]
),
.executableTarget(
name: "vphone-cli",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "Dynamic", package: "Dynamic"),
"FirmwarePatcher",
"VPhoneCore",
],
path: "sources/vphone-cli",
linkerSettings: [
.linkedFramework("Virtualization"),
.linkedFramework("AppKit"),
.linkedFramework("SwiftUI"),
.linkedFramework("CoreLocation"),
.linkedFramework("AVFoundation"),
]
),
.testTarget(
name: "FirmwarePatcherTests",
dependencies: ["FirmwarePatcher"],
path: "tests/FirmwarePatcherTests"
),
.testTarget(
name: "VPhoneCoreTests",
dependencies: ["VPhoneCore"],
path: "tests/VPhoneCoreTests"
),
]
)