Help me build Revengate for F-Droid

Godot Version

Godot 4.2.1


Hi everyone!
My game, Revengate, builds and exports for the F-Droid Android app store using the following instructions: metadata/org.revengate.revengate.yml · 0bab2be5db048569d82d5e6a42e9b248c0b4ed9f · Yannick Gingras / F-Droid Data · GitLab (you might have to scroll all the way down to the section with versionName: 0.11.4).

Conceptually, it’s pretty simple: checkout the Godot sources, build Godot for x86, cross compile it for ARM, then build the Android export templates with gradle. Why do all of that rather than take the Godot published package? F-Droid is very strict about their open source policy and they want to make sure that all the apps that they are hosting can be build completely from sources. I like that!

Once we have Godot, it’s just a matter of customizing my export_presets.cfg to match the current version number and calling Godot in headless mode to build the APK.

So when I run the above, I do end up with a working APK, but for some reason, it’s missing a handful of resources, such as the two noise textures that I use in my water material (src/ui/water_material.tres in the Revengate sources). It’s probably missing a few more things since the package is about 40MB smaller than those that I build locally, but the difference seems subtle because the game is playable and I don’t see bits that are obviously missing besides the water.

The whole build produces a lot of output with too many warnings for me to make sense off. Furthermore, if I run the same commands on my machine, including taking a fresh clone of my games sources so I do not start with a warm Godot import cache, then I end up with a working full sized APK with the water noises.

There are big differences, like my laptop running Ubuntu 23.10 in graphical mode and the F-Droid build server running Debian 11 in full headless mode, but most of the important bit (the JVM, Godot, the Android NDK) are pinned to use the exact same versions.

Anyone has any idea of what I might be doing wrong and how I could update my F-Droid build recipe to produce packages that include the water noise textures?

Here is the water material I was referring to:

I made some progress: I now have a local repro!

With a fresh git clone of both my game and the godot sources, I get the same missing noise textures when I export to android, whether I do it from the command line or from the graphical editor. I guess scons ––clean is not completely clean. There is also some obvious cache in the .godot of my game that is critical to the success of my exports. Better not lose it!

I was able to simplify the Godot build like so:

scons platform=linuxbsd target=editor
scons platform=android target=template_release arch=arm64
cd platform/android/java
./gradlew generateGodotTemplates

I’m now using g++ as recommended in the the godot docs. I can export my game from my usual working directory with those, so the editor and the export templates seem to be fine.

The build I was doing in my older godot source checkout has a bunch of my game assets in the export template package (android_release.apk). I don’t know how that happened, I can’t repro with a fresh checkout of the godot sources, but it would be a viable solution since the water noise textures are indeed in that apk.

Those missing textures show up in the freshly compiled editor, they are in the game on desktop with F5, but they are not in the game with any way I can export to Android (command line, project->export, or one click deploy).

I tried various combinations of “local to scene” on the water material and on the two noise textures, but that does not seem to have any effect.

I will try to repro with a minimal new project and see if that turns out to be a Godot bug. Stay tuned!


Solution: disable “convert resources to binary” in the advanced editor settings. This will be fixed in Godot 4.3.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.