mirror of
https://github.com/Lakr233/vphone-cli.git
synced 2026-09-05 17:14:28 +00:00
Merge pull request #15 from cocoa-xu/cx-fix-make-venv-keystone
This commit is contained in:
+4
-4
@@ -18,7 +18,7 @@ let package = Package(
|
|||||||
publicHeadersPath: "include",
|
publicHeadersPath: "include",
|
||||||
linkerSettings: [
|
linkerSettings: [
|
||||||
.linkedFramework("Virtualization"),
|
.linkedFramework("Virtualization"),
|
||||||
],
|
]
|
||||||
),
|
),
|
||||||
// Swift executable
|
// Swift executable
|
||||||
.executableTarget(
|
.executableTarget(
|
||||||
@@ -34,7 +34,7 @@ let package = Package(
|
|||||||
linkerSettings: [
|
linkerSettings: [
|
||||||
.linkedFramework("Virtualization"),
|
.linkedFramework("Virtualization"),
|
||||||
.linkedFramework("AppKit"),
|
.linkedFramework("AppKit"),
|
||||||
],
|
]
|
||||||
),
|
)
|
||||||
],
|
]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -30,9 +30,11 @@ die() { echo "[-] $*" >&2; exit 1; }
|
|||||||
|
|
||||||
check_tools() {
|
check_tools() {
|
||||||
local missing=()
|
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")
|
command -v "$cmd" &>/dev/null || missing+=("$cmd")
|
||||||
done
|
done
|
||||||
|
command -v glibtoolize &>/dev/null || command -v libtoolize &>/dev/null \
|
||||||
|
|| missing+=("libtool(ize)")
|
||||||
(( ${#missing[@]} == 0 )) || die "Missing: ${missing[*]} — brew install ${missing[*]}"
|
(( ${#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.
|
# so we build a dylib from it and place it inside the venv.
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Building keystone dylib ==="
|
echo "=== Building keystone dylib ==="
|
||||||
|
KEYSTONE_DIR="/opt/homebrew/Cellar/keystone"
|
||||||
KEYSTONE_STATIC="$(find /opt/homebrew/Cellar/keystone -name 'libkeystone.a' -type f 2>/dev/null | head -1)"
|
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
|
if [[ -z "${KEYSTONE_STATIC}" ]]; then
|
||||||
echo "Error: libkeystone.a not found. Install with: brew install keystone"
|
echo "Error: libkeystone.a not found. Install with: brew install keystone"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ struct VPhoneCLI: AsyncParsableCommand {
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
vphone-cli --rom firmware/rom.bin --disk firmware/disk.img
|
vphone-cli --rom firmware/rom.bin --disk firmware/disk.img
|
||||||
""",
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
@Option(help: "Path to the AVPBooter / ROM binary")
|
@Option(help: "Path to the AVPBooter / ROM binary")
|
||||||
@@ -98,7 +98,7 @@ struct VPhoneCLI: AsyncParsableCommand {
|
|||||||
sepRomURL: sepRomURL,
|
sepRomURL: sepRomURL,
|
||||||
serialLogPath: serialLog,
|
serialLogPath: serialLog,
|
||||||
stopOnPanic: stopOnPanic,
|
stopOnPanic: stopOnPanic,
|
||||||
stopOnFatalError: stopOnFatalError,
|
stopOnFatalError: stopOnFatalError
|
||||||
)
|
)
|
||||||
|
|
||||||
let vm = try VPhoneVM(options: options)
|
let vm = try VPhoneVM(options: options)
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class VPhoneVM: NSObject, VZVirtualMachineDelegate {
|
|||||||
let auxStorage = try VZMacAuxiliaryStorage(
|
let auxStorage = try VZMacAuxiliaryStorage(
|
||||||
creatingStorageAt: options.nvramURL,
|
creatingStorageAt: options.nvramURL,
|
||||||
hardwareModel: hwModel,
|
hardwareModel: hwModel,
|
||||||
options: .allowOverwrite,
|
options: .allowOverwrite
|
||||||
)
|
)
|
||||||
platform.auxiliaryStorage = auxStorage
|
platform.auxiliaryStorage = auxStorage
|
||||||
platform.hardwareModel = hwModel
|
platform.hardwareModel = hwModel
|
||||||
|
|||||||
Reference in New Issue
Block a user