No icon for addon created using jpm

It seems that I do not see my addon icon when I use jpm . The relevant items in package.json are

 "icon": "icon.png", "icon64": "icon64.png", 

and when I unpack the extension, I see them in install.rdf as

 <em:iconURL>icon.png</em:iconURL> <em:icon64URL>icon64.png</em:icon64URL> 

These are 48x48 and 64x64px png files, respectively.

Both of these files are located in the root directory of the extension. If I read the documents correctly, I don’t even need to specify these names, since they are standard.

I do not see extension icons in Addons-manager. What am I doing wrong?

+5
source share
3 answers

This is a known issue with jpm, and I just updated this bug report, suggesting updating what we can do with it. This is a mystery to me why it does not work as is.

+5
source

this is mistake.

If you are working with jpm 1.0.1, the only way to work is:

 "icon": "resource://@youraddonname/icon.png", 

rename your icon as "icon". I don't know why this works that way.

+3
source

For the new jpm tool jpm you can use the following:

"icon :" "resource://<ADDONID>/data/icon.png"

Note. . In cfx you have id , these are some things like jid1-O1iNqbs7ifwqvA , but in the new jpm tool we don’t have any identifier, instead of name field instead of @jetpack ...

for example, for the old cfx add-ons with id from jid1-O1iNqbs7ifwqvA , we must do this as follows:

 "id": " jid1-O1iNqbs7ifwqvA@jetpack ", "icon": "resource://jid1-O1iNqbs7ifwqvA-at-jetpack/data/icon.png" 

You can also add icons for menu bar , addon page , open menu Menu , as shown below:

 "icons":{ "16":"./data/icon-16.png", "32":"./data/icon-32.png", "64":"./data/icon-64.png", "128":"./data/icon-128.png", "256":"./data/icon-256.png", "512":"./data/icon-512.png" }, 

Useful links:

0
source

Source: https://habr.com/ru/post/1213484/


All Articles