Skip to content

Commit

Permalink
rpi: improve startup scripts, cleanup dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Dec 11, 2024
1 parent e90bb87 commit f636291
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/Deployment/Linux/Raspberry/ossia-score-cli
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions cmake/Deployment/Linux/Raspberry/ossia-score-eglfs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions cmake/Deployment/Linux/Raspberry/ossia-score-vnc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 14 additions & 0 deletions cmake/Deployment/Linux/Raspberry/ossia-score-wayland
Original file line number Diff line number Diff line change
@@ -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" $@
2 changes: 2 additions & 0 deletions cmake/Deployment/Linux/Raspberry/ossia-score-x11
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 16 additions & 0 deletions cmake/Deployment/Linux/Raspberry/setup-dependencies.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f636291

Please sign in to comment.