|
Replies:
11
-
Last Post:
Aug 8, 2007 8:51 AM
by: paulby
|
|
|
|
|
|
|
Incubator build script and folder structure
Posted:
Jun 19, 2007 9:40 PM
|
|
|
I just commited the build script for incubator, I tried to follow the directory structure from Wonderland and LG3D. I also created the src/classes folder where the classes are compiled from. For now wonderland doesn't do automatic builds for the incubator project, you have to compile it manually.
Jordan - I extracted your files and put them in the new structure - I left out the classes that are overwriting the existing ones, not sure what to do with them, if we want to be able to add the incubator jar file in the wonderland classpath, we'd be running into conflicts. Maybe for now we could leave them in the zip files as you have them and, once the XML configs are in place, we could just refactor them and put in the src/classes structure.
Right now the build compiles all the classes and the "jar" task creates a single jar with all the content.
Hope is going to be helpful going forward since there are several ideas for the incubator and it would be good to have a way to compile the classes and package them easily.
Let me know if you have problems compiling, the process depends on previous builds of LG3D and Wonderland so run these first
Maciej
|
|
|
|
|
|
|
Re: Incubator build script and folder structure
Posted:
Jun 20, 2007 4:55 AM
in response to: miechus
|
|
|
Great! Thanks for making improvements. I´m traveling until July 1 so I won´t be able to do anything except try to keep up with the forums as best I can...
|
|
|
|
|
|
|
|
Re: Incubator build script and folder structure
Posted:
Jun 20, 2007 9:50 AM
in response to: jslott
|
|
|
Great, thanks Maciej
|
|
|
|
|
|
|
|
Re: Incubator build script and folder structure
Posted:
Jun 20, 2007 9:10 PM
in response to: paulby
|
|
|
Paul,
Would it be possible for you to include the incubator JAR in the build scripts for Wonderland? I made the changes locally but it would be good to have it in CVS so we don't have to merge files when there are any changes. Here's what I changed (it's a bit hacky but I didn't want to impact too many files):
- added incubator classpath in build-setup.xml
<pathconvert property="wonderland-incubator.classpath"> <path location="../wonderland-incubator/build/lib/wonderland-incubator.jar"/> </pathconvert>
- modified both "wonderland-client-compile.classpath" and "wonderland-server-compile.classpath" paths in build-setup.xml - added the following line
<path path="${wonderland-incubator.classpath}"/>
This trick works fine and allows using incubator classes in Wonderland.
Thanks
Maciej
|
|
|
|
|
|
|
|
Re: Incubator build script and folder structure
Posted:
Jun 29, 2007 2:18 PM
in response to: miechus
|
|
|
Yes.
Krishna and I were talking about this the other day. There are still a number of changes going into the build system to support the binary packages, we will be sure to include this.
|
|
|
|
|
|
|
|
Re: Incubator build script and folder structure
Posted:
Jul 25, 2007 8:28 PM
in response to: miechus
|
|
|
Just a bit confused -- which gets compiled first, wonderland or the incubator? How does one run wonderland with the incubator files included?
Thanks, Jordan
|
|
|
|
|
|
|
|
Re: Incubator build script and folder structure
Posted:
Jul 25, 2007 9:03 PM
in response to: jslott
|
|
|
Jordan,
There is a bit of a chicken-and-egg problem with the incubator. Right now, the strategy is to build Wonderland, then build incubator, then modify WorldRootCellGLO and rebuild Wonderland. If you do that, incubator classes will be available in Wonderland, but you have to be careful about doing clean builds.
Recently, I've made a couple of small improvements in this area to support some internal development projects we have going on:
- There is a class in darkstar.server.cell called "CellGLOFactory". This class instantiates cell classes using reflection, so you can avoid having to rebuild Wonderland after incubator. For example you can use the following to load a cell of the given class with some arbitrary arguments:
String cellType = "org.jdesktop.lg3d.wonderland.samplemodule.server.cell.SampleModuleCellGLO";
CellGLO cellGLO = CellGLOFactory.loadCellGLO(cellType, bounds, orig);
This was designed partly with XML world descriptions in mind, so we should re-open that discussion.
- I added some build support for simple modules. Basically this is a directory with a specific build.xml file in the <top_dir>/modules directory. Whenever the lg3d-wonderland project is built, it will also build all module projects after the core is built. Any files that are put in the module's dist/client and dist/server directory will end up in the client or server classpath respectively. This is an extension of the incubator mechanism to support lots of smaller workspaces, which is what we have internally. There is now a "modules" section of the incubator with a sample module if you're curious.
I expect the module support to evolve significantly over the next little while. Ideally, we would like to provide extensions to Wonderland in a single module file (like a .nbm) that includes server-side and client-side code, and potentially artwork as well. Code would be loaded on the server and then downloaded by the client, so an unmodified client could potentially load any custom cell type. I have some initial thoughts on implementation (like using Apache Felix or similar), but I need to do some more experimenting and put together a real design document.
-Jon
wonderland@javadesktop.org wrote: > Just a bit confused -- which gets compiled first, wonderland or the incubator? How does one run wonderland with the incubator files included? > > Thanks, Jordan > [Message sent by forum member 'jslott' (jslott)] > > http://forums.java.net/jive/thread.jspa?messageID=228272 >
|
|
|
|
|
|
|
|
Re: Incubator build script and folder structure
Posted:
Jul 25, 2007 9:39 PM
in response to: Jonathan Kaplan
|
|
|
Jonathan,
Terrific! I really like the module mechanism -- it is exactly what will make Wonderland all the more better than it already is. In terms of all that is needed for the module files -- I suspect a JAR might do (see discussion on XML files below).
Also -- thank you for putting my files in the core. I think we can get rid of WonderlandAdministration.java. That was a stub for pinging the server to reload the world structure from disk, but I think the better way to do that is through the already existing SERVER_MANAGER_CHANNEL. (now that I read through the code...)
I had a lengthy discussion with Paul today about describing the world by a series of XML files that would fit in with your post here. We talked about having the world be reflected on disk by a directory structure and each cell being describing by XML. The class name would be already embedded in the XML, so as long as the GLO class is found in the classpath, the XMLDecode routine should be able to instantiate it. (hence may make incorporating new cell types relatively simple I think).
I told Paul I would spend a little time thinking about how to put this together and post something to the forum very soon (in the next week or so).
Jordan
|
|
|
|
|
|
|
|
Re: Incubator build script and folder structure
Posted:
Jul 26, 2007 1:34 PM
in response to: jslott
|
|
|
There is now a simple ServerManagerUI. That would probably be a good place for the 'World Reload' button.
|
|
|
|
|
|
|
|
Re: Incubator build script and folder structure
Posted:
Jul 27, 2007 6:42 AM
in response to: miechus
|
|
|
I'm wondering if we do not need a full blown lg3d-wonderland workspace in the incubator. The module system is way cool -- but I'm running into the need to edit the "core" and it seems easier just to edit an entire workspace and then let people look at that (and perhaps integrate back into the official workspace easier). Of course, there is no reason why I cannot just make my own directory and have an lg3d-wonderland directory in there (unless space on the cvs server is an issue).
Thoughts? Jordan
|
|
|
|
|
|
|
|
Re: Incubator build script and folder structure
Posted:
Jul 27, 2007 7:28 AM
in response to: jslott
|
|
|
|
|
Perhaps the best way to handle this is through storing patches in the incubator (rather than a whole copy), then they can be applied back into the main branch after review/discussion etc. I think we are going to find that this is going to be a necessity while in these relatively early stages of development.
This was the way we handled a couple of the projects for the summer of code (2005) in lg3d. By the end of the summer the code was integrated back in - and these were significant changes. The issues system supports patches, and is an alternative for distributing them, rather than through the incubator. Also if minimal patching is done to support extensions then the incubator can be used for the modules as suggested - but I think the problem we will see if that the main branch does need extending its functionality.
Just my 2 cents.
Kirk [att1.html]
|
|
|
|
|
|
|
|
Re: Incubator build script and folder structure
Posted:
Aug 8, 2007 8:51 AM
in response to: Kirk Turner
|
|
|
Jordan if you post the core patches we will review and integrate them (either from incubator, bug reports or forum postings). As you become more familiar with core etc we can give you developer access to core.
|
|
|
|
|