andreasgal/gaia — pull request #161 by vingtetun (2011-12-09 09:50:42+00:00)
Title: Webapps + Appcache manifest for application

Those commits has some cool effects:
- broke the web demo for ever (maybe not but it will require some additional work)

But gaia is still working with a http server that runs a configuration like:
---
LoadModule vhost_alias_module /usr/lib/apache2/modules/mod_vhost_alias.so

Listen 8888

ServerName gaia.org
NameVirtualHost *:8888
UseCanonicalName Off

ServerAlias gaia.org *.gaia.org
VirtualDocumentRoot /var/www/gaia2/apps/%1/

---

So people working on Gaia should move to that as soon as possible and never never again use file://.

Now the cool stuff provided by this patch.

The homescreen uses navigator.mozApps.enumerate (yeah!) and every apps runs inside their own domain: [app].gaia.org and all apps's bug fixes are included in those commits.

Also every applications have a manifest.appcache, so Gaia will still works even if you're offline.
Apps required to be opened once to be stored in the cache obviously.

There is some fixes in the b2g/ dir I need to push in order for this to works correctly.
We also need to integrate fabrice fixes to the install-gaia target to generate a default webapps.json file in the profile (which will be /data/b2g/mozilla/b2g.default by default now).

After that I need to add some shits to install-gaia to to generate a fake OfflineApps/ directory with all the entries for the default apps. This will let us get rid of httpd.js! - but that's a big TODO on my list now.