Files
processing4/build/windows/build.xml
2005-01-27 06:00:01 +00:00

112 lines
4.9 KiB
XML
Executable File

<?xml version="1.0" encoding="UTF-8"?>
<!-- base dir set to parent of mobile directory, i.e:
parent <- basedir
mobile
build
windows
processing
processing will be checked out into the parent directory, if it doesn't exist -->
<project name="mobile" default="dist" basedir="..\..\..">
<!-- init should always be the first target in a dependency list, it sets up
properties necessary for things to work correctly. -->
<target name="init">
<!-- Check if processing has been checked out and set property accordingly-->
<available property="ischeckedout" file="processing" type="dir"/>
<!-- home directory of cygwin -->
<property name="cygwin.dir" value="C:/Sdk/cygwin"/>
<!-- the absolute path of the basedir, specified here with unix slashes -->
<property name="parent.dir" value="C:/Projects/processing"/>
<!-- the absolute path of a WTK implementation for building core files -->
<property name="wtk.dir" value="C:/WTK22"/>
<!-- the boot classpath to use when compiling core files -->
<property name="wtk.bootClassPath" value="${wtk.dir}/lib/cldcapi10.jar;${wtk.dir}/lib/midpapi10.jar"/>
</target>
<!-- checks out a recent tagged copy of processing (tag currently hard coded here
for now) if it hasn't been done so already. -->
<target name="checkout" unless="ischeckedout">
</target>
<!-- gets unmodified tagged source files back into the processing app directory. -->
<target name="revert" depends="init, checkout">
<!-- perform the cvs update to get clean files. -->
<exec executable="${cygwin.dir}/bin/bash.exe">
<arg value="--login"/>
<arg value="-c"/>
<arg value="cd ${parent.dir}/processing/app; cvs update -CP; rm .#*"/>
</exec>
</target>
<!-- copy app source files from mobile into corresponding directory in processing. -->
<target name="copyappsrc" depends="checkout">
<copy todir="processing/app" overwrite="true">
<fileset dir="mobile/app">
<include name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="make" depends="init, copyappsrc">
<!-- execute make.sh shell script in processing build dir. -->
<exec executable="${cygwin.dir}/bin/bash.exe">
<arg value="--login"/>
<arg value="-c"/>
<arg value="cd ${parent.dir}/processing/build/windows; ./make.sh"/>
</exec>
<antcall target="copycore"/>
</target>
<target name="dist" depends="init, copyappsrc">
<!-- execute dist.sh shell script in processing build dir. -->
<exec executable="${cygwin.dir}/bin/bash.exe">
<arg value="--login"/>
<arg value="-c"/>
<arg value="cd ${parent.dir}/processing/build/windows; ./make.sh"/>
</exec>
</target>
<target name="run" depends="init">
<!-- execute run.sh shell script in processing build dir. -->
<exec executable="${cygwin.dir}/bin/bash.exe">
<arg value="--login"/>
<arg value="-c"/>
<arg value="cd ${parent.dir}/processing/build/windows; ./run.sh"/>
</exec>
</target>
<!-- builds the mobile core files and packages them up for inclusion with processing ide-->
<target name="makecore" depends="init">
<!-- compile core source files into a temporary directory -->
<mkdir dir="mobile/build/windows/classes"/>
<javac srcdir="mobile/core/processing/core"
destdir="mobile/build/windows/classes"
bootclasspath="${wtk.bootClassPath}"
source="1.3"
target="1.1"/>
<!-- preverify compiled classes into another temporary directory -->
<mkdir dir="mobile/build/windows/preverified"/>
<exec executable="${wtk.dir}/bin/preverify.exe">
<arg value="-classpath"/>
<arg path="${wtk.bootClassPath}"/>
<arg value="-target"/>
<arg value="CLDC1.0"/>
<arg value="-d"/>
<arg path="mobile/build/windows/preverified"/>
<arg path="mobile/build/windows/classes"/>
</exec>
<!-- pack preverified classes into jar -->
<jar destfile="mobile/build/windows/mobile.jar" basedir="mobile/build/windows/preverified">
<include name="**/*.class"/>
</jar>
</target>
<!-- copies core jar and manifest/jad template into processing ide build -->
<target name="copycore" depends="makecore">
<!-- copy jar and jad/manifest template into processing build -->
<copy file="mobile/build/shared/lib/mobile.mf" todir="processing/build/windows/work/lib"/>
<copy file="mobile/build/windows/mobile.jar" todir="processing/build/windows/work/lib"/>
</target>
</project>