summaryrefslogtreecommitdiffstats
path: root/doc/HowToBuild.html
blob: 1f9a0e323ae579c0bff4edae157022f0d15f02d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>How to build the Jogl OpenGL binding for Java</title>
</head>
<body>

<h1>How to build the Jogl OpenGL binding for Java</h1>
<hr>

Here are the steps that are required in order to build the Jogl
OpenGL binding from a fresh copy of the source distribution:

<OL>
  <LI> <B>Install Ant:</B> <br> Download and unpack Ant 1.5.3 from <a href="http://ant.apache.org/">http://ant.apache.org</a> and add the <code>bin/</code> subdirectory to your PATH environment variable.
  <LI> <B>Install ANTLR:</B> <br> Download and unpack ANTLR 2.7.2 from <a href="http://www.antlr.org">http://www.antlr.org</a>. 

  <LI> <B>Unset your CLASSPATH environment variable:</B> <br> The Ant build requires that the Jogl jars not be visible on the classpath. On Unix, type <code> unsetenv CLASSPATH </code> into a csh or tcsh shell, or <code> set CLASSPATH=; export CLASSPATH </code> into a Bourne shell. On Windows, type <code> set CLASSPATH= </code> into a command prompt.

  <LI> <B>Copy and edit jogl.properties:</B> <br>
    <UL>
      <LI> <B>On Windows and X11 platforms:</B> Copy <b>make/jogl.properties</b> into your home directory (pointed to by the Java system property <b>user.home</b>).
      <LI> <B>On Mac OS X:</B> Copy <b>make/jogl.properties</b> into the <b>Library/Java</b> subdirectory of your home directory (pointed to by the Java system property <b>user.home</b>).
    </UL>
    Edit the copy to change any settings that are necessary, in particular the location of the ANTLR jar file (typically <b>$HOME/antlr-2.7.2/antlr.jar</b>).
  <LI> <B>Build the source tree:</B> <br> Open a command shell in the "make" directory of the source tree and type "ant [target]", where [target] is one of <code>linux</code>, <code>macosx</code>, <code>solaris</code>, <code>win32.vc6</code>, <code>win32.vc7</code>, or <code>win32.mingw</code>.
      <UL>
	<LI>The win32 targets require one of Microsoft Visual C++ 6, 7 (Visual Studio .NET) or the free MinGW (<a href="http://www.mingw.org/">http://www.mingw.org/</a>) compilers to be installed. Choose the appropriate target for the compiler desired.
	<LI>An experimental binding to the high-level <a href="http://developer.nvidia.com/view.asp?PAGE=cg_main">Cg</a> language by NVidia corporation can be generated by specifying <code>-Djogl.cg=1</code> to ant; e.g. <code>ant -Djogl.cg=1 win32.vc6</code>. Currently the Cg binding has only been tested on Windows, though in theory it should build and run on Linux and Mac OS X with appropriate modification of the host.properties file.
      </UL>
      
  <LI> <B>Add Jogl to your CLASSPATH:</B> <br> To be able to use Jogl once built, you must add the build process' resulting jogl.jar (<source tree root>/build/jogl.jar) to your CLASSPATH environment variable.
  <LI> <B>Add Jogl to your PATH:</B> <br> To be able to use Jogl once built, you must also add the build process JNI code library directory (<source tree root>/build/obj) to your PATH.

  <LI> <B>Test if everything's working:</B> <br> To test if everything went well, you should check out the source code for the <B>jogl-demos</B> project (available at <a href = "http://jogl-demos.dev.java.net/">http://jogl-demos.dev.java.net/</a>), build the demos using the supplied instructions, and run the Gears demo ("java demos.gears.Gears").
  <LI> <B>Build Javadoc:</B> <br> "ant javadoc" will produce the end-user documentation for Jogl along with some auxiliary utility packages. The developers' documentation, including that for the GlueGen tool, can be generated for your current platform using one of the following commands: "ant javadoc.dev.win32", "ant javadoc.dev.x11", or "ant javadoc.dev.macosx". (The javadoc for the Cg binding can be built by inserting <code>-Djogl.cg=1</code> into the command line as above.)
</OL>
 
Note that there are a lot of warnings produced by ANTLR about the 
C grammar and our modifications to some of the signatures of the 
productions; the C grammar warnings have been documented by the 
author of the grammar as having been investigated completely and 
harmless, and the warnings about our modifications are also 
harmless. <P>

- Christopher Kline and Kenneth Russell, June 2003

</body>
</html>