Rename PrintCraft to PdfCraft (#174)

The app, crates, binaries, bundle id, packaging, icons, screenshots and docs are now
PdfCraft / pdfcraft (repo storytold/pdfcraft). On first launch the desktop app moves the
PrintCraft settings and crash-recovery folders to the new name, and both apps read settings
saved under the old storage key, so upgrades keep recent files, preferences and unsaved work.
The signing test fixtures keep their PrintCraft subject names (they are binary).

Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Brandon ThomasandClaude Opus 5.5 authored and GitHub committed 2026-10-07 16:03:57 -04:00
1 parent 1c78ff479c
commit d3db99818f
351 files changed
+3218 -3216

No files matched your search

+10 -10
View File
@@ -7,13 +7,13 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>PrintCraft</string>
<string>PdfCraft</string>
<key>CFBundleName</key>
<string>PrintCraft</string>
<string>PdfCraft</string>
<key>CFBundleExecutable</key>
<string>PrintCraft</string>
<string>PdfCraft</string>
<key>CFBundleIdentifier</key>
<string>ai.storyteller.printcraft</string>
<string>ai.storyteller.pdfcraft</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
@@ -24,12 +24,12 @@
<string>@SHORT_VERSION@</string>
<key>CFBundleVersion</key>
<string>@SHORT_VERSION@</string>
<key>PrintCraftVersion</key>
<key>PdfCraftVersion</key>
<string>@VERSION@</string>
<key>PrintCraftBuildCommit</key>
<key>PdfCraftBuildCommit</key>
<string>@BUILD_SHA@</string>
<key>CFBundleIconFile</key>
<string>PrintCraft</string>
<string>PdfCraft</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.graphics-design</string>
<!-- Must match MACOSX_DEPLOYMENT_TARGET in package.sh. Big Sur is the first release on
@@ -43,12 +43,12 @@
<key>NSRequiresAquaSystemAppearance</key>
<false/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © the PrintCraft authors. MIT OR Apache-2.0.</string>
<string>Copyright © the PdfCraft authors. MIT OR Apache-2.0.</string>
<!-- Documents PrintCraft opens (#73): it is offered under Open With and can be made the default
<!-- Documents PdfCraft opens (#73): it is offered under Open With and can be made the default
for PDFs, without taking over from the system's viewer on install ("Alternate"). Declared by
extension and MIME type; LaunchServices maps them to the system's PDF type. Finder hands the
file over as an Apple event, which apps/printcraft/src/apple_events.rs receives. -->
file over as an Apple event, which apps/pdfcraft/src/apple_events.rs receives. -->
<key>CFBundleDocumentTypes</key>
<array>
<dict>
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Hardened-runtime entitlements for Printcraft. Deliberately empty: the app is pure Rust,
<!-- Hardened-runtime entitlements for Pdfcraft. Deliberately empty: the app is pure Rust,
loads no unsigned code, needs no JIT, and is not sandboxed (it opens files by path, from the
command line and drag-and-drop). Add exceptions here only with a reason in a comment. -->
<plist version="1.0">
+2 -2
View File
@@ -18,8 +18,8 @@ if [ -z "${APPLE_CERTIFICATE:-}" ]; then
fi
TMP="${RUNNER_TEMP:-${TMPDIR:-/tmp}}"
KEYCHAIN="$TMP/printcraft-signing.keychain-db"
CERT="$TMP/printcraft-signing.p12"
KEYCHAIN="$TMP/pdfcraft-signing.keychain-db"
CERT="$TMP/pdfcraft-signing.p12"
KC_PASS="${KEYCHAIN_PASSWORD:-$(openssl rand -hex 24)}"
trap 'rm -f "$CERT"' EXIT
+22 -22
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
# Build, sign and (optionally) notarize the macOS release artifacts:
#
# $DIST/printcraft-<version>-macos-<arch>.dmg PrintCraft.app on a drag-to-Applications DMG
# $DIST/printcraft-cli-<version>-macos-<arch>.zip the headless CLI
# $DIST/pdfcraft-<version>-macos-<arch>.dmg PdfCraft.app on a drag-to-Applications DMG
# $DIST/pdfcraft-cli-<version>-macos-<arch>.zip the headless CLI
#
# Usage: packaging/macos/package.sh [--arch universal|aarch64|x86_64] [--skip-build]
#
@@ -39,9 +39,9 @@ export MACOSX_DEPLOYMENT_TARGET=11.0
IDENTITY="${MACOS_SIGN_IDENTITY:--}"
SHORT_VERSION="${VERSION%%-*}"
WORK="$CARGO_TARGET_DIR/macos-package"
APP="$WORK/PrintCraft.app"
DMG="$DIST/printcraft-$VERSION-macos-$ARCH.dmg"
CLI_ZIP="$DIST/printcraft-cli-$VERSION-macos-$ARCH.zip"
APP="$WORK/PdfCraft.app"
DMG="$DIST/pdfcraft-$VERSION-macos-$ARCH.dmg"
CLI_ZIP="$DIST/pdfcraft-cli-$VERSION-macos-$ARCH.zip"
NOTARIZE=0
if [ "$IDENTITY" = "-" ]; then
@@ -52,18 +52,18 @@ else
warn "macOS: APPLE_ID / APPLE_PASSWORD / APPLE_TEAM_ID incomplete; signed but not notarized"
fi
echo "==> PrintCraft $VERSION for macOS ($ARCH), identity: $IDENTITY, notarize: $NOTARIZE"
echo "==> PdfCraft $VERSION for macOS ($ARCH), identity: $IDENTITY, notarize: $NOTARIZE"
# ---- build -------------------------------------------------------------------------------------
if [ "$SKIP_BUILD" = 0 ]; then
args=()
for t in "${TARGETS[@]}"; do args+=(--target "$t"); done
(cd "$ROOT" && cargo build --release --locked -p printcraft -p printcraft-cli "${args[@]}")
(cd "$ROOT" && cargo build --release --locked -p pdfcraft -p pdfcraft-cli "${args[@]}")
fi
rm -rf "$WORK"
mkdir -p "$WORK/bin"
for bin in printcraft printcraft-cli; do
for bin in pdfcraft pdfcraft-cli; do
inputs=()
for t in "${TARGETS[@]}"; do inputs+=("$CARGO_TARGET_DIR/$t/release/$bin"); done
lipo -create -output "$WORK/bin/$bin" "${inputs[@]}"
@@ -97,28 +97,28 @@ notarize() {
fi
}
# ---- PrintCraft.app ----------------------------------------------------------------------------
# ---- PdfCraft.app ----------------------------------------------------------------------------
echo "==> assembling $APP"
mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources"
# Executable and icon carry the display name (CFBundleExecutable / CFBundleIconFile).
cp "$WORK/bin/printcraft" "$APP/Contents/MacOS/PrintCraft"
cp "$ROOT/assets/app-icon/printcraft.icns" "$APP/Contents/Resources/PrintCraft.icns"
cp "$WORK/bin/pdfcraft" "$APP/Contents/MacOS/PdfCraft"
cp "$ROOT/assets/app-icon/pdfcraft.icns" "$APP/Contents/Resources/PdfCraft.icns"
copy_font_licences "$APP/Contents/Resources"
sed -e "s/@VERSION@/$VERSION/g" -e "s/@SHORT_VERSION@/$SHORT_VERSION/g" \
-e "s/@BUILD_SHA@/${PRINTCRAFT_BUILD_SHA:-unknown}/g" \
-e "s/@BUILD_SHA@/${PDFCRAFT_BUILD_SHA:-unknown}/g" \
"$HERE/Info.plist.in" >"$APP/Contents/Info.plist"
plutil -lint "$APP/Contents/Info.plist"
printf 'APPL????' >"$APP/Contents/PkgInfo"
# Sign inside-out: nested code first, then the bundle itself (no --deep on the final signature).
# Today the only nested code is the main executable; frameworks/helpers would be signed here too.
sign --options runtime --entitlements "$HERE/entitlements.plist" "$APP/Contents/MacOS/PrintCraft"
sign --options runtime --entitlements "$HERE/entitlements.plist" "$APP/Contents/MacOS/PdfCraft"
sign --options runtime --entitlements "$HERE/entitlements.plist" "$APP"
codesign --verify --strict --deep --verbose=2 "$APP"
if [ "$NOTARIZE" = 1 ]; then
ditto -c -k --keepParent "$APP" "$WORK/PrintCraft-notarize.zip"
notarize "$WORK/PrintCraft-notarize.zip"
ditto -c -k --keepParent "$APP" "$WORK/PdfCraft-notarize.zip"
notarize "$WORK/PdfCraft-notarize.zip"
xcrun stapler staple "$APP"
xcrun stapler validate "$APP"
spctl --assess --type execute -vvv "$APP"
@@ -128,12 +128,12 @@ fi
echo "==> building $DMG"
STAGE="$WORK/dmg"
mkdir -p "$STAGE"
ditto "$APP" "$STAGE/PrintCraft.app"
ditto "$APP" "$STAGE/PdfCraft.app"
ln -s /Applications "$STAGE/Applications"
rm -f "$DMG" "$WORK/raw.dmg"
# makehybrid + convert builds the image without attaching a device, unlike `create -srcfolder`,
# which is flaky on CI runners ("Resource busy") and hangs in sandboxed sessions.
hdiutil makehybrid -hfs -hfs-volume-name "PrintCraft $VERSION" -hfs-openfolder "$STAGE" -o "$WORK/raw.dmg" "$STAGE"
hdiutil makehybrid -hfs -hfs-volume-name "PdfCraft $VERSION" -hfs-openfolder "$STAGE" -o "$WORK/raw.dmg" "$STAGE"
hdiutil convert "$WORK/raw.dmg" -format UDZO -imagekey zlib-level=9 -o "$DMG"
rm -f "$WORK/raw.dmg"
sign "$DMG"
@@ -147,17 +147,17 @@ fi
# ---- CLI ---------------------------------------------------------------------------------------
echo "==> building $CLI_ZIP"
CLI_DIR="$WORK/printcraft-cli-$VERSION-macos-$ARCH"
CLI_DIR="$WORK/pdfcraft-cli-$VERSION-macos-$ARCH"
mkdir -p "$CLI_DIR"
cp "$WORK/bin/printcraft-cli" "$CLI_DIR/"
cp "$WORK/bin/pdfcraft-cli" "$CLI_DIR/"
copy_docs "$CLI_DIR"
sign --options runtime "$CLI_DIR/printcraft-cli"
codesign --verify --strict --verbose=2 "$CLI_DIR/printcraft-cli"
sign --options runtime "$CLI_DIR/pdfcraft-cli"
codesign --verify --strict --verbose=2 "$CLI_DIR/pdfcraft-cli"
rm -f "$CLI_ZIP"
ditto -c -k --keepParent "$CLI_DIR" "$CLI_ZIP"
# A bare Mach-O can't carry a stapled ticket; Gatekeeper looks the notarization up online.
if [ "$NOTARIZE" = 1 ]; then notarize "$CLI_ZIP"; fi
"$WORK/bin/printcraft-cli" --version
"$WORK/bin/pdfcraft-cli" --version
echo "==> done"
ls -lh "$DMG" "$CLI_ZIP"