forked from flathub/com.heroicgameslauncher.hgl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
com.heroicgameslauncher.hgl.yml
363 lines (335 loc) · 11.7 KB
/
com.heroicgameslauncher.hgl.yml
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
id: com.heroicgameslauncher.hgl
sdk: org.freedesktop.Sdk
runtime: org.freedesktop.Platform
runtime-version: '23.08'
base: org.electronjs.Electron2.BaseApp
base-version: '23.08'
command: heroic-run
separate-locales: false
cleanup:
- /share/docs
- /share/man
sdk-extensions:
- org.freedesktop.Sdk.Compat.i386
- org.freedesktop.Sdk.Extension.toolchain-i386
finish-args:
- --allow=devel
- --allow=multiarch
- --device=all
- --env=PATH=/app/bin:/app/utils/bin:/usr/bin:/usr/lib/extensions/vulkan/MangoHud/bin:/usr/lib/extensions/vulkan/gamescope/bin:/usr/lib/extensions/vulkan/OBSVkCapture/bin:/app/bin/heroic/resources/app.asar.unpacked/build/bin/linux
- --env=LD_LIBRARY_PATH=/usr/lib/extensions/vulkan/gamescope/lib
- --filesystem=~/.local/share/lutris:rw
- --filesystem=~/.steam/steam:rw
- --filesystem=~/.local/share/applications:rw
- --filesystem=~/.steam:rw
- --filesystem=~/Games/Heroic:create
- --filesystem=~/.var/app/com.valvesoftware.Steam:rw
- --filesystem=xdg-documents
- --filesystem=xdg-desktop
- --filesystem=xdg-run/gamescope-0:rw
# should fix access to SD card on the deck
- --filesystem=/run/media
# There are still quite a few users using /mnt/ and /media/ for external drives
- --filesystem=/mnt
- --filesystem=/media
# should fix steamdeck controler navigation
- --filesystem=/run/udev:ro
# should fix discord rich presence
- --filesystem=xdg-run/app/com.discordapp.Discord:create
- --persist=.
- --share=ipc
- --share=network
- --socket=x11
- --socket=wayland
- --socket=pulseaudio
- --talk-name=org.kde.StatusNotifierWatcher
- --talk-name=com.canonical.Unity
# Electron checks if it's running on Unity or KDE before using the UnityLauncherAPI. To make it work on other Desktops too, we need to pretend we are on KDE.
- --env=XDG_CURRENT_SESSION=KDE
- --env=XDG_CURRENT_DESKTOP=KDE
# Make moving files to trash work because it chooses which to use based on XDG_CURRENT_SESSION.
- --env=ELECTRON_TRASH=gio
# umu
- --filesystem=~/.var/app/org.openwinecomponents.umu.umu-launcher/data/umu
- --env=XDG_DATA_DIRS=/app/share:/usr/lib/extensions/vulkan/share:/usr/share:/usr/share/runtime/share:/run/host/user-share:/run/host/share:/usr/lib/pressure-vessel/overrides/share
add-extensions:
org.freedesktop.Platform.Compat.i386:
directory: lib/i386-linux-gnu
version: '23.08'
org.freedesktop.Platform.Compat.i386.Debug:
directory: lib/debug/lib/i386-linux-gnu
version: '23.08'
no-autodownload: true
org.freedesktop.Platform.GL32:
directory: lib/i386-linux-gnu/GL
version: '1.4'
versions: 23.08;1.4
subdirectories: true
no-autodownload: true
autodelete: false
add-ld-path: lib
merge-dirs: vulkan/icd.d;glvnd/egl_vendor.d;OpenCL/vendors;lib/dri;lib/d3d;vulkan/explicit_layer.d;vulkan/implicit_layer.d
download-if: active-gl-driver
enable-if: active-gl-driver
x-compat-i386-opts: &compat_i386_opts
prepend-pkg-config-path: /app/lib32/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig
ldflags: -L/app/lib32
append-path: /usr/lib/sdk/toolchain-i386/bin
env:
CC: i686-unknown-linux-gnu-gcc
CXX: i686-unknown-linux-gnu-g++
libdir: /app/lib32
org.freedesktop.Platform.VAAPI.Intel.i386:
directory: lib/i386-linux-gnu/dri/intel-vaapi-driver
version: '23.08'
versions: '23.08'
autodelete: false
no-autodownload: true
add-ld-path: lib
download-if: have-intel-gpu
autoprune-unless: have-intel-gpu
com.valvesoftware.Steam.Utility:
subdirectories: true
directory: utils
version: stable
versions: stable;beta;test
add-ld-path: lib
merge-dirs: bin
no-autodownload: true
autodelete: true
modules:
# --- Tools ---
- name: vulkan-tools
buildsystem: cmake-ninja
config-opts:
- -DGLSLANG_INSTALL_DIR=/app
- -DVULKAN_HEADERS_INSTALL_DIR=/app
- -DCMAKE_BUILD_TYPE=Release
sources:
- type: git
url: https://github.com/KhronosGroup/Vulkan-Tools.git
tag: sdk-1.3.261.1
- name: gamemode
buildsystem: meson
config-opts: &gamemode_opts
- -Dwith-examples=false
- -Dwith-util=false
- -Dwith-sd-bus-provider=no-daemon
sources: &gamemode_sources
- type: git
url: https://github.com/FeralInteractive/gamemode.git
tag: 1.8.2
commit: c54d6d4243b0dd0afcb49f2c9836d432da171a2b
x-checker-data:
type: git
- name: gamemode-32bit
build-options:
arch:
x86_64: *compat_i386_opts
buildsystem: meson
config-opts: *gamemode_opts
sources: *gamemode_sources
- name: gamemoderun
buildsystem: simple
build-commands:
- install -Dm755 data/gamemoderun -t /app/bin
sources: *gamemode_sources
- name: rsync
config-opts:
- --prefix=${FLATPAK_DEST}
- --with-included-popt
- --with-included-zlib
- --host=x86
- --disable-xxhash
- --disable-md2man
sources:
- type: archive
url: https://download.samba.org/pub/rsync/src/rsync-3.3.0.tar.gz
sha256: 7399e9a6708c32d678a72a63219e96f23be0be2336e50fd1348498d07041df90
x-checker-data:
type: anitya
project-id: 4217
stable-only: true
url-template: https://download.samba.org/pub/rsync/src/rsync-$version.tar.gz
# --- Heroic ---
- name: heroic
buildsystem: simple
build-commands:
- chmod +x Heroic-*.AppImage
- ./Heroic-*.AppImage --appimage-extract
- mv squashfs-root /app/bin/heroic
- install -D heroic-run -t /app/bin
- patch-desktop-filename ${FLATPAK_DEST}/bin/heroic/resources/app.asar
sources:
- type: script
dest-filename: heroic-run
commands:
- for i in {0..9}; do
- test -S $XDG_RUNTIME_DIR/discord-ipc-$i || ln -sf {app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-$i;
- done
- export TMPDIR="$XDG_RUNTIME_DIR/app/$FLATPAK_ID"
- zypak-wrapper /app/bin/heroic/heroic "$@"
- type: file
url: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/releases/download/v2.15.2/Heroic-2.15.2.AppImage
sha512: d03153e68bf1d98b6dfaa21bd5604db793b0dbe222a4e135b257b4b2e6b0e685b716283d50ab873b39975609746868f50cf3b24263c497f86321eb28cfc68aae
- name: platform-bootstrap
buildsystem: simple
build-commands:
- |
set -e
mkdir -p /app/bin
mkdir -p /app/utils
mkdir -p /app/lib/i386-linux-gnu
mkdir -p /app/lib/debug/lib/i386-linux-gnu
mkdir -p /app/lib/i386-linux-gnu/GL
mkdir -p /app/lib/i386-linux-gnu/dri/intel-vaapi-driver
install -Dm644 com.heroicgameslauncher.hgl.png /app/share/icons/hicolor/128x128/apps/com.heroicgameslauncher.hgl.png
install -Dm644 com.heroicgameslauncher.hgl.desktop /app/share/applications/${FLATPAK_ID}.desktop
install -Dm644 -t /app/etc ld.so.conf
install -Dm644 $FLATPAK_ID.metainfo.xml /app/share/metainfo/$FLATPAK_ID.appdata.xml
sources:
- type: inline
dest-filename: ld.so.conf
contents: |
/app/lib32
/app/lib/i386-linux-gnu
- type: file
path: com.heroicgameslauncher.hgl.metainfo.xml
- type: file
path: com.heroicgameslauncher.hgl.png
- type: file
path: com.heroicgameslauncher.hgl.desktop
#START --- Winetricks Deps ---
- name: p7zip
no-autogen: true
build-options:
strip: true
make-args:
- all2
- OPTFLAGS=-O2 -g -std=gnu++14
- DEST_HOME=$(FLATPAK_DEST)
- DEST_BIN=$(FLATPAK_DEST)/bin
- DEST_SHARE=$(FLATPAK_DEST)/lib/p7zip
- DEST_MAN=$(FLATPAK_DEST)/share/man
make-install-args:
- DEST_HOME=$(FLATPAK_DEST)
- DEST_BIN=$(FLATPAK_DEST)/bin
- DEST_SHARE=$(FLATPAK_DEST)/lib/p7zip
- DEST_MAN=$(FLATPAK_DEST)/share/man
sources:
- type: archive
url: https://downloads.sourceforge.net/p7zip/p7zip_16.02_src_all.tar.bz2
sha256: 5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f
- type: patch
paths:
- patches/p7zip/gcc10-conversion.patch
- type: shell
only-arches:
- x86_64
commands:
- ln -sf makefile.linux_amd64_asm makefile.machine
- type: shell
only-arches:
- i386
commands:
- ln -sf makefile.linux_x86_asm_gcc_4.X makefile.machine
modules:
- name: yasm
buildsystem: cmake-ninja
sources:
- type: archive
url: https://github.com/yasm/yasm/archive/v1.3.0.tar.gz
sha256: f708be0b7b8c59bc1dbe7134153cd2f31faeebaa8eec48676c10f972a1f13df3
cleanup:
- '*'
- name: cabextract
build-options:
strip: true
sources:
- type: archive
url: https://www.cabextract.org.uk/cabextract-1.11.tar.gz
sha256: b5546db1155e4c718ff3d4b278573604f30dd64c3c5bfd4657cd089b823a3ac6
x-checker-data:
type: anitya
project-id: 245
url-template: https://www.cabextract.org.uk/cabextract-$version.tar.gz
- name: unrar
no-autogen: true
build-options:
strip: true
make-install-args:
- DESTDIR=$(FLATPAK_DEST)
sources:
- type: archive
url: https://www.rarlab.com/rar/unrarsrc-6.2.12.tar.gz
sha256: a008b5f949bca9bb4ffa1bebbfc8b3c14b89df10a10354809b845232d5f582e5
x-checker-data:
type: anitya
project-id: 13306
url-template: https://www.rarlab.com/rar/unrarsrc-$version.tar.gz
- name: binutils-ar
buildsystem: simple
build-options:
strip: true
build-commands:
- install -Dm755 /usr/bin/ar -t ${FLATPAK_DEST}/bin/
- install -Dm755 /usr/lib/$(gcc -print-multiarch)/libbfd-*.so -t ${FLATPAK_DEST}/lib/
- name: aria2
config-opts:
- --disable-libaria2
- --disable-websocket
- --without-sqlite3
sources:
- type: archive
sha256: 58d1e7608c12404f0229a3d9a4953d0d00c18040504498b483305bcb3de907a5
url: https://github.com/aria2/aria2/releases/download/release-1.36.0/aria2-1.36.0.tar.xz
- type: patch
path: patches/aria2/working-build.patch
- name: libcaca
config-opts: &libcaca_config_opts
- --disable-doc
- --disable-python
- --disable-ruby
- --disable-static
sources: &libcaca_sources
- type: archive
url: http://caca.zoy.org/files/libcaca/libcaca-0.99.beta19.tar.gz
sha256: 128b467c4ed03264c187405172a4e83049342cc8cc2f655f53a2d0ee9d3772f4
- name: libcaca-32bit
build-options:
arch:
x86_64: *compat_i386_opts
config-opts: *libcaca_config_opts
sources: *libcaca_sources
- name: libbsd
sources: &libbsd_sources
- type: archive
url: https://libbsd.freedesktop.org/releases/libbsd-0.10.0.tar.xz
sha256: 34b8adc726883d0e85b3118fa13605e179a62b31ba51f676136ecb2d0bc1a887
- name: libbsd-32bit
build-options:
arch:
x86_64: *compat_i386_opts
sources: *libbsd_sources
- name: libjpeg # with libjpeg.so.8
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_SKIP_RPATH:BOOL=YES
- -DENABLE_STATIC:BOOL=NO
- -DWITH_JPEG8:BOOL=YES
- -DCMAKE_INSTALL_LIBDIR=/app/lib # uses lib64 by default
sources: &libjpeg_sources
- type: archive
url: https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/2.1.3.tar.gz
sha256: dbda0c685942aa3ea908496592491e5ec8160d2cf1ec9d5fd5470e50768e7859
- name: libjpeg-32bit # with libjpeg.so.8
buildsystem: cmake-ninja
build-options:
arch:
x86_64: *compat_i386_opts
config-opts:
- -DCMAKE_SKIP_RPATH:BOOL=YES
- -DENABLE_STATIC:BOOL=NO
- -DWITH_JPEG8:BOOL=YES
sources: *libjpeg_sources
#END --- Winetricks Deps ---