Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building AppImages for Godot editor and (maybe) games #6681

Closed
Calinou opened this issue Oct 2, 2016 · 16 comments
Closed

Building AppImages for Godot editor and (maybe) games #6681

Calinou opened this issue Oct 2, 2016 · 16 comments

Comments

@Calinou
Copy link
Member

Calinou commented Oct 2, 2016

It would be awesome if AppImages could be created for the Godot editor (for distribution of official or unofficial builds) and maybe exported games.

The goal of AppImages is to make portable Linux binaries easy. No dependencies need to be installed for users; think of it as macOS' .app, but for Linux, it's essentially an application bundle which can also provide basic system integration (such as menus and icons).

What needs to be done

  • Gather a list of all required libraries that are not linked statically to Godot. This can be figured out using ldd for example. Beware as some libraries should never be included in an AppImage.
  • Automate the creation of editor AppImages using SCons (or shell scripts). For this, a template AppDir must be created first, and put in the Godot Git repository (just like the macOS template). A script should be provided for copying system libraries to the AppDir.
  • Document the AppImage creation process.
  • Provide official AppImages as the recommended way of running Godot on Linux, for 64-bit and 32-bit. Some instructions should be provided as well (users still need to chmod +x them).

Additional tasks

  • What should be done for games? I don't think it's feasible to export AppImages from a non-Linux system, but this needs to be confirmed. Perhaps we can provide a script that converts a Linux export to an AppImage.

Resources

@akien-mga
Copy link
Member

See also #5241 which needs to be rebased before I can merge it.

@probonopd
Copy link

I made a quick recipe
https://github.com/probonopd/AppImages/blob/master/recipes/meta/Godot.yml
The resulting AppImage is available for testing at
https://bintray.com/probono/AppImages/Godot/_latestVersion#files

It is expected that some more testing on different distributions and fine-tuning might be necessary. Ideally the upstream project would build the AppImage during the continuous build process.

@ghost
Copy link

ghost commented Apr 7, 2018

First of all thank you for your report and sorry for the delay.

We released Godot 3.0 in January 2018 after 18 months of work, fixing many old issues either directly, or by obsoleting/replacing the features they were referring to.

We still have hundreds of issues whose relevance/reproducibility needs to be checked against the current stable version, and that's where you can help us.
Could you check if the issue that you described initially is still relevant/reproducible in Godot 3.0 or any newer version, and comment about it here?

For bug reports, please also make sure that the issue contains detailed steps to reproduce the bug and, if possible, a zipped project that can be used to reproduce it right away. This greatly speeds up debugging and bugfixing tasks for our contributors.

Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed.

Thanks in advance.

Note: This message is being copy-pasted to many "stale" issues (90+ days without activity). It might happen that it is not meaningful for this specific issue or appears oblivious of the issue's context, if so please comment to notify the Bugsquad about it.

@probonopd
Copy link

probonopd commented Apr 7, 2018

Whoever the bugsquad is, I think this is still relevant.

@Calinou
Copy link
Member Author

Calinou commented Apr 7, 2018

This issue is still relevant – I believe one of the primary goals would be to distribute an official Godot editor AppImage which could be downloaded from the Godot website (currently, it's just a statically-linked binary which is less guaranteed to work on freshly-installed systems).

@michaellee8
Copy link

@Calinou @akien-mga Sure this is a needed feature, I have tried to use snapcraft.io to install godot but it sounds broken. That snap is confined to use the jarsigner, which is provided from the openjdk that snap don't get access to.

@sdfgeoff
Copy link
Contributor

sdfgeoff commented Dec 4, 2018

Creating an appimage from godot was quite easy using linuxdeploy and appimagetool. Pointing linuxdeploy at the godot binary automatically finds all the needed libs (except for the ones that cause issues such as libc, as determined by an official list from the appimage project). This generates an appimagedir that can be converted into an appimage using appimagetool.

We do this to provide a single file for our final game including some gdnative libraries etc (which do have to be copied in manually).

@ndarilek
Copy link
Contributor

@sdfgeoff Do you have any example deployment scripts you might be willing to share? I'm trying to package a game with native dependencies as an AppImage and am running into issues. In particular, if I export the game and manually create something approaching the structure of an appdir, including my GDNative dependencies, the game runs. If I create the appimage on my own distro (Fedora 30) and run it there, it runs. If I package it into an AppImage on my CI server using Debian 10, it doesn't run on my local Fedora 30 workstation. None of the errors are particularly explanative (I.e. no "Missing this or that shared library" that'd be easy to debug.) I suppose I could switch the CI server to use Fedora, but then I wonder if things would break on Debian/Ubuntu bases. Anyhow, trying to debug this here, but if you have it working in a cross-distro way with GDNative dependencies then I'd love to see that work, if possible.

Thanks.

@Calinou
Copy link
Member Author

Calinou commented Oct 10, 2019

@ndarilek AppImages should be built on the oldest distribution you wish to target, which is usually the oldest still-supported Ubuntu LTS (16.04 as of writing).

Due to glibc version incompatibilities, Linux binaries can only run on distributions as recent or newer than the distribution they were compiled on. The opposite isn't true – one can't run a recent binary on an old distribution.

@sdfgeoff
Copy link
Contributor

I'm afraid I was doing it as part of my day-job, so I can't share anything here, but to me it sounds like you've got the packaging working and probably Calinou's suggestion is what you are after. There was nothing special I did (once I was informed that you have to put the gdnative libraries in the same folder as the binary).

The only other thing I can think of is that if you are using linuxdeploy to automatically detect/copy libraries, it will only do that for the executable you point it at. So if you have a GDNative library with a dependency, make sure you point linuxdeploy at that as well (or in some other way copy the libs into the appimage). Ideally running "ldd" on the libraries inside the appimage will point at other dll's inside the appimage rather than on the system.

@ndarilek
Copy link
Contributor

ndarilek commented Oct 10, 2019 via email

@ndarilek
Copy link
Contributor

ndarilek commented Oct 10, 2019 via email

@probonopd
Copy link

Just a tiny hint here; You know about formatting code with

    ```
    here goes the code
    ```

?

@akien-mga
Copy link
Member

@probonopd That's what they used, but Markdown is not parsed when sent via email instead of the GitHub website (as done here).

@ndarilek
Copy link
Contributor

ndarilek commented Oct 11, 2019 via email

@Calinou
Copy link
Member Author

Calinou commented Apr 29, 2020

Nowadays, I don't think Godot specifically needs to integrate AppImage somehow. Nearly everything is statically linked*, so as long as you use official Godot binaries or build them yourself on an old enough distribution, you should be fine. Therefore, I'll close this.

Maybe someone could write a documentation page for packaging a Godot project as an AppImage, but I don't see much point for a Godot-specific tutorial.

If the official binary doesn't suffice due to lack of automatic desktop integration, we now have a Flatpak for the editor as well as a Snap.

*: To build a compatible binary with recent GCC version on an old distribution, pass use_static_cpp=yes on the SCons command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants