Re: Thunderbird extension. Need some help - Mozilla

This is a discussion on Re: Thunderbird extension. Need some help - Mozilla ; > If you are able to make a executable that implements the protocol, you > can easily put that exec into the xpi and execute it from a thunderbird > extension (javascript). Perhaps you could explain a little more... The ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Re: Thunderbird extension. Need some help

  1. Re: Thunderbird extension. Need some help

    > If you are able to make a executable that implements the protocol, you
    > can easily put that exec into the xpi and execute it from a thunderbird
    > extension (javascript). Perhaps you could explain a little more...


    The implementation of the protocol is a daemon that runs on Linux. Its
    installation would have to be performed by the user himself. The
    daemon also has an API with functions for things like sending and
    receiving files.

    So I need to find out a couple of things before starting with my project:
    1. How to send commands to Cygwin (and Linux terminal) from Javascript
    to start the daemon.
    2. How to use the C++ libraries that come with the daemon. I assume I
    need XPCOM for that, but as I mentioned before I can't find a way to
    put XPCOM components in XPInstall package to install the extension
    automatically.

    Maybe these things are not difficult to do, but I'm only a beginner in
    making Mozilla extensions and never used javascript for anything else
    but websites.

  2. Re: Thunderbird extension. Need some help

    Valdas Japertas wrote:


    >
    > So I need to find out a couple of things before starting with my project:
    > 1. How to send commands to Cygwin (and Linux terminal) from Javascript
    > to start the daemon.


    http://developer.mozilla.org/en/docs...g_applications
    Note that you can't access stdin/stdout/stderr from the process once you
    start it; you can only approximate that by having it write to a file and
    then reading from the file afterwards.

    > 2. How to use the C++ libraries that come with the daemon. I assume I
    > need XPCOM for that, but as I mentioned before I can't find a way to
    > put XPCOM components in XPInstall package to install the extension
    > automatically.

    http://developer.mozilla.org/en/docs/Bundles
    - for install.rdf using extensions
    http://developer.mozilla.org/en/docs...ion_Components
    - if you need to load shared libraries in your XPCOM component,
    instead of compiling it into the same library (dll/so) as your XPCOM
    component via a static library.
    >
    > Maybe these things are not difficult to do, but I'm only a beginner in
    > making Mozilla extensions and never used javascript for anything else
    > but websites.


    That's what this group is for, isn't it?

    HTH,
    --
    Mook
    mook dot moz plus stuff at gmail dot stuff

  3. Re: Thunderbird extension. Need some help

    Hi,

    first of all thanks for the answer.

    > > <...> I can't find a way to put XPCOM components in XPInstall package to install the
    > > extension automatically.

    > http://developer.mozilla.org/en/docs/Bundles
    > - for install.rdf using extensions


    I read this article over and over again and finally I realized what I
    was doing wrong.

    So here's a tip for the people who will face similar problems in the
    future. This is what you have to do to include XPCOM components in
    your XPI packages:

    1. Put the .so (or .dll - depending on the platform) and .xpt files in
    the /components folder
    2. Add the following line in chrome.manifest:
    components _NAME_OF_YOUR_EXTENSION_ components/

    Problems with simple solutions seem to cause the biggest headaches...

  4. Re: Thunderbird extension. Need some help

    Valdas Japertas wrote:
    > Hi,
    >
    > first of all thanks for the answer.
    >
    >> > <...> I can't find a way to put XPCOM components in XPInstall

    >> package to install the
    >> > extension automatically.

    >> http://developer.mozilla.org/en/docs/Bundles
    >> - for install.rdf using extensions

    >
    > I read this article over and over again and finally I realized what I
    > was doing wrong.
    >
    > So here's a tip for the people who will face similar problems in the
    > future. This is what you have to do to include XPCOM components in
    > your XPI packages:
    >
    > 1. Put the .so (or .dll - depending on the platform) and .xpt files in
    > the /components folder
    > 2. Add the following line in chrome.manifest:
    > components _NAME_OF_YOUR_EXTENSION_ components/
    >
    > Problems with simple solutions seem to cause the biggest headaches...


    Hmm, I've never needed that. In fact, I've tested binary components by
    dumping them into existing extensions without any, then forcing
    registration by killing compreg.dat...

    Were you trying to change an extension that previously had no binary
    components, by dropping it in the installed directory? In that case you
    should delete compreg.dat (in profile folder; on Windows, in Local
    Settings\...) to see changes.

    --
    Mook
    mook dot moz plus stuff at gmail dot stuff

  5. Re: Thunderbird extension. Need some help

    On Mar 29, 10:14 pm, Mook
    wrote:
    > Valdas Japertas wrote:
    > > Hi,

    >
    > > first of all thanks for the answer.

    >
    > >> > <...> I can't find a way to put XPCOM components in XPInstall
    > >> package to install the
    > >> > extension automatically.
    > >>http://developer.mozilla.org/en/docs/Bundles
    > >> - for install.rdf using extensions

    >
    > > I read this article over and over again and finally I realized what I
    > > was doing wrong.

    >
    > > So here's a tip for the people who will face similar problems in the
    > > future. This is what you have to do to include XPCOM components in
    > > your XPI packages:

    >
    > > 1. Put the .so (or .dll - depending on the platform) and .xpt files in
    > > the /components folder
    > > 2. Add the following line in chrome.manifest:
    > > components _NAME_OF_YOUR_EXTENSION_ components/

    >
    > > Problems with simple solutions seem to cause the biggest headaches...

    >
    > Hmm, I've never needed that. In fact, I've tested binary components by
    > dumping them into existing extensions without any, then forcing
    > registration by killing compreg.dat...
    >
    > Were you trying to change an extension that previously had no binary
    > components, by dropping it in the installed directory? In that case you
    > should delete compreg.dat (in profile folder; on Windows, in Local
    > Settings\...) to see changes.
    >
    > --
    > Mook
    > mook dot moz plus stuff at gmail dot stuff


    you may some times need to have a look at the code of a firefox
    extension which I resently relased.

    http://wso2.org/repos/wso2/trunk/wsf/javascript/xpi/

    -danr


+ Reply to Thread