* components/overlay/java/com/sun/lwuit/impl/ImplementationFactory.java: Loads the... svn/trunk
authorguillaum1 <guillaum1@users.evolvis.org>
Wed, 1 Apr 2009 15:44:47 +0000 (15:44 +0000)
committerguillaum1 <guillaum1@users.evolvis.org>
Wed, 1 Apr 2009 15:44:47 +0000 (15:44 +0000)
* build.sh: Updated

build.sh
components/overlay/java/com/sun/lwuit/impl/ImplementationFactory.java

index 3bb8fcd..af8e203 100644 (file)
--- a/build.sh
+++ b/build.sh
@@ -26,6 +26,7 @@ DEMO_ENABLED=yes
 # Overridable file names and default locations
 CORE_JAR=${JAR_DIST_HOME}/lwuimb-0.1-alpha1.jar
 DEMO_JAR=${JAR_DIST_HOME}/lwuimb-demo.jar
+GLUE_JAR=${DIST_HOME}/lib/glue.jar
 
 #==========================================
 # You should not change anything below
@@ -168,8 +169,25 @@ build_java_res()
 # Build jars
 #------------------------
 
+# Build glue code
+build_java yes components/glue/java $GLUE_JAR
+
+# Sync with the official LWUIT directory
+USERNAME=java-net-username
+svn export https://lwuit.dev.java.net/svn/lwuit/trunk/MIDP/LWUIT/src lwuit --username $USERNAME
+rm -rf lwuit/com/sun/lwuit/M3G.java
+rm -rf lwuit/com/sun/lwuit/impl/ImplementationFactory.java
+rm -rf lwuit/com/sun/lwuit/util/Log.java
+rm -rf lwuit/com/sun/lwuit/impl/midp
+rm -rf lwuit/com/sun/lwuit/SVGImage.java
+cp -rf lwuit/* components/core/java/ 
+rm -rf lwuit
+
+# Add the overlay
+cp -rf components/overlay/java/* components/core/java/
+
 # Build core library
-build_java $CORE_ENABLED core/java $CORE_JAR :$MICROBACKEND_JAR
+build_java $CORE_ENABLED components/core/java $CORE_JAR :$MICROBACKEND_JAR:$GLUE_JAR
 
 # Build demo  
 build_java_res $DEMO_ENABLED demos/java demos/resources $DEMO_JAR :$J2SE_JAR:$CORE_JAR
index bcd6fbb..8c33dfc 100644 (file)
@@ -24,9 +24,6 @@
  */
 package com.sun.lwuit.impl;
 
-import org.thenesis.lwuimb.LWUIMBImplementation;
-
-
 /**
  * Generic class allowing 3rd parties to replace the underlying implementation in
  * LWUIT seamlessly. The factory can be replaced by 3rd parties to install a new
@@ -68,6 +65,13 @@ public class ImplementationFactory {
      * @return a newly created implementation instance
      */
     public LWUITImplementation createImplementation() {
-        return new LWUIMBImplementation();
+        LWUITImplementation impl = null;
+        try {
+            Class c = Class.forName("org.thenesis.lwuimb.LWUIMBImplementation");
+            impl = (LWUITImplementation)c.newInstance();
+        } catch (Exception e) {
+            System.out.println("Can't find org.thenesis.lwuimb.LWUIMBImplementation class");
+        }
+        return impl;
     }
 }