zxing/javame/build.xml

65 lines
1.9 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<project name="javame" default="build">
<property file="../build.properties"/>
<target name="init">
<tstamp/>
</target>
<target name="build" depends="init">
<mkdir dir="build"/>
<javac srcdir="src"
destdir="build"
source="1.4"
target="1.4"
bootclasspath="${JDK1.4-classes}"
optimize="true"
debug="true"
deprecation="true"
fork="true">
<classpath>
<pathelement location="${WTK-home}/lib/cldcapi11.jar"/>
<pathelement location="${WTK-home}/lib/midpapi20.jar"/>
<pathelement location="${WTK-home}/lib/mmapi.jar"/>
<pathelement location="${WTK-home}/lib/jsr234.jar"/>
<pathelement location="../core/core.jar"/>
</classpath>
</javac>
<unzip src="../core/core.jar" dest="build"/>
<mkdir dir="build-j2me"/>
<exec executable="${WTK-home}/bin/preverify1.1">
<arg line="-classpath ${WTK-home}/lib/cldcapi11.jar:${WTK-home}/lib/midpapi20.jar:${WTK-home}/lib/mmapi.jar:${WTK-home}/lib/jsr234.jar:${WTK-home}/lib/satsa-apdu.jar -d build-j2me build"/>
</exec>
<copy todir="build-j2me">
<fileset dir=".">
<include name="res/**"/>
</fileset>
</copy>
<jar jarfile="ZXingReader.jar" basedir="build-j2me" manifest="src/com/google/zxing/client/j2me/MANIFEST.MF"/>
<!-- get .jar size to include it in the .jad file -->
<exec executable="sh" outputproperty="jar-size">
<arg line="-c &quot;wc -c ZXingReader.jar | cut -d' ' -f1&quot;"/>
</exec>
<copy file="ZXingReader.jad.template" tofile="ZXingReader.jad" overwrite="true">
<filterset>
<filter token="JAR_SIZE" value="${jar-size}"/>
</filterset>
</copy>
</target>
<target name="clean">
<delete dir="build"/>
<delete dir="build-j2me"/>
<delete file="ZXingReader.jar"/>
<delete file="ZXingReader.jad"/>
</target>
</project>