-
Notifications
You must be signed in to change notification settings - Fork 0
/
com.jagex.Launcher.yaml
253 lines (240 loc) · 10.4 KB
/
com.jagex.Launcher.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
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
# Versions
x-runtime-version: &runtime-version '23.08'
x-gl-version: &gl-version '1.4'
x-gl-versions: &gl-versions 23.08;1.4
x-wine-version: &wine-version 'wine-8.20'
x-openssl-tag: &openssl-tag 'OpenSSL_1_1_1w'
# Flatpak manifest
id: com.jagex.Launcher
runtime: org.freedesktop.Platform
runtime-version: *runtime-version
sdk: org.freedesktop.Sdk
separate-locales: false
command: /app/bin/launch.sh
finish-args:
- --allow=multiarch
- --allow=devel
- --share=ipc
- --socket=x11
- --device=dri
- --share=network
- --persist=.runelite
- --persist=jagexcache
- --socket=pulseaudio
- --env=WINEPREFIX=/var/data/wine
- --env=WINEARCH=win64
- --env=WINEDLLOVERRIDES=dxgi=b # Fix launch on Steam Deck by using builtin dxgi
- --env=GST_PLUGIN_SYSTEM_PATH=/app/lib32/gstreamer-1.0:/app/lib/gstreamer-1.0:/usr/lib/i386-linux-gnu/gstreamer-1.0:/usr/lib/x86_64-linux-gnu/gstreamer-1.0
- --talk-name=org.freedesktop.Notifications
- --filesystem=xdg-pictures/RuneLite:create
sdk-extensions:
- org.freedesktop.Sdk.Compat.i386
add-extensions:
org.freedesktop.Platform.Compat.i386:
directory: lib/i386-linux-gnu
version: *runtime-version
no-autodownload: false
org.freedesktop.Platform.GL32:
directory: lib/i386-linux-gnu/GL
version: *gl-version
versions: *gl-versions
subdirectories: true
no-autodownload: false
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
com.jagex.Launcher.ThirdParty:
directory: ThirdParty
subdirectories: true
no-autodownload: true
autodelete: true
modules:
- name: wine
buildsystem: simple
build-commands:
- mkdir -p ${FLATPAK_DEST}/wine
- cp -r * ${FLATPAK_DEST}/wine
sources:
- type: archive
url: https://github.com/GloriousEggroll/wine-ge-custom/releases/download/GE-Proton8-26/wine-lutris-GE-Proton8-26-x86_64.tar.xz
archive-type: tar-xz
sha256: 9cef292850a470b1a2637b22959051ab36784dccdb4966c19607790a1e3a96f1
- name: gtk2
build-options:
env:
CC: ccache gcc
CXX: ccache g++
config-opts:
- --libdir=/app/lib
- --sysconfdir=/app/etc
- --localstatedir=/app/var
- --with-xinput=yes
- --disable-gtk-doc
sources:
- type: git
url: https://gitlab.gnome.org/GNOME/gtk.git
tag: 2.24.33
cleanup:
- /bin/openssl
- /share/gtk-2.0/demo
- /lib/pkgconfig
- /lib/debug
- /include
- /bin/gtk-demo
- name: openssl
buildsystem: simple
build-commands:
- ./config --prefix=/app --openssldir=/app/ssl shared zlib
- make -j $FLATPAK_BUILDER_N_JOBS
- make install_sw
sources:
- type: git
url: https://github.com/openssl/openssl.git
tag: *openssl-tag
cleanup:
- /lib/pkgconfig
- /lib/debug
- /include
- name: rs3-client
buildsystem: simple
build-commands:
- ar x *.deb
- mkdir -p ${FLATPAK_DEST}/RS3
- tar -C ${FLATPAK_DEST}/RS3 -xf data.tar.xz
- mv launch.sh ${FLATPAK_DEST}/RS3/RuneScape.exe
- chmod +x ${FLATPAK_DEST}/RS3/RuneScape.exe
sources:
- type: file
url: https://content.runescape.com/downloads/ubuntu/pool/non-free/r/runescape-launcher/runescape-launcher_2.2.11_amd64.deb
sha256: 60b12ccc088e76ba3da261c0b5087fe781fb4b6243b3552f03b7ed98362a8d31
- type: inline
dest-filename: launch.sh
contents: |
#!/bin/sh
set -exo pipefail
if [ -z $1 ]; then
configURI=https://www.runescape.com/k=5/l=\$\(Language:0\)/jav_config.ws
else
configURI=$1
shift
fi
export PULSE_PROP_OVERRIDE="application.name='RuneScape' application.icon_name='runescape' media.role='game'"
export SDL_VIDEO_X11_WMCLASS="RuneScape"
export PULSE_LATENCY_MSEC=${PULSE_LATENCY_MSEC:-256}
unset XMODIFIERS
export HOME=${XDG_DATA_HOME}
exec /app/RS3/usr/share/games/runescape-launcher/runescape --configURI $configURI $@
cleanup:
- /RS3/usr/share/applications
- /RS3/usr/share/doc
- /RS3/usr/bin
- /RS3/usr/share/icons
- /RS3/usr/share/kde4
- /RS3/usr/share/games/runescape-launcher/runescape.png
- name: jagex-launcher
buildsystem: simple
build-commands:
- mkdir -p ${FLATPAK_DEST}/Jagex\ Launcher
- cp -r * ${FLATPAK_DEST}/Jagex\ Launcher
- cp -r .* ${FLATPAK_DEST}/Jagex\ Launcher
sources:
- type: archive
url: https://github.com/USA-RedDragon/jagex-launcher/releases/download/1.2.0/launcher-1.2.0.tar.gz
archive-type: tar-gzip
sha256: 11f390e7b03218553e566960c97cfd20c31caa6a8e0bfdf26c5436285c80cdf8
- name: bundle-setup
buildsystem: simple
post-install:
- install -d /app/ThirdParty
build-commands:
- mkdir -p ${FLATPAK_DEST}/lib/i386-linux-gnu/GL
- mkdir -p ${FLATPAK_DEST}/lib/debug/lib/i386-linux-gnu
- install -Dm755 launch.sh ${FLATPAK_DEST}/bin/launch.sh
- install -Dm644 ld.so.conf ${FLATPAK_DEST}/etc/ld.so.conf
- install -Dm644 16x16.png ${FLATPAK_DEST}/share/icons/hicolor/16x16/apps/com.jagex.Launcher.png
- install -Dm644 32x32.png ${FLATPAK_DEST}/share/icons/hicolor/32x32/apps/com.jagex.Launcher.png
- install -Dm644 48x48.png ${FLATPAK_DEST}/share/icons/hicolor/48x48/apps/com.jagex.Launcher.png
- install -Dm644 64x64.png ${FLATPAK_DEST}/share/icons/hicolor/64x64/apps/com.jagex.Launcher.png
- install -Dm644 128x128.png ${FLATPAK_DEST}/share/icons/hicolor/128x128/apps/com.jagex.Launcher.png
- install -Dm644 256x256.png ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/com.jagex.Launcher.png
- install -D com.jagex.Launcher.desktop ${FLATPAK_DEST}/share/applications/com.jagex.Launcher.desktop
- install -D com.jagex.Launcher.metainfo.xml ${FLATPAK_DEST}/share/metainfo/com.jagex.Launcher.metainfo.xml
sources:
- type: inline
dest-filename: ld.so.conf
contents: |
/app/lib32
/app/lib/i386-linux-gnu
- type: inline
dest-filename: launch.sh
contents: |
#!/bin/sh
set -exuo pipefail
WINEDIR=/app/wine/bin
mkdir -p "${WINEPREFIX}/drive_c/Program Files (x86)/"
if [ ! -d "${WINEPREFIX}/drive_c/Program Files (x86)/Jagex Launcher" ]; then
cp -r /app/Jagex\ Launcher "${WINEPREFIX}/drive_c/Program Files (x86)/"
else
# Check .version against the .version we have in /app/Jagex Launcher. If they don't match, copy the new version over.
if [ "$(cat /app/Jagex\ Launcher/.version)" != "$(cat "${WINEPREFIX}/drive_c/Program Files (x86)/Jagex Launcher/.version")" ]; then
# Delete folder, then copy over the new version
rm -f "${WINEPREFIX}/drive_c/Program Files (x86)/Jagex Launcher/"* || true
cp -r /app/Jagex\ Launcher/* "${WINEPREFIX}/drive_c/Program Files (x86)/Jagex Launcher/"
cp /app/Jagex\ Launcher/.version "${WINEPREFIX}/drive_c/Program Files (x86)/Jagex Launcher/"
fi
fi
rm -rf "${WINEPREFIX}/drive_c/Program Files (x86)/Jagex Launcher/locales/"* || true
cp -r "/app/Jagex Launcher/locales/"* "${WINEPREFIX}/drive_c/Program Files (x86)/Jagex Launcher/locales/"
# "${WINEDIR}/wineboot" -u
# Override the install location for RuneScape so we can use the native client
if "${WINEDIR}/wine64" reg.exe query "HKEY_LOCAL_MACHINE\\Software\\Jagex\\JagexLauncher\\RuneScape"; then
"${WINEDIR}/wine64" reg.exe delete "HKEY_LOCAL_MACHINE\\Software\\Jagex\\JagexLauncher\\RuneScape" /f
fi
"${WINEDIR}/wine64" reg.exe add "HKEY_LOCAL_MACHINE\\Software\\Jagex\\JagexLauncher\\RuneScape" /v "InstallLocation" /t REG_SZ /d "Z:\\app\\RS3\\" /f
"${WINEDIR}/wine64" reg.exe add "HKEY_LOCAL_MACHINE\\Software\\Jagex\\JagexLauncher\\RuneScape" /v "LauncherManaged" /t REG_DWORD /d 0 /f
# Move the old RS3 cache to the new location if it exists
if [ -d "${WINEPREFIX}/drive_c/ProgramData/Jagex/RuneScape" ]; then
mkdir -p "${XDG_DATA_HOME}/Jagex/RuneScape/"
mv "${WINEPREFIX}/drive_c/ProgramData/Jagex/RuneScape/*" "${XDG_DATA_HOME}/Jagex/RuneScape/" || true
rm -rf "${WINEPREFIX}/drive_c/ProgramData/Jagex/RuneScape"
fi
if [ -d "${WINEPREFIX}/drive_c/Program Files (x86)/Jagex Launcher/Games/RuneScape" ]; then
rm -rf "${WINEPREFIX}/drive_c/Program Files (x86)/Jagex Launcher/Games/RuneScape"
fi
if [ ! -d "/app/ThirdParty/RuneLite" ]; then
# Check WINEPREFIX for RuneLite Launcher_is1 key
if "${WINEDIR}/wine" reg.exe query "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\RuneLite Launcher_is1"; then
"${WINEDIR}/wine" reg.exe delete "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\RuneLite Launcher_is1" /f
fi
fi
if [ ! -d "/app/ThirdParty/HDOS" ]; then
# Check WINEPREFIX for HDOS Launcher_is1 key
if "${WINEDIR}/wine" reg.exe query "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\HDOS Launcher_is1"; then
"${WINEDIR}/wine" reg.exe delete "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\HDOS Launcher_is1" /f
fi
fi
if [ -f /app/ThirdParty/HDOS/prelaunch.sh ]; then
. /app/ThirdParty/HDOS/prelaunch.sh
fi
if [ -f /app/ThirdParty/RuneLite/prelaunch.sh ]; then
. /app/ThirdParty/RuneLite/prelaunch.sh
fi
exec "${WINEDIR}/wine" "${WINEPREFIX}/drive_c/Program Files (x86)/Jagex Launcher/JagexLauncher.exe" "$@"
- type: file
path: resources/icons/16x16.png
- type: file
path: resources/icons/32x32.png
- type: file
path: resources/icons/48x48.png
- type: file
path: resources/icons/64x64.png
- type: file
path: resources/icons/128x128.png
- type: file
path: resources/icons/256x256.png
- type: file
path: resources/com.jagex.Launcher.desktop
- type: file
path: resources/com.jagex.Launcher.metainfo.xml