Using the SDK with XUL extensions

106 views
Skip to first unread message

imiaou

unread,
Jan 20, 2011, 5:08:22 AM1/20/11
to mozilla-labs-jetpack
I follow documentation to setup. When I type 'cfx run -t extension' in
SDK, I get 'cfx: error: no such option: -t'.
Anyone know why I get this error?

Nickolay Ponomarev

unread,
Jan 22, 2011, 8:20:27 PM1/22/11
to mozilla-la...@googlegroups.com
The steps described in https://jetpack.mozillalabs.com/sdk/1.0b1/docs/#guide/xul-extensions no longer work.

I have a fork of the SDK here: https://github.com/nickolay/addon-sdk/tree/WIP-xul-extensions

With it you can run a test XUL extension like this:
1) activate the SDK as usual
2) create an empty directory, cd inside it.
3) run cfx init --template xul - this will create an example extension in the current directory
4) test or run the example extension with cfx run/test --templatedir extension

Nickolay

XuluWarrior

unread,
Mar 8, 2011, 9:18:59 AM3/8/11
to mozilla-labs-jetpack
Your fork is very useful, and has allowed me to hack together a
Javascript Shell / Venkman debugging environment for my Jetpack
development.

However, I am concerned that you won't be able to maintain a fork
forever and at some point in the future integrating XUL extensions
with Jetpack code will become impossible or at least very frustrating
again.

Do you know why the --template / --templatedir functionality was
removed from the addon SDK? Is it going to be replaced/supported in
anyway?

Nickolay Ponomarev

unread,
Mar 12, 2011, 11:27:18 AM3/12/11
to mozilla-la...@googlegroups.com, XuluWarrior
Hi,


On Tue, Mar 8, 2011 at 5:18 PM, XuluWarrior <goo...@xuluwarrior.org> wrote:
Your fork is very useful, and has allowed me to hack together a
Javascript Shell / Venkman debugging environment for my Jetpack
development.

However, I am concerned that you won't be able to maintain a fork
forever and at some point in the future integrating XUL extensions
with Jetpack code will become impossible or at least very frustrating
again.

Thanks. Glad to know someone else is interested :)

FWIW, I'm slowly getting my changes into the main tree. I think that once enough people will start using this, the chances of SDK breaking the XUL integration with no-one to fix it will get lower. Keeping it from breaking so far was far from rocket science.
 
Do you know why the --template / --templatedir functionality was
removed from the addon SDK?  Is it going to be replaced/supported in
anyway?
 
It was never removed. IIRC it was renamed once, that's it. The breaking change was that Fx4 / Gecko 2 changed the way XPCOM components are registered in XUL extensions, and no-one updated the SDK code to work in that scenario, since the SDK focuses on creating restartless/bootstrapped addons, which register themselves using a different mechanism.

Nickolay

Nickolay Ponomarev

unread,
Mar 12, 2011, 11:27:45 AM3/12/11
to mozilla-la...@googlegroups.com
On Sun, Jan 23, 2011 at 4:20 AM, Nickolay Ponomarev <asqu...@gmail.com> wrote:
On Thu, Jan 20, 2011 at 1:08 PM, imiaou <imi...@gmail.com> wrote:
I follow documentation to setup. When I type 'cfx run -t extension' in
SDK, I get 'cfx: error: no such option: -t'.
Anyone know why I get this error?

The steps described in https://jetpack.mozillalabs.com/sdk/1.0b1/docs/#guide/xul-extensions no longer work.

I have a fork of the SDK here: https://github.com/nickolay/addon-sdk/tree/WIP-xul-extensions
With it you can run a test XUL extension like this:
1) activate the SDK as usual
2) create an empty directory, cd inside it.
3) run cfx init --template xul - this will create an example extension in the current directory
4) test or run the example extension with cfx run/test --templatedir extension

TiMBuS

unread,
Mar 28, 2011, 5:48:28 AM3/28/11
to mozilla-la...@googlegroups.com, Nickolay Ponomarev
When jetpack was still but a child, I liked to make extensions using jetpack, and loading panels with XUL in them to form the interface. It allowed for easy, nice looking dialogs that fit the theme of firefox, and I didn't have to mess around with any of the grittier parts of XUL that made me choose jetpack in the first place.
But ever since gecko 2 disabled remote XUL, I can't do this anymore.
Needless to say, this sucks.
Is there a way to bring back just the XUL interfaces without having to go through all of these hoops? And if not, why not? Wasnt XUL supposed to be one of the biggest benefits of firefox in the first place?

KWierso

unread,
Mar 28, 2011, 12:49:28 PM3/28/11
to mozilla-labs-jetpack
If this ever lands, it'd help: https://bugzilla.mozilla.org/show_bug.cgi?id=559306
Reply all
Reply to author
Forward
0 new messages