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.
161keychain's Developer ID, notarizes a DMG, tags =v<version>=, uploads the DMG to the 161keychain's Developer ID, notarizes a DMG, tags =v<version>=, uploads the DMG to the
162gitbay release and updates the cask in krz/homebrew-tap. 162gitbay release and updates the cask in krz/homebrew-tap.
163 163
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
164Set =ORGSTAR_NOTES= to an HTML file of release notes for the appcast, which Sparkle's 168Set =ORGSTAR_NOTES= to an HTML file of release notes for the appcast, which Sparkle's
165update window shows, and =ORGSTAR_RELEASE_NOTES= to a Markdown file for the gitbay 169update window shows, and =ORGSTAR_RELEASE_NOTES= to a Markdown file for the gitbay
166release. Without them both get the one-line platform note. 170release. 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
31# shellcheck disable=SC2086 31# shellcheck disable=SC2086
32binary="$(swift build -c release $arch_flags --show-bin-path)/Orgstar" 32binary="$(swift build -c release $arch_flags --show-bin-path)/Orgstar"
33 33
34rm -rf "$app" 34rm -rf "$app" .build/app/dSYMs
35mkdir -p "$app/Contents/MacOS" "$app/Contents/Resources" "$app/Contents/Frameworks" 35mkdir -p "$app/Contents/MacOS" "$app/Contents/Resources" "$app/Contents/Frameworks" .build/app/dSYMs
36cp "$binary" "$app/Contents/MacOS/Orgstar" 36cp "$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
37 39
38# Sparkle, from its SwiftPM artifact: the framework beside the binary, found through an rpath. 40# Sparkle, from its SwiftPM artifact: the framework beside the binary, found through an rpath.
39sparkle="$(find .build/artifacts -path '*Sparkle.xcframework/macos-*/Sparkle.framework' -maxdepth 7 | head -1)" 41sparkle="$(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
41ditto "$sparkle" "$app/Contents/Frameworks/Sparkle.framework" 43ditto "$sparkle" "$app/Contents/Frameworks/Sparkle.framework"
42otool -l "$app/Contents/MacOS/Orgstar" | grep -q '@executable_path/../Frameworks' \ 44otool -l "$app/Contents/MacOS/Orgstar" | grep -q '@executable_path/../Frameworks' \
43 || install_name_tool -add_rpath @executable_path/../Frameworks "$app/Contents/MacOS/Orgstar" 45 || install_name_tool -add_rpath @executable_path/../Frameworks "$app/Contents/MacOS/Orgstar"
46strip -x "$app/Contents/MacOS/Orgstar"
44 47
45# SwiftMath's math fonts, which it finds in the app's resources. 48# SwiftMath's math fonts, which it finds in the app's resources.
46cp -R "$(dirname "$binary")/SwiftMath_SwiftMath.bundle" "$app/Contents/Resources/" 49cp -R "$(dirname "$binary")/SwiftMath_SwiftMath.bundle" "$app/Contents/Resources/"
@@ -176,6 +179,7 @@ appex() { # name, extension point, principal class (or ""), attributes, extra en
176 dir="$app/Contents/PlugIns/$1.appex/Contents" 179 dir="$app/Contents/PlugIns/$1.appex/Contents"
177 mkdir -p "$dir/MacOS" "$dir/Resources" 180 mkdir -p "$dir/MacOS" "$dir/Resources"
178 cp "$(dirname "$binary")/$1" "$dir/MacOS/$1" 181 cp "$(dirname "$binary")/$1" "$dir/MacOS/$1"
182 strip -x "$dir/MacOS/$1"
179 scripts/localize.sh "$dir/Resources" 183 scripts/localize.sh "$dir/Resources"
180 cat > "$dir/Info.plist" <<PLIST 184 cat > "$dir/Info.plist" <<PLIST
181<?xml version="1.0" encoding="UTF-8"?> 185<?xml version="1.0" encoding="UTF-8"?>
scripts/release-mac.sh +2
@@ -52,6 +52,8 @@ out=".build/release"
52dmg="$out/orgstar-$version.dmg" 52dmg="$out/orgstar-$version.dmg"
53rm -rf "${out:?}" 53rm -rf "${out:?}"
54mkdir -p "$out/dmg" 54mkdir -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"
55ditto "$app" "$out/dmg/orgstar.app" 57ditto "$app" "$out/dmg/orgstar.app"
56ln -s /Applications "$out/dmg/Applications" 58ln -s /Applications "$out/dmg/Applications"
57hdiutil create -quiet -volname "orgstar $version" -srcfolder "$out/dmg" -format UDZO -fs HFS+ "$dmg" 59hdiutil create -quiet -volname "orgstar $version" -srcfolder "$out/dmg" -format UDZO -fs HFS+ "$dmg"