This material is distributed under the GNU General Public License Version 2. To obtain a copy of the original source code, make a request on the Wonderland Forum.
This page describes how to download, configure, build and run Open Wonderland v0.5 from the source code. Generally only software developers will use Wonderland in this way -- to do so, you should be familiar and comfortable with building open-source software from the command-line using ant or via an IDE.
The Open Wonderland source code comes bundled with most of the software you will need, including an up-to-date version of Java 3D and Project Darkstar.
Wonderland is set up as a Netbeans project that includes ant scripts for running the various Wonderland services. If you're using Netbeans you can check out and compile the project directly. If not, you need to install the following tools if not already present on your system:
If you wish to use the command-line in addition to Netbeans, be aware that Netbeans does not add ant to your path. You will need to do this manually. If you are using Netbeans, the wonderland workspace is setup as a Netbeans project. The Netbeans community has published tutorials on using Subversion (here). You may invoke the ant targets (specified below) directly from Netbeans.
NOTE: In general, you will need to set the ANT_OPTS environment variable to -XX:MaxPermSize=900m -Xmx900m (otherwise you will likely get an OutOfMemoryError when trying to compile and run). For example, if you are using Bash, you can set the ANT_OPTS environment variable using export ANT_OPTS="-XX:MaxPermSize=900m -Xmx900m".
The wonderland workspace contains all of the source code and any libraries that Open Wonderland depends upon and is available via svn. It contains its own ant-based build system. This tutorial assumes you will place this workspace inside of a directory named ~/src/wonderland, although you are free to place it anywhere. (Note that '~' denotes your home directory).
The most recent version of the code is called the trunk. To download the source in the trunk, inside a terminal window from your home directory, after you have created the src/wonderland/ subdirectory:
% cd ~/src/wonderland
% mkdir trunk
% cd trunk
% svn checkout http://openwonderland.googlecode.com/svn/trunk wonderland
This will download the Open Wonderland source into the directory ~/src/wonderland/trunk/wonderland.
Most developers should use the trunk of Open Wonderland, which is typically quite stable. If you need to find the source corresponding to a particular stable release, start the stable release from the command line and look at the first line of output. It should be something like:
Launching Open Wonderland version 0.5 rev. 4260 (January 10, 2012)
You can checkout this specific version based on the revision number, inside a terminal window from your home directory, after you have created the src/wonderland/ subdirectory:
% cd ~/src/wonderland
% mkdir 0.5-r4260
% cd 0.5-r4260
% svn checkout -r 4260 https://openwonderland.googlecode.com/svn/trunk wonderland
This will download the Open Wonderland source into the directory ~/src/wonderland/0.5-[r4260]/wonderland. Note that updating the source using svn update will not make any changes. If you want to restore the trunk version, use svn update -r HEAD.
You can build the Open Wonderland source code by running the ant command in a terminal window:
% ant
Run this command in the wonderland directory created by checking out the source, either ~/src/wonderland/trunk/wonderland or ~/src/wonderland/0.5-[r4260]/wonderland.
You run Open Wonderland by using ant targets provided by the build system. When you run Wonderland, you are really starting a web server on your machine. This web server provides a number of functions: it supports a web-based administration interface that lets you start/stop the Wonderland server and associated services.
To run wonderland, in the wonderland directory:
% ant run-server
Once you start Wonderland, you can administer the server via a web-based user interface. Please visit the following tutorial for more details:
You may also wish to include optional modules in your Wonderland build. For instructions on downloading and including the optional modules, see DownloadBuildModules05.