Grendel:Compile: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
 
No edit summary
Line 1: Line 1:
{{Grendel}}
{{Grendel}}
==New compilation proposal==
Building Grendel:


Basically, entirely ant based. Should also copy resources located in each directory. Ant is a much more popular standard for Java projects and is much more cross-platform. Also integrates with most popular Java IDEs.
# Make sure you have the required (external) packages (see [[Grendel:Libraries|Libraries]]). 
# Copy the jars to the extlib directory. With OROMatcher, you'll have to create the jar yourself from the binaries in the OROMatcher distribution. To do this, unpack the OROMatcher distribution and cd to the top directory, then run 'jar cvf OROMatcher.jar com'. Copy the resulting OROMatcher.jar to the extlib directory in here. '''If you want, you can download the [http://mirrors.trfenv.com/rlk/grendel-jar-pack.zip Grendel Library Pack] to get a copy of all of the libraries needed to be put in this directory'''.
# Type 'ant build' and go get a cup of coffee or something. Grendel takes a little while to build.
# Binaries and application resources will now be in dist.
# Go the the dist directory by typing 'cd dist' and then type 'java Grendel.main' and test that Grendel works. If everything built successfully, it should.
# If you want to make an executable jar to package up all the application's classes (minus the external libraries), type 'ant jar'. Once you've done that, you can type 'java -jar Grendel.jar' and it should run Grendel for you.
# To clean out the dist directory of all build products, type 'ant clean'.


To compile, you'd run:
==Note to Mac users==
 
We are no longer supporting JDK 1.4.x, so Grendel will not run on MacOS 10.2 or earlier. You'll have to upgrade to Mac OS 10.3 if you want to run Grendel.
<pre>ant build</pre>
 
at the command prompt. Other ant commands:
 
<pre>ant clean //cleans up all files generated by ant during the build or javadoc process.
ant javadoc //generate JavaDoc information for Grendel
ant resources //Unzips resources just like "build" command but doesn't compile any Java files.</pre>
 
==Old Makefile build instructions==
 
You no longer have to set a CLASSPATH environment variable to build Grendel successfully. Just
follow the instructions below and you should be up and running pretty quickly.
 
# Make sure you have the required (external) packages (see README.libs). 
# Copy the jars to the extlib directory. With OROMatcher, you'll have to create the jar yourself from the binaries in the OROMatcher distribution. To do this, unpack the OROMatcher distribution and cd to the top directory, then:
        jar cvf OROMatcher.jar com
 
  Copy the resulting OROMatcher.jar to the extlib directory in here.
# Type 'make' and go get a cup of coffee or something. Grendel takes a little while to build.
# Type 'make resources' to copy the application resources to the right locations in the binary tree.
# Binaries and application resources will now be in dist/classes.
# Type 'make run' and test that Grendel works. If everything built successfully, it should.
# If you want to make an executable jar to package up all the application's classes (minus the external libraries), type 'make jar'. There is a manifest header file in dist/classes which sets the main class so the Java VM can find it. You'll have to take care of setting up the class-path if you want to run Grendel from the jar. Once you've done that, you can type:
        java -jar dist/classes/Grendel.jar
 
  and it should run Grendel for you.
# To clean out the dist/classes directory of all build products, type 'make clean'.
 
NOTE TO MAC USERS:
We are no longer supporting JDK 1.1.x, so Grendel will not run on MacOS 9.x or earlier. You'll have
to upgrade to Mac OS X if you want to run Grendel. Support for building with Project Builder is
forthcoming. Please note also that the application settings in Project Builder (especially the
MRJAppBuilder related settings) should NOT be changed without a VERY compelling reason. Changing
these settings may cause Grendel to fail to run in your particular environment. The creator code
'GRen' is registered with Apple, so please don't change that setting. If you want to use Icon
Composer to change the application icons to something you like better than an envelope, go ahead.
You'll find the Project Builder project and resource files in PBProj/Grendel.pbproj and
PBProj/Grendel.icns. Project Builder will put the build products in PBProj/build. You can double-
click Grendel in the Finder to launch Grendel. Note that I'm still working on figuring out how to
get Project Builder to copy the jars from extlib into the right place in the app bundle, so if you
get a "NoClassDefFound" exception at startup (you'll see it if you run Grendel from within Project
Builder after building it), you'll need to use Terminal to copy the jars into
Grendel.app/Contents/Resources/Java/ , at least for now.
   
   
NOTE TO ALL USERS/DEVELOPERS:
If you add directories, copy one of the Makefiles from a neighbouring directory to use as a
template for your Makefiles. This will help ensure that you have all the right things set up in
your Makefiles for your new modules to build correctly. If you add sources to existing directories,
be sure to add the source file names to the SOURCES list in that directory's Makefile. If you add
new external library dependencies for a new module you're contributing, be sure to add the new
jar to the LIBS definition in rules.mk, then check rules.mk in after you've verified your build.
Also be sure to add the new external library to README.libs so everyone knows about it.
If you must edit any of the Makefiles to make changes specific to your environment, but not
generally useful to everyone, please, please, PLEASE DO NOT check the Makefiles in. You should
actually have no need to edit the Makefiles as they are currently, unless you really truly
cannot copy the required jars to extlib (which should never be the case).
Happy haquing!
Happy haquing!
--Jeff
41

edits

Navigation menu