[PC-BSD Commits] r14621 - in pbi/modules/games/minecraft-client: resources/bin scripts

svn at pcbsd.org svn at pcbsd.org
Tue Jan 3 15:36:31 PST 2012


Author: kenmoore
Date: 2012-01-03 23:36:31 +0000 (Tue, 03 Jan 2012)
New Revision: 14621

Modified:
   pbi/modules/games/minecraft-client/resources/bin/minecraft-client.sh
   pbi/modules/games/minecraft-client/scripts/post-portmake.sh
Log:
Fix the wrapper script and adjust the post-install script to correct compilation errors of the LWJGL library for minecraft



Modified: pbi/modules/games/minecraft-client/resources/bin/minecraft-client.sh
===================================================================
--- pbi/modules/games/minecraft-client/resources/bin/minecraft-client.sh	2012-01-03 19:28:09 UTC (rev 14620)
+++ pbi/modules/games/minecraft-client/resources/bin/minecraft-client.sh	2012-01-03 23:36:31 UTC (rev 14621)
@@ -3,16 +3,28 @@
 export JAVA_HOME=${PROGDIR}/linux-sun-jdk1.6.0
 
 #Check if the libs within the user's .minecraft folder have been fixed yet
+if [ -d ~/.minecraft ]; then
 
-if [ -f ~/.minecraft/pcbsdlibsfixed ]; then
-   if [ "`cat ~/.minecraft/pcbsdlibsfixed`" != "TRUE" ]; then
+   if [ -f ~/.minecraft/pbilibsfixed ]; then
+   else
+      echo "FALSE" > ~/.minecraft/pbilibsfixed
+   fi
+
+   if [ "`cat ~/.minecraft/pbilibsfixed`" != "TRUE" ]; then
+      echo "Replacing the LWJGL libraries"
       cd ~/.minecraft/bin/
       rm lwjgl.jar jinput.jar lwjgl_util.jar linux_natives.jar.lzma
-      cp ${PROGDIR}/lwjgl-recompiled/{lwjgl.jar,lwjgl_util.jar} .
+      cp ${PROGDIR}/libs-recompiled/lwjgl.jar lwjgl.jar         
+      cp ${PROGDIR}/libs-recompiled/lwjgl_util.jar lwjgl_util.jar
       rm -r natives/
-      cp -R ${PROGDIR}/lwjgl-recompiled/natives/ natives/
-      echo "TRUE" > ~/.minecraft/pcbsdlibsfixed
+      cp -R ${PROGDIR}/libs-recompiled/natives/ natives/
+      echo "TRUE" > ~/.minecraft/pbilibsfixed
+   else
+      echo "FreeBSD compiled LWJGL libs discovered"
    fi
+
+else
+   echo "Please restart minecraft after logging in once to fix the libraries"
 fi
 
 #Start minecraft

Modified: pbi/modules/games/minecraft-client/scripts/post-portmake.sh
===================================================================
--- pbi/modules/games/minecraft-client/scripts/post-portmake.sh	2012-01-03 19:28:09 UTC (rev 14620)
+++ pbi/modules/games/minecraft-client/scripts/post-portmake.sh	2012-01-03 23:36:31 UTC (rev 14621)
@@ -1,11 +1,16 @@
 #!/bin/sh
 
 echo "Beginning post-portmake.sh"
+cd ${PBI_PROGDIRPATH}
+mkdir libs-recompiled/
+
+
 echo "Step 1: JUtils"
 cd ${PBI_PROGDIRPATH}
 svn checkout --trust-server-cert --non-interactive -r 26 https://svn.java.net/svn/jutils~svn/trunk jutils
 cd jutils/
 ant
+cp bin/jutils.jar ${PBI_PROGDIRPATH}/libs-recompiled/jutils.jar
 
 echo "Step 2: JInput"
 cd ${PBI_PROGDIRPATH}
@@ -14,6 +19,7 @@
 rm lib/jutils.jar
 ln -s ${PBI_PROGDIRPATH}/jutils/bin/jutils.jar lib/jutils.jar
 ant simple_linux
+cp coreAPI/bin/jinput-core.jar ${PBI_PROGDIRPATH}/libs-recompiled/jinput-core.jar
 
 echo "Step 3: LWJGL"
 cd ${PBI_PROGDIRPATH}
@@ -23,14 +29,13 @@
 cd lwjgl
 fetch http://foo.poildetroll.net/minecraft/lwjgl-2.7.1-freebsd.diff
 patch -p1 < lwjgl-2.7.1-freebsd.diff
-export CLASSPATH=${PBI_PROGDIRPATH}/jutils/bin/jutils.jar:${PBI_PROGDIRPATH}/jinput/dist/jinput.jar
+export CLASSPATH=${PBI_PROGDIRPATH}/libs-recompiled/jutils.jar:${PBI_PROGDIRPATH}/libs-recompiled/jinput-core.jar
 ant jars
+export CLASSPATH+=${PBI_PROGDIRPATH}/lwjgl/libs/lwjgl.jar:${PBI_PROGDIRPATH}/lwjgl/libs/lwjgl_util.jar
 ant compile_native
 
 echo "Step 4: Moving files"
-cd ${PBI_PROGDIRPATH}
-mkdir libs-recompiled/
-cd lwjgl-recompiled/
+cd ${PBI_PROGDIRPATH}/libs-recompiled/
 mv ${PBI_PROGDIRPATH}/lwjgl/libs/lwjgl.jar lwjgl.jar
 mv ${PBI_PROGDIRPATH}/lwjgl/libs/lwjgl_util.jar lwjgl_util.jar
 mkdir natives/



More information about the Commits mailing list