Repository navigation
Conversation
- macOS: the macos-14 image is retired ("The configuration
'macos-14-arm64-us-default' is not supported"); move to macos-15.
- Windows: windows-latest ships Visual Studio 2026. The sdl_mixer recipe
pulls in cmake/3.31.12, which fails with "Could not create named
generator Visual Studio 18 2026". Replace all cmake tool_requires with
cmake/4.2.1 (the version conanfile.py already uses).
- Windows: repolevedavaj/install-nsis downloads from a fixed SourceForge
mirror that now serves a corrupted installer; install NSIS via
Chocolatey instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When Li-ri is started from Finder the working directory is "/", so the data path "Li-ri.app/Contents/Resources/..." (relative to the working directory) is not found and the game exits. - Locate game data via SDL_GetBasePath(), which points to Contents/Resources inside a bundle; keep LIRI_DATA_DIR (if set) and the old relative path as fallbacks - Build as MACOSX_BUNDLE with Info.plist, an .icns icon generated from the existing PNGs, and data/ + Sounds/ copied into Contents/Resources - On install, embed non-system dylibs with fixup_bundle and re-sign ad hoc (required on Apple Silicon); fail the install if codesign fails - Homebrew's sdl2 is sdl2-compat, which dlopen()s SDL3 at runtime and is invisible to fixup_bundle: ship it as Contents/Frameworks/libSDL3.dylib - Skip Linux desktop/icon/share installs and tools/Li-ri.sh on macOS - CI: verify bundle contents, Info.plist and the dmg signature Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
On macOS there is no usable
.appbundle: the build produces a plain binary, and the macOS branch ofUtils::GetPath()looks for data atLi-ri.app/Contents/Resources/...relative to the current working directory. When the game is started from Finder (or viaopen), the working directory is/, so the data is not found and the game exits withUnable to find '...'.Fix
Utils::GetPath()on macOS now usesSDL_GetBasePath(), which returns<App>.app/Contents/Resources/independent of the working directory. Falls back toLIRI_DATA_DIR(only if set at configure time) and the old relative path.Li-riis built asMACOSX_BUNDLEwithmacos/Info.plist.in, an.icnsicon generated from the existing PNGs viaiconutil, anddata/+Sounds/copied intoContents/Resources(post-build, so the.appin the build tree runs too).fixup_bundlecopies non-system dylibs intoContents/Frameworksand rewrites their install names; the bundle is then re-signed ad hoc (required on Apple Silicon afterinstall_name_tool). The install fails ifcodesignfails.sdl2is sdl2-compat, whichdlopen()s SDL3 at runtime — invisible tofixup_bundle. When thesdl2-compatpkg-config module is found, SDL3 is installed asContents/Frameworks/libSDL3.dylib(the first path sdl2-compat probes). No effect on the Conan build.tools/Li-ri.share skipped on macOS.Info.plist(plutil -lint), and mounts the DMG to check data presence andcodesign --verify --deep --strict.CI fixes (separate commit; runner image drift, also affects
main)The macOS and Windows jobs no longer run on current GitHub runners, independent of this change:
macos-14is retired (The configuration 'macos-14-arm64-us-default' is not supported) → moved tomacos-15.windows-latestnow ships Visual Studio 2026; thesdl_mixerrecipe pulls incmake/3.31.12, which fails withCould not create named generator Visual Studio 18 2026. The Windows job now adds[replace_tool_requires] cmake/*: cmake/4.2.1to the Conan profile (same versionconanfile.pyalready uses).repolevedavaj/install-nsisdownloads from a fixed SourceForge mirror that now serves a corrupted installer → install NSIS via Chocolatey instead.Testing
Tested on an Apple M1, macOS 27.2.1, CMake 4.5.1, Homebrew SDL2 (sdl2-compat 2.32.74 / SDL3 3.4.20) + SDL2_mixer 2.8.2:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build→open build/Li-ri.appstarts with cwd/, graphics and sound work.cmake --install build --prefix /tmp/liri→otool -Lshows only@executable_path/../Frameworks/...and system libs (no/opt/homebrewreferences in the binary or any embedded dylib);codesign --verify --deep --strictpasses; at runtimelsofshows SDL2, SDL2_mixer and SDL3 loaded from inside the bundle.codesign --verify, and the game runs from it (graphics and sound OK).Note: with Homebrew,
pkg-configmay fail to resolveSDL2_mixerbecause fluidsynth requires the keg-onlyreadline;PKG_CONFIG_PATH=$(brew --prefix readline)/lib/pkgconfigworks around it (unrelated to this PR).Notes
The CI DMG is
arm64only (as before), so it does not run on Intel Macs.The app is signed ad hoc only. When downloaded via a browser, Gatekeeper blocks it until the user allows it (right-click → Open, or System Settings → Privacy & Security). Avoiding that would need a Developer ID certificate and notarization.
If the data ever moves (e.g. the
Assets/idea from Game data moved into Assets directory #114), only the twocopy_directorylines in theAPPLEblock need adjusting.Once the project moves to SDL3 (
work/sdl3), the sdl2-compat special case can be dropped.🤖 Generated with Claude Code