Commit 96e2b60a30

96e2b60a303cdb102246dfb5302d5f5a8fb0d389

parent: 13a0d02bad

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-22 17:46 UTC

Strip the Developer ID executables and keep their dSYMs

build-app.sh strips local symbols from the four executables before signing and
copies the build's dSYMs to .build/app/dSYMs; release-mac.sh zips them beside
the DMG in .build/release.

Closes #207

Layout: unified · split

CONTRIBUTING.org +4
@@ -161,6 +161,10 @@ There is no CI; run these before committing.
161161keychain's Developer ID, notarizes a DMG, tags =v<version>=, uploads the DMG to the
162162gitbay release and updates the cask in krz/homebrew-tap.
163163
164=scripts/build-app.sh= strips the executables and copies their dSYMs to =.build/app/dSYMs=;
165the release zips them to =.build/release/orgstar-<version>-dSYMs.zip= and doesn't upload
166them. Keep the zip to symbolicate that release's crash reports.
167
164168Set =ORGSTAR_NOTES= to an HTML file of release notes for the appcast, which Sparkle's
165169update window shows, and =ORGSTAR_RELEASE_NOTES= to a Markdown file for the gitbay
166170release. Without them both get the one-line platform note.
scripts/build-app.sh +6 −2
@@ -31,9 +31,11 @@ swift build -c release $arch_flags --product OrgstarWidgets
3131# shellcheck disable=SC2086
3232binary="$(swift build -c release $arch_flags --show-bin-path)/Orgstar"
3333
34rm -rf "$app"
35mkdir -p "$app/Contents/MacOS" "$app/Contents/Resources" "$app/Contents/Frameworks"
34rm -rf "$app" .build/app/dSYMs
35mkdir -p "$app/Contents/MacOS" "$app/Contents/Resources" "$app/Contents/Frameworks" .build/app/dSYMs
3636cp "$binary" "$app/Contents/MacOS/Orgstar"
37# The build's debug symbols, for symbolicating crash reports; the executables ship stripped.
38for dsym in "$(dirname "$binary")"/*.dSYM; do ditto "$dsym" ".build/app/dSYMs/$(basename "$dsym")"; done
3739
3840# Sparkle, from its SwiftPM artifact: the framework beside the binary, found through an rpath.
3941sparkle="$(find .build/artifacts -path '*Sparkle.xcframework/macos-*/Sparkle.framework' -maxdepth 7 | head -1)"
@@ -41,6 +43,7 @@ sparkle="$(find .build/artifacts -path '*Sparkle.xcframework/macos-*/Sparkle.fra
4143ditto "$sparkle" "$app/Contents/Frameworks/Sparkle.framework"
4244otool -l "$app/Contents/MacOS/Orgstar" | grep -q '@executable_path/../Frameworks' \
4345 || install_name_tool -add_rpath @executable_path/../Frameworks "$app/Contents/MacOS/Orgstar"
46strip -x "$app/Contents/MacOS/Orgstar"
4447
4548# SwiftMath's math fonts, which it finds in the app's resources.
4649cp -R "$(dirname "$binary")/SwiftMath_SwiftMath.bundle" "$app/Contents/Resources/"
@@ -176,6 +179,7 @@ appex() { # name, extension point, principal class (or ""), attributes, extra en
176179 dir="$app/Contents/PlugIns/$1.appex/Contents"
177180 mkdir -p "$dir/MacOS" "$dir/Resources"
178181 cp "$(dirname "$binary")/$1" "$dir/MacOS/$1"
182 strip -x "$dir/MacOS/$1"
179183 scripts/localize.sh "$dir/Resources"
180184 cat > "$dir/Info.plist" <<PLIST
181185<?xml version="1.0" encoding="UTF-8"?>
scripts/release-mac.sh +2
@@ -52,6 +52,8 @@ out=".build/release"
5252dmg="$out/orgstar-$version.dmg"
5353rm -rf "${out:?}"
5454mkdir -p "$out/dmg"
55# The debug symbols of the stripped executables, for symbolicating crash reports; not uploaded.
56ditto -c -k --keepParent .build/app/dSYMs "$out/orgstar-$version-dSYMs.zip"
5557ditto "$app" "$out/dmg/orgstar.app"
5658ln -s /Applications "$out/dmg/Applications"
5759hdiutil create -quiet -volname "orgstar $version" -srcfolder "$out/dmg" -format UDZO -fs HFS+ "$dmg"