0

I might be a complete idiot, so please bear with me if I am.

I've been attempting to create an extension for Thunderbird.
I quickly googled for an official documentation and followed it as closely as I could. This way, I ended up with a simple result to test, which would, according to the documentation, work.

So I opened up Thunderbird, nothing.
I closed it again and went to see what I did wrong. However, Thunderbird had completely removed the folder I had.

I did this a few times more with the same result.

This is what my folder setup looked like:

%APPDATA%/Thunderbird/Profiles/[profile name]/extensions/
    foobar@foo.bar/
        install.rdf
        chrome.manifest
        chrome/
            content/
                foobar.xul
                foobar.js
            locale/
        defaults/
            preferences/

The contents of these files were, at my last attempt, literally copy/pasted from the documentation, only with altered filenames(both in code and in actual files), extension ID(both in code and the folder name), and maximum version tag.

What exactly am I missing here?

JeeGee
  • 23
  • 3
  • Are you using a proxy file as advised in https://developer.mozilla.org/en/Setting_up_extension_development_environment ? – Jonathan Protzenko Nov 15 '13 at 12:41
  • Just tried, now it deletes the proxy file instead of the folder. It's a start :) – JeeGee Nov 15 '13 at 16:34
  • I think the page I mentioned has some prefs you can flip so that the extension manager barks at you during startup. – Jonathan Protzenko Nov 15 '13 at 16:40
  • The only thing I could find there were some flags to show more debug information in the error console. Now, the error console tells me that it has been installed, however, it actually doesn't seem to be in any shape or form. There is no other mention about the extension. – JeeGee Nov 15 '13 at 20:35
  • I'm similarly a newbie to this, but my understanding is you're supposed to build your addon elsewhere, package it into a .xpi and then let the addin manager handle it (dragging and dropping the .xpi over it seems adequate to install/update). Looks like you're trying to skip over that and build in place, so I can imagine the addin manager deleting things it doesn't think should be there. – Craig Graham Nov 21 '13 at 15:56

1 Answers1

0

I absolutely agree with using proxy files for addon development. But if you followed the guide mentioned by Jonathan Protzenko, your structure would look more like this:

%APPDATA%\Thunderbird\profiles\[profile name]\extensions\
    foobar@foo.bar

SomeDrive:\path\to\some\place\
    foobar_dev_directory\
        install.rdf
        ...
        chrome\

i.e, the development directory is not located inside your profile. Instead, consider the proxy file

%APPDATA%\Thunderbird\profiles\[profile name]\extensions\foobar@foo.bar
SomeDrive:\path\to\some\place\foobar_dev_directory\

You must only enter the second line, and never forget the trailing \ as mentioned here (3, Note).

Also you should uninstall the addon (if you had one with the same id created and installed before). When you start tb the first time thereafter, you will be asked to allow exernal addons to be installed or something similar.

I got things working this way, hope this helps.

A second guess might be the following: you're obviously working on windows. Are you viewing files always with extension in windows explorer? If not or not sure, check the following:

In Windows Explorer under Organize \ Folder Options \ View deactivate Hide extensions for known file types.

Further, try using a proxy file named differently, especially without the top-level domain. I suspect this could be misinterpreted by windows as an extension. You should call your proxy file thus foobar@foobar.

marc
  • 264
  • 1
  • 2
  • 17