diff --git a/Package.swift b/Package.swift index 120bae1..963fec4 100644 --- a/Package.swift +++ b/Package.swift @@ -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"), - ], - ), - ], + ] + ) + ] ) diff --git a/scripts/setup_libimobiledevice.sh b/scripts/setup_libimobiledevice.sh index d9ab647..d789fe8 100755 --- a/scripts/setup_libimobiledevice.sh +++ b/scripts/setup_libimobiledevice.sh @@ -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[*]}" } diff --git a/scripts/setup_venv.sh b/scripts/setup_venv.sh index b0a831e..50f3543 100755 --- a/scripts/setup_venv.sh +++ b/scripts/setup_venv.sh @@ -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 diff --git a/sources/vphone-cli/VPhoneCLI.swift b/sources/vphone-cli/VPhoneCLI.swift index dcf8e3d..5a2c6f5 100644 --- a/sources/vphone-cli/VPhoneCLI.swift +++ b/sources/vphone-cli/VPhoneCLI.swift @@ -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) diff --git a/sources/vphone-cli/VPhoneVM.swift b/sources/vphone-cli/VPhoneVM.swift index 5725503..7d706b1 100644 --- a/sources/vphone-cli/VPhoneVM.swift +++ b/sources/vphone-cli/VPhoneVM.swift @@ -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