Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reusing a Firefox extension as a XULRunner app

24 views
Skip to first unread message

Panagiotis Astithas

unread,
Nov 20, 2009, 5:53:26 AM11/20/09
to
Hi all,

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

Pernot Christian

unread,
Nov 20, 2009, 8:26:43 AM11/20/09
to
Le 20.11.2009 11:53, Panagiotis Astithas a �crit :
> Hi all,

> 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.
>

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 ?

Benjamin Smedberg

unread,
Nov 20, 2009, 8:49:43 AM11/20/09
to
On 11/20/09 5:53 AM, Panagiotis Astithas wrote:

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

Panagiotis Astithas

unread,
Nov 21, 2009, 4:42:18 AM11/21/09
to
On Nov 20, 3:26 pm, Pernot Christian <christ...@pingroom.net> wrote:

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,

Pernot Christian

unread,
Nov 23, 2009, 4:08:47 AM11/23/09
to
Le 21.11.2009 10:42, Panagiotis Astithas a �crit :

>> 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?
>

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.

0 new messages