Distribution on Mac

Not knowing much about Mac, say I want to create a downloadable version of my game for mac. What would be the way?
Can I just create an executable jar? Where do I put the native library: Just next to the jar like on windows, or can I also put it in the jar?

Erik

I’d love to help but I don’t really know :stuck_out_tongue: I got a friend to do it. Have a look in http://www.puppygames.net/downloads/alienflux.sit and see how it works. (Needs stuffit 8.02 or later)

Cas :slight_smile:

Don’t go by that AlienFlux example - I’m going to make a better package for him :). (waiting for the newer LWJGL). It works but isn’t the best way.

There are articles on packaging for the Mac here:
http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/

You put the native libs in the Resources/Java folder of you application package.

Send me the files (include mac native code) and I can package it for you. (scott dot palmer at 2connected dot org)
Make a nice 32-bit 128x128 icon (PNG, TIFF, whatever) and I can have a nice app ready with simple drag-n-drop install.

I’ve managed to do this for AlienFlux and a Xith3D app that is in beta and it isn’t very hard at once you know how OS X expects things.

All you need is the icons file, any native libs, and the java stub launcher that apple provides and you can make a Mac application package on Windows and just zip it up. But usually applications are distributed as Mac OS X disk images (.dmg).

Thanks :smiley:

So swpalmer has been very helpful in trying to get a mac distro of CT running.
But… it doesn’t work! The webstart version ‘kinda’ works (no input). The offline version simply hangs.
The problem seems resource loading.

For example:


URL url = this.getClass().getClassLoader().getResource("music.wav");
music= Applet.newAudioClip(url);

This hangs on the last line. No exceptions, no errors: the JRE just locks up :-[. We tried to simply disable the music to see how for it gets. Then it hangs in loading the 1st texture. Also with getResource().
I think there is a general problem with using getResource() here to load resources which is platform dependant (it all works on windows).

Anybody else stumbled across such a problem?

Erik

Just to clarify. The code segment above worked fine on it’s own in a test case. But as part of Cosmic Trip it locks up… Very odd. This happens when I launch from the command line, or from an app bundle. The WebStart version doesn’t have problems loading resources. I can’t think of any reason for WebStart to be successful and the other two methods to fail. Specially when a simple test case to play the audio clip (which loads from the exact same jar as when it is in CT) works fine from both the command line and the app bundle… with the exact same project - I just changed the main class within CT to test it.

There is a try/catch surrounding the code - but it dumps the exception info to the console, and no such info is printed. The application does not exit - it must be forced to terminate. The code is still single threaded at the point in which it fails, so threading deadlocks (caused by CT code) should not be an issue.

I’m running out of ideas.