Page 1 of 1

Build (nightly) binary packages for Linux/Mac

PostPosted: 14 Jul 2018, 09:29
by acme_pjz
I'd like to ask that how to build binary packages for Linux/Mac such that they can be downloaded, unpack and run directly without worrying dependencies.

Of course, one can compile from source code, but I don't think simply package the resulting binary and data files will work.

Re: Build (nightly) binary packages for Linux/Mac

PostPosted: 14 Jul 2018, 10:53
by c_xong
acme_pjz {l Wrote}:Of course, one can compile from source code, but I don't think simply package the resulting binary and data files will work.

It should work, as long as you link all libraries statically, or include the dynamically linked libraries.

Re: Build (nightly) binary packages for Linux/Mac

PostPosted: 14 Jul 2018, 11:59
by Julius
If you compile in on a Ubuntu16.04, it is reasonable to assume that 90% of your Linux audience will be able to run it as this is sort of the base-line right now.

Other that that, look into snaps, appimages and flatpacks :)

Re: Build (nightly) binary packages for Linux/Mac

PostPosted: 15 Jul 2018, 18:38
by acme_pjz
Julius {l Wrote}:Other that that, look into snaps, appimages and flatpacks :)


I'm trying AppImage now. I have to say that the document of AppImage is terrible; I'm using pkg2appimage script to create AppImage file and there is almost no document at all. :(

I manage to run pkg2appimage on Travis CI without errors, but I can't find the generated AppImage file :( The last few lines of the log is
{l Code}: {l Select All Code}
......
/home/travis/build/acmepjz/meandmyshadow/MeAndMyShadow/MeAndMyShadow.AppDir/usr/lib/x86_64-linux-gnu/liblua5.2.so.0.0.0 used for determining architecture x86_64
/home/travis/build/acmepjz/meandmyshadow/MeAndMyShadow/MeAndMyShadow.AppDir/usr/lib/libmodplug.so.1.0.0 used for determining architecture x86_64
Using architecture x86_64
App name for filename: Me_and_My_Shadow
meandmyshadow{.png,.svg,.svgz,.xpm} defined in desktop file but not found
For example, you could put a 256x256 pixel png into
/home/travis/build/acmepjz/meandmyshadow/MeAndMyShadow/MeAndMyShadow.AppDir/meandmyshadow.png
Desktop file: /home/travis/build/acmepjz/meandmyshadow/MeAndMyShadow/MeAndMyShadow.AppDir/meandmyshadow.desktop
/home/travis/build/acmepjz/meandmyshadow/MeAndMyShadow/MeAndMyShadow.AppDir should be packaged as Me_and_My_Shadow-.glibc2.14-x86_64.AppImage


But I can't find the packaged file! Although the last line of the log mentioned it. I even use ls -R to list all files recursively but it's still not found.

Does anyone have any ideas? The repository is https://github.com/acmepjz/meandmyshadow and full log can be downloaded at https://travis-ci.org/acmepjz/meandmyshadow .

Re: Build (nightly) binary packages for Linux/Mac

PostPosted: 16 Jul 2018, 06:10
by SecureUvula
I've gotten the "LD_LIBRARY_PATH" env var trick to work on Linux a couple times.

With this, you pack all needed .so files (found from 'ldd mygame.exe" into the release archive and make a launcher script that points the env var to where the .so files are.

It works to a point - Different versions of glibc still mess me up sometimes. I don't get why they have to introduce incompatibilities, when the kernel itself is sworn not to break userspace.

Re: Build (nightly) binary packages for Linux/Mac

PostPosted: 16 Jul 2018, 17:38
by acme_pjz
I have figured out what the problem is. It looks like that somehow the appimagetool script refuses to run when it can't found the icon:

{l Code}: {l Select All Code}
meandmyshadow{.png,.svg,.svgz,.xpm} defined in desktop file but not found
For example, you could put a 256x256 pixel png into
/home/travis/build/acmepjz/meandmyshadow/MeAndMyShadow/MeAndMyShadow.AppDir/meandmyshadow.png


Also, the appimagetool script refuses to bundle libwayland-egl.so.1 so you still need the dependency libwayland-egl1-mesa. I have tested that after install this dependency the AppImage runs on puppy linux. Now the nightly builds are automatically uploaded to https://bintray.com/acmepjz/meandmyshad ... uild#files .

SecureUvula {l Wrote}:I've gotten the "LD_LIBRARY_PATH" env var trick to work on Linux a couple times.

With this, you pack all needed .so files (found from 'ldd mygame.exe" into the release archive and make a launcher script that points the env var to where the .so files are.


Thanks. I think the AppImage works in the similar way.

Re: Build (nightly) binary packages for Linux/Mac

PostPosted: 28 Jul 2018, 10:09
by GunChleoc
You could also try setting up a PPA on the Launchpad site for Linux.

https://help.launchpad.net/Packaging/PPA