[committed] testchooser for JOGL with Win/32 and Linux/64

The Ant run-testchooser target does not work for JOGL on Windows 32-bit architecture and Linux 64-bit architecture because the native lib path settings doesn't accommodate JOGL's convention that libraries are named exactly the same for both 32- and 64-bit architectures on both Windows and Linux.  The directories in the Ant filelist happen to be in the sequence windows 64 bit and Linux 32-bit first, so the windows 32-bit and Linux 64-bit libraries can never be read.



I'm actually deducing about Windows 32-bit, because I don't have jME source code installed on a 32-bit Windows machine.  It's possible, though unlikely, that Java on Windows coud skip over the 64-bit library and use the 32-bit.  In any case, 64-bit libraries should not be cluttering up the path on a 32-bit machine, and the fix is definely required for Linux.



I'll detect the platform architecture and omit the inapplicable native libs from the native library path.  This fix only impacts running of the run-testchooser Ant target.  This target doesn't write anything, and no other Ant targets depend on it.

I'd appreciate it if somebody with the jME 2.0 system installed on Windows 32-bit… or 64-bit Intel (as opposed to AMD)… could try some demos with the run-testchooser Ant target, choosing JOGL as Renderer, after applying this patch.  Don't expect input to work, due to JOGL-specific bugs in the jME input system (you may need to kill the JVM using the Windows task manager, since the click to close it may not be detected).



Index: build.xml        
===================================================================
--- build.xml   (revision 4557)
+++ build.xml   (working copy)
@@ -72,13 +72,15 @@
   </target>

   <target name="run-testchooser" depends="compile-test" description="Runs the TestChooser">
+    <condition property="jogl.arch.suffix" value="amd64">
+      <os arch="amd64"/>
+    </condition>
+    <property name="jogl.arch.suffix" value="i586"/>
     <pathconvert property="native.libpath" setonempty="false">
       <filelist dir="${libs}">
-        <file name="jogl/native/windows_amd64"/>
+        <file name="jogl/native/windows_${jogl.arch.suffix}"/>
         <file name="jogl/native/macosx"/>
-        <file name="jogl/native/linux_i586"/>
-        <file name="jogl/native/linux_amd64"/>
-        <file name="jogl/native/windows_i586"/>
+        <file name="jogl/native/linux_${jogl.arch.suffix}"/>
         <file name="lwjgl/native/linux"/>
         <file name="lwjgl/native/macosx"/>
         <file name="lwjgl/native/windows"/>

Thank you. I will give it a try when I get back my Internet connection (my ISP should hurry up  :’(). At work, I’m under Vista 64 bits (Intel Xeon), would it be interesting for your test?

gouessej said:

Thank you. I will give it a try when I get back my Internet connection (my ISP should hurry up  :'(). At work, I'm under Vista 64 bits (Intel Xeon), would it be interesting for your test?


Excellent.  I have no idea if jME base works with Intel 64 bit, but would hope so.

Please see update to my test request post, which could avoid some frustration for you.

I've got an XP 32/Core 2 Duo box at home, I'll give it a shot as well.



EDIT:  Seems to run fine on a Core 2/NV Quadro FX1500/JDK6u15/XP32

sbook said:

I've got an XP 32/Core 2 Duo box at home, I'll give it a shot as well.

EDIT:  Seems to run fine on a Core 2/NV Quadro FX1500/JDK6u15/XP32


Thanks a lot.
gouessej said:

Thank you. I will give it a try when I get back my Internet connection (my ISP should hurry up  :'(). At work, I'm under Vista 64 bits (Intel Xeon), would it be interesting for your test?


How about it?

committed rev 4591