for a long time I've been under the assumption that a Firefox
extension could be packaged as a standalone application, by installing
it as an extension in a minimal, bare-bones xulrunner app. However
after looking into this extensively this week, I can only find a
single online source that claims something along these lines:
http://praveenmatanam.wordpress.com/2007/12/27/convert-firefox-extension-to-xulrunner/
Assembling information from this post, the developer.mozilla.org site
and everywhere else I could find, I tried to port the FireGSS
extension (http://code.google.com/p/firegss/) to a xulrunner app. The
xulrunner shell can be found in:
http://code.google.com/p/firegss/source/browse/#hg/app
However, I can't seem to make it work this way, no matter what I try
and I'm coming to the conclusion that perhaps it can't be done. The
two main issues I'm facing is that the extension UI is not overlayed
in the shell UI and that many things the extension code expects (like
gBrowser/getBrowser for instance) are not readily available. I think I
could solve the latter, but I'm baffled by the former. I've checked
every application mentioned in the XULRunner Hall Of Fame that was
distributed as both an extension and a standalone app and nobody is
reusing the extension in the way I was expecting.
Now, before I give up and go this route myself and suffer the
maintenance nightmare that it may entail, I thought I'd ask here if
perhaps there *are* people out there doing this and I could be pointed
in the right direction.
Thanks in advance,
--
Panagiotis Astithas
http://www.linkedin.com/in/astithas
perhaps a stupid question, but did you try with a browser element
instead of tabbrowser ? (which is not officialy available in Xulrunner
according to https://developer.mozilla.org/En/XUL:tabbrowser )
or maybe with prism ?
followup to mozilla.dev.extensions
> However, I can't seem to make it work this way, no matter what I try
> and I'm coming to the conclusion that perhaps it can't be done. The
> two main issues I'm facing is that the extension UI is not overlayed
> in the shell UI and that many things the extension code expects (like
> gBrowser/getBrowser for instance) are not readily available. I think I
> could solve the latter, but I'm baffled by the former. I've checked
> every application mentioned in the XULRunner Hall Of Fame that was
> distributed as both an extension and a standalone app and nobody is
> reusing the extension in the way I was expecting.
"extension UI is not overlayed in the shell UI". What do you mean, exactly?
The typical extension which can also be a XULRunner application has its own
window and only uses XUL overlays to provide extension points into the
browser such as toolbar items or menu entries. To make this kind of
extension a standalone app you just open the extension window by itself
(using toolkit.defaultChromeURI or a custom command-line handler) and ignore
the browser overlays which are unneeded.
Certainly browser-specific items such as gBrowser aren't going to be
available, since there is no browser to make gBrowser!
> Now, before I give up and go this route myself and suffer the
> maintenance nightmare that it may entail, I thought I'd ask here if
> perhaps there *are* people out there doing this and I could be pointed
> in the right direction.
I know that chatzilla is used as both very simply.
--BDS
Yes, I've seen that too, and tried using a browser instead of
tabbrowser, but still the overlay wouldn't work (the same empty window
would be displayed).
> or maybe with prism ?
I thought Prism was for turning websites into apps. We built this
extension because we needed access to the local system APIs, can you
do that with Prism?
Thanks,
I don't really know, but I hope so, as there is an extension folder in
the prism installation, you could try turning the firefox extension into
a prism extension. I think it's worth a try.