Skip to content

Commit 29d06ce

Browse files
Merge pull request #77 from baagaard-usgs/feature-wsl-setup
Adjust setup_linux.sh to include options for setting up WSL.
2 parents 183da90 + d0363c1 commit 29d06ce

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

packager/setup_linux.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,24 @@ else
1414
export PATH="$pylith/bin:$PATH"
1515
export PYTHONPATH="$pylith/lib/python3.10/site-packages:$pylith/lib64/python3.10/site-packages"
1616
export LD_LIBRARY_PATH="$pylith/lib:$pylith/lib64"
17+
18+
for arg in "$@"; do
19+
if [ $arg = "add-wsl-libs" ]; then
20+
if test ! -d lib-tmp; then
21+
mkdir lib-tmp
22+
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 lib-tmp/
23+
echo "Created lib-tmp with symbolic link for libstdc++.so.6."
24+
fi
25+
export LD_LIBRARY_PATH=$pylith_dir/lib-tmp:$LD_LIBRARY_PATH
26+
elif [ $arg = "enable-software-rendering" ]; then
27+
export LIBGL_ALWAYS_SOFTWARE=1
28+
echo "Set LIBGL_ALWAYS_SOFWARE=1."
29+
else
30+
echo "Unknown argument '$arg'."
31+
echo "Usage: source setup.sh [add-wsl-libs] [enable-software-rendering]"
32+
fi
33+
done
34+
1735
echo "Ready to run PyLith."
1836
fi
1937

0 commit comments

Comments
 (0)