Closed Bug 576767 Opened 14 years ago Closed 14 years ago

Add manifest file entries to extension chrome.manifest, or allow using other manifest files

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Fallen, Assigned: Fallen)

References

Details

Attachments

(1 file)

After bug 568691 was fixed, its not possible for extensions to easily register their components.

To fix this situation, a couple of things are needed. As I've read and heard, the only place extensions can register components, interfaces and categories is in their chrome.manifest.

For binary-component/interfaces this is easy. The attached patch adds the lines to chrome.manifest in case USE_EXTENSION_MANIFEST/BOTH_MANIFESTS is 1.

It looks a bit more tricky for the other directives. Since right now they are supposed to be in separate manifest fiels, which need to be merged with chrome.manifest. Here's a few suggestions on how to solve it:

* Parse $extdir/components/*.manifest:
  - With this solution, we can keep the current solution and add manifests to
    EXTRA_(PP_)?_COMPONENTS.
  - Downside, we have to iterate all files in the components dir

* Merge all manifests with chrome.manifest:
  - Adapt buildlist.py so it can merge multiple lines from stdin into the target
    file.
  - Add an EXTRA_MANIFESTS directive to the build system, which:
    o When USE_EXTENSION_MANIFEST = 1, uses the new buildlist.py to merge
      the manifest file with chrome.manifest
    o Otherwise, just install the manifest to $(FINAL_TARGET)/components


I'm happy to help out here, let me know which of the above solutions is preferable, or maybe even a totally different solution.
Attachment #455869 - Flags: review?(benjamin)
Use jar.mn: see http://mxr.mozilla.org/mozilla-central/source/netwerk/test/httpserver/jar.mn for an example.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Attachment #455869 - Flags: review?(benjamin) → review-
Blocks: 576746
This may work for extension-only scenarios, but for calendar some directories are used shared. For example comm-central/calendar/base is included in Lightning and Sunbird.

For Lightning we would need to add the lines to jar.mn, and for Sunbird, we would need to add the same lines to a manifest file.

Or is chrome.manifest also parsed for components for applications?
Also, for an extension we need to add the binary-components/interfaces lines too, but not for the app. This means we would have to special case with USE_EXTENSION_MANIFEST in each jar.mn file.

I think this should rather be fixed in the build system.
Blocks: 576791
I really think this should be reopened. Lets talk about this, I'll try to get a hold of you at the summit today.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Version: 1.9.2 Branch → Trunk
We talked about this and it seems this will be taken care for. I'd appreciate being CC'd on those bugs, I'll search for them myself if not though :)
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: