remove unused files from the b2g installer xpi

RESOLVED FIXED

Status

Firefox OS
B2gInstaller
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: Jovan Gerodetti, Assigned: Jovan Gerodetti, Mentored)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
We didn't pass the AMO review because the xpi contains unused files.

Please only package files actually used, e.g. just the used font files instead of the whole font folder.
You are welcome to fix this :)
(Assignee)

Comment 2

2 years ago
How can I exclude the unnecessary files? :)
Flags: needinfo?(lissyx+mozillians)
You need to hack in the build, but I cannot help you.
Flags: needinfo?(lissyx+mozillians)
Jovan, you should just follow the documentation at https://developer.mozilla.org/en-US/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/B2G_installer_add-on#Hacking

I know it's painful to depend on patching (even if the patch is trivial) and building m-c, but this is historic (I started working on this at a time where it would have made sense to land the addon as part of webide for example).

You need to play around the moz.build definitions and packaging stuff :)
Flags: needinfo?(titannanomail)
(Assignee)

Comment 5

2 years ago
Created attachment 8758494 [details] [review]
TitanNano:master > mozilla-b2g:master
Flags: needinfo?(titannanomail)
Attachment #8758494 - Flags: review?(lissyx+mozillians)
left a comment on github
Flags: needinfo?(titannanomail)
Attachment #8758494 - Flags: review?(lissyx+mozillians)
Assignee: nobody → titannanomail
(Assignee)

Comment 7

2 years ago
> % content/subprocess_worker_unix.js (subprocess_worker_unix.js) abi=Linux_x86-gcc3
> % content/subprocess_worker_unix.js (subprocess_worker_unix.js) abi=Linux_x86_64-gcc3
> % content/subprocess_worker_unix.js (subprocess_worker_unix.js) abi=Darwin_x86_64-gcc3

this doesn't work, the file doesn't get added to the package. How is this supposed to work?
Flags: needinfo?(titannanomail) → needinfo?(lissyx+mozillians)
Well I remember reading this in some documentation. And now, I cannot find any trace of this?
Flags: needinfo?(lissyx+mozillians)
(Assignee)

Comment 10

2 years ago
I played around with different configs and I had to discover that all the % rules have zero impact on the packaging process, also 

> % content/linux/        (linux/*)	abi=Linux_x86-gcc3
> % content/linux64/      (linux64/*)	abi=Linux_x86_64-gcc3
> % content/mac64/        (mac64/*)	abi=Darwin_x86_64-gcc3

could be removed. The only thing this lines are causing are warnings at start up that firefox will ignore these lines in the chrome.manifest.
So I think we should just use my current patch.
Flags: needinfo?(titannanomail) → needinfo?(lissyx+mozillians)
Jovan, according to comment 9 this should work. We need to check why it is not the case: only for XPCOM binary components ? misdocumentation ? broken feature ?
Flags: needinfo?(lissyx+mozillians) → needinfo?(titannanomail)
(Assignee)

Comment 12

2 years ago
the link you posted in Comment 9 only talks about content REGISTRATION. I can't find anything about the actual packaging of the xpi, so I guess it works as intended?
Mentor: lissyx+mozillians
Flags: needinfo?(titannanomail) → needinfo?(lissyx+mozillians)
Well then we need to do preprocessing ?
Flags: needinfo?(lissyx+mozillians)
(Assignee)

Comment 14

2 years ago
Alexandre, are you going to merge this?
Flags: needinfo?(lissyx+mozillians)
Sure, as soon as you flag me for review and it's good to go. I don't know if you have any other pending change :)
Flags: needinfo?(lissyx+mozillians)
(Assignee)

Comment 16

2 years ago
Comment on attachment 8758494 [details] [review]
TitanNano:master > mozilla-b2g:master

as we talked on IRC, we need to place the logic for the worker file in moz.build, so we should use this patch.
Attachment #8758494 - Flags: review?(lissyx+mozillians)
Attachment #8758494 - Flags: review?(lissyx+mozillians) → review+
https://github.com/mozilla-b2g/b2g-installer/commit/519961ff19b5f8016bf5a9e14f1fa527ba05e0b7
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.