Mac OS X port ready

Started by elias, November 11, 2004, 16:08:03

Previous topic - Next topic

itistoday

Quote from: "Gom Jabbar"You have to redo that bit too, Enum's aren't supported prior to Java 1.5 either. Just throw out all references to gameState(s) and add a boolean to keep track of whether the game is running or not. If you don't know how to do this give me a shout and I'll post some source...
It's alright thanks, trevorsm PM'd me a working copy :)

Gom Jabbar

I updated the code anyway! :D

http://lwjgl.org/wiki/tiki-index.php?page=Basic+Game+Framework

I haven't tested it yet - as I'm honestly too lazy for that right now - but from how it looks it should work :).

itistoday

Quote from: "Gom Jabbar"I updated the code anyway! :D

http://lwjgl.org/wiki/tiki-index.php?page=Basic+Game+Framework

I haven't tested it yet - as I'm honestly too lazy for that right now - but from how it looks it should work :).
Ok thanks a bunch!

elias

The isKeyDown() issue has been fixed in CVS.

- elias

elias

And I've updated the libraries on odense.kollegienet.dk.

- elias

itistoday

Quote from: "elias"The isKeyDown() issue has been fixed in CVS.

- elias
Thanks, but how exactly do I compile all this?  I went to lwjgl's sourceforge page and got the CVS source, and ran 'ant' in the main directory (had to make a folder called bin or it wouldn't work), which seemed to build the classes (but didn't put them into a jar file, oh well).  But I can't seem to figure out how to compile the native library.  How do I do that?

elias

the jarring command is "ant jars", and to buld the native part you'll have to live with the crude Makefile in src/native/macosx. Go in there and run "make" to create the liblwjgl.jnilib.

- elias

itistoday

Quote from: "elias"the jarring command is "ant jars", and to buld the native part you'll have to live with the crude Makefile in src/native/macosx. Go in there and run "make" to create the liblwjgl.jnilib.

- elias
"ant jars" does not seems to be a "valid target", but when I tried "ant all" I got a lot of stuff going :)
However, when it tried to compile the native library it gave me this:
[exec] /Developer/Private/jam -d2 -j2 JAMBASE=/Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase JAMFILE=- build ACTION=build _DEFAULT_GCC_VERSION=3.3 "CPP_HEADERMAP_FILE=/Users/gslepak/Desktop/Java Stuff/lwjgl/CVS/lwjgl/platform_build/mac_xcode/build/mac_xcode.build/JNILib.build/liblwjgl.jnilib.hmap" "SRCROOT=/Users/gslepak/Desktop/Java Stuff/lwjgl/CVS/lwjgl/platform_build/mac_xcode" "OBJROOT=/Users/gslepak/Desktop/Java Stuff/lwjgl/CVS/lwjgl/platform_build/mac_xcode/build" "SYMROOT=/Users/gslepak/Desktop/Java Stuff/lwjgl/CVS/lwjgl/platform_build/mac_xcode/build" DSTROOT=/tmp/mac_xcode.dst

     [exec] Missing file or directory: ../../src/native/macosx/hid.cpp
     [exec] Missing file or directory: ../../src/native/macosx/org_lwjgl_Display.cpp
...

And attempting to manually do a 'make' in the macosx native dir I get this:
gcc -fPIC -O2 -D_MACOSX -Wall -c -I/Users/oddlabs/cvs/openal/include -I../common -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers org_lwjgl_Sys.c -o org_lwjgl_Sys.o
gcc -fPIC -O2 -D_MACOSX -Wall -c -I/Users/oddlabs/cvs/openal/include -I../common -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers org_lwjgl_input_Mouse.c -o org_lwjgl_input_Mouse.o
gcc -fPIC -O2 -D_MACOSX -Wall -c -I/Users/oddlabs/cvs/openal/include -I../common -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers org_lwjgl_opengl_Pbuffer.c -o org_lwjgl_opengl_Pbuffer.o
gcc -fPIC -O2 -D_MACOSX -Wall -c -I/Users/oddlabs/cvs/openal/include -I../common -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers ../common/common_tools.c -o ../common/common_tools.o
gcc -fPIC -O2 -D_MACOSX -Wall -c -I/Users/oddlabs/cvs/openal/include -I../common -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers ../common/extal.c -o ../common/extal.o
In file included from ../common/extal.c:36:
../common/extal.h:49:25: AL/alctypes.h: No such file or directory
../common/extal.h:50:24: AL/altypes.h: No such file or directory
In file included from ../common/extal.c:36:
../common/extal.h:107: error: parse error before '*' token
../common/extal.h:107: error: parse error before "capability"
../common/extal.h:107: warning: type defaults to `int' in declaration of `ALvoid'
../common/extal.h:107: error: `ALvoid' declared as function returning a function
../common/extal.h:108: error: parse error before '*' token
../common/extal.h:108: error: parse error before '*' token
...

It seems it's using your username's path to try to find stuff.... And it can't seem to find the stuff in ../commons... :(

trevorsm

Quote from: "itistoday"And attempting to manually do a 'make' in the macosx native dir I get this:

You need to download the OpenAL framework/headers.

EDIT:
The installer at http://developer.creative.com/articles/article.asp?cat=1&sbcat=31&top=38&aid=97 ought to work fine.

trevorsm

Quote from: "elias"The isKeyDown() issue has been fixed in CVS.

And I've updated the libraries on odense.kollegienet.dk.

Thanks a bunch!

itistoday

Quote from: "trevorsm"
Quote from: "itistoday"And attempting to manually do a 'make' in the macosx native dir I get this:

You need to download the OpenAL framework/headers.

EDIT:
The installer at http://developer.creative.com/articles/article.asp?cat=1&sbcat=31&top=38&aid=97 ought to work fine.
Downloaded it, installed it, still doesn't work.

The make file contains this line:
AL=/Users/oddlabs/cvs/openal

I think I need to change that to something.

renanse

This is great, thanks elias!  Only 1 question...  Is Pbuffer support forthcoming?  Sorry, if I sound ungrateful, just want to add as much lwjgl-Mac support as I can in jME.  :)

elias

Soon, I think. It seems that I was hasty when dismissing the 10.3 pbuffers as incompatible with LWJGL semantics, as it is possible to use it as regular offscreen buffers.

- elias

elias

Pbuffer support has been comitted to CVS.

- elias

javac

This is looking great elias, thanks for all your work on it so far.

I'm not experiencing 'mode capping' myself. I'm currently using jME and can run at 1280x1024 on my lowly G4 533DP, OSX 10.3, Java 1.4.2_05.