-
Notifications
You must be signed in to change notification settings - Fork 8
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
Provide the Godot engine itself #4
Comments
Actually, we should drop this BaseApp entirely and replace it with reusable module files (like https://github.com/flathub/shared-modules). See discussion in #3 where @TingPing agreed this was a better solution. BaseApps only have a substantial benefit for really large frameworks like Electron, and there needs to be some degree of guaranteed compatibility over patch releases (which Godot doesn't really have in practice). The other issue is that exporting a project in a headless manner takes much more time and can sometimes be unreliable, so I prefer shipping the original PCK as intended by the author. Note that PCK files don't contain any native code and can be extracted with relative ease, so there wouldn't be much benefit to creating the PCK ourselves anyway. PCK files of non-C# projects are also platform-independent, at least across desktop platforms (since all desktop platforms support S3TC). PS: Godot doesn't compile a native binary when you export a project. It just copies an export template binary, which we happen to build from source in this BaseApp. |
That's a possibility, yeah. A SDK containing pre-built godot (over the freedesktop SDK for instance) would make quite some sense to me too. Mostly for usage in the build process.
About the time, I believe that it's less of a problem in a build system (you don't do it every day!). For the unreliability, maybe, I don't know enough about Godot. Anyway we could still ship a PCK and run it with godot-runner being embedded in the package, for maintainers who prefer this, I don't care. But even when doing this, the PCK should ideally be built from the sources (when available). This is really about trust in the build process and all that. Actually I am going to quote yourself in #3:
😛
Hmmm… From what I can tell, it's still not the same thing as the base source (which would be the clone of the source repository itself or a tarball of these same sources at a given release point). There are still packaging and processing steps done. You can reverse them, but it won't ever be the same as pointing to the sources, the ones the developer really works on. I remind it is mostly a question of trust. And for trust to happen, the whole process has to be as transparent as possible (providing pre-processed intermediate binaries and saying "this is somehow reversible with some other third party tool on github" is not ideal at all for trust). Note that I am not arguing against having the possibility to just make a flatpak off a Seriously, I just tested right now, building a headless godot exporter took not too long and is easy as hell. We could just have a SDK based off Freedesktop which has this exporter. And people will be free to create either native binaries off it, or just a PCK if you prefer.
Pretty sure it does. See:
And this binary works by running it directly (with godot not installed). I did test. :-) |
When you exported the project, Godot copied that ELF binary from |
Ah ok yeah it doesn't compile in this sense, yeah maybe. Didn't check code of what it actually does. 🙂 I use compiling in a more broader sense of "going from one format to another" (transpilation and family). I'll note that it's not a simple copy though. I have no idea what it actually does and maybe no C/C++ compilers are involved, but the files are not exactly the same ( |
@Jehan I guess you left debugging enabled in the final export file dialog, so it copied When exporting a project, the Windows binary will be modified if you have rcedit configured, but otherwise, the Linux binary will never be modified (unless you choose to embed the PCK within the binary). |
Nope. Well I have no idea if it used the release or the debug binary as a base, but I did a
Since I am only interested into building for flathub (I mean right now for this small project), as I said above, I built the headless godot. No checkbox. 🙂
Which I guess is the default behavior of the headless godot (as I said in my previous comment, the same command behaved differently with GUI, used as CLI, and headless godot; and the PCK is not even generated so yes, it has to be embedded). |
It's not the default behavior, but it will be enabled if you checked "Embed Pck" in the export preset. This information is written to the Anyway, I think this is a good idea. Here's my current proposal for creating a Godot Flatpak modules repository that can be integrated as a submodule:
The repository structure could be as follows:
The first workflow will require more work on the maintainer's side, so we'll have to make sure it's clearly documented in the README. What do you think? |
I was looking into this BaseApp for Godot when looking at helping someone developing a game with Godot. I realized that you are just packing the
godot-runner
and looking at the 2 manifests on Flathub which seems to use this BaseApp, from what I see, it means they just provide a.pck
file.This is basically a pre-compiled package of the game, and all we are doing here in flathub is therefore to run this already-compiled game.
While it makes sense for proprietary games (and then the main advantage of flatpak is to get some sandboxing), this should not be the proposed process for Free Software.
A whole point of a public repository such as Flathub is to also show the full build process: people have access to the manifest, see what sources were used, which commands were run, and can even look at build logs. If the source is a pre-built binary and the commands/logs is just "copy the binary into
/app/bin
" (what is currently done for Godot applications), I could as well provide you ELF binary and.so
libraries for GIMP. It would be the same thing. Just trust meeee 🐍👁️… Not sure anyone would like it! 😛So my proposition is to provide
godot
itself. From my researches, godot can export the project from command line: https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_projects.html#exporting-from-the-command-lineThis will create the software
.pck
, as well as a binary which can be directly run. There is not even the need of godot-runner itself to run the produced executable (a proper independent ELF binary). So that means that it is not even useful to packagegodot-runner
in the end. In fact Godot could just be made available in a SDK package, it is not needed for running.Edit: when I said "From my researches", I implied not just theoretical research, I also tested the command line from Godot docs, then I actually uninstalled Godot and ran the application without any problem.
Edit 2: and for a headless Godot, since we don't care about the GUI obviously in our SDK, they have a procedure in their docs too: https://docs.godotengine.org/en/stable/development/compiling/compiling_for_x11.html#compiling-a-headless-server-build
This can be used to just build Godot projects from Flathub build servers.
The text was updated successfully, but these errors were encountered: