Closed
Bug 1141839
Opened 10 years ago
Closed 7 years ago
install.rdf should support relative uris for iconURL and icon64URL
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: evold, Unassigned)
References
Details
Attachments
(1 file)
983 bytes,
patch
|
Details | Diff | Splinter Review |
At the moment it appears that the iconURL only supports absolute paths and the default path:
https://dxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/internal/XPIProvider.jsm#6710-6719
we should also support relative paths.
Comment 1•10 years ago
|
||
I did a bit of searching and came across a comment in XPIProvider.jsm, which claims that using a relative URL causes issues on Windows:
https://dxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/internal/XPIProvider.jsm#5206-5210
That seems like an odd claim seeing as a direct reference to "icon.png" is OK in the code referenced by evold. Further research is needed.
The release of Firefox 38 and therefore the adoption of jpm is getting really close now, but the last comment here was over a month ago. TBH this seems a much too important and ridiculously easily solved bug to go unfixed when the release happens. How is progress on this going? I'd really rather not keep redundant copies of my icon files in the root of my addon when I use the same files from the data dir for notifications and such too.
Reporter | ||
Comment 3•10 years ago
|
||
(In reply to marnick.leau from comment #2)
> The release of Firefox 38 and therefore the adoption of jpm is getting
> really close now, but the last comment here was over a month ago. TBH this
> seems a much too important and ridiculously easily solved bug to go unfixed
> when the release happens. How is progress on this going? I'd really rather
> not keep redundant copies of my icon files in the root of my addon when I
> use the same files from the data dir for notifications and such too.
As a workaround I would suggest using the default icon locations and getting that location with this little hack:
var iconURL = require.resolve("package.json").replace(/package\.json$/, "icon.png");
Comment 4•9 years ago
|
||
> I did a bit of searching and came across a comment in XPIProvider.jsm, which claims that using a relative URL causes issues on Windows:
I guess Daniel Jost is talking about this comment?
https://dxr.mozilla.org/mozilla-central/rev/91100de4f2ad/toolkit/mozapps/extensions/internal/XPIProvider.jsm#5206-5210
This comment comes from bug568480. That bug does not look like a relative path issue for me.
Comment 5•9 years ago
|
||
Pinging Mossop, he might know more. If someone were to take this on do you think we could find a way to finally fix this?
Flags: needinfo?(dtownsend)
Comment 6•9 years ago
|
||
(In reply to Johann Hofmann [:johannh] from comment #5)
> Pinging Mossop, he might know more. If someone were to take this on do you
> think we could find a way to finally fix this?
Yes that comment is talking about bug 568480, it only applies to the icon used before the add-on is finally installed.
Flags: needinfo?(dtownsend)
Comment 7•9 years ago
|
||
Here's a possible fix. Just like what I've done in jpm - wrap the icon URL if it's a relative one.
Comment 8•7 years ago
|
||
We no longer support install.rdf
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•