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)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: evold, Unassigned)

References

Details

Attachments

(1 file)

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.
Blocks: jpm
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.
(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");
> 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.
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)
(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)
Attached patch A possible fixSplinter Review
Here's a possible fix. Just like what I've done in jpm - wrap the icon URL if it's a relative one.
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.

Attachment

General

Created:
Updated:
Size: