Helper Script for Downloading, Building and Installing Java Monkey Engine

OBSOLETE PLEASE SEE [[new_frontpage]] for jME 2 Tutorials

The following script, will help you automate the process of downloading a specific jME version, compile and get it installed on you system.

For that you just have to follow the following steps:

  • Define the value you want for your checked out directory in jme.dir property;
  • If you plan to install jME after building, then define the install.dir property as well;
  • If you intend to check out Java Monkey Engine v1, you need to replace _username_ by your java.net username and _password_ as well;
  • If you don't want to provide the password like this, then you should remove the :_password_ part from the cvsRoot. The use the following command to log in before invoking ant:
   cvs -d :pserver:_username_@cvs.dev.java.net:/cvs login
  • Call the target for the version you are interested, jME_v1 or jME_v2
  • Assuming everything went ok, you should have the Java Monkey Engine now installed
<project name="Java Monkey Engine">
 
<!-- Build file properties. Please list them all here. -->
<property name="jme.dir" value="jme"/>
<property name="jme.lib.dir" value="${jme.dir}/lib"/>
<property name="jme.target.dir" value="${jme.dir}/target"/>
<property name="jme.javadoc.dir" value="${jme.dir}/data/doc"/>
 
<property name="install.dir" value="install"/>
<property name="install.javadoc.dir" value="${install.dir}/javadoc"/>
<property name="install.lib.dir" value="${install.dir}/lib"/>
<property name="install.nativelib.dir" value="${install.dir}/lib/native"/>
 
 
<!-- Available targets -->
<target name="jME_v1"
        description="Checkouts, compiles and installs the Java Monkey Engine v1"
        depends="checkout_jme_v1, build, install">
</target>
 
<target name="jME_v2"
        description="Checkouts, compiles and installs the Java Monkey Engine v2"
        depends="checkout_jme_v2, build, install">
</target>
 
<target name="checkout_jme_v1" description="Checkout the Java Monkey Engine v1 Source Code">
    <cvs cvsRoot=":pserver:_username_:_password_@cvs.dev.java.net:/cvs"  package="jme" dest="." />
</target>
 
<target name="checkout_jme_v2" description="Checkout the Java Monkey Engine v2 Source Code">
    <!-- Ant does not provide support out of the box for Subversion -->
    <exec executable="svn">
      <arg value="checkout"/>
      <arg value="http://jmonkeyengine.googlecode.com/svn/trunk/"/>
      <arg value="${jme.dir}"/>
    </exec>
</target>
 
<!-- Common Targets -->
<target name="build" description="Compiles the Java Monkey Engine">
    <ant dir="${jme.dir}" target="dist-all"/>
    <ant dir="${jme.dir}" target="dist-test"/>
    <ant dir="${jme.dir}" target="doc"/>
</target>
 
<target name="install" description="Installs the Java Monkey Engine into your system">
    <!-- Create required libraries -->
    <mkdir dir="${install.dir}"/>
    <mkdir dir="${install.lib.dir}"/>
    <mkdir dir="${install.nativelib.dir}"/>
    <mkdir dir="${install.javadoc.dir}"/>
 
    <!-- Copy native libraries -->
    <copy todir="${install.nativelib.dir}">
        <fileset dir="${jme.lib.dir}" />
    </copy>
 
    <!-- Copy Java libraries -->
    <copy todir="${install.lib.dir}">
        <fileset dir="${jme.target.dir}" />
    </copy>
 
    <!-- Copy Javadocs -->
    <copy todir="${install.javadoc.dir}">
        <fileset dir="${jme.javadoc.dir}" />
    </copy>
 
</target>
</project>

/var/www/wiki/data/pages/antbuildscript.txt · Last modified: 2010/01/24 16:57 by sbook  
Recent changes · Show pagesource · Login

Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki

subscribe to jME latest jme headlines


site design by bleedcrimson designs © 2008