Merge pull request #15 from cocoa-xu/cx-fix-make-venv-keystone

This commit is contained in:
Lakr
2026-02-28 13:01:57 +09:00
committed by Lakr
parent e65e78d090
commit d9e66ae30d
5 changed files with 16 additions and 10 deletions

View File

@@ -18,7 +18,7 @@ let package = Package(
publicHeadersPath: "include",
linkerSettings: [
.linkedFramework("Virtualization"),
],
]
),
// Swift executable
.executableTarget(
@@ -34,7 +34,7 @@ let package = Package(
linkerSettings: [
.linkedFramework("Virtualization"),
.linkedFramework("AppKit"),
],
),
],
]
)
]
)

View File

@@ -30,9 +30,11 @@ die() { echo "[-] $*" >&2; exit 1; }
check_tools() {
local missing=()
for cmd in autoconf automake libtool pkg-config cmake git; do
for cmd in autoconf automake pkg-config cmake git; do
command -v "$cmd" &>/dev/null || missing+=("$cmd")
done
command -v glibtoolize &>/dev/null || command -v libtoolize &>/dev/null \
|| missing+=("libtool(ize)")
(( ${#missing[@]} == 0 )) || die "Missing: ${missing[*]} — brew install ${missing[*]}"
}

View File

@@ -41,8 +41,12 @@ pip install -r "${REQUIREMENTS}"
# so we build a dylib from it and place it inside the venv.
echo ""
echo "=== Building keystone dylib ==="
KEYSTONE_STATIC="$(find /opt/homebrew/Cellar/keystone -name 'libkeystone.a' -type f 2>/dev/null | head -1)"
KEYSTONE_DIR="/opt/homebrew/Cellar/keystone"
if [ ! -d "${KEYSTONE_DIR}" ]; then
echo "Error: keystone not found. Install with: brew install keystone"
exit 1
fi
KEYSTONE_STATIC="$(find "${KEYSTONE_DIR}" -name 'libkeystone.a' -type f 2>/dev/null | head -1)"
if [[ -z "${KEYSTONE_STATIC}" ]]; then
echo "Error: libkeystone.a not found. Install with: brew install keystone"
exit 1

View File

@@ -19,7 +19,7 @@ struct VPhoneCLI: AsyncParsableCommand {
Example:
vphone-cli --rom firmware/rom.bin --disk firmware/disk.img
""",
"""
)
@Option(help: "Path to the AVPBooter / ROM binary")
@@ -98,7 +98,7 @@ struct VPhoneCLI: AsyncParsableCommand {
sepRomURL: sepRomURL,
serialLogPath: serialLog,
stopOnPanic: stopOnPanic,
stopOnFatalError: stopOnFatalError,
stopOnFatalError: stopOnFatalError
)
let vm = try VPhoneVM(options: options)

View File

@@ -48,7 +48,7 @@ class VPhoneVM: NSObject, VZVirtualMachineDelegate {
let auxStorage = try VZMacAuxiliaryStorage(
creatingStorageAt: options.nvramURL,
hardwareModel: hwModel,
options: .allowOverwrite,
options: .allowOverwrite
)
platform.auxiliaryStorage = auxStorage
platform.hardwareModel = hwModel