-
Notifications
You must be signed in to change notification settings - Fork 23
/
org.godotengine.Godot.yaml
109 lines (93 loc) · 3.49 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
104
105
106
107
108
109
app-id: org.godotengine.Godot
runtime: org.freedesktop.Platform
runtime-version: '19.08'
default-branch: stable
sdk: org.freedesktop.Sdk
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=x11
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
udev=no
finish-args:
- --share=ipc
- --socket=x11
- --share=network
- --socket=pulseaudio
- --filesystem=host
- --device=all
- --talk-name=org.freedesktop.Flatpak
modules:
- shared-modules/glu/glu-9.json
- name: scons
buildsystem: simple
cleanup: ['*']
sources:
- type: archive
sha256: 7801f3f62f654528e272df780be10c0e9337e897650b62ddcee9f39fde13f8fb
url: https://downloads.sourceforge.net/project/scons/scons/3.1.2/scons-3.1.2.tar.gz
build-commands:
- python3 setup.py install --prefix=/app
- name: godot-tools
buildsystem: simple
sources:
- type: archive
sha256: fb85065c4430b8f43fa057f5348dacbb3975e2018cd722f97039293f1428d009
url: https://downloads.tuxfamily.org/godotengine/3.1.2/godot-3.1.2-stable.tar.xz
- type: patch
path: android-export-defaults.patch
- type: script
dest-filename: godot.sh
commands:
- export APPDATA="$XDG_DATA_HOME"
- /app/bin/godot-bin "$@"
- type: script
dest-filename: adb.sh
commands:
- flatpak-spawn --host adb "$@"
- type: script
dest-filename: jarsigner.sh
commands:
- flatpak-spawn --host jarsigner "$@"
- type: file
path: org.godotengine.Godot.appdata.xml
build-commands:
- python3 /app/bin/scons $SCONS_FLAGS $SCONS_FLAGS_EXTRA tools=yes target=release_debug -j "$FLATPAK_BUILDER_N_JOBS"
- install -D -m755 bin/godot.x11.opt.tools.* /app/bin/godot-bin
- install -D -m755 godot.sh /app/bin/godot
- install -D -m755 adb.sh /app/bin/adb
- install -D -m755 jarsigner.sh /app/bin/jarsigner
- desktop-file-edit --set-icon=org.godotengine.Godot misc/dist/linux/org.godotengine.Godot.desktop
- install -Dm644 misc/dist/linux/org.godotengine.Godot.desktop /app/share/applications/org.godotengine.Godot.desktop
- sed -i 's/<icon name="godot"/<icon name="org.godotengine.Godot"/' misc/dist/linux/x-godot-project.xml
- install -Dm644 misc/dist/linux/x-godot-project.xml /app/share/mime/packages/org.godotengine.Godot.xml
- install -Dm644 org.godotengine.Godot.appdata.xml /app/share/appdata/org.godotengine.Godot.appdata.xml
- install -Dm644 icon.svg /app/share/icons/hicolor/scalable/apps/org.godotengine.Godot.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/org.godotengine.Godot.png";
done