-
-
Notifications
You must be signed in to change notification settings - Fork 517
/
net.wz2100.wz2100.yaml.in
executable file
·199 lines (188 loc) · 7.41 KB
/
net.wz2100.wz2100.yaml.in
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
app-id: net.wz2100.wz2100@WZ_OUTPUT_NAME_SUFFIX@
# We need to force the target architecture for the runtime, to support cross-compilation
runtime: org.freedesktop.Platform@WZ_RUNTIME_SUFFIX@
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
command: warzone2100
@WZ_CROSS_COMPILE_SDK_EXTENSIONS@
separate-locales: false
finish-args:
- --require-version=0.10.3
- --socket=wayland
- --share=ipc
- --socket=fallback-x11
- --device=dri
- --socket=pulseaudio
- --share=network
# Use features=devel to enable ptrace, which is needed for the crash reporter
# (breakpad and crashpad - only "inproc" works w/out this, and is much more limited).
# This same workaround is used by Firefox, and:
# > The application is still confined in a pid namespace, so that won't let us
# > escape the flatpak sandbox.
# Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=1653852#c23
- --allow=devel
cleanup:
- /include
- /lib/cmake
- /lib/pkgconfig
- /share/gtk-doc
- /share/man
- /share/pkgconfig
- '*.a'
- '*.la'
build-options:
env:
GEM_PATH: /app/lib/ruby/gems/build-dep
x-compat-aarch64-build-options: &compat-aarch64-build-options
# Add the cross compiler to the PATH
append-path: /usr/lib/sdk/toolchain-aarch64/bin
# binutils are available there in a different path. GCC knows
# where to get them. But if we need access to those tools,
# they can be added to the path that way:
# prepend-path: /usr/lib/sdk/toolchain-aarch64/aarch64-unknown-linux-gnu/bin
# Use the proper pkg-config path
prepend-pkg-config-path: /usr/lib/aarch64-linux-gnu/pkgconfig
# Because default CFLAGS are architecture-specific, we need
# to reset them to something more portable.
cflags: -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer
cflags-override: true
cxxflags: -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer
cxxflags-override : true
modules:
@WZ_CROSS_FILES_SETUP@
- name: asciidoctor
cleanup:
- '*'
buildsystem: simple
build-commands:
- gem install --ignore-dependencies --no-user-install --verbose --local --install-dir /app/lib/ruby/gems/build-dep --bindir /app/bin asciidoctor-2.0.17.gem
sources:
- type: file
url: https://rubygems.org/downloads/asciidoctor-2.0.17.gem
sha256: ed5b5e399e8d64994cc16f0983f993d6e33990909a8415b6fc8b786cdeb00f3d
- name: sentry-native
cleanup:
- '*'
buildsystem: simple
build-commands:
- mkdir -p /app/prestaged-dl || echo "Directory already exists"
- cp "sentry-native.zip" /app/prestaged-dl
sources:
- type: file
url: @WZ_SENTRY_NATIVE_URL@
sha512: @WZ_SENTRY_NATIVE_SHA512@
dest-filename: sentry-native.zip
- name: prebuilt-texture-packages
cleanup:
- '*'
buildsystem: simple
build-commands:
- mkdir -p /app/prestaged-dl || echo "Directory already exists"
- cp "high.wz" /app/prestaged-dl
sources:
- type: file
url: @WZ_PREBUILT_TERRAIN_HIGH_DL_URL@
sha512: @WZ_PREBUILT_TERRAIN_HIGH_DL_SHA512@
dest-filename: high.wz
- name: glslc
buildsystem: cmake-ninja
builddir: true
build-options:
no-debuginfo: true
# Always build for host - do not include WZ_CROSS_BUILD_OPTIONS
cleanup:
- '*'
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DSHADERC_SKIP_INSTALL=OFF
- -DSHADERC_SKIP_TESTS=ON
- -DSHADERC_SKIP_EXAMPLES=ON
- -DENABLE_CODE_COVERAGE=OFF
- -DSKIP_SPIRV_TOOLS_INSTALL=ON
- -DSKIP_GLSLANG_INSTALL=ON
sources:
- type: git
url: https://github.com/google/shaderc.git
tag: v2022.2
commit: 551f106dc64a1cacb298cc2f05613d142b53302f
# Replicate the needed functionality of utils/git-sync-deps
# To avoid having to break the build sandbox to download files
- type: git
url: https://github.com/KhronosGroup/SPIRV-Headers.git
commit: 0bcc624926a25a2a273d07877fd25a6ff5ba1cfb # retrieved from DEPS in https://github.com/google/shaderc @ tag
dest: third_party/spirv-headers
- type: git
url: https://github.com/KhronosGroup/SPIRV-Tools.git
commit: 3a8a961cffb7699422a05dcbafdd721226b4547d # retrieved from DEPS in https://github.com/google/shaderc @ tag
dest: third_party/spirv-tools
- type: git
url: https://github.com/KhronosGroup/glslang.git
commit: f771c1293dce29e1ac3557cf994169136155c81f # retrieved from DEPS in https://github.com/google/shaderc @ tag
dest: third_party/glslang
- name: physfs
buildsystem: cmake-ninja
builddir: true
@WZ_CROSS_BUILD_OPTIONS@
config-opts:
- -DCMAKE_INSTALL_PREFIX=/app
- -DCMAKE_BUILD_TYPE=Release
- -DPHYSFS_BUILD_TEST=OFF
@WZ_CMAKE_CROSS_CONFIG_OPTIONS@
sources:
- type: archive
url: https://github.com/icculus/physfs/archive/eb3383b532c5f74bfeb42ec306ba2cf80eed988c.zip # PhysFS 3.2.0
sha512: 1068b1e0636b478f0d7910303e94d109923b2e4d809fa7a00232ba3733a4cd39c28d17851ff946859c431d7d7febdd229237cc10176eb5d5d19b49c887919fd8
- name: fribidi
buildsystem: meson
builddir: true
@WZ_CROSS_BUILD_OPTIONS@
config-opts:
@WZ_MESON_CROSS_CONFIG_OPTIONS@
- -Ddocs=false
- -Dbin=false
- -Dtests=false
sources:
- type: git
url: https://github.com/fribidi/fribidi
tag: v1.0.12
commit: 6428d8469e536bcbb6e12c7b79ba6659371c435a
- name: libsodium
@WZ_CROSS_BUILD_OPTIONS@
config-opts:
@WZ_AUTOTOOLS_CROSS_CONFIG_OPTIONS@
sources:
- type: archive
url: https://github.com/jedisct1/libsodium/releases/download/1.0.18-RELEASE/libsodium-1.0.18.tar.gz
sha256: 6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1
- name: warzone2100
buildsystem: cmake-ninja
builddir: true
@WZ_CROSS_BUILD_OPTIONS@
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DWZ_SKIP_OUTPUT_NAME_SUFFIX_ON_BINARY=ON
- -DWZ_APPSTREAM_ID=net.wz2100.wz2100
- -DWZ_BUILD_SENTRY:BOOL=ON
- -DWZ_SENTRY_PREDOWNLOADED_SENTRY_ARCHIVE=/app/prestaged-dl/sentry-native.zip
- -DWZ_DOWNLOAD_PREBUILT_PACKAGES_ASSET_DIR=/app/prestaged-dl
# Crashpad works in the Flatpak sandbox *if* --allow=devel is set above. Otherwise, this must be: inproc
- -DSENTRY_BACKEND=crashpad
@WZ_CMAKE_CROSS_CONFIG_OPTIONS@
secret-opts:
- -DWZ_DISTRIBUTOR:STRING=$WZ_DISTRIBUTOR
- -DDISCORD_RPC_APPID:STRING=$DISCORD_RPC_APPID
- -DSENTRY_IO_DSN:STRING=$SENTRY_IO_DSN
- -DWZ_OUTPUT_NAME_SUFFIX=$WZ_OUTPUT_NAME_SUFFIX
- -DWZ_NAME_SUFFIX=$WZ_NAME_SUFFIX
secret-env:
- WZ_OUTPUT_NAME_SUFFIX
sources:
- type: dir
path: ../../
- type: file
url: https://github.com/Warzone2100/wz-sequences/releases/download/v3/standard-quality-en-sequences.wz
sha256: 142ae905be288cca33357a49f42b884c190e828fc0b1b1773ded5dff774f41a3
post-install:
- mkdir -p /app/share/icons/hicolor/128x128/apps
- cp /app/share/icons/net.wz2100.wz2100*.png /app/share/icons/hicolor/128x128/apps/
- install -Dm644 ../standard-quality-en-sequences.wz /app/share/warzone2100${WZ_OUTPUT_NAME_SUFFIX}/sequences.wz