Files
ICCery-CPU/Scripts/lib.sh
gronod e319e5b106
Build macOS Packages / Build macOS (Intel) (pull_request) Successful in 39s
Build macOS Packages / Build macOS (Apple Silicon) (pull_request) Successful in 40s
Build macOS Packages / Build macOS (Universal) (pull_request) Failing after 10s
fix: resolve PPD media type and tray option discovery and selection
- 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
2026-09-07 22:45:02 +01:00

57 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# Shared helpers for TargetPrint release scripts.
macos_root() {
# Works when this tree is the Gitea repo root *or* lives under macos/.
local here
here="$(cd "$(dirname "${BASH_SOURCE[1]}")/.." && pwd)"
if [[ -d "$here/TargetPrint.xcodeproj" ]]; then
echo "$here"
return
fi
if [[ -d "$here/macos/TargetPrint.xcodeproj" ]]; then
echo "$here/macos"
return
fi
echo "$here"
}
sign_app() {
local app="$1"
local entitlements="$2"
local identity="${MACOS_CODESIGN_IDENTITY:--}"
if ! command -v codesign >/dev/null 2>&1; then
echo "codesign not available; skipping"
return 0
fi
codesign --force --deep --options runtime \
--sign "$identity" \
--entitlements "$entitlements" \
"$app"
codesign --verify --verbose=2 "$app" || true
}
cpu_jobs() {
if [ -n "${JOBS:-}" ]; then
echo "$JOBS"
return
fi
sysctl -n hw.ncpu 2>/dev/null || nproc 2>/dev/null || echo 4
}
# Intel: Catalina 10.15. Apple Silicon did not exist until Big Sur 11.0.
min_os_for_arch() {
case "$1" in
x86_64) echo "${MACOSX_DEPLOYMENT_TARGET_X86_64:-10.15}" ;;
arm64) echo "${MACOSX_DEPLOYMENT_TARGET_ARM64:-11.0}" ;;
*) echo "10.15" ;;
esac
}
zip_app() {
local app="$1"
local dest="$2"
rm -f "$dest"
ditto -c -k --keepParent "$app" "$dest"
}