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