2010-02-08 00:15:50 +01:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
|
|
<!--+
|
|
|
|
|
|
|
|
|
| Gridworks Build File
|
|
|
|
|
|
|
|
|
+-->
|
2010-02-10 19:47:32 +01:00
|
|
|
|
|
|
|
<!--+
|
|
|
|
| NOTE: this script expects the 'build.dir' and 'dist.dir' properties to be set
|
|
|
|
| when invoking it. This is done like this
|
|
|
|
|
|
|
|
|
| ant -f build.xml -Dbuild.dir="/path/to/build/dir" -Ddist.dir="/path/to/dist/dir"
|
|
|
|
|
|
|
|
|
| the 'gridworks' shell script does this and it's meant to be the way to invoke ant,
|
|
|
|
| so running this script directly in ant is not suggested.
|
|
|
|
+-->
|
2010-02-08 00:15:50 +01:00
|
|
|
|
2010-02-10 08:30:16 +01:00
|
|
|
<project name="gridworks" default="build" basedir=".">
|
2010-02-08 00:15:50 +01:00
|
|
|
|
|
|
|
<property environment="env"/>
|
|
|
|
|
|
|
|
<property name="src.dir" value="${basedir}/src/main/java" />
|
2010-02-09 21:21:10 +01:00
|
|
|
<property name="graphics.dir" value="${basedir}/src/graphics" />
|
2010-02-08 00:15:50 +01:00
|
|
|
<property name="lib.dir" value="${basedir}/lib" />
|
2010-02-09 21:21:10 +01:00
|
|
|
<property name="tools.dir" value="${basedir}/thirdparty" />
|
2010-02-10 19:47:32 +01:00
|
|
|
|
2010-02-08 00:15:50 +01:00
|
|
|
<property name="classes.dir" value="${build.dir}/classes" />
|
2010-02-09 21:21:10 +01:00
|
|
|
<property name="bundle.dir" value="${build.dir}/bundle" />
|
2010-02-10 08:30:16 +01:00
|
|
|
<property name="exe.dir" value="${build.dir}/exe" />
|
2010-02-09 21:21:10 +01:00
|
|
|
|
2010-02-08 00:15:50 +01:00
|
|
|
<path id="class.path">
|
|
|
|
<fileset dir="${lib.dir}">
|
|
|
|
<include name="**/*.jar" />
|
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
|
2010-02-10 08:30:16 +01:00
|
|
|
<target name="build">
|
2010-02-08 00:15:50 +01:00
|
|
|
<mkdir dir="${classes.dir}" />
|
2010-02-10 08:30:16 +01:00
|
|
|
<javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" includeAntRuntime="no">
|
2010-02-08 00:15:50 +01:00
|
|
|
<classpath refid="class.path" />
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
2010-02-10 08:30:16 +01:00
|
|
|
<target name="jar" depends="build">
|
2010-02-09 21:21:10 +01:00
|
|
|
<jar destfile="${build.dir}/gridworks.jar" basedir="${classes.dir}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="bundle" depends="jar">
|
2010-02-10 08:30:16 +01:00
|
|
|
<taskdef
|
|
|
|
name="jarbundler"
|
|
|
|
classname="net.sourceforge.jarbundler.JarBundler"
|
|
|
|
classpath="${tools.dir}/jarbundler-2.1.0.jar"
|
|
|
|
/>
|
2010-02-09 21:21:10 +01:00
|
|
|
<mkdir dir="${bundle.dir}"/>
|
|
|
|
<jarbundler
|
|
|
|
dir="${bundle.dir}"
|
|
|
|
name="Gridworks"
|
|
|
|
mainclass="com.metaweb.gridworks.Gridworks"
|
|
|
|
icon="${graphics.dir}/icon/gridworks.icns"
|
|
|
|
version="${version}"
|
|
|
|
infostring="Gridworks ${version}"
|
|
|
|
aboutmenuname="Gridworks"
|
|
|
|
workingdirectory="$APP_PACKAGE/Contents/Resources"
|
|
|
|
jvmversion="1.6+"
|
|
|
|
bundleid="com.metaweb.gridworks.Gridworks"
|
2010-02-10 08:30:16 +01:00
|
|
|
vmoptions="${java.options}"
|
2010-02-09 21:21:10 +01:00
|
|
|
antialiasedgraphics="true"
|
|
|
|
antialiasedtext="true"
|
|
|
|
liveresize="true"
|
|
|
|
growboxintrudes="true"
|
|
|
|
screenmenu="true">
|
|
|
|
<jarfileset dir="${lib.dir}">
|
|
|
|
<exclude name="**/.svn" />
|
|
|
|
<include name="**/*.jar" />
|
|
|
|
</jarfileset>
|
|
|
|
<jarfilelist dir="${build.dir}" files="gridworks.jar" />
|
|
|
|
<resourcefileset dir="${basedir}/src/main/">
|
|
|
|
<include name="webapp/**" />
|
|
|
|
</resourcefileset>
|
|
|
|
</jarbundler>
|
|
|
|
</target>
|
|
|
|
|
2010-02-10 08:30:16 +01:00
|
|
|
<target name="exe" depends="jar">
|
|
|
|
<mkdir dir="${exe.dir}"/>
|
|
|
|
<taskdef
|
|
|
|
name="launch4j"
|
|
|
|
classname="net.sf.launch4j.ant.Launch4jTask"
|
|
|
|
classpath="${tools.dir}/launch4j/launch4j.jar:${tools.dir}/launch4j/lib/xstream.jar"
|
|
|
|
/>
|
|
|
|
<launch4j>
|
|
|
|
<config
|
|
|
|
headerType="console"
|
|
|
|
outfile="${exe.dir}/Gridworks.exe"
|
|
|
|
jarPath="lib/gridworks-${version}.jar"
|
|
|
|
dontWrapJar="true"
|
|
|
|
icon="${graphics.dir}/icon/gridworks.ico">
|
|
|
|
<classPath mainClass="com.metaweb.gridworks.Gridworks">
|
|
|
|
<cp>${lib.dir}/*.jar</cp>
|
|
|
|
</classPath>
|
|
|
|
<jre minVersion="1.6.0" jdkPreference="preferJre">
|
|
|
|
<opt>${java.version}</opt>
|
|
|
|
</jre>
|
|
|
|
<versionInfo
|
|
|
|
fileVersion="${version}.0.0"
|
|
|
|
txtFileVersion="${version}"
|
|
|
|
fileDescription="gridworks"
|
|
|
|
copyright="Copyright (c) 2010, Metaweb Technologies, Inc."
|
|
|
|
productVersion="${version}.0.0"
|
|
|
|
txtProductVersion="${version}.0.0"
|
|
|
|
productName="Gridworks"
|
|
|
|
companyName="Metaweb Technologies, Inc."
|
|
|
|
internalName="gridworks"
|
|
|
|
originalFilename="gridworks.exe"
|
|
|
|
/>
|
|
|
|
</config>
|
|
|
|
</launch4j>
|
|
|
|
<copy todir="${exe.dir}/lib">
|
|
|
|
<fileset dir="${lib.dir}">
|
|
|
|
<include name="**/*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
<copy file="${build.dir}/gridworks.jar" tofile="${exe.dir}/lib/gridworks-${version}.jar"/>
|
2010-02-10 19:47:32 +01:00
|
|
|
<copy todir="${exe.dir}/webapp">
|
|
|
|
<fileset dir="${basedir}/src/main/webapp">
|
|
|
|
<include name="**/*"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
2010-02-10 08:30:16 +01:00
|
|
|
<zip destfile="${dist.dir}/gridworks-${version}.zip" basedir="${exe.dir}"/>
|
|
|
|
</target>
|
|
|
|
|
2010-02-08 00:15:50 +01:00
|
|
|
<target name="clean">
|
2010-02-09 21:21:10 +01:00
|
|
|
<delete file="${build.dir}/gridworks.jar" />
|
2010-02-08 00:15:50 +01:00
|
|
|
<delete dir="${classes.dir}" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="distclean">
|
|
|
|
<delete dir="${build.dir}" />
|
2010-02-09 21:21:10 +01:00
|
|
|
<delete dir="${dist.dir}" />
|
2010-02-08 00:15:50 +01:00
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|