summarylogtreecommitdiffstats
path: root/Albion-Online.patch
blob: 3a7d3ae9615f6b5516f8492b5930fcb3ae947e28 (plain)
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
--- old	2022-08-09 09:07:35.000000000 -0600
+++ new	2022-09-13 13:54:49.424249375 -0600
@@ -1,16 +1,25 @@
 #!/bin/sh
 SCRIPT=$(readlink -f "$0")
 SCRIPTPATH=$(dirname "$SCRIPT")
-export QT_QPA_PLATFORM_PLUGIN_PATH="$SCRIPTPATH/launcher/plugins/platforms"
-export QT_PLUGIN_PATH="$SCRIPTPATH/launcher/plugins/"
-OSNAME=$(grep '^NAME=' /etc/os-release)
-
-if [ $OSNAME != "NAME=\"SteamOS\"" ]; then
 export LIBGL_ALWAYS_SOFTWARE=1
 export QSG_INFO=1
-"$SCRIPTPATH/launcher/Albion-Online" "--no-sandbox" "-loglevel 0" "$@" &
-else
-export QT_QPA_PLATFORM="xcb;eglfs"
-export __GL_GlslUseCollapsedArrays=0
-"$SCRIPTPATH/launcher/Albion-Online" "--no-sandbox" "$@" &
+
+LD_PRELOAD=\
+/opt/albion-online-launcher-bin/launcher/libsteam_api.so \
+"$SCRIPTPATH/launcher/Albion-Online" "--no-sandbox" "-loglevel 0" "$@"
+
+declare exit_code=$?
+declare core_dump_msg="Core Dump can be produced by corrupt cache
+Clear user cache/configuration and try again!
+\trm -rf \"$HOME/.config/Sandbox Interactive GmbH\"
+\trm -rf \"$HOME/.config/unity3d/Sandbox Interactive GmbH\"
+\trm -rf \"$HOME/.local/share/Sandbox Interactive GmbH/Albion Online Launcher\"
+"
+
+## Clear cache on core dump
+if (( $exit_code )); then
+    echo "Bad exit code: $exit_code"
+    if (( $exit_code >= 128 )); then ## Core Dump
+        printf "$core_dump_msg"
+    fi
 fi