Jirr on Linux or Mac

Discussion about Irrlicht's Java wrapper
Post Reply
javaman44
Posts: 10
Joined: Tue Sep 08, 2009 2:25 pm
Location: Ohio, United States

Jirr on Linux or Mac

Post by javaman44 »

Hi,
I just found the amazingly fast Irrlicht engine, and this great Java binding. I would like to use Jirr in a Java applet with WebStart, but I'm not sure if it will run under non-Win environments. I looked on the forums, and it seems, from some old posts, that I could recompile a Linux version from the source; but what about Macs? Is there some way I could get whatever the native library wrapper is for Mac? I don't own a Mac, just a PC, so I don't see how I could compile for it.

Also, I posted this same question on the SourceForge Help forums, but I suspect I will get a faster answer here.

Thanks for any help,
Vance
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

At least Irrlicht's SF forums are dead due to deprecation, there are some messages that refer to this forum :)
In theory you should be able to replace the underlying native library by the OSX version on Macs, and use it through the jirr wrapper. However, due to many differences of the platforms, this might be difficult and will definitely not work without some programming on the Mac.
javaman44
Posts: 10
Joined: Tue Sep 08, 2009 2:25 pm
Location: Ohio, United States

Post by javaman44 »

Oh, well that's disappointing. So, I guess then Jirr is only really for Windows?

Also, how about this. How hard would it be to use the JNI to access the Irrlicht library, and create C++ objects(Is that what the C++ version of Java objects are called? I know very little about C++) and use them? I have been programming in Java as a hobby for 3 years now, so I am familiar with Java; but I don't know the slightest bit about JNI. The other thing though is I couldn't find any non-Win native library files in the actual Irrlicht distribution. I only found the Irrlicht.dll and the irkLang.dll. The site says Irrlicht is cross-platform, but do you have to build the native lib yourself?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, you have to build it on your own. For Mac we also have a binary release (for a few days now), but due to the many differences of the Linux distributions, and the simplicity of regenerating the library, it's left open for Linux, Unix, and BSD systems. Simply go to souce/Irrlicht and type 'make' to get the library on those systems.
javaman44
Posts: 10
Joined: Tue Sep 08, 2009 2:25 pm
Location: Ohio, United States

Post by javaman44 »

Ok, I see. I'll figure out the make command. I tried running it off a Linux on a live CD, but it didn't work. I guess I have to install the distro onto my hdd.

About the Mac release. Does the binary release mean that in order to get the Mac native lib, I have to build from the binary? Where is the binary release, or what is the file extension?

Thanks for the help,
Vance
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You need some additional libraries or dev packages, which are not necessarily installed. But you'll need them when developing your app anyway.
The binary release means that it includes the lib, that's the idea of the binary release. Just as the win32 version, which also includes the lib (and the example binaries). If you can use that lib from Java, or what is necessary to use it or not is not known to me.
javaman44
Posts: 10
Joined: Tue Sep 08, 2009 2:25 pm
Location: Ohio, United States

Post by javaman44 »

Where is the Mac lib? Is it in the regular Irrlicht release, or the Mac release? I looked in both, but I can't find a Mac specific library. I mean the release that can be downloaded from here at the top of the page.http://irrlicht.sourceforge.net/downloads.html

I can use a dll in Java. To load a native lib from Java one calls System.loadLibrary(lib name), but the extension is not included. I think the JRE figures out what native lib the underlying OS can use.

Thanks again!
Vance
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I think the Mac version uses a static lib, you have to recompile with XCode on the Mac to get a dynamic library. It should be named .dylib on OSX.
javaman44
Posts: 10
Joined: Tue Sep 08, 2009 2:25 pm
Location: Ohio, United States

Post by javaman44 »

Oh, ok. Well I'll look into trying to run XCode on Win, or do you know if someone on this forum may have already compile IRRLicht into a .dylib, and I could get it from them? I'm asking this because your are an Admin, so I suppose you know a lot of what gos on here.

I'll ask one more quickie. Where is that static lib, just in case I find that Java can load a static lib on MacOSX. Or, is that a stupid question?
I just looked on Wikipedia about what a static library is. It said that C or C++ can create these. So, is it generated when I use Visual Studio?
Sorry again for the possibly ignorant questions, I have never programmed outside of Java in the world of native code.
Vance
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

The OSX binary release installs the dynamic library to /Library/Frameworks/Irrlicht.framework
It also installs the examples and an XCode project, just open the examples dir and open the buildAllExamples.MacOSX project. The static library can be compiled by opening the XCode project in source/Irrlicht/MacOS/, you can use this to build a minimal Irrlicht with lots of stuff missed out, then static link to your application keeping it nice and small.

I know nothing of Jirr though!
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
javaman44
Posts: 10
Joined: Tue Sep 08, 2009 2:25 pm
Location: Ohio, United States

Post by javaman44 »

The OSX binary release installs the dynamic library to /Library/Frameworks/Irrlicht.framework
How do I run the binary release; what is it? Is it a file in the Mac Irrlicht 1.5.1 download, or is it something else?

Thanks,
Vance
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Run the installer, it will install the 1.5.1 shared library to your system and copy the examples to your home dir. Then just open the examples project in XCode and hit the compile button.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
javaman44
Posts: 10
Joined: Tue Sep 08, 2009 2:25 pm
Location: Ohio, United States

Post by javaman44 »

I'm sorry to be such an imbecile, but how do I run the installer? I've only used Windows and Linux, so I'm familiar with .exe, .bat, or the Linux executable(I can't remember the name now), so is it a mac installer program that?

Also, what file is the installer, or what is the extension?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You cannot run it on Windows, neither XCode nor the OSX installer for Irrlicht. And you don't need an extension, just click it (when using a OSX system).
javaman44
Posts: 10
Joined: Tue Sep 08, 2009 2:25 pm
Location: Ohio, United States

Post by javaman44 »

Oh, I see. Thanks for the help you gave me, and you too hybrid!
Vance
Post Reply