[sugar] [PATCH] installing components in Browse

Tomeu Vizoso tomeu
Fri Jul 11 04:12:03 EDT 2008


Hi,

have been looking at the problems that David Van Assche has found
while trying to put Gears to work in Browse and reached the point
where the extension installs itself successfully. Hopefully, after we
fix these issues other extensions will be installable in Browse.

Unfortunately, gears is not working yet because we fail to properly
display the popup that requests permission from the user to run the
gears app. Hopefully it's some small bug in our dialog handling code.

The patch isn't ready to be committed yet, help in polishing will be
appreciated.

Summary:

* handle NS_XPCOM_XPTI_REGISTRY_FILE in our directory provider, so
mozilla doesn't try (and fail) to keep that file in /usr/lib:

+    if (!strcmp(aKey, NS_XPCOM_XPTI_REGISTRY_FILE) && mProfilePath) {
...
+        rv = file->AppendNative(nsCString("xpti.dat"));
...
+    }

* Set the binDir path to /usr/lib/xulrunner-1.9, mozilla will add
"components" to the path when autoregistering components:

-    rv = NS_NewNativeLocalFile(nsCString(LIBXUL_DIR"/components"), PR_TRUE,
+    rv = NS_NewNativeLocalFile(nsCString(LIBXUL_DIR), PR_TRUE,

* Add an implementation of the service @mozilla.org/xre/app-info;1,
extensions use this interface to tell if they should load in a given
xulrunner environment. Many absurd values there, we need to decide
better ones. Perhaps this should live in a components dir inside the
activity bundle? So every activity can provide its own values? One
more hack: had to name xulappinfo.js as axulappinfo.js so it loads
before the gears extension.

-components_DATA = hulahopAddCertException.js
+components_DATA = hulahopAddCertException.js   \
+                 axulappinfo.js

Won't be around this weekend, so would be great if someone could take
this task (David?). Also, perhaps we should start filing tickets about
it.

Thanks,

Tomeu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Some-fixes-for-component-registration.-Add-NSXULAppI.patch
Type: text/x-diff
Size: 5294 bytes
Desc: not available
Url : http://lists.laptop.org/pipermail/sugar/attachments/20080711/368f71d6/attachment.patch 



More information about the Sugar-devel mailing list