Bug 576610 - Fix Android packaging with data driven compreg, r=vlad
authorMichael Wu <mwu@mozilla.com>
Fri, 02 Jul 2010 13:20:24 -0700
changeset 47152 e65442f37c01761b640683d3b8237bbdca8b9161
parent 47151 72fcbf4fd27177bb4be6ba7edeae9003db3ffed6
child 47153 05f5704a084c79c85cac852afe7f4d5072383b2f
push idunknown
push userunknown
push dateunknown
reviewersvlad
bugs576610
milestone2.0b2pre
first release with
nightly mac
e65442f37c01 / 4.0b2pre / 20100702133258 / files
nightly linux32
nightly linux64
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly mac
Bug 576610 - Fix Android packaging with data driven compreg, r=vlad
embedding/android/GeckoApp.java
embedding/android/Makefile.in
--- a/embedding/android/GeckoApp.java
+++ b/embedding/android/GeckoApp.java
@@ -273,52 +273,56 @@ abstract public class GeckoApp
         ZipFile zip;
         InputStream listStream;
 
         try {
             File componentsDir = new File("/data/data/org.mozilla." + getAppName() +"/components");
             componentsDir.mkdir();
             zip = new ZipFile(getApplication().getPackageResourcePath());
 
-            ZipEntry componentsList = zip.getEntry("components/components.list");
+            ZipEntry componentsList = zip.getEntry("components/components.manifest");
             if (componentsList == null) {
                 Log.i("GeckoAppJava", "Can't find components.list !");
                 return;
             }
 
             listStream = new BufferedInputStream(zip.getInputStream(componentsList));
         } catch (Exception e) {
             Log.i("GeckoAppJava", e.toString());
             return;
         }
 
         byte[] buf = new byte[8192];
 
         StreamTokenizer tkn = new StreamTokenizer(new InputStreamReader(listStream));
         String line = "components/";
         int status;
+        boolean addnext = false;
         tkn.eolIsSignificant(true);
         do {
             try {
                 status = tkn.nextToken();
             } catch (IOException e) {
                 Log.i("GeckoAppJava", e.toString());
                 return;
             }
             switch (status) {
             case StreamTokenizer.TT_WORD:
-                line += tkn.sval;
+                if (tkn.sval.equals("binary-component"))
+                    addnext = true;
+                else if (addnext) {
+                    line += tkn.sval;
+                    addnext = false;
+                }
                 break;
             case StreamTokenizer.TT_NUMBER:
-                line += tkn.nval;
                 break;
             case StreamTokenizer.TT_EOF:
             case StreamTokenizer.TT_EOL:
-                if (!line.endsWith(".js"))
-                    unpackFile(zip, buf, null, line);
+                unpackFile(zip, buf, null, line);
                 line = "components/";
                 break;
             }
         } while (status != StreamTokenizer.TT_EOF);
 
         unpackFile(zip, buf, null, "application.ini");
         unpackFile(zip, buf, null, getContentProcessName());
     }
--- a/embedding/android/Makefile.in
+++ b/embedding/android/Makefile.in
@@ -142,24 +142,19 @@ libs/armeabi/%: $(DIST)/lib/%
 	@cp -L -v $< $@
 	@$(DO_STRIP) $@
 
 # Bug 567873 - Android packaging should use standard packaging code
 dist: FORCE
 	$(NSINSTALL) -D dist/components
 	rm -f dist/components/*
 	@(for f in $(DIST)/bin/components/* ; do ln -sf ../../$$f dist/components ; done)
-	$(DIST)/host/bin/host_xpt_link gecko.xpt dist/components/*.xpt
-	rm dist/components/*.xpt
-	mv gecko.xpt dist/components
 	$(NSINSTALL) -D dist/chrome
 	rm -f dist/chrome/*
 	@(for f in $(DIST)/bin/chrome/* ; do ln -sf ../../$$f dist/chrome ; done)
-	@(for MANIFEST in dist/chrome/*.manifest ; do cat "$$MANIFEST" >> chrome.manifest ; echo >> chrome.manifest; rm "$$MANIFEST" ; done )
-	mv chrome.manifest dist/chrome/
 	$(NSINSTALL) -D dist/defaults
 	rm -f dist/defaults/*
 	@(for f in $(DIST)/bin/defaults/* ; do ln -sf ../../$$f dist/defaults ; done )
 	@(for PREF in $(DIST)/bin/defaults/pref/*.js ; do cat "$$PREF" >> dist/defaults/prefs.js ; echo >> dist/defaults/prefs.js ; done )
 	rm dist/defaults/pref
 	@(for f in $(DIST_LINK_FILES) ; do if [ -e $(DIST)/bin/$$f ] ; then echo $$f ; ln -sf ../$(DIST)/bin/$$f dist ; fi ; done)
 
 gecko-unsigned-unaligned.apk: gecko.ap_ classes.dex dist $(FULL_LIBS)