I write down here how I managed to do since it took me a while and I see other posts here and on StackOverflow where people got stuck, which is a pity since it’s so close to be working. Also I may forgot it myself.
Also I added some considerations at the end.
First I’ve tried the snap distro: simulator works but it cannot build android apk.
I think the issue is related to download some dependencies on local .m2 repo which is not in the snap sandbox. I’m not familiar with snap so I didn’t try to fix it, but it may be just a configuration fix.
Build from sources (not that difficult):
I’m using pop-os which is based on ubuntu 22.04 LTS.
The first issue was that the zipped sources in the release pages are useless because they lacks some git submodules.
So you need to clone the whole repo and subrepo:
git clone --recursive https://github.com/coronalabs/corona
then using compiling it cmake:
cd corona
cmake .
make
if cmake is not installed:
apt install cmake
also I had to install (with apt install) a lot of dev libraries, this is my list but your may be different:
libgl1-mesa-dev
libfreetype-dev
libcurl4
libcurl4-gnutls-dev
libpcap-dev
libssl-dev
libsdl2-dev
libjpeg-dev
just keep launching cmake and make and install what’s missing until it completes.
At this point you should be able to launch the simulator with
./Solar2d
and run your games in the simulator.
to build android apk you also need
install Java8 (newer version won’t work because of the java module opening) I’ve used sdkman to install a recent java8 and made it default.
add a symlink to java signer in /usr/bin
sudo ln -s /yourjava8dir/bin/jarsigner /usr/bin/jarsigner
the android template zip file (and the whole Native/Corona/android dir) is missing from the sources (at least I couldn’t find it) so I copied from the snap installation:
cp /snap/solar2d/current/usr/local/bin/Solar2D/Resources/Native/Corona/android ./Resources/Native/Corona/.
and that’s it, it works and I can build apk.
Current limitations I’ve found so far:
- the box2d corona lib is an older version and it’s missing some function calls.
- live builds checkbox is not present in the build dialog, so no live builds (so far).
I understand that the maintainer of linux version is not working on it anymore, I’m not volunteering myself but if someone helps me a bit with how corona builds are working I’m willing so spend some time trying to fix some of the above issues, they seems quite low hanging fruits.
In the meanwhile I hope this can be useful to other people as well.