diff --git a/cmake/Deployment/Linux/Raspberry/ossia-score-cli b/cmake/Deployment/Linux/Raspberry/ossia-score-cli index 426e2dafc7..95e714a2a1 100755 --- a/cmake/Deployment/Linux/Raspberry/ossia-score-cli +++ b/cmake/Deployment/Linux/Raspberry/ossia-score-cli @@ -1,11 +1,13 @@ #!/bin/bash -eux # This script will run ossia score as a CLI only version. -# Most features will not be available but it will be more efficient. +# Most features will not be available but it will be more efficient and it will use very little RAM. DIR=$(realpath "${BASH_SOURCE[0]}") DIR=$(dirname "$DIR") +source "$DIR/bin/setup-dependencies.sh" + export MESA_GLES_VERSION_OVERRIDE=3.2 export MESA_GLSL_VERSION_OVERRIDE=320 export LD_LIBRARY_PATH="$DIR/lib" diff --git a/cmake/Deployment/Linux/Raspberry/ossia-score-eglfs b/cmake/Deployment/Linux/Raspberry/ossia-score-eglfs index 20dfe2b8ec..6fc250ab0e 100755 --- a/cmake/Deployment/Linux/Raspberry/ossia-score-eglfs +++ b/cmake/Deployment/Linux/Raspberry/ossia-score-eglfs @@ -11,6 +11,8 @@ DIR=$(realpath "${BASH_SOURCE[0]}") DIR=$(dirname "$DIR") +source "$DIR/bin/setup-dependencies.sh" + export MESA_GLES_VERSION_OVERRIDE=3.2 export MESA_GLSL_VERSION_OVERRIDE=320 export LD_LIBRARY_PATH="$DIR/lib" diff --git a/cmake/Deployment/Linux/Raspberry/ossia-score-vnc b/cmake/Deployment/Linux/Raspberry/ossia-score-vnc index 8c8e78fdba..7b221a591f 100755 --- a/cmake/Deployment/Linux/Raspberry/ossia-score-vnc +++ b/cmake/Deployment/Linux/Raspberry/ossia-score-vnc @@ -7,6 +7,8 @@ DIR=$(realpath "${BASH_SOURCE[0]}") DIR=$(dirname "$DIR") +source "$DIR/bin/setup-dependencies.sh" + export MESA_GLES_VERSION_OVERRIDE=3.2 export MESA_GLSL_VERSION_OVERRIDE=320 export LD_LIBRARY_PATH="$DIR/lib" diff --git a/cmake/Deployment/Linux/Raspberry/ossia-score-wayland b/cmake/Deployment/Linux/Raspberry/ossia-score-wayland new file mode 100755 index 0000000000..8adccfbdca --- /dev/null +++ b/cmake/Deployment/Linux/Raspberry/ossia-score-wayland @@ -0,0 +1,14 @@ +#!/bin/bash -eux + +# Default script to use to launch ossia on a graphical session under a Pi +DIR=$(realpath "${BASH_SOURCE[0]}") +DIR=$(dirname "$DIR") + +source "$DIR/bin/setup-dependencies.sh" + +export MESA_GLES_VERSION_OVERRIDE=3.2 +export MESA_GLSL_VERSION_OVERRIDE=320 +export LD_LIBRARY_PATH="$DIR/lib" +export QT_QPA_PLATFORM=wayland + +"$DIR/bin/ossia-score" $@ diff --git a/cmake/Deployment/Linux/Raspberry/ossia-score-x11 b/cmake/Deployment/Linux/Raspberry/ossia-score-x11 index 3d12f6f6f3..44b57af3e4 100755 --- a/cmake/Deployment/Linux/Raspberry/ossia-score-x11 +++ b/cmake/Deployment/Linux/Raspberry/ossia-score-x11 @@ -4,6 +4,8 @@ DIR=$(realpath "${BASH_SOURCE[0]}") DIR=$(dirname "$DIR") +source "$DIR/bin/setup-dependencies.sh" + export MESA_GLES_VERSION_OVERRIDE=3.2 export MESA_GLSL_VERSION_OVERRIDE=320 export LD_LIBRARY_PATH="$DIR/lib" diff --git a/cmake/Deployment/Linux/Raspberry/setup-dependencies.sh b/cmake/Deployment/Linux/Raspberry/setup-dependencies.sh new file mode 100644 index 0000000000..fd00f5d56e --- /dev/null +++ b/cmake/Deployment/Linux/Raspberry/setup-dependencies.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [[ -f /etc/redhat-release ]]; then + # Fedora does not ship this for some obscure reason + if [[ ! -f "$DIR/lib/libbz2.so.1.0" ]]; then + find /usr -name libbz2.so.1 -exec cp {} "$DIR/lib/libbz2.so.1.0" \; || true + fi + + # Fedora has a recent enough libstdc++ + rm "$DIR/lib/libstdc++.so.6" +fi + +if [[ -f /etc/arch-release ]]; then + # Arch has a recent enough libstdc++ + rm "$DIR/lib/libstdc++.so.6" +fi \ No newline at end of file