Problem Building Hello World Extension via BASH / OS X

Talk about add-ons and extension development.
Post Reply
mesh
Posts: 61
Joined: November 28th, 2004, 12:54 pm

Problem Building Hello World Extension via BASH / OS X

Post by mesh »

I am working on buidling my first extension. I have been following the tutorial at:

http://extensions.roachfiend.com/howto.php

and trying to get it to work with the build script at (Im on OS X):

http://kb.mozillazine.org/index.phtml?t ... ild_script

I figured out how to organize the directory, and am just trying to rebuild the HelloWorld extension with the bash build script. Everything seems to work fine, and the resulting xpi files appears to be the same as the original (I uncompressed them and compared the files and directory structure).

Anyways, when I try to install the extension, I get this error:

--
Chrome Registration failed for Extension '{9AA46F4F-4DC7-4c06-97AF-5035170633FE}' when calling nsIXULChromeRegistry::installPackage with this chrome path: jar:file:///Users/mesh/Library/Application%20Support/Firefox/Profiles/rcosibv2.default/extensions/%7B9AA46F4F-4DC7-4c06-97AF-5035170633FE%7D/chrome/helloworld.jar!/content/helloworld/ (profile extension = true). Perhaps this path does not exist within the chrome JAR file, or the contents.rdf file at that location is malformed?
--

I can't figure out what is wrong because the contents.rdf file has not changed, and the xpi structure is the same as the original from the tutorial (which installs fine).

Anyone have any idea on what is going wrong? Or what I should do to debug it?

Again, I am sorry if this is a super simple question. I am new to FireFox extension development, and trying to learn the ropes.

mesh
User avatar
Giorgio Maone
Posts: 3516
Joined: September 21st, 2004, 12:05 am
Location: Palermo - Italy
Contact:

Post by Giorgio Maone »

Did you run diff on the two packages (both in compressed and uncompressed form)?
If you post the XPIs somewhere, I'll be glad to inspect them... :-)
mesh
Posts: 61
Joined: November 28th, 2004, 12:54 pm

Post by mesh »

Thanks...

Here is the original XPI

http://extensions.roachfiend.com/helloworld.xpi

and here is the one I created with the build script:

http://mesh.typepad.com/tmp/helloworld.xpi

One thing I noticed is that the build script is not excluding the .DS_Store files / directories from mac. Would this cause the problem?

mesh
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

Post by Ted Mielczarek »

I think the paths in your zipfile are bogus. If you look at helloworld.jar, it has a leading .\ at the beginning of each path. You need to change the build script from

Code: Select all

find ./content -path './*CVS*' -prune -o -type f -print

To

Code: Select all

find content -path './*CVS*' -prune -o -type f -print


Note the removed ./ in the find command. You should do this for the content skin and locale lines.
User avatar
Giorgio Maone
Posts: 3516
Joined: September 21st, 2004, 12:05 am
Location: Palermo - Italy
Contact:

Post by Giorgio Maone »

Ted is right. It will do the trick.
mesh
Posts: 61
Joined: November 28th, 2004, 12:54 pm

Post by mesh »

Thanks. That did the trick. I also had to do the same for skins and locale.

Ill post an updated version of the file later tonight. I just need to figure out how to get it to exclude the .DS_Store files.

mike chambers

mesh
mesh
Posts: 61
Joined: November 28th, 2004, 12:54 pm

Post by mesh »

fyi

I made a post about setting this up on OS X:

http://mesh.typepad.com/blog/2004/11/bu ... nd_pa.html

mike chambers
Post Reply