How I tried putting my Godot engine game on F-Droid

I sometimes try to do pretty complicated things (for instance, trying to make a multiplayer game with procedurally generated maps). Other times, I’ll try simple things (a rhythm game with tapping to the beat). But here’s one thing that stumped me.

When I had made my game,”Draw Ping Pong“, I figured I would put it on F-Droid because I mainly used open code to create it. At first, I looked around at anyone who was able to put their game on F-Droid. I found a YAML script from a programmer named Hasan Hejdari Nasab who was able to put his 2-player-battle game on F-Droid. Before diving into the YAML script, though, I had to prep my repository for inclusion in F-Droid.

F-Droid uses something called the “Fastlane” file structure. This makes it easy for F-Droid’s software distribution system to read a project’s repository and put any relevant information on their app. I put in most of those files (the file structure, the descriptive files, and the icons) and started prepping the YAML file. On GitLab, I followed F-Droid’s instructions by forking their repository and adding my YAML file in the metadata directory of the forked repository. Then I submitted a merge request and made my repository available to the developers of F-Droid. One of the top contributors, Izzy (who wrote the above guidelines on “Fastlane”), rewrote my YAML a bit so that the formatting was correct. When Izzy finished his edits, I tried having the package build. Sadly, this started a whole chain of test builds.

At first, the project didn’t build. It was due to some small error in the YAML file (which currently escapes me). It wasn’t that difficult; I changed something in the file and tried again. Once again, the project didn’t build. Maybe I had to really change that YAML file I found (it was meant for Godot v3.2.1, while I was building for Godot v3.3.3)? I tried various edits to the YAML file: I changed the temporary “editor_settings.cfg” for the project (because it’s built in a temporary directory), tried changing it so that I could import the binary from the official Godot repos (I couldn’t do that; it has to be built on F-Droid’s servers), changed some of the code in the “export.cpp” file, tried extending the build time of the package, and I even tried saving the artifacts from the F-Droid build so that I could examine the actual built files. None of these would build. The builds would usually involve an error that looks like this:

ERROR: get_dependencies: Cannot open file 'res://.import/ping_pong_8bit_beeep.wav-43de947304ee474a3e233d9d7e2634a8.sample'.
    At: core/io/resource_format_binary.cpp:1048.
ERROR: get_dependencies: Cannot open file 'res://.import/ping_pong_8bit_peeeeeep.wav-8a1b2f41f21917b956903be484ca31ce.sample'.
    At: core/io/resource_format_binary.cpp:1048.
ERROR: get_dependencies: Cannot open file 'res://.import/ping_pong_8bit_plop.wav-e4f5b80fe7ca0f988b36b1d861607ecb.sample'.
    At: core/io/resource_format_binary.cpp:1048.
ERROR: get_dependencies: Cannot open file 'res://.import/round_end.wav-dd33be60e2de9e9688d481412221d714.sample'.
    At: core/io/resource_format_binary.cpp:1048.
Godot Engine v3.3.3.stable.custom_build.b973f997f - https://godotengine.org

I deleted the *.sample files and reimported them into the project. That didn’t solve the problem. After this error, though, the Godot export binary would then reimport the assets of the project, and would try to export the Android binary. After a while, it would give an error about not being able to find the Android export template, even though it was placed in the build directory, and the path to the directory was given. This “export template” error appears halfway in-between the part where the Android package is having its META-INF added (here’s an example in the logs of one of the builds). After trying this for about two weeks without a binary being built, I threw in the towel.

The repository is still there; you can look at my current YAML file if you want. It would be even better if someone could rewrite it so that it builds an F-Droid package.

Jason Anderson

Jason Anderson has been hacking up computers for nearly 20 years, has been using Linux for over 15 years, and has studying and practicing IT security for over 3 years. Among that, he has a BBA in Accounting, an A+ certification, and a Linux+ certification. Look him up on Twitter at @FakeJasonA and on Mastodon on @ertain@mast.linuxgamecast.com

Leave a Reply

Your email address will not be published.