Now makes sure JDK 1.4 / WTK are present. No longer requires Unix-style wc binary, so runs on Windows

git-svn-id: https://zxing.googlecode.com/svn/trunk@74 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2007-11-26 16:21:57 +00:00
parent 9081d63ce1
commit 2ab0f2e2ad
3 changed files with 33 additions and 5 deletions

View file

@ -1,5 +1,11 @@
version=0.1.1
version=0.1.2
# Set this to a location where Sun's Wireless Toolkit, version 2.5.2 or later, has been installed
WTK-home=/usr/local/WTK2.5.2
JDK1.4-classes=/usr/lib/jvm/j2sdk1.4.2_16/jre/lib/rt.jar
# Set this to a location where the platform classes included with Java SDK version 1.4 (not later)
# have been installed. This is typically the installation root of the JDK followed by
# 'jre/lib/rt.jar'
# Mac users, this should be set to:
# JDK1.4-classes=/System/Library/Frameworks/JavaVM.framework/Versions/1.4/Classes/classes.jar
JDK1.4-classes=/usr/lib/jvm/j2sdk1.4.2_16/jre/lib/rt.jar

View file

@ -8,6 +8,13 @@
</target>
<target name="build" depends="init">
<fail message="Please set 'JDK1.4-classes' in build.properties">
<condition>
<not>
<available file="${JDK1.4-classes}" type="file"/>
</not>
</condition>
</fail>
<mkdir dir="build"/>
<javac srcdir="src"
destdir="build"

View file

@ -19,6 +19,22 @@
</target>
<target name="build" depends="init">
<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>
<mkdir dir="build"/>
<javac srcdir="src"
destdir="build"
@ -49,9 +65,8 @@
<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>
<length file="ZXingReader.jar" property="jar-size"/>
<copy file="ZXingReader.jad.template" tofile="ZXingReader.jad" overwrite="true">
<filterset>
<filter token="JAR_SIZE" value="${jar-size}"/>