Re-add helper scripts libgdx-setup and libgdx-run. They were removed

because of the change to multiversion support; with plan to roll out a
different setup and launcher solution. However, as this is still not
ready for widespread use, the (legacy) helper scripts will at least
provide the previous functionality (limited to libgdx 1.9.11 in the
scripts).
Thanks to brynet@ who updated the scripts for this change.
This commit is contained in:
thfr 2022-04-14 15:16:29 +00:00
parent eccd1232df
commit 8120656313
4 changed files with 50 additions and 1 deletions

View File

@ -1,6 +1,10 @@
VERSION = 1.9.11
REVISION = 4
REVISION = 5
WANTLIB += ${COMPILER_LIBCXX} X11 m
post-install:
${INSTALL_SCRIPT} ${FILESDIR}/libgdx-run.sh ${PREFIX}/bin/libgdx-run
${INSTALL_SCRIPT} ${FILESDIR}/libgdx-setup.sh ${PREFIX}/bin/libgdx-setup
.include <bsd.port.mk>

View File

@ -0,0 +1,11 @@
#!/bin/sh
# get mainClass from config.json
mainclass=
mainclass="$(cat config.json | grep mainClass | cut -d\" -f 4)"
# TODO: get vmArgs from config.json
vmargs="-Xmx2G"
TRUEPREFIX=/usr/local
JAVA_HOME=${TRUEPREFIX}/jdk-11 PATH=$PATH:$JAVA_HOME/bin java $vmargs $mainclass

View File

@ -0,0 +1,32 @@
#!/bin/sh
GDXVER=1.9.11
GDXARCH=
if [ "$(uname -p)" = "amd64" ] ; then
GDXARCH=64
fi
TRUEPREFIX=/usr/local
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/${GDXVER}/$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/${GDXVER}/com/badlogic com/badlogic

View File

@ -1,6 +1,8 @@
@option no-default-conflict
@option is-branch
@pkgpath games/libgdx
bin/libgdx-run
bin/libgdx-setup
share/libgdx/
share/libgdx/1.9.11/
share/libgdx/1.9.11/com/