Skip to content

Commit 2dcd112

Browse files
committed
appimage: add support for running with --platform argument, to invoke the relevant qpa scripts
1 parent 8694435 commit 2dcd112

7 files changed

Lines changed: 45 additions & 23 deletions

File tree

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
#!/bin/sh
22
export LD_LIBRARY_PATH="${APPIMAGE_LIBRARY_PATH}:${APPDIR}/usr/lib:${LD_LIBRARY_PATH}"
33
"${APPDIR}/usr/bin/linuxcheck" "${APPDIR}/usr/bin/ossia-score"
4-
exec "${APPDIR}/usr/bin/ossia-score" "$@"
4+
5+
APP_SUFFIX=""
6+
7+
[[ "$@" =~ '--platform=cli' ]] && APP_SUFFIX=-cli
8+
[[ "$@" =~ '--platform=x11' ]] && APP_SUFFIX=-x11
9+
[[ "$@" =~ '--platform=wayland' ]] && APP_SUFFIX=-wayland
10+
[[ "$@" =~ '--platform=eglfs' ]] && APP_SUFFIX=-eglfs
11+
[[ "$@" =~ '--platform=vkkhrdisplay' ]] && APP_SUFFIX=-vkkhrdisplay
12+
[[ "$@" =~ '--platform=vulkan' ]] && APP_SUFFIX=-vkkhrdisplay
13+
[[ "$@" =~ '--platform=vnc' ]] && APP_SUFFIX=-vnc
14+
[[ "$@" =~ '--platform=help' ]] && echo "Valid options for --ui-mode: cli, x11, wayland, eglfs, vkkhrdisplay, vnc" && exit 1
15+
16+
exec "${APPDIR}/usr/bin/ossia-score${APP_SUFFIX}" "$@"

cmake/Deployment/Linux/AppImage/Recipe.llvm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ cmake --install . --component Devel --prefix "$SDK_DIR/usr"
6161
find . -name '*.a' -exec rm -rf {} \;
6262
)
6363

64-
64+
# Copy helper scripts
65+
cp "$SOURCE_DIR/cmake/Deployment/Linux/Raspberry/*" "$APP_DIR/usr/bin/"
6566

6667
# Copy pixmaps
6768
cp "$APP_DIR/usr/share/applications/ossia-score.desktop" "$APP_DIR/"

cmake/Deployment/Linux/Raspberry/ossia-score-cli

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ DIR=$(dirname "$DIR")
88

99
source "$DIR/setup-dependencies.sh"
1010

11-
export MESA_GLES_VERSION_OVERRIDE=3.2
12-
export MESA_GLSL_VERSION_OVERRIDE=320
13-
export LD_LIBRARY_PATH="$DIR/lib"
1411
export QT_QPA_PLATFORM=minimal
1512

16-
"$DIR/bin/ossia-score" --no-gui --no-restore $@
13+
"$DIR/ossia-score" --no-opengl --no-gui --no-restore $@

cmake/Deployment/Linux/Raspberry/ossia-score-eglfs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
# This script will run ossia score directly on DRM & EGLFS,
44
# without using X11, Wayland or anything like this.
5-
# This is the most efficient way to playback scores that use the GPU on a Pi
5+
# This is almost most efficient way to playback scores that use the GPU on a Pi
66
# as the entirety of the GPU is dedicated to the graphics rendering of score.
7+
# (The most efficient is through the Vulkan vkkhrdisplay backend which gives a small additional edge).
78
# Note that the Qt EGLFS back-end is fairly configurable: if multiple screens
89
# or special resolution is required, check out the documentation here:
910
# https://doc.qt.io/qt-6/embedded-linux.html
@@ -13,9 +14,13 @@ DIR=$(dirname "$DIR")
1314

1415
source "$DIR/setup-dependencies.sh"
1516

16-
export MESA_GLES_VERSION_OVERRIDE=3.2
17-
export MESA_GLSL_VERSION_OVERRIDE=320
18-
export LD_LIBRARY_PATH="$DIR/lib"
17+
if [[ -n MESA_GLES_VERSION_OVERRIDE ]]; then
18+
export MESA_GLES_VERSION_OVERRIDE=3.2
19+
fi
20+
if [[ -n MESA_GLSL_VERSION_OVERRIDE ]]; then
21+
export MESA_GLSL_VERSION_OVERRIDE=3.2
22+
fi
23+
1924
export QT_QPA_PLATFORM=eglfs
2025

21-
"$DIR/bin/ossia-score" $@ --no-opengl --no-gui
26+
"$DIR/ossia-score" $@ --no-opengl

cmake/Deployment/Linux/Raspberry/ossia-score-vnc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ DIR=$(dirname "$DIR")
99

1010
source "$DIR/setup-dependencies.sh"
1111

12-
export MESA_GLES_VERSION_OVERRIDE=3.2
13-
export MESA_GLSL_VERSION_OVERRIDE=320
14-
export LD_LIBRARY_PATH="$DIR/lib"
12+
# GL does not work in VNC so let's not bother too much with it
13+
export SCORE_DISABLE_SHADER_PREVIEW=1
1514
export QT_QPA_PLATFORM="vnc:size=1280x720"
1615

17-
"$DIR/bin/ossia-score" $@
16+
"$DIR/ossia-score" $@ --no-opengl

cmake/Deployment/Linux/Raspberry/ossia-score-wayland

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ DIR=$(dirname "$DIR")
66

77
source "$DIR/setup-dependencies.sh"
88

9-
export MESA_GLES_VERSION_OVERRIDE=3.2
10-
export MESA_GLSL_VERSION_OVERRIDE=320
11-
export LD_LIBRARY_PATH="$DIR/lib"
9+
if [[ -n MESA_GLES_VERSION_OVERRIDE ]]; then
10+
export MESA_GLES_VERSION_OVERRIDE=3.2
11+
fi
12+
if [[ -n MESA_GLSL_VERSION_OVERRIDE ]]; then
13+
export MESA_GLSL_VERSION_OVERRIDE=3.2
14+
fi
15+
1216
export QT_QPA_PLATFORM=wayland
1317

14-
"$DIR/bin/ossia-score" $@
18+
"$DIR/ossia-score" $@

cmake/Deployment/Linux/Raspberry/ossia-score-x11

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ DIR=$(dirname "$DIR")
66

77
source "$DIR/setup-dependencies.sh"
88

9-
export MESA_GLES_VERSION_OVERRIDE=3.2
10-
export MESA_GLSL_VERSION_OVERRIDE=320
11-
export LD_LIBRARY_PATH="$DIR/lib"
9+
if [[ -n MESA_GLES_VERSION_OVERRIDE ]]; then
10+
export MESA_GLES_VERSION_OVERRIDE=3.2
11+
fi
12+
if [[ -n MESA_GLSL_VERSION_OVERRIDE ]]; then
13+
export MESA_GLSL_VERSION_OVERRIDE=3.2
14+
fi
15+
1216
export QT_QPA_PLATFORM=xcb
1317

14-
"$DIR/bin/ossia-score" $@
18+
"$DIR/ossia-score" $@

0 commit comments

Comments
 (0)