Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #3 from cscott/build-fixes

Build fixes
  • Loading branch information...
commit a45ea7cfc2b0faa81066b73c3e9720e12e061793 2 parents fc713d6 + 3b64241
@mfinkle authored
Showing with 10 additions and 13 deletions.
  1. +5 −10 bootstrap.js
  2. +4 −2 build.sh
  3. +1 −1  install.rdf
View
15 bootstrap.js
@@ -5,8 +5,7 @@ const Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
function isNativeUI() {
- let appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
- return (appInfo.ID == "{aa3c5121-dab2-40e2-81ca-7ea25febc110}");
+ return (Services.appinfo.ID == "{aa3c5121-dab2-40e2-81ca-7ea25febc110}");
}
function showToast(aWindow) {
@@ -83,17 +82,15 @@ var windowListener = {
};
function startup(aData, aReason) {
- let wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
-
// Load into any existing windows
- let windows = wm.getEnumerator("navigator:browser");
+ let windows = Services.wm.getEnumerator("navigator:browser");
while (windows.hasMoreElements()) {
let domWindow = windows.getNext().QueryInterface(Ci.nsIDOMWindow);
loadIntoWindow(domWindow);
}
// Load into any new windows
- wm.addListener(windowListener);
+ Services.wm.addListener(windowListener);
}
function shutdown(aData, aReason) {
@@ -102,13 +99,11 @@ function shutdown(aData, aReason) {
if (aReason == APP_SHUTDOWN)
return;
- let wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
-
// Stop listening for new windows
- wm.removeListener(windowListener);
+ Services.wm.removeListener(windowListener);
// Unload from any existing windows
- let windows = wm.getEnumerator("navigator:browser");
+ let windows = Services.wm.getEnumerator("navigator:browser");
while (windows.hasMoreElements()) {
let domWindow = windows.getNext().QueryInterface(Ci.nsIDOMWindow);
unloadFromWindow(domWindow);
View
6 build.sh
@@ -69,11 +69,13 @@ mkdir --parents --verbose $TMP_DIR/chrome
# generate the JAR file, excluding CVS, SVN, and temporary files
JAR_FILE=$TMP_DIR/chrome/$APP_NAME.jar
echo "Generating $JAR_FILE..."
+rm -f files ; touch files
for CHROME_SUBDIR in $CHROME_PROVIDERS; do
find $CHROME_SUBDIR \( -path '*CVS*' -o -path '*.svn*' \) -prune -o -type f -print | grep -v \~ >> files
done
zip -0 -r $JAR_FILE -@ < files
+echo $JAR_FILE > files
# The following statement should be used instead if you don't wish to use the JAR file
#cp --verbose --parents `cat files` $TMP_DIR/chrome
@@ -88,8 +90,8 @@ done
# Copy other files to the root of future XPI.
for ROOT_FILE in $ROOT_FILES install.rdf chrome.manifest; do
- cp --verbose $ROOT_FILE $TMP_DIR
if [ -f $ROOT_FILE ]; then
+ cp --verbose $ROOT_FILE $TMP_DIR
echo $ROOT_FILE >> files
fi
done
@@ -130,7 +132,7 @@ echo "Done!"
$AFTER_BUILD
if [ $PUSH_TO_DEVICE = 1 ]; then
- adb push ../$APP_NAME.xpi /sdcard/$APP_NAME.xpi
+ adb push ./$APP_NAME.xpi /sdcard/$APP_NAME.xpi
adb shell am start -a android.intent.action.VIEW \
-c android.intent.category.DEFAULT \
-d file:///mnt/sdcard/$APP_NAME.xpi \
View
2  install.rdf
@@ -15,7 +15,7 @@
<Description>
<em:id>{aa3c5121-dab2-40e2-81ca-7ea25febc110}</em:id>
<em:minVersion>14.0</em:minVersion>
- <em:maxVersion>16.*</em:maxVersion>
+ <em:maxVersion>18.*</em:maxVersion>
</Description>
</em:targetApplication>
Please sign in to comment.
Something went wrong with that request. Please try again.