[SCM] Multi-format 1D/2D barcode image processing library branch, upstream, updated. 24d4480bc48cf9eabf7b2bd2f528248b0e458809
srowen
srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57
Wed Aug 4 01:31:01 UTC 2010
The following commit has been merged in the upstream branch:
commit b3ae9137deaac7e747957912071d20d5a2737aaa
Author: srowen <srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Date: Mon Apr 12 08:59:41 2010 +0000
Fix small compile error in javame/, update for Java ME SDK 3.x layout, finally disentangle Proguard location from WTK
git-svn-id: http://zxing.googlecode.com/svn/trunk@1302 59b500cc-1b3d-0410-9834-0bbf25fbcc57
diff --git a/android/build.xml b/android/build.xml
index 1ee9a12..d2f7b74 100644
--- a/android/build.xml
+++ b/android/build.xml
@@ -194,7 +194,7 @@ limitations under the License.
<target name="optimize" unless="no-optimize">
<mkdir dir="optimized"/>
<property name="libraryjars.path" refid="android.target.classpath"/>
- <java jar="${WTK-home}/bin/proguard.jar" fork="true" failonerror="true">
+ <java jar="${proguard-jar}" fork="true" failonerror="true">
<jvmarg value="-Dmaximum.inlined.code.length=48"/>
<arg value="-injars ${out-classes}"/>
<arg value="-outjars optimized"/>
diff --git a/androidtest/build.xml b/androidtest/build.xml
index 82c1a68..e165ff6 100644
--- a/androidtest/build.xml
+++ b/androidtest/build.xml
@@ -192,7 +192,7 @@ limitations under the License.
<target name="optimize" unless="no-optimize">
<mkdir dir="optimized"/>
<property name="libraryjars.path" refid="android.target.classpath"/>
- <java jar="${WTK-home}/bin/proguard.jar" fork="true" failonerror="true">
+ <java jar="${proguard-jar}" fork="true" failonerror="true">
<jvmarg value="-Dmaximum.inlined.code.length=48"/>
<arg value="-injars ${out-classes}"/>
<arg value="-outjars optimized"/>
diff --git a/build.properties b/build.properties
index c159d50..130cabb 100644
--- a/build.properties
+++ b/build.properties
@@ -1,20 +1,16 @@
-version=1.5
+version=1.6
+
+# Set to the location where ProGuard's proguard.jar file can be found
+#proguard-jar=
# If you are building the J2ME client:
#
-# Set this to a location where Sun's Wireless Toolkit, version 2.5.2 or later, has been installed
-# Location on Linux varies but is typically under /usr/local or /usr/lib
-# On Windows the default install directory is C:\WTK2.5.2
-# Mac users: there is no WTK for Mac at the moment. The installer for Linux may work on Intel-based
-# Macs (haven't tried it) but I believe the preverify binary will not run.
-#
-# If you are buildling the Android client or optimized Java client:
-# Just create a 'WTK' directory wherever you like and add its location here. Proguard's
-# proguard.jar will still be expected at this location as bin/proguard.jar for historical reasons.
+# Set this to a location where Sun's Java ME SDK, version 3.0 or later, has been installed.
+# You can use version 2.5.2 or perhaps earlier, but will need to modify javame/build.xml to
+# use different .jar paths.
# Uncomment or set appropriately:
-#WTK-home=C:\\WTK2.5.2
-WTK-home=/usr/local/WTK2.5.2
+#WTK-home=/Applications/Java_ME_SDK_3.0.app/Contents/Resources
# Set this to the location where you have installed RIM's BlackBerry JDE in order to
# create the 'rim' client. There is no Mac or Linux version, but, these platforms can still
@@ -28,16 +24,16 @@ WTK-home=/usr/local/WTK2.5.2
# Uncomment and set appropriately
#BB-JDK-home=C:\\Program Files\\Research In Motion\\Blackberry JDE 4.3.0
-BB-JDK-home=/usr/local/bb-home
+#BB-JDK-home=/usr/local/bb-home
# Set this to the location where you installed the Android SDK.
#android-home=C:\\Program Files\\android-sdk-windows
-android-home=/usr/local/android
+#android-home=/usr/local/android
# Set this to the location of a Tomcat installation if you want to compile and run the zxing.org
# web site and web application
#tomcat-home=C:\\tomcat
-tomcat-home=/usr/local/tomcat
+#tomcat-home=/usr/local/tomcat
# Uncomment and set this variable if building the zxing.appspot.com subdirectory. It points to the
# location of the Google Web Toolkit (GWT) which can be downloaded here:
diff --git a/build.xml b/build.xml
index e8bff87..a5dc6ce 100644
--- a/build.xml
+++ b/build.xml
@@ -96,10 +96,17 @@
<pathelement location="zxingorg/src"/>
</sourcepath>
<classpath>
+ <!-- These are used with WTK 2.5.x -->
+ <!--
<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="${WTK-home}/lib/cldc_1.1.jar"/>
+ <pathelement location="${WTK-home}/lib/midp_2.0.jar"/>
+ <pathelement location="${WTK-home}/lib/jsr135_1.2.jar"/>
+ <pathelement location="${WTK-home}/lib/jsr234_1.0.jar"/>
<pathelement location="${android-home}/platforms/android-1.5/android.jar"/>
<pathelement location="${tomcat-home}/lib/servlet-api.jar"/>
<fileset dir="zxingorg/web/WEB-INF/lib">
diff --git a/core/build.xml b/core/build.xml
index f02fcb6..05e43d7 100644
--- a/core/build.xml
+++ b/core/build.xml
@@ -72,7 +72,7 @@
<delete file="core.jar"/>
<mkdir dir="optimized"/>
- <java jar="${WTK-home}/bin/proguard.jar" fork="true" failonerror="true">
+ <java jar="${proguard-jar}" fork="true" failonerror="true">
<jvmarg value="-Dmaximum.inlined.code.length=48"/>
<arg value="-injars build"/>
<arg value="-outjars optimized"/>
diff --git a/javame/build.xml b/javame/build.xml
index 8ec9f24..aefb989 100644
--- a/javame/build.xml
+++ b/javame/build.xml
@@ -22,11 +22,18 @@
<path id="wtk-build-path">
<fileset dir="${WTK-home}/lib">
+ <!-- These are used with WTK 2.5.x -->
+ <!--
<include name="cldcapi11.jar"/>
<include name="midpapi20.jar"/>
<include name="mmapi.jar"/>
<include name="jsr234.jar"/>
<include name="satsa-apdu.jar"/>
+ -->
+ <include name="cldc_1.1.jar"/>
+ <include name="midp_2.0.jar"/>
+ <include name="jsr135_1.2.jar"/>
+ <include name="jsr234_1.0.jar"/>
</fileset>
<pathelement location="../core/core.jar"/>
</path>
@@ -34,8 +41,13 @@
<path id="javame-compile-bootclasspath">
<fileset dir="${WTK-home}/lib">
+ <!-- These are used with WTK 2.5.x -->
+ <!--
<include name="cldcapi11.jar"/>
<include name="midpapi20.jar"/>
+ -->
+ <include name="cldc_1.1.jar"/>
+ <include name="midp_2.0.jar"/>
</fileset>
</path>
<property name="javame-compile-bootclasspath-path" refid="javame-compile-bootclasspath"/>
@@ -49,10 +61,10 @@
</not>
</condition>
</fail>
- <fail message="Please put proguard.jar in 'bin' under the WTK install directory">
+ <fail message="Please set 'proguard.jar' in build.properties">
<condition>
<not>
- <available file="${WTK-home}/bin/proguard.jar" type="file"/>
+ <available file="${proguard-jar}" type="file"/>
</not>
</condition>
</fail>
@@ -109,20 +121,27 @@
<jar jarfile="BarcodeReader.jar" basedir="build-j2me" manifest="src/com/google/zxing/client/j2me/MANIFEST.MF"/>
<move file="BarcodeReader.jar" tofile="temp.jar"/>
- <java jar="${WTK-home}/bin/proguard.jar" fork="true" failonerror="true">
+ <java jar="${proguard-jar}" fork="true" failonerror="true">
<jvmarg value="-Dmaximum.inlined.code.length=32"/>
<arg value="-injars temp.jar"/>
<arg value="-outjars BarcodeReader.jar"/>
+ <!-- These are used with WTK 2.5.x -->
+ <!--
<arg value="-libraryjars ${WTK-home}/lib/cldcapi11.jar"/>
<arg value="-libraryjars ${WTK-home}/lib/midpapi20.jar"/>
<arg value="-libraryjars ${WTK-home}/lib/mmapi.jar"/>
<arg value="-libraryjars ${WTK-home}/lib/jsr234.jar"/>
+ -->
+ <arg value="-libraryjars ${WTK-home}/lib/cldc_1.1.jar"/>
+ <arg value="-libraryjars ${WTK-home}/lib/midp_2.0.jar"/>
+ <arg value="-libraryjars ${WTK-home}/lib/jsr135_1.2.jar"/>
+ <arg value="-libraryjars ${WTK-home}/lib/jsr234_1.0.jar"/>
<arg value="-microedition"/>
<arg value="-keep public class com.google.zxing.client.j2me.ZXingMIDlet"/>
<arg value="-keep class com.google.zxing.client.j2me.AdvancedMultimediaManager"/>
<arg value="-keep class com.google.zxing.client.j2me.DefaultMultimediaManager"/>
<arg value="-keep class com.google.zxing.client.j2me.MultimediaManager"/>
- <arg value="-optimizationpasses 7"/>
+ <arg value="-optimizationpasses 5"/>
<arg value="-overloadaggressively"/>
<arg value="-allowaccessmodification"/>
<arg value="-verbose"/>
@@ -144,12 +163,19 @@
</target>
<target name="dump">
- <java jar="${WTK-home}/bin/proguard.jar" fork="true">
+ <java jar="${proguard-jar}" fork="true">
<arg value="-injars BarcodeReader.jar"/>
+ <!-- These are used with WTK 2.5.x -->
+ <!--
<arg value="-libraryjars ${WTK-home}/lib/cldcapi11.jar"/>
<arg value="-libraryjars ${WTK-home}/lib/midpapi20.jar"/>
<arg value="-libraryjars ${WTK-home}/lib/mmapi.jar"/>
<arg value="-libraryjars ${WTK-home}/lib/jsr234.jar"/>
+ -->
+ <arg value="-libraryjars ${WTK-home}/lib/cldc_1.1.jar"/>
+ <arg value="-libraryjars ${WTK-home}/lib/midp_2.0.jar"/>
+ <arg value="-libraryjars ${WTK-home}/lib/jsr135_1.2.jar"/>
+ <arg value="-libraryjars ${WTK-home}/lib/jsr234_1.0.jar"/>
<arg value="-dontshrink"/>
<arg value="-dontobfuscate"/>
<arg value="-dontoptimize"/>
diff --git a/javame/src/com/google/zxing/client/j2me/Menu.java b/javame/src/com/google/zxing/client/j2me/Menu.java
index 544ee2f..dda4711 100644
--- a/javame/src/com/google/zxing/client/j2me/Menu.java
+++ b/javame/src/com/google/zxing/client/j2me/Menu.java
@@ -31,8 +31,8 @@ import javax.microedition.lcdui.List;
final class Menu extends List implements CommandListener {
private final ZXingMIDlet zXingMIDlet;
- private Command cancelCommand;
- private Command barcodeCommand;
+ private final Command cancelCommand;
+ private final Command barcodeCommand;
/**
* Creates a new Search List and initialises all components.
diff --git a/javame/src/com/google/zxing/client/j2me/ZXingMIDlet.java b/javame/src/com/google/zxing/client/j2me/ZXingMIDlet.java
index f1bb635..382200f 100644
--- a/javame/src/com/google/zxing/client/j2me/ZXingMIDlet.java
+++ b/javame/src/com/google/zxing/client/j2me/ZXingMIDlet.java
@@ -254,7 +254,7 @@ public final class ZXingMIDlet extends MIDlet {
showOpenURL("Compose E-mail?", emailResult.getEmailAddress(), emailResult.getMailtoURI());
} else if (type.equals(ParsedResultType.SMS)) {
SMSParsedResult smsResult = (SMSParsedResult) result;
- showOpenURL("Compose SMS?", smsResult.getNumber(), smsResult.getSMSURI());
+ showOpenURL("Compose SMS?", smsResult.getNumbers()[0], smsResult.getSMSURI());
} else if (type.equals(ParsedResultType.PRODUCT)) {
ProductParsedResult productResult = (ProductParsedResult) result;
String uri = "http://www.upcdatabase.com/item.asp?upc=" + productResult.getNormalizedProductID();
--
Multi-format 1D/2D barcode image processing library
More information about the Pkg-google-commits
mailing list