Native arm64 macOS build + fix bundle-corrupting data storage - #101
Open
paulohenriquesg wants to merge 2 commits into
Open
Native arm64 macOS build + fix bundle-corrupting data storage#101paulohenriquesg wants to merge 2 commits into
paulohenriquesg wants to merge 2 commits into
Conversation
- Add osx-arm64 to RuntimeIdentifiers. - ppy.SDL2-CS ships no arm64-macOS SDL2 native, which crashes the app on launch (DllNotFoundException: SDL2). build-app.sh now downloads the official SDL2 release, sha256-verifies it, thins it to arm64, and bundles it; an MSBuild guard fails the publish with a clear message if the native is absent. - build-app.sh publishes self-contained, assembles a signed .app bundle with a generated .icns icon, and ad-hoc signs it. - Ignore build output (dist/), the downloaded SDL2 native, and .serena/.
The launcher wrote settings, the app registry, caches, and installed games next
to its executable (AppDomain.CurrentDomain.BaseDirectory). Inside a macOS .app
that is Contents/MacOS/ — writing there corrupts the bundle's code signature
('a sealed resource is missing or invalid') and blocks installs into read-only
locations like /Applications.
Add AppPaths.DataDirectory, which resolves to
~/Library/Application Support/GithubLauncher on macOS and stays next to the
executable on Windows/Linux (unchanged). Route all writable paths through it:
settings.json, apps.json/games.json, Cache/, the Apps/ install folder, catalog
caches, apps_export.json, and update_check.json. Self-update / executable
replacement still uses the real app directory.
croissantsam
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes the launcher build and run as a native arm64 macOS
.app, and fixes a data-storage bug that corrupts the app bundle on macOS. Two independent commits.1. Native arm64 macOS build +
.apppackagingosx-arm64toRuntimeIdentifiers.ppy.SDL2-CSships native SDL2 forosx-x64/Linux/Windows but notosx-arm64, so an Apple-Silicon publish crashes on launch withSystem.DllNotFoundException: Unable to load shared library 'SDL2'.build-app.shnow downloads the official SDL2 release, sha256-verifies it, thins it to arm64, and bundles it. An MSBuild guard fails the publish with a clear message if the native is missing (it is git-ignored, not vendored).build-app.shpublishes self-contained, assembles a signed.appwith a generated.icnsicon, and ad-hoc signs it.2. Store writable data outside the app directory on macOS
The launcher wrote
settings.json, the app registry, caches, and installed games next to its executable (AppDomain.CurrentDomain.BaseDirectory). Inside a.appthat isContents/MacOS/— writing there corrupts the bundle code signature (a sealed resource is missing or invalid) and blocks installs into read-only locations like/Applications.New
AppPaths.DataDirectoryresolves to~/Library/Application Support/GithubLauncheron macOS and stays next to the executable on Windows/Linux (behavior unchanged off macOS). All writable paths route through it; self-update / executable replacement still targets the real app directory.Verification (macOS 15.6, Apple M4 Max)
./build-app.shfrom a clean tree: downloads + verifies SDL2, builds, signs —codesign --verify --strictpasses.~/Library/Application Support/GithubLauncher/.Related issues
Relates to #61 (macOS version) and #98 (Apple Silicon release).