fix(linux): enable Solar2DBuilder Android builds on Linux - #891
Open
shtse8 wants to merge 1 commit into
Open
Conversation
Solar2DBuilder's Android packaging code had Mac/Windows branches but no Linux equivalent. This adds the missing Linux support across 5 files. Fixes: - CMakeLists.txt: simplify root cmake to delegate to platform/linux - platform/linux/CMakeList.txt: add Rtt_AndroidSupportTools.c to Solar2DBuilder sources; add CORONABUILDER_ANDROID compile definition - Rtt_AppPackagerAndroidFactory.cpp: add Rtt_LINUX_ENV branch for AndroidValidation.lua path lookup (was Mac/Win only) - Rtt_AppPackagerFactory.cpp: implement GetResourceDirectory() for Linux using /proc/self/exe readlink - tools/CoronaBuilder/main.cpp: use $TMPDIR instead of hardcoded /TemporaryFiles (root-owned on Linux) Tested: successfully builds Android APKs on Ubuntu 22.04 CI runners. Closes coronalabs#890
chkuendig
added a commit
to chkuendig/corona
that referenced
this pull request
Aug 15, 2026
The paths start empty, so appending left the builder writing to /Documents and its three siblings, which only root can create; they now go under TMPDIR, one directory per uid (first reported in coronalabs#891).
|
Heads up: #936 covers this ground, opened as a supersession rather than a competing patch. The overlap is the Linux Three deliberate differences:
#936 additionally gates the HTML5 builder and fixes |
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.
Fixes #890
What
Enables
Solar2DBuilderto build Android APKs on Linux. The C++ code already hadRtt_LINUX_ENVdefined and compiles fine — it just had Mac/Windows branches without a Linux equivalent in a few places.Changes (5 files)
CMakeLists.txtplatform/linux/CMakeList.txtplatform/linux/CMakeList.txtRtt_AndroidSupportTools.cto Solar2DBuilder sources; addCORONABUILDER_ANDROIDcompile definitionRtt_AppPackagerAndroidFactory.cppRtt_LINUX_ENVbranch forAndroidValidation.luapath (was Mac/Win only)Rtt_AppPackagerFactory.cppGetResourceDirectory()for Linux via/proc/self/exereadlinktools/CoronaBuilder/main.cpp$TMPDIRinstead of hardcoded/TemporaryFiles(root-owned on Linux CI)Tested
Successfully builds Android APKs on Ubuntu 22.04 self-hosted runners. We've been using this in production CI for our Solar2D games.
Community build repo with pre-built binaries + auto-update workflow: https://github.com/Cubeage/solar2d-linux