Created
March 12, 2022 16:32
-
-
Save rfht/25e9cc9ed4cd2280941325eec9e97e17 to your computer and use it in GitHub Desktop.
Legacy setup script for libgdx games on OpenBSD, like Slay the Spire
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
GDXARCH= | |
if [ "$(uname -p)" = "amd64" ] ; then | |
GDXARCH=64 | |
fi | |
JAVA_HOME=${TRUEPREFIX}/jdk-11 | |
PATH=$PATH:$JAVA_HOME/bin | |
for i in $(ls *.jar); do | |
jar xvf $i | |
done | |
for i in libgdx${GDXARCH}.so libgdx-controllers-desktop${GDXARCH}.so libgdx-freetype${GDXARCH}.so; do | |
if [ -f "$i" ] ; then | |
ln -sf ${TRUEPREFIX}/share/libgdx/$i | |
fi | |
done | |
if [ -f "liblwjgl${GDXARCH}.so" ] ; then | |
ln -sf ${TRUEPREFIX}/share/lwjgl/liblwjgl${GDXARCH}.so | |
fi | |
if [ -f "libopenal${GDXARCH}.so" ] ; then | |
ln -sf ${TRUEPREFIX}/lib/libopenal.so* libopenal${GDXARCH}.so # will fail if multiple libopenal.so versions exist | |
fi | |
rm -rf com/badlogic | |
ln -sf ${TRUEPREFIX}/share/libgdx/com/badlogic com/badlogic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment