summarylogtreecommitdiffstats
path: root/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml529
1 files changed, 529 insertions, 0 deletions
diff --git a/build.xml b/build.xml
new file mode 100644
index 000000000000..8b4945dd01fa
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,529 @@
+<?xml version="1.0"?>
+<project name="Processing" default="build">
+
+ <condition property="platform" value="linux">
+ <os family="unix" />
+ </condition>
+
+ <property name="examples.dir"
+ value="../../processing-docs/content/examples" />
+
+ <fileset dir="linux/work/java" id="jre-optional-linux">
+ <include name="lib/ext/dnsns.jar" />
+
+ <include name="bin/orbd" />
+ <include name="bin/policytool" />
+ <include name="bin/rmid" />
+ <include name="bin/rmiregistry" />
+ <include name="bin/servertool" />
+ <include name="bin/tnameserv" />
+
+ <include name="bin/javaws" />
+ <include name="lib/javaws.jar" />
+
+ <include name="lib/cmm/PYCC.pf" />
+ </fileset>
+
+ <!-- Unused JavaFX files that can be removed from the JRE on Windows
+ and Linux. On Mac OS X, this is removed by the appbundler task.
+ www.oracle.com/technetwork/java/javase/jdk-7-readme-429198.html
+ However, we're now looking into using JavaFX as the default 2D
+ renderer for 3.0. So in 3.0a8, we're no longer removing javafx. -->
+
+ <fileset dir="${platform}/work/java" id="javafx-basics">
+ <include name="THIRDPARTYLICENSEREADME-JAVAFX.txt" />
+ <include name="lib/javafx.properties" />
+ <include name="lib/jfxrt.jar" />
+ <include name="lib/security/javafx.policy" />
+ </fileset>
+
+ <fileset dir="linux/work/java" id="javafx-linux-32">
+ <include name="lib/i386/fxavcodecplugin-52.so" />
+ <include name="lib/i386/fxavcodecplugin-53.so" />
+ <include name="lib/i386/fxplugins.so" />
+ <include name="lib/i386/libglass.so" />
+ <include name="lib/i386/libgstplugins-lite.so" />
+ <include name="lib/i386/libgstreamer-lite.so" />
+ <include name="lib/i386/libjavafx-font.so" />
+ <include name="lib/i386/libjavafx-iio.so" />
+ <include name="lib/i386/libjfxmedia.so" />
+ <include name="lib/i386/libjfxwebkit.so" />
+ <include name="lib/i386/libprism-es2.so" />
+ </fileset>
+
+ <fileset dir="linux/work/java" id="javafx-linux-64">
+ <include name="lib/amd64/fxavcodecplugin-52.so" />
+ <include name="lib/amd64/fxavcodecplugin-53.so" />
+ <include name="lib/amd64/fxplugins.so" />
+ <include name="lib/amd64/libglass.so" />
+ <include name="lib/amd64/libgstplugins-lite.so" />
+ <include name="lib/amd64/libgstreamer-lite.so" />
+ <include name="lib/amd64/libjavafx-font.so" />
+ <include name="lib/amd64/libjavafx-iio.so" />
+ <include name="lib/amd64/libjfxmedia.so" />
+ <include name="lib/amd64/libjfxwebkit.so" />
+ <include name="lib/amd64/libprism-es2.so" />
+ </fileset>
+
+ <!-- <echo message="${java.class.path}" /> -->
+
+ <!-- Set a property named macosx, linux, or windows.
+ The 'value' chosen is arbitrary. -->
+ <property name="${platform}" value="${platform}" />
+
+ <property environment="env" />
+
+ <condition property="target.path" value="linux/work">
+ <os family="unix" />
+ </condition>
+
+ <!-- Libraries required for running processing -->
+ <!-- also need to copy these to the bundleapp task for macosx -->
+ <fileset dir=".." id="runtime.jars">
+ <include name="app/pde.jar" />
+ <include name="app/lib/antlr.jar" />
+ <include name="app/lib/jna.jar" />
+ <include name="app/lib/jna-platform.jar" />
+ <include name="app/lib/ant.jar" />
+ <include name="app/lib/ant-launcher.jar" />
+ </fileset>
+
+ <target name="build" description="Build Processing.">
+ <antcall target="${platform}-build" />
+ </target>
+
+ <target name="run" description="Run Processing.">
+ <antcall target="${platform}-run" />
+ </target>
+
+ <!-- Run the app in a more "native" manner, i.e. no additional
+ console for debugging. Ensures that double-clicking shortcuts
+ and other desktop integration features work properly. -->
+ <target name="app" description="Run Processing w/o console.">
+ <antcall target="${platform}-run-app" />
+ </target>
+
+ <target name="dist"
+ description="Build Processing for distribution.">
+ <input message="Enter version number:"
+ addproperty="version"
+ defaultvalue="${revision}" />
+
+ <available file="${examples.dir}" property="examples.exist" />
+ <fail unless="examples.exist" message="To do a distribution, the processing-docs repo must be checked out at the same level as the processing repo." />
+
+ <!-- do a git pull in the docs repo so that it is up to date -->
+ <exec executable="git" dir="${examples.dir}">
+ <arg line="pull" />
+ </exec>
+
+ <antcall target="${platform}-dist" />
+ </target>
+
+ <!-- "§$§$&, ant doesn't have a built-in help target :( -->
+ <target name="help" description="Show project help">
+ <java classname="org.apache.tools.ant.Main">
+ <arg value="-p" />
+ </java>
+ </target>
+
+ <!-- - - - - - - - - - - - - - - - - - -->
+ <!-- Subprojects: Core, App, Libraries -->
+ <!-- - - - - - - - - - - - - - - - - - -->
+
+ <target name="subprojects-clean">
+ <subant buildpath="../core" target="clean"/>
+ <subant buildpath="../app" target="clean"/>
+ <subant buildpath="../java/libraries/dxf" target="clean"/>
+ <subant buildpath="../java/libraries/io" target="clean"/>
+ <subant buildpath="../java/libraries/net" target="clean"/>
+ <subant buildpath="../java/libraries/pdf" target="clean"/>
+ <subant buildpath="../java/libraries/serial" target="clean"/>
+ <subant buildpath="../java/libraries/svg" target="clean"/>
+ <subant buildpath="shared/tools/MovieMaker" target="clean"/>
+ <subant buildpath="../java" target="clean"/>
+
+ <!-- make sure this isn't around from an old build 140730 -->
+ <delete dir="../java/examples" />
+ </target>
+
+ <target name="subprojects-build">
+ <subant buildpath="../core" target="build"/>
+ <subant buildpath="../app" target="build"/>
+ <subant buildpath="../java/libraries/dxf" target="build"/>
+ <subant buildpath="../java/libraries/net" target="build"/>
+ <subant buildpath="../java/libraries/pdf" target="build"/>
+ <subant buildpath="../java/libraries/serial" target="build"/>
+ <subant buildpath="../java/libraries/svg" target="build"/>
+ <subant buildpath="shared/tools/MovieMaker" target="build"/>
+ <subant buildpath="../java" target="build"/>
+ </target>
+
+ <!-- - - - - - - - - -->
+ <!-- Basic Assembly -->
+ <!-- - - - - - - - - -->
+
+ <target name="assemble" depends="version-clear, version-write">
+ <fail unless="target.path"
+ message="Do not call assemble from the command line." />
+
+ <!-- copy shared tools folder -->
+ <copy todir="${target.path}/tools">
+ <fileset dir="shared/tools" />
+ </copy>
+
+ <copy todir="${target.path}/modes/java">
+ <fileset dir="../java">
+ <!-- don't include LWJGL, it's not operational -->
+ <exclude name="libraries/lwjgl/**" />
+
+ <exclude name="reference.zip" />
+ <exclude name="**/._*" />
+ </fileset>
+ </copy>
+
+ <!-- get the examples folder, but don't require it to buid -->
+ <copy todir="${target.path}/modes/java/examples" failonerror="false">
+ <fileset dir="${examples.dir}" />
+ </copy>
+
+ <!-- if we're creating a dist, the reference is required -->
+ <condition property="reference.ignorable" value="false" else="true">
+ <isset property="version" />
+ </condition>
+
+ <!--<echo message="ref ignoreable? ${reference.ignorable}" />-->
+ <get src="http://download.processing.org/reference.zip"
+ dest="../java/reference.zip"
+ ignoreerrors="${reference.ignorable}"
+ usetimestamp="true" />
+
+ <unzip dest="${target.path}/modes/java"
+ src="../java/reference.zip"
+ overwrite="false">
+ <patternset>
+ <exclude name="__MACOSX/**" />
+ <exclude name="**/._*" />
+ </patternset>
+ </unzip>
+
+ </target>
+
+ <target name="version-clear">
+ <delete file="${target.path}/lib/version.txt" />
+ </target>
+
+ <target name="version-write" if="version">
+ <echo file="${target.path}/lib/version.txt" message="${version}"/>
+ </target>
+
+ <!-- - - - - - - - -->
+ <!-- Linux -->
+ <!-- - - - - - - - -->
+
+ <target name="linux-build" depends="subprojects-build" description="Build Linux version">
+ <mkdir dir="linux/work" />
+
+ <copy todir="linux/work">
+ <fileset dir=".." includes="core/library/**" />
+ <fileset dir="shared" includes="launch4j/**" />
+ <fileset dir="shared" includes="lib/**" />
+ <fileset dir="shared" includes="modes/**" />
+ <fileset file="shared/revisions.txt" />
+ </copy>
+
+ <antcall target="assemble">
+ <param name="target.path" value="linux/work" />
+ </antcall>
+
+ <property name="launch4j.dir"
+ value="linux/work/modes/java/application/launch4j" />
+ <property name="launch4j.variant" value="linux" />
+
+ <!-- rename the version we need -->
+ <move file="${launch4j.dir}/bin/windres-${launch4j.variant}"
+ tofile="${launch4j.dir}/bin/windres" />
+ <move file="${launch4j.dir}/bin/ld-${launch4j.variant}"
+ tofile="${launch4j.dir}/bin/ld" />
+
+ <!-- make executable (ant doesn't preserve) -->
+ <chmod perm="ugo+x" file="${launch4j.dir}/bin/windres" />
+ <chmod perm="ugo+x" file="${launch4j.dir}/bin/ld" />
+
+ <!-- remove the others -->
+ <delete failonerror="true">
+ <fileset dir="${launch4j.dir}/bin" includes="ld-*" />
+ <fileset dir="${launch4j.dir}/bin" includes="windres-*" />
+ </delete>
+
+ <copy todir="linux/work/lib" flatten="true">
+ <fileset refid="runtime.jars" />
+ </copy>
+
+ <copy file="linux/processing" todir="linux/work" />
+ <chmod perm="ugo+x" file="linux/work/processing" />
+
+ <!-- copy command line tool -->
+ <copy file="linux/processing" tofile="linux/work/processing-java" />
+ <chmod perm="ugo+x" file="linux/work/processing-java" />
+
+ <!-- This allows Linux users to add mime types to the PDE by simply
+ running the install script added to the Processing folder.
+ This adds the following features:
+ - the icons for the PDE in different resolutions
+ - icons for the files
+ - a desktop icon
+ - when double clicking the *.pde files, the PDE will be opened
+
+ from Sweden with <3
+ -->
+ <copy file="linux/install.sh" todir="linux/work" />
+ <chmod perm="ugo+x" file="linux/work/install.sh" />
+
+ <copy file="linux/uninstall.sh" todir="linux/work" />
+ <chmod perm="ugo+x" file="linux/work/uninstall.sh" />
+
+ <copy file="linux/processing-pde.xml" todir="linux/work/lib" />
+ <copy file="linux/appdata.xml" todir="linux/work/lib" />
+ <copy file="linux/desktop.template" todir="linux/work/lib" />
+
+<!--
+ Cannot use ant version of tar because it doesn't preserve properties.
+ <untar compression="gzip"
+ dest="linux/work"
+ src="linux/jre.tgz"
+ overwrite="false"/>
+-->
+
+<!--
+ http://www.gnu.org/software/tar/manual/html_section/transform.html
+-->
+ <exec executable="true">
+ <!-- Change directory -->
+ <!--
+ <arg value="-C" />
+ <arg value="linux/work" />
+ <arg value="-xzpf" />
+ -->
+ <arg value="xfz" />
+ <arg value="../${jre.tgz.path}"/>
+ </exec>
+
+ <!-- use the jre subfolder when having downloaded a JDK file -->
+ <condition property="jre.dir" value="jdk${jdk.esoteric}/jre">
+ <!-- property might not be set, but it is for arm -->
+ <equals arg1="${jre.download.jdk}" arg2="true" />
+ </condition>
+ <condition property="jre.dir" value="jre${jdk.esoteric}">
+ <not>
+ <equals arg1="${jre.download.jdk}" arg2="true" />
+ </not>
+ </condition>
+
+ <exec executable="true" dir="linux">
+ <arg value="-a" />
+ <arg value="--delete" />
+ <arg value="${jre.dir}/" />
+ <arg value="work/java/" />
+ </exec>
+
+ <delete dir="linux/jre${jdk.esoteric}" failonerror="false" />
+ <delete dir="linux/jdk${jdk.esoteric}" failonerror="false" />
+
+ <!-- Remove unused JRE bloat. -->
+ <delete failonerror="true">
+ <!--
+ <fileset refid="javafx-basics" />
+ <fileset refid="javafx-linux-${sun.arch.data.model}" />
+ -->
+ <fileset refid="jre-optional-linux" />
+ </delete>
+ </target>
+
+ <target name="linux-run" depends="linux-build"
+ description="Run Linux version">
+ <exec executable="./processing" dir="linux/work" spawn="true"/>
+ </target>
+
+ <target name="linux-dist" depends="linux-build"
+ description="Build .tar.gz of linux version">
+
+<!--
+ <tar compression="gzip" destfile="linux/processing-${version}.tgz">
+ <tarfileset dir="linux/work" prefix="processing-${version}" />
+ </tar>
+-->
+
+ <!-- rename the work folder temporarily -->
+ <move file="linux/work" tofile="linux/processing-${version}" />
+
+ <property name="linux.dist" value="linux/processing-${version}-linux${sun.arch.data.model}.tgz" />
+
+ <exec executable="tar">
+ <arg value="--directory=linux" />
+ <arg value="--file=${linux.dist}" />
+ <arg value="-cpz" />
+ <arg value="processing-${version}" />
+ </exec>
+
+ <!-- put... the candle... back -->
+ <!-- (rename the work processing-NNNN version to work) -->
+ <move file="linux/processing-${version}" tofile="linux/work" />
+
+ <echo>
+ =======================================================
+ Processing for Linux was built. Grab the archive from
+
+ ${linux.dist}
+ =======================================================
+ </echo>
+ </target>
+
+ <!-- Target to create the icons... putting this in here rather than docs.
+ For OS X (though Linux might work), not intended for general use,
+ because it requires things like iconutil (on OS X) or ImageMagick's
+ convert tool (primarily in *nix environments). -->
+ <target name="icons">
+ <!-- Create .ico for exported Java applications -->
+ <exec executable="convert" dir="../core/src/icon">
+ <arg line="icon-16.png icon-32.png icon-48.png icon-64.png icon-256.png ../../../java/application/sketch.ico" />
+ </exec>
+ </target>
+
+ <!-- - - - - - - - - -->
+ <!-- Developer Docs -->
+ <!-- - - - - - - - - -->
+
+ <target name="doc">
+
+ <mkdir dir="javadoc" />
+
+ <!-- Core is in the classpath, so we must build it. -->
+ <subant buildpath="../core" target="build" failonerror="false" />
+
+ <!-- build doc for core -->
+ <exec executable="find" dir="javadoc" errorproperty="ignored">
+ <arg line="core -type f -exec rm -rf {} ';'" />
+ </exec>
+
+ <javadoc access="public" author="false" classpath="../core/library/jogl-all.jar:../core/bin:../core/library/gluegen-rt.jar" destdir="javadoc/core" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.8" splitindex="false" use="false" version="false">
+
+ <!-- provide links for java.* classes.
+ also suppresses the java.lang prefix in the text. -->
+ <link href="http://docs.oracle.com/javase/7/docs/api/" />
+
+ <!-- prevent files from always appearing to have changed -->
+ <arg value="-notimestamp" />
+
+ <arg value="-quiet" />
+
+ <!-- Suppress errors and display some information. -->
+ <tag name="webref" enabled="false" />
+ <tag name="nowebref" enabled="false" />
+ <tag name="generate" enabled="false" />
+ <tag name="instanceName" enabled="false" />
+ <tag name="see_external" enabled="false" />
+ <tag name="brief" description="In brief:" />
+ <tag name="usage" />
+ <arg value="-Xdoclint:reference,accessibility" />
+
+ <packageset dir="../core/src">
+ <include name="processing/**" />
+ </packageset>
+
+ </javadoc>
+
+ <!-- build everything else -->
+ <exec executable="find" dir="javadoc" errorproperty="ignored">
+ <arg line="everything -type f -exec rm -rf {} ';'" />
+ </exec>
+
+ <javadoc access="public" author="false" classpath="../app/lib/ant.jar:../app/lib/ant-launcher.jar:../app/lib/antlr.jar:../app/lib/apple.jar:../app/lib/jna.jar:../app/lib/jna-platform.jar:../core/bin:../core/library/gluegen-rt.jar:../core/library/jogl-all.jar:../java/libraries/svg:../java/libraries/pdf/library/itext.jar:../java/libraries/dxf:../java/libraries/serial/library:${java.home}/lib/tools.jar" destdir="javadoc/everything" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.8" splitindex="false" use="false" version="false" noqualifier="all">
+
+ <arg value="-notimestamp" />
+
+ <arg value="-quiet" />
+
+ <link href="http://docs.oracle.com/javase/7/docs/api/" />
+
+ <packageset dir="../app/src">
+ <include name="antlr/**" />
+ <include name="processing/**" />
+ </packageset>
+
+
+ <tag name="webref" enabled="false" />
+ <tag name="nowebref" enabled="false" />
+ <tag name="generate" enabled="false" />
+ <tag name="instanceName" enabled="false" />
+ <tag name="see_external" enabled="false" />
+ <tag name="brief" description="In brief:" />
+ <tag name="usage" />
+ <arg value="-Xdoclint:reference,accessibility" />
+
+ <!--<packageset dir="../app/generated">
+ <include name="processing/**" />
+ </packageset>-->
+
+ <packageset dir="../core/src">
+ <include name="processing/**" />
+ <!--
+ <include name="japplemenubar/**" />
+ -->
+ </packageset>
+ </javadoc>
+
+
+ <!-- do libraries -->
+ <exec executable="find" dir="javadoc" errorproperty="ignored">
+ <arg line="libraries -type f -exec rm -rf {} ';'" />
+ </exec>
+
+ <javadoc access="public" author="false" classpath="../app/lib/ant.jar:../app/lib/ant-launcher.jar:../app/lib/antlr.jar:../app/lib/apple.jar:../app/lib/jna.jar:../app/lib/jna-platform.jar:../core/bin:../core/library/gluegen-rt.jar:../core/library/jogl-all.jar:../java/libraries/svg/library/batik-dom-1.8.jar:../java/libraries/svg/library/batik-svggen-1.8.jar:../java/libraries/pdf/library/itext.jar:../java/libraries/dxf:../java/libraries/serial/library/jssc.jar:${java.home}/lib/tools.jar" destdir="javadoc/libraries" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.8" splitindex="false" use="false" version="false" noqualifier="all">
+
+ <arg value="-notimestamp" />
+
+ <arg value="-quiet" />
+
+ <link href="http://docs.oracle.com/javase/7/docs/api/" />
+ <link href="../../javadoc/core/" />
+
+ <tag name="webref" enabled="false" />
+ <tag name="nowebref" enabled="false" />
+ <tag name="generate" enabled="false" />
+ <tag name="instanceName" enabled="false" />
+ <tag name="see_external" enabled="false" />
+ <tag name="brief" description="In brief:" />
+ <tag name="usage" />
+ <arg value="-Xdoclint:reference,accessibility" />
+
+
+ <packageset dir="../java/libraries/dxf/src">
+ <include name="antlr/**" />
+ <include name="processing/**" />
+ </packageset>
+ <packageset dir="../java/libraries/io/src">
+ <include name="antlr/**" />
+ <include name="processing/**" />
+ </packageset>
+ <packageset dir="../java/libraries/net/src">
+ <include name="antlr/**" />
+ <include name="processing/**" />
+ </packageset>
+ <packageset dir="../java/libraries/pdf/src">
+ <include name="antlr/**" />
+ <include name="processing/**" />
+ </packageset>
+ <packageset dir="../java/libraries/serial/src">
+ <include name="antlr/**" />
+ <include name="processing/**" />
+ </packageset>
+ <packageset dir="../java/libraries/svg/src">
+ <include name="antlr/**" />
+ <include name="processing/**" />
+ </packageset>
+ </javadoc>
+
+ </target>
+
+</project>