Author SHA1 Message Date
Local Admin e0b1719921 amended build target version numbers
Build macOS Packages / Build macOS (Intel) (push) Successful in 31s
Build macOS Packages / Build macOS (Apple Silicon) (push) Successful in 48s
Build macOS Packages / Build macOS (Universal) (push) Failing after 11s
2026-09-07 06:30:42 -07:00
Local Admin fe68c5c01d build fixes
Build macOS Packages / Build macOS (Intel) (push) Successful in 38s
Build macOS Packages / Build macOS (Apple Silicon) (push) Successful in 38s
Build macOS Packages / Build macOS (Universal) (push) Failing after 9s
2026-09-07 06:20:29 -07:00
6 changed files with 34 additions and 14 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ This directory is the **native AppKit implementation** of [`SPEC.md`](SPEC.md).
| Item | Value | | Item | Value |
|------|--------| |------|--------|
| macOS | 10.15 Catalina → 26+ Tahoe | | macOS | Intel **10.15** Catalina · Apple Silicon **11.0** Big Sur → 26+ Tahoe |
| Architecture | Universal 2 (Intel + Apple Silicon) | | Architecture | Universal 2 (Intel + Apple Silicon) |
| Xcode | Command Line Tools / full Xcode (Swift 5) | | Xcode | Command Line Tools / full Xcode (Swift 5) |
| Sandbox | Hardened Runtime **on**, App Sandbox **off** | | Sandbox | Hardened Runtime **on**, App Sandbox **off** |
+3 -1
View File
@@ -34,7 +34,8 @@ if xcodebuild_works; then
# shellcheck source=lib.sh # shellcheck source=lib.sh
source "$SCRIPTS/lib.sh" source "$SCRIPTS/lib.sh"
JOBS="$(cpu_jobs)" JOBS="$(cpu_jobs)"
echo "==> Building TargetPrint ($CONFIGURATION, $ARCH) with $XCODEBUILD (-jobs $JOBS)" MIN_OS="$(min_os_for_arch "$ARCH")"
echo "==> Building TargetPrint ($CONFIGURATION, $ARCH, min $MIN_OS) with $XCODEBUILD (-jobs $JOBS)"
rm -rf "$OUT_DIR" rm -rf "$OUT_DIR"
mkdir -p "$OUT_DIR" "$DD_DIR" mkdir -p "$OUT_DIR" "$DD_DIR"
"$XCODEBUILD" \ "$XCODEBUILD" \
@@ -47,6 +48,7 @@ if xcodebuild_works; then
-derivedDataPath "$DD_DIR" \ -derivedDataPath "$DD_DIR" \
CONFIGURATION_BUILD_DIR="$OUT_DIR" \ CONFIGURATION_BUILD_DIR="$OUT_DIR" \
ONLY_ACTIVE_ARCH=NO \ ONLY_ACTIVE_ARCH=NO \
MACOSX_DEPLOYMENT_TARGET="$MIN_OS" \
CODE_SIGN_IDENTITY="${MACOS_CODESIGN_IDENTITY:--}" \ CODE_SIGN_IDENTITY="${MACOS_CODESIGN_IDENTITY:--}" \
CODE_SIGNING_ALLOWED=YES \ CODE_SIGNING_ALLOWED=YES \
ENABLE_HARDENED_RUNTIME=YES \ ENABLE_HARDENED_RUNTIME=YES \
+9
View File
@@ -39,6 +39,15 @@ cpu_jobs() {
sysctl -n hw.ncpu 2>/dev/null || nproc 2>/dev/null || echo 4 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() { zip_app() {
local app="$1" local app="$1"
local dest="$2" local dest="$2"
+3 -8
View File
@@ -20,22 +20,17 @@ BIN="$MACOS_DIR/TargetPrint"
SDKROOT="${SDKROOT:-$(xcrun --sdk macosx --show-sdk-path)}" SDKROOT="${SDKROOT:-$(xcrun --sdk macosx --show-sdk-path)}"
SWIFT="${SWIFT:-$(xcrun --find swiftc)}" SWIFT="${SWIFT:-$(xcrun --find swiftc)}"
# Match the SDK so swiftc uses the prebuilt stdlib. Targeting macos10.15
# with a modern CLT compiler forces a multi-minute stdlib rebuild and
# still may not find a compatible x86_64 runtime.
SDK_VER="$(xcrun --sdk macosx --show-sdk-version 2>/dev/null || sw_vers -productVersion)"
SDK_VER="${SDK_VER%%$'\n'*}"
TARGET="${ARCH}-apple-macos${SDK_VER}"
MIN_OS="10.15"
# shellcheck source=lib.sh # shellcheck source=lib.sh
source "$(dirname "$0")/lib.sh" source "$(dirname "$0")/lib.sh"
JOBS="$(cpu_jobs)" JOBS="$(cpu_jobs)"
MIN_OS="$(min_os_for_arch "$ARCH")"
TARGET="${ARCH}-apple-macos${MIN_OS}"
echo "==> swiftc build ($CONFIGURATION, $ARCH, $JOBS threads)" echo "==> swiftc build ($CONFIGURATION, $ARCH, $JOBS threads)"
echo " SDKROOT=$SDKROOT" echo " SDKROOT=$SDKROOT"
echo " SWIFT=$SWIFT" echo " SWIFT=$SWIFT"
echo " TARGET=$TARGET" echo " TARGET=$TARGET (min $MIN_OS)"
rm -rf "$APP" rm -rf "$APP"
mkdir -p "$MACOS_DIR" "$RES_DIR" mkdir -p "$MACOS_DIR" "$RES_DIR"
@@ -1,4 +1,5 @@
import AppKit import AppKit
import UniformTypeIdentifiers
/// SPEC §9 three-pane window: thumbnails | canvas | inspector. /// SPEC §9 three-pane window: thumbnails | canvas | inspector.
@@ -211,7 +212,15 @@ final class PreviewWindowController: NSWindowController {
let panel = NSOpenPanel() let panel = NSOpenPanel()
panel.allowsMultipleSelection = true panel.allowsMultipleSelection = true
panel.canChooseDirectories = false panel.canChooseDirectories = false
if #available(macOS 12.0, *) {
var types: [UTType] = [.tiff, .json]
if let jobType = UTType(filenameExtension: "targetjob") {
types.append(jobType)
}
panel.allowedContentTypes = types
} else {
panel.allowedFileTypes = ["tif", "tiff", "targetjob", "json"] panel.allowedFileTypes = ["tif", "tiff", "targetjob", "json"]
}
panel.begin { result in panel.begin { result in
if result == .OK { completion(panel.urls) } if result == .OK { completion(panel.urls) }
} }
+7 -2
View File
@@ -82,12 +82,17 @@ enum ColorMatching {
static func stripColorMatchingAccessories(from panel: NSPrintPanel) { static func stripColorMatchingAccessories(from panel: NSPrintPanel) {
let accessories = panel.accessoryControllers let accessories = panel.accessoryControllers
for ac in accessories { for ac in accessories {
let title = (ac.title ?? "") + " " + (ac.nibName ?? "") let cls = NSStringFromClass(type(of: ac))
let title = (ac.title ?? "") + " " + (ac.nibName ?? "") + " " + cls
let hay = title.lowercased() let hay = title.lowercased()
if hay.contains("color matching") || hay.contains("colour matching") || hay.contains("colormatch") { if hay.contains("color matching") || hay.contains("colour matching") || hay.contains("colormatch") {
panel.removeAccessoryController(ac) // SDK types this as NSViewController; removeAccessoryController
// requires NSPrintPanelAccessorizing (SPEC §7.2).
if let accessor = ac as? (NSViewController & NSPrintPanelAccessorizing) {
panel.removeAccessoryController(accessor)
TPLog.info("Removed print-panel accessory: \(title)") TPLog.info("Removed print-panel accessory: \(title)")
} }
} }
} }
} }
}