extension reload

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

extension reload

o.marce91
Hi there
a dummy question for rare who still develop Tb extension.

How to easily reload extension once modified ?
During development process, it is necessary to uninstall/install extension a huge number of times. Any other method ?

Thanks
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: extension reload

dillinger-2
On 08/14/2018 04:32 PM, [hidden email] wrote:

> Hi there
> a dummy question for rare who still develop Tb extension.
>
> How to easily reload extension once modified ?
> During development process, it is necessary to uninstall/install extension a huge number of times. Any other method ?
>
> Thanks
>

Check
https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Setting_up_extension_development_environment

Look for "Firefox extension proxy file", at about two thirds of the
page, it works the same for Thunderbird.

Edit your extension, restart Thunderbird and the new version will be loaded.
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: extension reload

Jörg Knobloch
On 15/08/2018 23:20, dillinger wrote:
> Check
> https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Setting_up_extension_development_environment 
>
>
> Look for "Firefox extension proxy file", at about two thirds of the
> page, it works the same for Thunderbird.
>
> Edit your extension, restart Thunderbird and the new version will be
> loaded.

Have you tried this recently?

I think it doesn't work any more unless you change the RDF file(?), see:

https://bugzilla.mozilla.org/show_bug.cgi?id=1389189#c4
https://bugzilla.mozilla.org/show_bug.cgi?id=1389741

Jörg.

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: extension reload

o.marce91
Thanks dillinger and Jörg

Indeed, what I want is to *not* restart neither Tb nor reload the addon during development process. I don't know if there is a better way through online debugger or something else, anyway I setup a skeleton addon that loads modules each time that it is enabled.

See explanation below.

Regards

This is a skeleton to ease the development process of add-on:
 no more need to uninstall/install new version at each new version, only unactivate/activate (i.e. 2 clicks rather than uninstall/file chooser/wait for installation)

The bootstrap (re)loads the module.js at each startup.

To do that you need :

1) Create a bootstrap.js (this file) that loads (mozIJSSubScriptLoader object) the module that you want to develop (create at least an empty file)

2) Add to your chrome.manifest the declaration of location of your modules, for example :
resource mymodules mymodules/
to access files located under <addon_directory_installation>/mymodules/ with "resource://mymodules/" URL

3) Set <em:unpack>true</em:unpack> option in install.rdf file

4) Install and activate your addon

5) Access to <your_profile_directory>/extensions/<addon_name>/modules/ and edit your module.js file

6) To get changes taken into account, simply unactivate/activate the addon.

Et voilà

Note that it is said possible to do the same with Components.utils.import()/unload() but I never successed with.  https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.unload
Le jeudi 16 août 2018 08:56:10 UTC+2, Jörg Knobloch a écrit :

> On 15/08/2018 23:20, dillinger wrote:
> > Check
> > https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Setting_up_extension_development_environment 
> >
> >
> > Look for "Firefox extension proxy file", at about two thirds of the
> > page, it works the same for Thunderbird.
> >
> > Edit your extension, restart Thunderbird and the new version will be
> > loaded.
>
> Have you tried this recently?
>
> I think it doesn't work any more unless you change the RDF file(?), see:
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=1389189#c4
> https://bugzilla.mozilla.org/show_bug.cgi?id=1389741
>
> Jörg.

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: extension reload

dillinger-2
In reply to this post by Jörg Knobloch
On 8/16/18 8:47 AM, Jörg Knobloch wrote:

> On 15/08/2018 23:20, dillinger wrote:
>> Check
>> https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Setting_up_extension_development_environment 
>>
>>
>> Look for "Firefox extension proxy file", at about two thirds of the
>> page, it works the same for Thunderbird.
>>
>> Edit your extension, restart Thunderbird and the new version will be
>> loaded.
>
> Have you tried this recently?
>
> I think it doesn't work any more unless you change the RDF file(?), see:
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=1389189#c4
> https://bugzilla.mozilla.org/show_bug.cgi?id=1389741
>
> Jörg.
>

I'm still using it, maintaining an extension works on TB60.
Installing is a bit trickier, you may have revert to TB52 to install
your extension.
On TB63 it doesn't work at all.

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird