Bug 576610 - Fix Android packaging with data driven compreg, r=vlad

This commit is contained in:
Michael Wu 2010-07-02 13:20:24 -07:00
parent 88776b063a
commit 9e28ed1f7d
2 changed files with 9 additions and 10 deletions

View File

@ -278,7 +278,7 @@ abstract public class GeckoApp
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;
@ -295,6 +295,7 @@ abstract public class GeckoApp
StreamTokenizer tkn = new StreamTokenizer(new InputStreamReader(listStream));
String line = "components/";
int status;
boolean addnext = false;
tkn.eolIsSignificant(true);
do {
try {
@ -305,15 +306,18 @@ abstract public class GeckoApp
}
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;
}

View File

@ -147,14 +147,9 @@ 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 )