From d0363c1b77e4d49d282dec36cc02c8188a1588c3 Mon Sep 17 00:00:00 2001 From: Brad Aagaard Date: Tue, 18 Jun 2024 14:55:43 -0600 Subject: [PATCH] Adjust setup_linux.sh to include options for setting up WSL. --- packager/setup_linux.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packager/setup_linux.sh b/packager/setup_linux.sh index d681df9..7ae171c 100644 --- a/packager/setup_linux.sh +++ b/packager/setup_linux.sh @@ -14,6 +14,24 @@ else export PATH="$pylith/bin:$PATH" export PYTHONPATH="$pylith/lib/python3.10/site-packages:$pylith/lib64/python3.10/site-packages" export LD_LIBRARY_PATH="$pylith/lib:$pylith/lib64" + + for arg in "$@"; do + if [ $arg = "add-wsl-libs" ]; then + if test ! -d lib-tmp; then + mkdir lib-tmp + ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 lib-tmp/ + echo "Created lib-tmp with symbolic link for libstdc++.so.6." + fi + export LD_LIBRARY_PATH=$pylith_dir/lib-tmp:$LD_LIBRARY_PATH + elif [ $arg = "enable-software-rendering" ]; then + export LIBGL_ALWAYS_SOFTWARE=1 + echo "Set LIBGL_ALWAYS_SOFWARE=1." + else + echo "Unknown argument '$arg'." + echo "Usage: source setup.sh [add-wsl-libs] [enable-software-rendering]" + fi + done + echo "Ready to run PyLith." fi