I'm working on developing a Firefox add-on using the Add-on SDK
. My extension is working fine when using SDK, but when I create the .xpi
file to add it manually to the browser, it does not show the extension icon.
I tried to change the icon path in the package.json
file, but still it didn't shows the icon.
package.json file:
{...
"icon" : "Phone-icon48.png",
"icon64" : "Phone-icon64.png",
...}
Widget panel used to display icon:
WidgetPackage.Widget({
label: "Phone Dial",
id: "phone_dial",
contentURL: data.url("images/Phone-icon19.png"),
panel: panel_name
});
Can anyone help me resolve the issue?
Thank You.
This may be a persistent bug. This thread reports a similar problem.
Ah - here is the solution. You put your icons in a folder called
data
in the root of your addon's directory and call themas if
they were in root.When I did this then the icons show up in the toolbars. It isn't very clear, but if you piece things together, you might deduce that from here.
A seemingly related issue was closed earlier, yet it happens to me today
A workaround with jpm 1.1.4 and Firefox 48/50:
icon.png
and place it in root dir of addon."icon": ...
entry in package.json (thus no<em:icon>
in install.rdf)According to Addon SDK docs:
So your package.json should look like this: