Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
131 lines (106 sloc) 4.49 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--
Part of the Processing Fullscreen API
Copyright (c) 2006-09 Hansi Raber
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
-->
<project name="Processing Fullscreen API" default="dist">
<!-- path to the sketch folder -->
<property name="sketch.path" value="${user.home}/Documents/Processing" />
<property name="version" value="0.98.5-pre" />
<fileset id="cp" includes="dependencies/**/*.jar" />
<path id="cp">
<fileset dir="." includes="dependencies/**/*.jar" />
</path>
<!-- empty the binary folder -->
<target name="clean">
<delete dir="bin" />
<delete dir="reference" />
</target>
<!-- compile the sources, place the class files in the bin folder -->
<target name="compile" description="compile the sources">
<mkdir dir="bin" />
<javac srcdir="src" destdir="bin" classpathref="cp" target="1.5" debug="yes" debuglevel="lines,vars,source"/>
</target>
<!-- create the reference -->
<target name="reference" depends="compile" description="generate reference">
<javadoc bottom="processing fullscreen api library by hansi, 2009. "
classpath="dependencies/processing-core.jar; bin"
destdir="reference"
verbose="false"
stylesheetfile="dependencies/stylesheet.css"
doctitle="Javadocs: Fullscreen API"
public="true" version="false"
windowtitle="Javadocs: Fullscreen API">
<link href="http://java.sun.com/javase/6/docs/api" />
<link href="http://dev.processing.org/reference/everything/javadoc/" />
<fileset dir="src" includes="**/*.java" excludes="fullscreen/tests/**" />
</javadoc>
</target>
<!-- create the files for the website -->
<target name="dist" depends="compile, reference" description="export library to the dist folder">
<mkdir dir="dist" />
<mkdir dir="fullscreen" />
<mkdir dir="fullscreen/library" />
<mkdir dir="fullscreen/reference" />
<!-- copy documentation files -->
<copy todir="fullscreen">
<fileset dir="docs" excludes="**/.*" />
</copy>
<!-- copy native library files -->
<copy todir="fullscreen/library/">
<fileset dir="lib" />
</copy>
<copy todir="fullscreen">
<fileset dir="." includes="examples/**, reference/**" />
</copy>
<!-- create the jar files and copy them over -->
<jar destfile="fullscreen/library/fullscreen.jar" basedir="bin" includes="fullscreen/** japplemenubar/**" excludes="fullscreen/tests/**" />
<!-- done, zip it up! -->
<zip destfile="dist/fullscreen.zip">
<fileset dir="." includes="fullscreen/**" excludes="**/.*" />
</zip>
<!-- for archiving purposes we also create a fs-xxx.zip -->
<copy file="dist/fullscreen.zip" tofile="dist/fullscreen-${version}.zip" />
<delete dir="fullscreen" />
<!-- - - - - - - - - - - - - - - - -->
<!-- now create the source snapshot -->
<mkdir dir="fs_src" />
<copy todir="fs_src">
<fileset dir="." includes="dependencies/**, examples/**, src/**, docs/**, lib/**" />
<fileset dir="." includes="build.xml, COPYING" />
</copy>
<zip destfile="dist/fullscreen-src.zip">
<fileset dir="fs_src" excludes="**/.*" />
</zip>
<copy file="dist/fullscreen-src.zip" tofile="dist/fullscreen-src-${version}.zip" />
<delete dir="fs_src" />
</target>
<!-- run unit tests -->
<target name="test" depends="compile" description="Run unit tests">
<junit printsummary="yes" showoutput="yes" fork="yes">
<formatter type="plain"/>
<classpath refid="cp" />
<classpath location="bin" />
<jvmarg value="-Djava.library.path=lib${path.separator}dependencies/opengl"/>
<test name="fullscreen.tests.Tests"/>
</junit>
</target>
<!-- install the library, the processing folder (at the top) has to be specified! -->
<target name="install" depends="dist" description="install library to ${sketch.path}">
<unzip dest="${sketch.path}/libraries/">
<fileset file="dist/fullscreen.zip" />
</unzip>
</target>
</project>