Files
ICCery-CPU/Scripts/create_dmg.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

42 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Installable UDZO disk image: TargetPrint.app + /Applications shortcut.
# System tools only (hdiutil). No create-dmg / npm.
# Usage: create_dmg.sh <TargetPrint.app> <output.dmg> [volume name]
set -euo pipefail
APP="${1:?path to TargetPrint.app}"
DMG="${2:?output .dmg path}"
VOLNAME="${3:-TargetPrint}"
test -d "$APP"
APP_NAME="$(basename "$APP")"
STAGE="$(mktemp -d /tmp/targetprint-dmg-XXXXXX)"
cleanup() { rm -rf "$STAGE"; }
trap cleanup EXIT
mkdir -p "$STAGE"
cp -R "$APP" "$STAGE/$APP_NAME"
ln -s /Applications "$STAGE/Applications"
# Optional background for Finder (ignored by hdiutil srcfolder; kept next to
# the app so a later Finder-layout pass can use it).
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
if [[ -f "$ROOT/Resources/dmg/background.png" ]]; then
mkdir -p "$STAGE/.background"
cp "$ROOT/Resources/dmg/background.png" "$STAGE/.background/background.png"
fi
rm -f "$DMG"
mkdir -p "$(dirname "$DMG")"
echo "==> Creating $DMG"
hdiutil create \
-volname "$VOLNAME" \
-srcfolder "$STAGE" \
-ov \
-format UDZO \
-imagekey zlib-level=9 \
"$DMG"
echo "==> $(du -h "$DMG" | awk '{print $1}') $DMG"