mirror of
https://github.com/Lakr233/vphone-cli.git
synced 2026-04-05 04:59:05 +08:00
Merge pull request #15 from cocoa-xu/cx-fix-make-venv-keystone
This commit is contained in:
@@ -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"),
|
||||
],
|
||||
),
|
||||
],
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
@@ -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[*]}"
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user