Closed Bug 1118138 Opened 9 years ago Closed 9 years ago

B2G desktop should be able to run non-zipped apps

Categories

(Firefox OS Graveyard :: Runtime, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.2 S4 (23jan)

People

(Reporter: paul, Assigned: fabrice)

References

Details

Attachments

(1 file, 1 obsolete file)

We want to be able to point B2G to a manifest file to run an app as a package app. Today, an app needs to be a zip file (application.zip).

Then, working on an app would not require a build step.
Blocks: graphene
It would also help getting rid of the DEBUG=1 mode in gaia where we involve a local http server to work around this.
Blocks: 1108947
Attached patch patch v1 (obsolete) — Splinter Review
Allow loading webapps from a folder.
But that doesn't work yet for unknown reason.
I used this gaia hack in order to set the magic flag in webapps.json:
  https://github.com/ochameau/gaia/commit/fcaff0b0070061ad9766a4fa80602e2ba8f0ddf8
I see two request correctly resolved to:
  file:///home/alex/gaia/profile/webapps/system.gaiamobile.org/index.html
But then, nothing, no particular error and black screen.
(In reply to Alexandre Poirot [:ochameau] from comment #3)
> I see two request correctly resolved to:
>   file:///home/alex/gaia/profile/webapps/system.gaiamobile.org/index.html
> But then, nothing, no particular error and black screen.

Random guess… don't you hit this:

http://mxr.mozilla.org/mozilla-central/source/netwerk/ipc/NeckoParent.cpp#636
This patch adds support for a --start-manifest command line parameter. When it is present, we use that manifest url as the system app to bootstrap from.

I intentionally didn't make that support desktop specific, though we'll need to add resource preloading for proper device support.
Assignee: nobody → fabrice
Attachment #8545207 - Attachment is obsolete: true
Attachment #8552043 - Flags: review?(21)
Comment on attachment 8552043 [details] [diff] [review]
launch-manifest.patch

Review of attachment 8552043 [details] [diff] [review]:
-----------------------------------------------------------------

::: b2g/chrome/content/shell.js
@@ +224,5 @@
>  
> +  bootstrap: function() {
> +    let startManifestURL =
> +      Cc['@mozilla.org/commandlinehandler/general-startup;1?type=b2gbootstrap']
> +        .getService(Ci.nsISupports).wrappedJSObject.startManifestURL;

This is a pretty ugly line.

::: b2g/components/Bootstraper.jsm
@@ +15,5 @@
> +Cu.import("resource://gre/modules/Webapps.jsm");
> +Cu.import("resource://gre/modules/AppsUtils.jsm");
> +
> +function debug(aMsg) {
> +  dump("-*- Bootstraper: " + aMsg + "\n");

//
Attachment #8552043 - Flags: review?(21) → review+
https://hg.mozilla.org/mozilla-central/rev/c636c1f0e07b
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S4 (23jan)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: