Hi,
I'm currently developing an Eclipse plugin using LWJGL. For that purpose I'm wondering whether a LWJGL Eclipse plug in already exists? I've already created my own LWJGL plugin which I could make public (or which can be used as a starting point). It may be a good idea if an "official" LWJGL plugin could be created to avoid people of inventing the wheel over and over again.
My "plugin" consists of actually four plugins:
- jars and native libs
- documentation (javadoc)
- sources
- test plugin providing a simple LWJGL based view
I had some trouble with automatically resolving the native libs, in my current version LWJGL works without specifying any additional paths (suc has java.library.path), it's running simply after copying the plugins into Eclipse's plugin folder. At least under Windows and Mac OS X....
Is there any interest in creating such an "official" plugin -- or is it even available yet?
Jens
What exactly does the plugin do? I don't see any reason for having a plugin as you only have to create a Eclipse Variable with the library informations stored and attach to your current project.
A plugin will make installation easier if you provide or develop a plugin using LWJGL. If you have no plugin, a user will have to
- install LWJGL manually (i.e. download and extract somewhere)
- set the variable, and attach the variable to every new project
- set java.library.path or something for the native libraries
With the plugin, the user has simply to install the plugin, i.e. download the plugin and extract/copy it to the plugin folder of eclipse. Since (in case of my plugin) the documentation is also provided as a plugin, the javadoc is directly available in Eclipse without further configurations. You can also use the Eclipse dependency mechanism for different versions etc.
A plugin is not a big deal, I know. But it makes things easier. No classpath struggle, no variables etc. Just have a look at this forum: There are several postings with exactly these problems. Of course, a plugin is only good for Eclipse and Eclipse plug in development ;-) I only thought that it might be a good idea if there is a "official" LWJGL plugin, because otherwise every Eclipse plugin developer creates her or his own plugin, just like me (and I have seen other plugins with LWJGL stuff as well...).
Yea, your cases make sense. Is the plugin an extension for the JDT or how does it fit into the eclipse JDT workflow?
It's a simple plugin providing the LWJGL jars.
To give you an impression, I make my current version temporarily available. You can download it under
http://www.informatik.fernuni-hagen.de/import/pi3/jens/gef3d/temp/lwjgl-plugins.zip (http://www.informatik.fernuni-hagen.de/import/pi3/jens/gef3d/temp/lwjgl-plugins.zip)
This archive is no longer available, see posting below!
The zip contains four plugins:
- org.lwjgl_1.1.0 -- the current lwjgl version, e.g. jars and native libs. I've added an Activator which
sets org.lwjgl.librarypath to the appropriate path. It works with Windows and Mac OS X, I have
not Linux to test it....
If you develop a plugin using LWJGL, you have to simply add this plugin to your required bundles in
the manifest file -- that's it.
- org.lwjgl.source_1.1.0 -- contains the source code. The sources should be automatically retrieved
if you use the first plugin, but this is not working yet. Must have missed something...
- org.lwjgl.doc_1.1.0 -- containts the javadocs of LWJGL and a simple help page linking to org.lwjgl.
The javadocs are automatically retrieved (if the first plugin is used), I've tested that with Eclipse 3.3
- org.lwjgl.test_1.1.0 -- provides a simple test view (Window/Show View/Others/LWJGL Test View).
It draws a torus to check whether everything is working.
The LWJGL code is taken from Snippet 195
(http://www.eclipse.org/swt/opengl/ (http://www.eclipse.org/swt/opengl/))
I will remove the zip within a few days from now -- if you don't like it ;-) Otherwise it could be used as a starting point for an "official" lwjgl plugin...
LWJGL Eclipse plug-in would be great. I tried to get Matzon to include it to the build process, but didn't succeed. :(
But that was long ago. I still think that Java OpenGL games built on the Eclipse Platform would rock. Unfortunately I haven't done any Java coding at home any more. Got swept up in D. ;)
Quote- org.lwjgl_1.1.0 -- the current lwjgl version, e.g. jars and native libs. I've added an Activator which
sets org.lwjgl.librarypath to the appropriate path. It works with Windows and Mac OS X, I have
not Linux to test it....
If you develop a plugin using LWJGL, you have to simply add this plugin to your required bundles in
the manifest file -- that's it.
Have you thought about putting the platform specific stuff in fragments? I did that back when I had(have still somewhere) my own LWJGL Eclipse plug-in. That way the user doesn't have to download binaries for platforms he/she doesn't need.
Just a thought.
I had put the platform specific stuff in fragments, but I changed it for two reasons:
- it's much easier simply installing one plugin instead of two, the size of the native libraries is not too big. Especially you have no trouble with different versions of the jars and the native libraries if you install simply one plugin with matching versions (this issue appeared in some postings in the forum here). I think it should be kept as simple as possible.
- setting the library path is much easier w/o fragments
Quote from: jpilgrim on July 21, 2007, 13:54:05
I had put the platform specific stuff in fragments, but I changed it for two reasons:
- it's much easier simply installing one plugin instead of two, the size of the native libraries is not too big. Especially you have no trouble with different versions of the jars and the native libraries if you install simply one plugin with matching versions (this issue appeared in some postings in the forum here). I think it should be kept as simple as possible.
- setting the library path is much easier w/o fragments
1. You are correct that it makes things easier for the plug-in creator, but the end result will be the same for the user, except the user needs to download a bigger plug-in.
2. I didn't need to set any library paths when the shared libraries where in the fragments root, if my memory serves. There's some magic going on which puts them in the search path automagically.
O.
I would very much like an Eclipse plugin - accessible through the Update manager using the remote path.
As odeamus mentioned we were in talks once, but somehow that ball got dropped.
If this plugin is buildable using ant (to minimize the already somewhat cumbersome build process) then that would be prefered.
@Odeamus: I don't think that size is really a matter here. The sizes of the libraries are 700 (Mac, Linux) and 300 kByte for Windows, so approximately 1 MB overhead is loaded. Apart from that I had problems with setting up the library path and fragments on Mac OS X. It worked on Windows, but not on Mac OS X. Thus I merged all native libraries into one plugin. The LWJGL archives also contain all native libraries.
@Matzon: I can add a feature (necessary for using the update mechanism), create a build.xml and send everything to you. You can then set up the update site ;-) Still: Someone has to test it under Linux...
yeah - that'd be nice 8)
Do I really have to upgrade to Eclipse 3.3 or am I just to dumb to get it work under 3.2. Maybe I've overseen something, plz gimme any hints on how to use it, if it is runnable unter 3.2.
Evil
The version I made available above should also run under Eclipse 3.2. The source code plugin contains a bug and doesn't work as expected. I've tested the plugin under Eclipse 3.3 (Windows) and Eclipse 3.2 (Mac OS X).
As i just wanted to build one by myself, I am glad to use yours.
Although it would be great to have an update site for this.
Quote from: jpilgrim on July 25, 2007, 16:58:01
The version I made available above should also run under Eclipse 3.2. The source code plugin contains a bug and doesn't work as expected. I've tested the plugin under Eclipse 3.3 (Windows) and Eclipse 3.2 (Mac OS X).
Ok, but how do I use it then? I haven't found any Menu/Settings Entry and have no idea how to use it.
OK, I have build an update site ;-)
Name: Gef3D
old location
URL: http://www.informatik.fernuni-hagen.de/pi3/jens/gef3d/update/
new location:
URL: http://www.informatik.fernuni-hagen.de/pi3/personen/pilgrim/gef3d/update/
This site will maybe not available in the future! Maybe it could be "moved" to org.lwjgl someday.
Usage:
- Help / Software Updates / Find and Install...
- Search for new features to install
- New Remote Site, data as above
- Install features from that site
Note that the link above could not be openend with Safari. It's primary purpose is to be used within Eclipse, but it can be browsed with Firefox, too.
The site contains two features:
- org.lwjgl - 1.1.0
* jars and native libraries
* documentation (javadoc)
* source code
* test viewer
- org.lwjgl.optional - 1.1.0
* FMOD component (w/o fmod libraries)
* DevIL component
I have fixed some minor bugs, I think that source code and documentation is now automatically retrieved.
Note that this is an Eclipse plugin and it is only useful when developing other plugins! In order to "use" the plugins, you will have to create a "Plug-In Project" and add the main plug-in (lwjgl.org) to the list of required plugins in your "MANIFEST.MF".
If you are interested in Eclipse support for developing plain Java applications with LWJGL, you have to implement a plugin extending JDT (with new actions like "Run as LWJGL application..."). This is not part of the plugins I assembled!
In order to test whether everything worked fine, simply open
Windows / Show Views / Others... --> Other / LWJGL Test View
I have developed and tested the plugin with he following settings:
- Eclipse 3.3, Windows XP
- Eclipse 3.2.2, Windows XP
- Eclipse 3.2, Mac OS X
As the update site is available now, I have removed the plugin archive (lwjgl-plugins.zip) I refered to in a recent posting.
Thank you!
We can move it to the lwjgl site fairly quickly, but I would like to get some scripts to go with all of that. It would also be great if someone could look into the Extend JDT thing. I have no idea how much work that involves. However I think that most people do not create plugin projects - so a JDT would probably be nice.
Quote from: jpilgrim on July 26, 2007, 14:26:27
Note that this is an Eclipse plugin and it is only useful when developing other plugins! In order to "use" the plugins, you will have to create a "Plug-In Project" and add the main plug-in (lwjgl.org) to the list of required plugins in your "MANIFEST.MF".
If you are interested in Eclipse support for developing plain Java applications with LWJGL, you have to implement a plugin extending JDT (with new actions like "Run as LWJGL application..."). This is not part of the plugins I assembled!
Ah, thats why it did not worked for me. I tried to use it with my JDT LWJGL Projects. It would be very nice if this would work as jdt project to and still have the "run as lwjgl app" :)
The update site I provided moved to a new location:
Name: Gef3D
URL: http://www.informatik.fernuni-hagen.de/import/pi3/personen/pilgrim/gef3d/update/
I modified the URL above accordingly. Also, the latest version of LWJGL (1.1.2) is now available via that update site. Since the URL has changed, you cannot use Eclipse's update mechanism, you have to remove elder versions instead.
@Matzon: I've sent an ANT script to info@lwjgl.org. This ANT script automatically creates all necessary features, plugins and even the update site based on the archive files of LWJGL.
yeah, I got the package - I just dropped the ball a bit since Quake Wars demo came out ;D
jpilgrim can i use the plugin on eclipse 3.2.2?
Will works good or have some error(s) yet? I will use on WINDOWS XP!
I see on the LINK, that has 2 types of plugins, the "optional" and the "other"... who you recommend to use?
THANKS
@scbasso: I think it should work with 3.2.2, too. The plug-in provides just the original LWJGL stuff packed into an Eclipse plugin structure, so you don't have to care about native libraries and stuff, also sources and documentation is made available automatically. I don't think that there are any errors in the plugin structure, and yes, it works with Windows XP.
The "optional" plugins are simply LWJGL's optional stuff, which is found in lwjgl_optional-1.1.2.zip (if you download LWJGL from the LWJGL's download location). You don't need that if you just want to use OpenGL.
Since installing the plugins is quite simple, I'd suggest you install the plug in using the update manager of Eclipse (see my posting above) and try it on your own.