"koext build" corrupting addon?

Posted by nathan on 2012-03-17 08:30

I just released my first addon (finally ran into the limitations of macro's) yesterday and had some problems with koext corrupting the addon, making it impossible for it to launch properly.

I suspect the issue may be with my chrome:// url's but at the same time it also doesn't seem to properly carry over the icon when compiling.

The source of the addon is available here:

https://github.com/Naatan/Komodo-Commando

I was hoping someone could take a look at the install.rdf as well as the file structure and let me know what I'm doing wrong that makes "koext build" create an xpi that doesn't load properly?

Thanks

kalvaro | Sat, 2012-03-17 11:53

I believe that koext does not expect a chrome folder in your sources. Both content and locale should be top level directories. This differs from MDN's Building an extension document.

nathan | Sun, 2012-03-18 09:31

Thanks, I've tried moving the files into the main folder but to no avail.

I've checked other addons and see nothing that could be causing problems for mine.

I've committed the changes I've tried so far here: https://github.com/Naatan/Komodo-Commando/tree/koextfix

Icon still isn't working either, this is very odd.

kalvaro | Mon, 2012-03-19 09:44

Your chrome.manifest doesn't look right. Instead of:

content commando content/

... I think it should be something like:

content commando jar:commando.jar!/content/

... and so on, since stuff in the "commando-1.1-ko.xpi" file is inside "commando.jar".

Whatever, I haven't been able to fix it and it seems that Komodo doesn't log these kind of errors.

Honestly, I'm stuck in my first extension as well so I can be of very little help.

nathan | Mon, 2012-03-19 10:24

Thanks kalvaro, I don't think that's it though. koext generates the jar and should also be the one updating the manifest with the appropriate jar name. I don't use a jar while developing as I don't want to have to recompile each time.

I think that's how it's generally done when developing. For the addons I've checked none of them had the .jar file specified in their manifest (pre-compile).

toddw
ActiveState Staff
Mon, 2012-03-19 13:48

Note that koext will create a .jar file by default, and expects the chrome.manifest to be using the "jar!/" paths, like this:
http://svn.openkomodo.com/openkomodo/view/addons/dbexplorer_mysql/chrome...

You don't have to use a jar though (so it's easier when developing), just pass in a "--unjarred" option to koext koext build --unjarred.

There are also more advanced features for koext, like file pre-processing and dev install... use koext build --help for more details.

Cheers,
Todd

nathan | Tue, 2012-03-20 05:54

Thanks Todd, --unjarred will work just fine for me :)

I'm using the proxy method for developing the addon so using a jar would be a bit tedious, and I see that the devinstall requires you to use a dev version of Komodo, which I'm also not too crazy about, though I suppose I could install a stable and dev versions and launch each with different profiles. For now though, with the limited time I spend actually messing with Komodo, --unjarred does the trick :)