Assume I have a *.xpi file on my local hard disc.
How can I find out if this is an (old) AddOn or a (new) WebExtension?
Of cause NOT by trial and error.
I can imagine that I can rename the *.xpi file to *.zip and find inside some special WebExtension related files?
Which file exactly are AddOn and which WebExtension specific?
Peter
Find out if a *.xpi is an (old) AddOn or (new) WebExtension?
-
- Posts: 299
- Joined: July 29th, 2005, 3:25 am
- tanstaafl
- Moderator
- Posts: 49647
- Joined: July 30th, 2003, 5:06 pm
Re: Find out if a *.xpi is an (old) AddOn or (new) WebExtens
https://bugzilla.mozilla.org/show_bug.cgi?id=1396172 ([meta] Add support for WebExtensions)
My impression is that the current WebExtensions support in Thunderbird 60.4.0 is really for Embedded WebEXtensions. The embedded WebExtension's files are packaged inside the legacy add-on. See https://developer.mozilla.org/en-US/doc ... Extensions . It mentions:
"If the legacy add-on is a bootstrapped extension with an install.rdf, include the property "hasEmbeddedWebExtension" in the RDF, containing the value "true":"
"If the legacy add-on is an SDK add-on, include the key "hasEmbeddedWebExtension" in the package.json, set to true:"
My impression is that unlike Firefox, Thunderbird never supported SDK add-ons.
https://wiki.mozilla.org/Thunderbird/Add-ons_Guide_57 states "Thunderbird 60 does not have WebExtensions support. Going forwards, bug 1396172 will add WebExtension support in Thunderbird beta 63, while maintaining "legacy" add-ons and hybrid add-ons."
According to the version 65 beta release notes Thunderbird 60.5 will be released at the end of January and it will support WebExtensions.
My impression is that the current WebExtensions support in Thunderbird 60.4.0 is really for Embedded WebEXtensions. The embedded WebExtension's files are packaged inside the legacy add-on. See https://developer.mozilla.org/en-US/doc ... Extensions . It mentions:
"If the legacy add-on is a bootstrapped extension with an install.rdf, include the property "hasEmbeddedWebExtension" in the RDF, containing the value "true":"
"If the legacy add-on is an SDK add-on, include the key "hasEmbeddedWebExtension" in the package.json, set to true:"
My impression is that unlike Firefox, Thunderbird never supported SDK add-ons.
https://wiki.mozilla.org/Thunderbird/Add-ons_Guide_57 states "Thunderbird 60 does not have WebExtensions support. Going forwards, bug 1396172 will add WebExtension support in Thunderbird beta 63, while maintaining "legacy" add-ons and hybrid add-ons."
According to the version 65 beta release notes Thunderbird 60.5 will be released at the end of January and it will support WebExtensions.
-
- Posts: 6432
- Joined: February 3rd, 2009, 6:29 pm
Re: Find out if a *.xpi is an (old) AddOn or (new) WebExtens
A legacy extension has a install.rdf file.
A legacy bootstrapped extension has a install.rdf file and a bootstrap.js file.
A web extension has a manifest.json file.
http://thunderbird-webextensions.readth ... egacy.html
A legacy bootstrapped extension has a install.rdf file and a bootstrap.js file.
A web extension has a manifest.json file.
Legacy API in WebExtensionsMozilla Developer wrote:Legacy extensions will not be around forever, and possibly will not even make it to Thunderbird 68.
http://thunderbird-webextensions.readth ... egacy.html
- tanstaafl
- Moderator
- Posts: 49647
- Joined: July 30th, 2003, 5:06 pm
Re: Find out if a *.xpi is an (old) AddOn or (new) WebExtens
In Is there any ETA when Thunderbird 63.0 will be released ? Jörg mentions "I think full themes won't be supported any more. There are WebExtension themes now and they already work, even in TB 60."
That is confusing. Do they have to be part of a hybrid add-on (Embedded WebEXtension) to work?
How do you normally get one since addons.mozilla.org doesn't want to let you download one (even from Firefox) and if I try to install one copied from my Firefox profile Thunderbird claims its corrupt. The chrome web store also doesn't let you download one.
That is confusing. Do they have to be part of a hybrid add-on (Embedded WebEXtension) to work?
How do you normally get one since addons.mozilla.org doesn't want to let you download one (even from Firefox) and if I try to install one copied from my Firefox profile Thunderbird claims its corrupt. The chrome web store also doesn't let you download one.
-
- Posts: 6432
- Joined: February 3rd, 2009, 6:29 pm
Re: Find out if a *.xpi is an (old) AddOn or (new) WebExtens
@tanstaafl
A complete theme has the following line in the install.rdf file.
Install Manifests - type
http://developer.mozilla.org/docs/Archi ... fests#type
I guess a WebExtension theme is the same as a lightweight theme or persona.
WebExtensions theme (see examples)
http://developer.mozilla.org/docs/Mozil ... /API/theme
I couldn't install the Dynamic theme in Thunderbird 60. It appears to be corrupt.
i.e.
Dynamic theme
http://github.com/mdn/webextensions-examples
http://github.com/mdn/webextensions-exa ... amic-theme
I can't get a bare bone WebExtension to install in Thunderbird 60.
I don't know what a hybrid extension means exactly.
A complete theme has the following line in the install.rdf file.
Code: Select all
<em:type>4</em:type>
http://developer.mozilla.org/docs/Archi ... fests#type
I guess a WebExtension theme is the same as a lightweight theme or persona.
WebExtensions theme (see examples)
http://developer.mozilla.org/docs/Mozil ... /API/theme
I couldn't install the Dynamic theme in Thunderbird 60. It appears to be corrupt.
i.e.
Code: Select all
cd webextensions-examples-master\dynamic-theme
zip dynamic.xpi background.js manifest.json moon.jpg sun.jpg
http://github.com/mdn/webextensions-examples
http://github.com/mdn/webextensions-exa ... amic-theme
I can't get a bare bone WebExtension to install in Thunderbird 60.
I don't know what a hybrid extension means exactly.
- tanstaafl
- Moderator
- Posts: 49647
- Joined: July 30th, 2003, 5:06 pm
Re: Find out if a *.xpi is an (old) AddOn or (new) WebExtens
@morat
I tried creating a WebExtension theme by creating a .zip file containing the manifest.json and weta.png file in https://github.com/mdn/webextensions-ex ... /weta_fade , and renaming it to be a *.xpi file but it was rejected by TB 60.4 as corrupt. Ditto when I tried it with Firefox 64. Unfortunately https://github.com/mdn/webextensions-ex ... ster/build didn't have builds of any themes.
It looks like a static WebExtension theme is similar to a persona, but is basically just an WebExtension based extension with a theme key. However, if that is true, then I'd expect it not to work unless I used a beta build.
https://developer.mozilla.org/en-US/doc ... json/theme states:
"If your manifest.json file includes the theme key, the extension is assumed to be a theme and any other WebExtension keys are ignored. If you want to include a theme with an extension, please see the theme API."
I tried creating a WebExtension theme by creating a .zip file containing the manifest.json and weta.png file in https://github.com/mdn/webextensions-ex ... /weta_fade , and renaming it to be a *.xpi file but it was rejected by TB 60.4 as corrupt. Ditto when I tried it with Firefox 64. Unfortunately https://github.com/mdn/webextensions-ex ... ster/build didn't have builds of any themes.
It looks like a static WebExtension theme is similar to a persona, but is basically just an WebExtension based extension with a theme key. However, if that is true, then I'd expect it not to work unless I used a beta build.
https://developer.mozilla.org/en-US/doc ... json/theme states:
"If your manifest.json file includes the theme key, the extension is assumed to be a theme and any other WebExtension keys are ignored. If you want to include a theme with an extension, please see the theme API."
-
- Posts: 6432
- Joined: February 3rd, 2009, 6:29 pm
Re: Find out if a *.xpi is an (old) AddOn or (new) WebExtens
@tanstaafl
I got the weta_fade theme working in Thunderbird 60.
i.e.
weta_fade theme
http://github.com/mdn/webextensions-examples
http://github.com/mdn/webextensions-exa ... /weta_fade
I had to install it as a temporary extension.
Tools > Developer Tools > Debug Addons
[check] Enable addon debugging
Do you need to sign the weta_fade theme to install it normally?
How to submit themes
http://blog.mozilla.org/addons/2018/09/ ... emes-here/
http://addons.thunderbird.net/developers/
I got the weta_fade theme working in Thunderbird 60.
i.e.
Code: Select all
cd webextensions-examples-master\themes\weta_fade
zip weta.xpi manifest.json weta.png
http://github.com/mdn/webextensions-examples
http://github.com/mdn/webextensions-exa ... /weta_fade
I had to install it as a temporary extension.
Tools > Developer Tools > Debug Addons
[check] Enable addon debugging
Do you need to sign the weta_fade theme to install it normally?
How to submit themes
http://blog.mozilla.org/addons/2018/09/ ... emes-here/
http://addons.thunderbird.net/developers/
- Frank Lion
- Posts: 21178
- Joined: April 23rd, 2004, 6:59 pm
- Location: ... The Exorcist....United Kingdom
- Contact:
Re: Find out if a *.xpi is an (old) AddOn or (new) WebExtens
Yep.morat wrote:I guess a WebExtension theme is the same as a lightweight theme or persona.
However, it's possible to turn some types of Complete Theme into webextensions easily enough.
I say that as I made a 'complete theme' for Firefox 57 back in November 2017 and that was still working fine for Firefox 61. Would probably work fine for more recent versions, if I spent time on it....or indeed could even remember if it was already working fine.
For the method to work, the theme author needs to be using the @ overlay theme @ method, as I have been since 2014, and not the traditional replacement theme (as used since 2002) method. However, it is possible. That said, for public complete themes to have any point to them there needs to be a range of them available to users, i.e. not just mine.
So, unlikely it will happen.
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
.