forked from flathub/org.godotengine.Godot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
org.godotengine.Godot.yaml
103 lines (90 loc) · 3.19 KB
/
org.godotengine.Godot.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
app-id: org.godotengine.Godot
runtime: org.freedesktop.Sdk
runtime-version: '23.08'
default-branch: stable
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.openjdk17
command: godot
build-options:
arch:
x86_64:
env:
# Only enable link-time optimization when targeting x86_64
# (causes issues on other architectures)
SCONS_FLAGS_EXTRA: use_lto=yes
env:
# Will be appended to the version string displayed in the editor and command-line help
BUILD_NAME: flathub
# SCons flags common to all builds
# Shouldn't be quoted when used as it's a single string, not an array
SCONS_FLAGS: >
platform=linuxbsd
CCFLAGS=-I/app/include
prefix=/app
unix_global_settings_path=/app
progress=no
builtin_freetype=no
builtin_libogg=no
builtin_libpng=no
builtin_libtheora=no
builtin_libvorbis=no
builtin_libwebp=no
builtin_openssl=no
builtin_libvpx=no
builtin_zlib=no
builtin_graphite=no
builtin_harfbuzz=no
udev=no
finish-args:
- --share=ipc
- --socket=x11
- --share=network
- --socket=pulseaudio
- --filesystem=host
- --device=all
- --talk-name=org.freedesktop.Flatpak
- --env=JAVA_HOME=/app/jdk
modules:
- shared-modules/glu/glu-9.json
- name: openjdk17
buildsystem: simple
build-commands:
- /usr/lib/sdk/openjdk17/installjdk.sh
- name: scons
buildsystem: simple
cleanup: ['*']
sources:
- type: archive
sha256: 3d43b2303a924816ea0e1b345ff04c9b3e27b53eadf0f26012fc0c29b019685f
url: https://downloads.sourceforge.net/project/scons/scons/4.4.0/SCons-4.4.0.tar.gz
build-commands:
- pip3 install --no-index --no-build-isolation --prefix=/app .
- name: godot-tools
buildsystem: simple
sources:
- type: archive
sha256: be2d5b8333628e9135dd6fce992ebd16481b97e99d6facc2296411a7b7f72a62
url: https://downloads.tuxfamily.org/godotengine/4.2.1/godot-4.2.1-stable.tar.xz
- type: script
dest-filename: godot.sh
commands:
- export APPDATA="$XDG_DATA_HOME"
- export PATH="/app/jdk/bin:$PATH"
- /app/bin/godot-bin "$@"
- type: file
path: org.godotengine.Godot.appdata.xml
build-commands:
- python3 /app/bin/scons $SCONS_FLAGS $SCONS_FLAGS_EXTRA target=editor -j "$FLATPAK_BUILDER_N_JOBS"
- install -D -m755 bin/godot.linuxbsd.editor.* /app/bin/godot-bin
- install -D -m755 godot.sh /app/bin/godot
- desktop-file-edit --set-icon=$FLATPAK_ID misc/dist/linux/$FLATPAK_ID.desktop
- install -Dm644 misc/dist/linux/$FLATPAK_ID.desktop /app/share/applications/$FLATPAK_ID.desktop
- install -Dm644 misc/dist/linux/$FLATPAK_ID.xml /app/share/mime/packages/$FLATPAK_ID.xml
- install -Dm644 $FLATPAK_ID.appdata.xml /app/share/appdata/$FLATPAK_ID.appdata.xml
- install -Dm644 icon.svg /app/share/icons/hicolor/scalable/apps/$FLATPAK_ID.svg
- >
for size in {32,64,128,256}; do
rsvg-convert icon.svg -w "$size" -h "$size" -a -f png -o "$size.png";
install -Dm644 "$size.png" "/app/share/icons/hicolor/${size}x${size}/apps/$FLATPAK_ID.png";
done