JPatch developer documentation

IMPORTANT NOTE: I’ve migrated from CVS to Subversion. The new repository is now hosted on Sourceforge again.

Requirements

You’ll need a Java 2 Standard Edition (J2SE) Runtime Environment (JRE) version 1.5 (aka 5.0) or later. You can download it from Sun Microsystems free of charge.

Subversion access

You can check out the sourcecode anonymously using any svn client. To commit changes, you’ll have to be registered as JPatch developer with svn access and need to enter your sourceforge username and password.

/trunk contains the current development version, /branches other branches and /tags tagged versions.

Downloading, building and running JPatch with Eclipse

I’m using Eclipse version 3.1. The following guidelines assume that the Java perspective is used.

Install Subclipse, the Subversion Eclipse plugin

Download and install subclipse from http://subclipse.tigris.org/

Import the project from SVN

  • Select File → Import… from Eclipse’s main menu.
  • In the dialog that appears, select Checkout Projects from SVN.
  • Select Create a new repository location and click on the Next > button. Note: There seems to be a minor bug. If you can’t select the Next > button, click on the Use existing repository location radiobutton and then on Create a new repository location. After this, the Next > button should be enabled.
  • Enter “https://jpatch.svn.sourceforge.net/svnroot/jpatch” into the Url: textfield and click on the Next > button.
  • From the tree, select trunk/jpatch to checkout the current development version. Alternatively you can select a different branch or an older version. Click on the Next > button.
  • Select Check out as a project in the workspace and enter “jpatch” in the Project Name: textfield.
  • Choose a workspace location or select the Use default workspace location checkbox and click on Finish.

Directory structure

  • bin/ Eclipse will place compiled classes into this directory.
  • src/ The Java sourcecode.
  • src/inyo/ The inyo package contains the sourcecode of David Cuny’s Inyo renderer.
  • src/jpatch/ The jpatch package contains the sourcecode of JPatch (there are many subpackages).
  • src/objects/ This directory contains objects, images and other files.
  • src/patterns/ The patterns package contains the sourcecode for the procedural textures framework used by Inyo.
  • src/test/ This package contains some “test” code.
  • lib/ Additional libraries needed by JPatch. Contains binary distributions of BeanShell, jogl, Buoy and javax.vecmath.
  • lib/native/ Native shared libraries required by JOGL.
  • lib/native/linux_x86 Shared libraries for the Linux (x86) platform.
  • lib/native/osx_ppc Shared libraries for the Apple Macintosh (Power PC) OSX platform.
  • lib/native/windows Shared libraries for the Microsoft Windows (x86) platform.

Preparations

Eclipse needs to know which native shared libraries (for OpenGL support) to load:

  • In the Package Explorer view, rightclick your project (jpatch) and select Properties from the popup menu.
  • Select Java Build Path, the Libraries tab, and expand the jogl.jar treenode.
  • Select Native library location and click Edit….
  • In the Native Library Folder Configuration dialog, click Workspace…
  • In the Native Library Folder Selection dialog, expand the lib/native folder of your project.
  • Select the proper folder for your platform and click OK.
  • Click OK again to finish the selection and OK once more to apply the changes.

Running JPatch from Eclipse

  • In the main menu select RunRun…
  • Enter your project name (jpatch) and click on Search… below the Main class textfield.
  • Select the Launcher class and click OK.
  • Click Run to start JPatch

Downloading, building and running JPatch without Eclipse

  • Checkout the contents of the Subversion repository.
  • Compile all classes under the src/ tree.
  • Run the jpatch.Launcher class. You must include all the .jar archives found in lib/ into your classpath and use the -D option to select from which directory the native shared libraries required by JOGL should be loaded. Use the proper directory for your platform in lib/native/.

I plan to add an Ant buildfile to make building JPatch without Eclipse easier.

 
  dev/developer.txt · Last modified: 2008/01/20 07:52 by 91.113.84.100 (sascha)