Closed Bug 904105 Opened 11 years ago Closed 11 years ago

Build a minimal firefox addon to build gaia without any dependency other than firefox and this addon

Categories

(Firefox OS Graveyard :: Gaia, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ochameau, Assigned: yurenju)

References

Details

Attachments

(3 files, 2 obsolete files)

In the process of simplifying hacking on gaia, getting rid of command line dependency would ease contributing to gaia and especially on windows.
We target using mostly javascript for the build system in order to support node and firefox as runtime.
As most of the build system currently runs in xpcshell, it is really easy to craft such addon, that take a Gaia folder, build a profile with preferences, settings and apps being preinstalled and then run another firefox instance with a custom gaia build.
Attached file Pull request 11487 (obsolete) (deleted) —
Do you think gaia repo is a good place for this code/addon?
Attachment #789020 - Flags: feedback?(timdream)
Attached file The addon (deleted) —
Here is a build of the addon.
Take a recent nightly,
install the addon,
checkout gaia (you need a branch with settings.js - https://github.com/mozilla-b2g/gaia/pull/11486),
in firefox, open "about:gaia",
select the gaia folder,
click on launch!

That will open another firefox instance with a custom profile and automatically open gaia with devtools.
Comment on attachment 789020 [details]
Pull request 11487

I think it make sense to merge this tool in Gaia first, and make changes on top of it toward our goal.

Eventually Gaia itself should be split up into repos and we could figure out where our code should go at that time.
Attachment #789020 - Flags: feedback?(timdream) → feedback+
steal.
Assignee: nobody → yurenju.mozilla
Attached patch wip0903.patch (obsolete) (deleted) — Splinter Review
WIP here. I used addons-sdk to get require function for CommonJS pattern.
It'd be great if we could extend this to include localizations, creating the right languages.json, and picking up files from local clones of gaia-l10n.
I'll re-write multilocale.py to javascript :-D
but for localization I'll file another bug because we should have a minimal firefox addon first and finish all work for build system step by step.
it works again on mac ;-)

https://github.com/yurenju/gaia/tree/mod2arg-xpcshell
Attachment #789020 - Attachment is obsolete: true
Attachment #798784 - Attachment is obsolete: true
Attachment #803640 - Flags: review?(timdream)
Attachment #803640 - Flags: review?(timdream) → review+
What are the next steps here? Anxiously waiting...
Axel, There were some bugs for homescreen with this commit but I fixed it yesterday, I'll try to land it this week.
create a firefox extension for building gaia. you can follow instructions to use this extension:
    
1. cd <GAIA_DIR>/tools/extensions/gaia-build@gaiamobile.org
2. FIREFOX="<FIREFOX_BIN_PATH>" make run
3. go to tools -> addons and enable gaia-build extension (default is disable)
4. go to url: about:gaia
5. select your gaia dir and click launch gaia

another firefox window will be opened and running gaia.
Attachment #809686 - Flags: review?(timdream)
Attachment #809686 - Flags: review?(timdream) → review+
Merged.

https://github.com/mozilla-b2g/gaia/commit/6cbd94adaed55cff808503a93943c1cb88b6e266
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
always got red state on travis-ci, backouted this commit first.

https://github.com/mozilla-b2g/gaia/commit/13ca705debed41b19cb170e5820a43ea55096225
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
seems red state is caused by bug 850430, I'll land this commit if I got green state again.
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Attachment mime type: text/plain → text/x-github-pull-request
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: