2007-12-11 12:18:57 -08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
|
|
<!--
|
2008-06-19 13:56:24 -07:00
|
|
|
Copyright 2007 ZXing authors
|
2007-12-11 12:18:57 -08:00
|
|
|
|
|
|
|
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.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<project name="rim" default="build">
|
|
|
|
|
|
|
|
<property file="../build.properties"/>
|
2008-02-15 07:15:57 -08:00
|
|
|
<property name="rim-api-jar" value="${BB-JDK-home}/lib/net_rim_api.jar"/>
|
2007-12-11 12:18:57 -08:00
|
|
|
|
|
|
|
<target name="init">
|
|
|
|
<tstamp/>
|
|
|
|
<fail message="Please set 'BB-JDK-home' in build.properties">
|
|
|
|
<condition>
|
|
|
|
<not>
|
|
|
|
<available file="${BB-JDK-home}" type="dir"/>
|
|
|
|
</not>
|
|
|
|
</condition>
|
2008-01-30 08:12:56 -08:00
|
|
|
</fail>
|
2008-02-15 07:15:57 -08:00
|
|
|
<fail message="Please set 'WTK-home' in build.properties">
|
2008-01-30 08:12:56 -08:00
|
|
|
<condition>
|
|
|
|
<not>
|
2008-02-15 07:15:57 -08:00
|
|
|
<available file="${WTK-home}" type="dir"/>
|
|
|
|
</not>
|
|
|
|
</condition>
|
|
|
|
</fail>
|
|
|
|
<fail message="Please build 'core' first">
|
|
|
|
<condition>
|
|
|
|
<not>
|
|
|
|
<available file="../core/core.jar" type="file"/>
|
|
|
|
</not>
|
|
|
|
</condition>
|
|
|
|
</fail>
|
2008-07-10 13:05:03 -07:00
|
|
|
<fail message="Please build 'javame' first">
|
2008-02-15 07:15:57 -08:00
|
|
|
<condition>
|
|
|
|
<not>
|
2008-07-10 13:05:03 -07:00
|
|
|
<available file="../javame/javame.jar" type="file"/>
|
2008-01-30 08:12:56 -08:00
|
|
|
</not>
|
|
|
|
</condition>
|
2007-12-11 12:18:57 -08:00
|
|
|
</fail>
|
|
|
|
</target>
|
|
|
|
|
2008-02-15 07:15:57 -08:00
|
|
|
<target name="build" depends="init">
|
|
|
|
|
|
|
|
<mkdir dir="build"/>
|
|
|
|
<javac srcdir="src"
|
|
|
|
destdir="build"
|
|
|
|
source="1.2"
|
|
|
|
target="1.2"
|
|
|
|
bootclasspath="${rim-api-jar}"
|
|
|
|
optimize="true"
|
|
|
|
debug="true"
|
|
|
|
deprecation="true"
|
|
|
|
fork="true">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="../core/core.jar"/>
|
2008-07-10 13:05:03 -07:00
|
|
|
<pathelement location="../javame/javame.jar"/>
|
2008-02-15 07:15:57 -08:00
|
|
|
</classpath>
|
|
|
|
</javac>
|
|
|
|
|
|
|
|
<unzip src="../core/core.jar" dest="build"/>
|
2008-07-10 13:05:03 -07:00
|
|
|
<unzip src="../javame/javame.jar" dest="build"/>
|
2008-02-15 07:15:57 -08:00
|
|
|
|
|
|
|
<mkdir dir="build-j2me"/>
|
|
|
|
<exec executable="${WTK-home}/bin/preverify1.1" failonerror="true">
|
2008-03-06 13:54:24 -08:00
|
|
|
<arg line="-classpath '${rim-api-jar}' -d build-j2me build"/>
|
2008-02-15 07:15:57 -08:00
|
|
|
</exec>
|
|
|
|
|
2008-02-15 12:10:55 -08:00
|
|
|
<copy todir="build-j2me">
|
|
|
|
<fileset dir=".">
|
|
|
|
<include name="res/**"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<copy file="BarcodeReader.jad.template" tofile="BarcodeReader.jad" overwrite="true">
|
|
|
|
<filterset>
|
|
|
|
<filter token="VERSION" value="${version}"/>
|
|
|
|
</filterset>
|
|
|
|
</copy>
|
2008-09-21 04:12:41 -07:00
|
|
|
<copy file="BarcodeReader.alx.template" tofile="BarcodeReader.alx" overwrite="true">
|
|
|
|
<filterset>
|
|
|
|
<filter token="VERSION" value="${version}"/>
|
|
|
|
</filterset>
|
|
|
|
</copy>
|
2008-02-15 12:10:55 -08:00
|
|
|
|
2008-02-15 07:15:57 -08:00
|
|
|
<jar jarfile="temp.jar" basedir="build-j2me"/>
|
2008-01-07 13:19:03 -08:00
|
|
|
<java jar="${BB-JDK-home}/bin/rapc.jar" fork="true">
|
2008-02-15 07:15:57 -08:00
|
|
|
<arg value="-quiet"/>
|
|
|
|
<arg value="import=${rim-api-jar}"/>
|
2008-02-15 12:10:55 -08:00
|
|
|
<arg value="jad=BarcodeReader.jad"/>
|
2008-02-15 07:15:57 -08:00
|
|
|
<arg value="codename=BarcodeReader"/>
|
|
|
|
<arg value="temp.jar"/>
|
2007-12-11 12:18:57 -08:00
|
|
|
</java>
|
|
|
|
|
2008-02-15 12:10:55 -08:00
|
|
|
<echo>Remember to sign the .cod file!</echo>
|
|
|
|
|
|
|
|
</target>
|
2007-12-11 12:18:57 -08:00
|
|
|
|
|
|
|
<target name="clean">
|
2008-02-15 07:15:57 -08:00
|
|
|
<delete dir="build"/>
|
|
|
|
<delete dir="build-j2me"/>
|
|
|
|
<delete file="temp.jar"/>
|
|
|
|
<delete file="BarcodeReader.cod"/>
|
|
|
|
<delete file="BarcodeReader.csl"/>
|
|
|
|
<delete file="BarcodeReader.cso"/>
|
|
|
|
<delete file="BarcodeReader.debug"/>
|
2008-02-15 12:10:55 -08:00
|
|
|
<delete file="BarcodeReader.jad"/>
|
|
|
|
<delete file="BarcodeReader.jar"/>
|
|
|
|
<delete file="LogFile.txt"/>
|
2007-12-11 12:18:57 -08:00
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|