-
Notifications
You must be signed in to change notification settings - Fork 5
/
org.godotengine.GodotSharp.yaml
204 lines (182 loc) · 7.46 KB
/
org.godotengine.GodotSharp.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
app-id: org.godotengine.GodotSharp
runtime: org.freedesktop.Sdk
runtime-version: "23.08"
sdk: org.freedesktop.Sdk
add-extensions:
org.freedesktop.Sdk.Extension.openjdk17:
directory: jdk
version: "23.08"
no-autodownload: false
autodelete: false
sdk-extensions:
- org.freedesktop.Sdk.Extension.dotnet8
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
append-path: /usr/lib/sdk/dotnet8/bin
append-ld-library-path: /usr/lib/sdk/dotnet8/lib
env:
PKG_CONFIG_PATH: /app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib/sdk/dotnet8/lib/pkgconfig
# Will be appended to the version string displayed in the editor and command-line help
BUILD_NAME: flathub
DOTNET_CLI_TELEMETRY_OPTOUT: True
DOTNET_NOLOGO: True
DOTNET_ROOT: /usr/lib/sdk/dotnet8/lib
# 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_graphite=no
builtin_harfbuzz=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=wayland
- --socket=x11
- --share=network
- --socket=pulseaudio
- --filesystem=host
- --filesystem=xdg-run/speech-dispatcher # For TTS via libspeechd
- --device=all
- --talk-name=org.freedesktop.Flatpak
modules:
- shared-modules/glu/glu-9.json
- name: jdk
buildsystem: simple
build-commands:
- mkdir -p /app/jdk
- name: dotnet
buildsystem: simple
build-options:
arch:
x86_64:
env:
RUNTIME: linux-x64
build-commands:
- /usr/lib/sdk/dotnet8/bin/install-sdk.sh
- cp -r /usr/lib/sdk/dotnet8/lib/packs/ /app/lib/dotnet/
# This section is borrowed from:
# https://github.com/flathub/org.electronjs.Electron2.BaseApp/blob/c4635368f6c11ace8c1290525da4435d13d9173f/org.electronjs.Electron2.BaseApp.yml#L103
# https://github.com/flathub/net.lutris.Lutris/blob/76e94a0b80ef3ebc1b9a6b61f47d736f5ddd772c/net.lutris.Lutris.yml#L495
# https://gitlab.archlinux.org/archlinux/packaging/packages/speech-dispatcher/-/blob/414baaf78b5fe416df88a89ac18d2dd579a0c653/PKGBUILD
- name: libspeechd
config-opts:
- --disable-static
- --with-ibmtts=no
- --with-kali=no
- --with-baratinoo=no
- --with-voxin=no
- --without-flite
- --disable-python
no-make-install: true
post-install:
- cd ./src/api/c && make install
cleanup:
- "*.la"
- "*.a"
- /include
sources:
- type: archive
url: https://github.com/brailcom/speechd/releases/download/0.11.5/speech-dispatcher-0.11.5.tar.gz
sha512: d6d880bce0ae5bc2a5d519ef7740c689ae8b4b0bb658379762810e4beae3e465a429fbe19f7c490e89db0ea6a36aedd4b2287ac9251b90059b5c2cb3c0dd8a28
x-checker-data:
type: anitya
project-id: 13411
stable-only: true
url-template: https://github.com/brailcom/speechd/releases/download/$version/speech-dispatcher-$version.tar.gz
modules:
# dotconf provides utility functions to parse config files. It's only linked with the speech-dispatcher server,
# which we aren't building, but it needs to exist to get past the ./configure step anyway
- name: dotconf
sources:
- type: archive
url: https://github.com/williamh/dotconf/archive/refs/tags/v1.4.1.tar.gz
sha512: a6cada8621295b268d4b4fd85bc0c207e78324c9e84754ead2fdf6c1598ec8bdf626f9c24e66063d921c95d73e83b50ab50416a9b4c9a7a631392552ec46f55a
x-checker-data:
type: anitya
project-id: 13410
url-template: https://github.com/williamh/dotconf/archive/refs/tags/v$version.tar.gz
- type: script
commands:
- autoreconf -fiv
dest-filename: autogen.sh
cleanup:
- "*"
- name: scons
buildsystem: simple
cleanup: ["*"]
sources:
- type: archive
sha256: 6e928fc97984e719814270f6863f2183b3b72180b0162a5ed09db68c9994100c
url: https://downloads.sourceforge.net/project/scons/scons/4.8.0/SCons-4.8.0.tar.gz
x-checker-data:
type: anitya
project-id: 4770
url-template: https://downloads.sourceforge.net/project/scons/scons/$version/SCons-$version.tar.gz
build-commands:
- pip3 install --no-index --no-build-isolation --prefix=/app .
- name: godot-tools
buildsystem: simple
sources:
- type: archive
sha256: 751e55bfad8e04b846f9cf7b6eb80e058986a2cb1b103fc0fe6a4d8526a20e56
url: https://github.com/godotengine/godot-builds/releases/download/4.3-stable/godot-4.3-stable.tar.xz
- type: script
dest-filename: godot.sh
commands:
- export APPDATA="$XDG_DATA_HOME"
- if [ -f /app/jdk/enable.sh ]; then source /app/jdk/enable.sh; fi
- export DOTNET_ROOT="/app/lib/dotnet"
- export DOTNET_CLI_TELEMETRY_OPTOUT=true
- export DOTNET_NOLOGO=true
- /app/bin/godot-bin "$@"
- type: file
path: org.godotengine.GodotSharp.appdata.xml
- type: file
path: nuget/nuget-source.config
- type: file
url: https://www.nuget.org/api/v2/package/Microsoft.Build.NoTargets/2.0.1
sha512: 19fd7d616993d12d633674fe1e9779eab0aa40aa21eec412561e28e8a7e2de3bae8d9fef9595257134d73f33a9dea9ee0e4ebbafbd32525c123320c1eb5bf160
dest: nuget-sources
dest-filename: microsoft.build.notargets.2.0.1.nupkg
- nuget/nuget-sources.json
build-commands:
- cp nuget-source.config modules/mono/glue/GodotSharp/nuget.config
- cp nuget-source.config modules/mono/editor/GodotTools/nuget.config
- cp nuget-source.config modules/mono/editor/Godot.NET.Sdk/nuget.config
- python3 /app/bin/scons $SCONS_FLAGS $SCONS_FLAGS_EXTRA target=editor precision=single module_mono_enabled=yes -j "$FLATPAK_BUILDER_N_JOBS"
- bin/godot.* --display-driver headless --generate-mono-glue modules/mono/glue
- modules/mono/build_scripts/build_assemblies.py --godot-output-dir bin --godot-platform=linuxbsd --precision=single
- install -D -m755 bin/godot.* /app/bin/godot-bin
- cp -r bin/GodotSharp /app/bin/GodotSharp
- install -D -m755 godot.sh /app/bin/godot
- desktop-file-edit --set-name="Godot Engine (C#/.NET)" --set-icon=$FLATPAK_ID misc/dist/linux/org.godotengine.Godot.desktop
- install -Dm644 misc/dist/linux/org.godotengine.Godot.desktop /app/share/applications/$FLATPAK_ID.desktop
- install -Dm644 misc/dist/linux/org.godotengine.Godot.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