2007-10-23 12:12:27 -07:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2007-11-28 09:19:36 -08:00
|
|
|
|
|
|
|
<!--
|
|
|
|
Copyright 2007 Google Inc.
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
|
|
|
|
2007-10-23 12:12:27 -07:00
|
|
|
<project name="javame" default="build">
|
|
|
|
|
2007-11-14 07:27:06 -08:00
|
|
|
<property file="../build.properties"/>
|
2007-10-23 12:12:27 -07:00
|
|
|
|
2007-11-21 19:52:30 -08:00
|
|
|
<path id="wtk-build-path">
|
|
|
|
<fileset dir="${WTK-home}/lib">
|
|
|
|
<include name="cldcapi11.jar"/>
|
|
|
|
<include name="midpapi20.jar"/>
|
|
|
|
<include name="mmapi.jar"/>
|
|
|
|
<include name="jsr234.jar"/>
|
|
|
|
<include name="satsa-apdu.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<pathelement location="../core/core.jar"/>
|
|
|
|
</path>
|
|
|
|
|
2007-10-23 12:12:27 -07:00
|
|
|
<target name="init">
|
|
|
|
<tstamp/>
|
2007-11-26 08:21:57 -08:00
|
|
|
<fail message="Please set 'JDK1.4-classes' in build.properties">
|
|
|
|
<condition>
|
|
|
|
<not>
|
|
|
|
<available file="${JDK1.4-classes}" type="file"/>
|
|
|
|
</not>
|
|
|
|
</condition>
|
|
|
|
</fail>
|
|
|
|
<fail message="Please set 'WTK-home' in build.properties">
|
|
|
|
<condition>
|
|
|
|
<not>
|
|
|
|
<available file="${WTK-home}" type="dir"/>
|
|
|
|
</not>
|
|
|
|
</condition>
|
|
|
|
</fail>
|
2007-11-26 12:04:32 -08:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile" 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 refid="wtk-build-path"/>
|
|
|
|
</javac>
|
|
|
|
</target>
|
2007-11-26 08:21:57 -08:00
|
|
|
|
2007-11-26 12:04:32 -08:00
|
|
|
<target name="compile-basic" depends="init">
|
2007-10-23 12:12:27 -07:00
|
|
|
<mkdir dir="build"/>
|
2007-11-26 12:04:32 -08:00
|
|
|
<!-- For an explanation of this odd build command, see javadoc in
|
|
|
|
src/com/google/zxing/client/j2me/AdvancedMultimediaManager.java -->
|
|
|
|
<javac srcdir="src-basic"
|
|
|
|
destdir="build"
|
|
|
|
source="1.4"
|
|
|
|
target="1.4"
|
|
|
|
bootclasspath="${JDK1.4-classes}"
|
|
|
|
optimize="true"
|
|
|
|
debug="true"
|
|
|
|
deprecation="true"
|
|
|
|
fork="true">
|
|
|
|
<classpath refid="wtk-build-path"/>
|
|
|
|
</javac>
|
2007-10-23 12:12:27 -07:00
|
|
|
<javac srcdir="src"
|
|
|
|
destdir="build"
|
|
|
|
source="1.4"
|
|
|
|
target="1.4"
|
2007-11-20 10:22:52 -08:00
|
|
|
bootclasspath="${JDK1.4-classes}"
|
2007-10-23 12:12:27 -07:00
|
|
|
optimize="true"
|
|
|
|
debug="true"
|
|
|
|
deprecation="true"
|
|
|
|
fork="true">
|
2007-11-26 12:04:32 -08:00
|
|
|
<classpath refid="wtk-build-path"/>
|
|
|
|
<exclude name="com/google/zxing/client/j2me/AdvancedMultimediaManager.java"/>
|
2007-10-23 12:12:27 -07:00
|
|
|
</javac>
|
2007-11-26 12:04:32 -08:00
|
|
|
</target>
|
2007-10-23 12:12:27 -07:00
|
|
|
|
2007-11-26 12:04:32 -08:00
|
|
|
<target name="package">
|
2007-11-07 13:56:22 -08:00
|
|
|
<unzip src="../core/core.jar" dest="build"/>
|
|
|
|
|
2007-10-23 12:12:27 -07:00
|
|
|
<mkdir dir="build-j2me"/>
|
2007-11-21 19:52:30 -08:00
|
|
|
<property name="preverify-classpath" refid="wtk-build-path"/>
|
2007-11-07 13:56:22 -08:00
|
|
|
<exec executable="${WTK-home}/bin/preverify1.1">
|
2007-11-21 19:52:30 -08:00
|
|
|
<arg line="-classpath ${preverify-classpath} -d build-j2me build"/>
|
2007-10-23 12:12:27 -07:00
|
|
|
</exec>
|
|
|
|
|
2007-11-07 15:02:50 -08:00
|
|
|
<copy todir="build-j2me">
|
|
|
|
<fileset dir=".">
|
|
|
|
<include name="res/**"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
2007-11-26 12:04:32 -08:00
|
|
|
<copy file="src/com/google/zxing/client/j2me/MANIFEST.MF.template" tofile="src/com/google/zxing/client/j2me/MANIFEST.MF" overwrite="true">
|
|
|
|
<filterset>
|
|
|
|
<filter token="APP_NAME" value="${jar-name}"/>
|
|
|
|
</filterset>
|
|
|
|
</copy>
|
|
|
|
|
2007-11-28 09:22:39 -08:00
|
|
|
<jar jarfile="${jar-name}.jar" basedir="build-j2me" manifest="src/com/google/zxing/client/j2me/MANIFEST.MF" level="9"/>
|
2007-11-07 13:56:22 -08:00
|
|
|
|
2007-11-12 12:22:22 -08:00
|
|
|
<!-- get .jar size to include it in the .jad file -->
|
2007-11-26 12:04:32 -08:00
|
|
|
<length file="${jar-name}.jar" property="jar-size"/>
|
|
|
|
|
|
|
|
<copy file="ZXingReader.jad.template" tofile="${jar-name}.jad" overwrite="true">
|
2007-11-07 13:56:22 -08:00
|
|
|
<filterset>
|
|
|
|
<filter token="JAR_SIZE" value="${jar-size}"/>
|
2007-11-26 12:04:32 -08:00
|
|
|
<filter token="APP_NAME" value="${jar-name}"/>
|
2007-11-07 13:56:22 -08:00
|
|
|
</filterset>
|
|
|
|
</copy>
|
2007-10-23 12:12:27 -07:00
|
|
|
|
|
|
|
</target>
|
|
|
|
|
2007-11-26 12:04:32 -08:00
|
|
|
<target name="build">
|
|
|
|
<description>Builds the main reader .jar file</description>
|
|
|
|
<property name="jar-name" value="ZXingReader"/>
|
|
|
|
<antcall target="clean"/>
|
|
|
|
<antcall target="compile"/>
|
|
|
|
<antcall target="package"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="build-basic">
|
|
|
|
<description>Builds the basic reader .jar file</description>
|
|
|
|
<property name="jar-name" value="ZXingReaderBasic"/>
|
|
|
|
<antcall target="clean"/>
|
|
|
|
<antcall target="compile-basic"/>
|
|
|
|
<antcall target="package"/>
|
|
|
|
</target>
|
|
|
|
|
2007-10-23 12:12:27 -07:00
|
|
|
<target name="clean">
|
|
|
|
<delete dir="build"/>
|
|
|
|
<delete dir="build-j2me"/>
|
2007-11-26 12:04:32 -08:00
|
|
|
<delete dir="." includes="*.jar"/>
|
|
|
|
<delete dir="." includes="*.jad"/>
|
2007-10-23 12:12:27 -07:00
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|