-
Notifications
You must be signed in to change notification settings - Fork 3
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
Manifest: Build Godot Engine from source #12
Manifest: Build Godot Engine from source #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @cassidyjames, nice work! I hadn't realised you were working on Godot Flatpak packaging too. If I'd known, I could have saved myself some time 😆
I've left a few comments here about improvements I think you could make in case they're useful to any other manifests where you're doing something similar.
x86_64: | ||
env: | ||
# Only enable when targeting x86_64 (causes issues on other architectures) | ||
SCONS_FLAGS_EXTRA: production=yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you only use production=yes
for the template_release
build and not the editor
, you'll probably get a slight build speedup. Since the editor executable isn't included in the final flatpak, it probably doesn't need to be optimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, thanks!
- name: glu | ||
buildsystem: meson | ||
sources: | ||
- type: archive | ||
url: https://archive.mesa3d.org/glu/glu-9.0.3.tar.xz | ||
sha256: bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f | ||
cleanup: | ||
- /include | ||
- /lib/*.a | ||
- /lib/*.la | ||
- /lib/pkgconfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: glu | |
buildsystem: meson | |
sources: | |
- type: archive | |
url: https://archive.mesa3d.org/glu/glu-9.0.3.tar.xz | |
sha256: bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f | |
cleanup: | |
- /include | |
- /lib/*.a | |
- /lib/*.la | |
- /lib/pkgconfig |
AFAICT, this is no longer required to build godot: godotengine/godot@587826f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, interesting. It's still included in the Flathub BaseApp manifest; I've reported that here: flathub/org.godotengine.godot.BaseApp#47
|
||
build-commands: | ||
# Export the PCK file and install it alongside the Godot Engine runner | ||
- godot-tools --path sanctify --headless --verbose --export-pack "Linux" ${FLATPAK_ID}.pck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you --export
here instead of --export-pack
, and pass /app/bin/${FLATPAK_ID}
as the dest, you can export the .pck and the correctly named executable at the same time, meaning you don't have to export the executable as part of the godot module above, allowing cleanup: [*]
, which maybe makes that module a bit cleaner to drop into other manifests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't --export
require export templates? Or is that produced as part of the godot build step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the previous module sets up the export template.
I'm using --export
in my PR and it's tested and working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidmhewitt ah yeah, I was coming from the Flathub world where a BaseApp provides the runner, so you only provide the PCK file. But of course if you're building it all from source anyway… this makes sense.
I think @davidmhewitt's #13 is a bit smarter, so I'll close this in favor of that. Sorry for stepping on each others' toes, but it was a fun learning exercise for me nonetheless. And I'm happy there are more people out there getting familiar with Godot×Flatpak. <3 |
Thanks a lot @cassidyjames . It really means a lot. I'll incorporate some of the other changes that you made in the other PR as well. |
Opening more for your reference than suggesting you merge this; builds take a long time on my local machine… but if you can't ship the Godot Engine binary in our app without compiling it first, this is probably the only option unless/until elementary/appcenter-reviews#542 is tackled (or if you switch to Flathub and include the elementary stylesheet/icons in your manifest, instead).
Test with:
The first build will take a long time, but Flatpak Builder does cache the result, so later builds are much faster.