- Parse PPD translation strings and decode hex escapes (e.g. CD<2F>DVD -> CD/DVD) - Populate InspectorView media type and tray dropdowns with human-readable titles while preserving computer-readable choice codes - Fix empty-array nil coalescing bug in InspectorView preventing empty tray and media type popups - Support OEM vendor PPD keywords (Canon CNIJMediaType/CNIJMediaSupply, Epson EPIJ_FdSo) - Add dual-identity lookup in PrintEngine and InspectorView for robust choice code vs title resolution - Add comprehensive PPDOptionsTests and CLI test runner Closes #1, Closes #2
39 lines
1.1 KiB
Bash
Executable File
39 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Lipo x86_64 + arm64 TargetPrint.app into a Universal 2 bundle.
|
|
# Usage: make_universal.sh [x86_app] [arm_app] [out_app]
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
X86_APP="${1:-$ROOT/build/apps/x86_64/TargetPrint.app}"
|
|
ARM_APP="${2:-$ROOT/build/apps/arm64/TargetPrint.app}"
|
|
OUT_APP="${3:-$ROOT/build/apps/universal/TargetPrint.app}"
|
|
|
|
test -d "$X86_APP"
|
|
test -d "$ARM_APP"
|
|
|
|
echo "==> Universal 2 from"
|
|
echo " x86_64: $X86_APP"
|
|
echo " arm64: $ARM_APP"
|
|
|
|
rm -rf "$OUT_APP"
|
|
mkdir -p "$(dirname "$OUT_APP")"
|
|
# Copy the arm64 bundle as the template (same resources), then replace the Mach-O.
|
|
cp -R "$ARM_APP" "$OUT_APP"
|
|
|
|
lipo -create \
|
|
"$X86_APP/Contents/MacOS/TargetPrint" \
|
|
"$ARM_APP/Contents/MacOS/TargetPrint" \
|
|
-output "$OUT_APP/Contents/MacOS/TargetPrint"
|
|
|
|
# shellcheck source=lib.sh
|
|
source "$(dirname "$0")/lib.sh"
|
|
sign_app "$OUT_APP" "$ROOT/TargetPrint.entitlements"
|
|
|
|
echo "==> lipo -info"
|
|
lipo -info "$OUT_APP/Contents/MacOS/TargetPrint"
|
|
ARCHS="$(lipo -archs "$OUT_APP/Contents/MacOS/TargetPrint")"
|
|
echo "$ARCHS" | grep -q x86_64
|
|
echo "$ARCHS" | grep -q arm64
|
|
|
|
echo "==> $OUT_APP"
|