Confirmed users
396
edits
(Corrected copy-manifests link) |
m (fix wiki markup) |
||
Line 1: | Line 1: | ||
Some deep changes to Gaia | Some deep changes to Gaia landed last week. | ||
Gaia now | Gaia now uses the Offline Cache mechanism and the Web Apps mechnism to load applications (see {{MDN|Using_Application_Cache}} for more details on Offline Cache and {{MDN|Apps/Apps_JavaScript_API}} for details about the Apps API). | ||
Since every changes the team does lands on the github repository this make the task more complex for external contributors temporarily (should be fixed in the next few weeks). | Since every changes the team does lands on the github repository this make the task more complex for external contributors temporarily (should be fixed in the next few weeks). | ||
Line 7: | Line 7: | ||
In the Gaia root folder you need to run: | In the Gaia root folder you need to run: | ||
make copy-manifests && make offline | |||
This step will generate a profile/ folder in your gaia directory that should contains a webapps/ folder and a OfflineCache/ folder. | This step will generate a profile/ folder in your gaia directory that should contains a webapps/ folder and a OfflineCache/ folder. | ||
Line 17: | Line 17: | ||
Use this profile and now you should have a homescreen full of apps. | Use this profile and now you should have a homescreen full of apps. | ||
--- | ---- | ||
All the content of the applications will be loaded via the offline cache (not from gaiamobile.org) and the platform will check if there are updates on gaiamobile.org via the offline cache manifest. | All the content of the applications will be loaded via the offline cache (not from gaiamobile.org) and the platform will check if there are updates on gaiamobile.org via the offline cache manifest. | ||
Line 25: | Line 25: | ||
So once you are here you have a working homescreen that checks for updates. For now it will check on our demo server gaiamobile.org, which is convenient if you are using something just to try but cmplicate if you want to hack yourself. | So once you are here you have a working homescreen that checks for updates. For now it will check on our demo server gaiamobile.org, which is convenient if you are using something just to try but cmplicate if you want to hack yourself. | ||
So | So if you want to use another server — yours! — there are a few additional steps to do but not so much: | ||
In the Gaia root folder run: | In the Gaia root folder run: | ||
declare -x GAIA_DOMAIN=''yourdomain''.com | |||
make appcache-manifests && make copy-manifests && make offline | |||
Now you have an offline cache database built for your own domain. But there are still some reference to gaiamobile.org in the preferences on the platform (will be fixed) but you can change them via a prefs.js file dropped into the profile/ folder. | Now you have an offline cache database built for your own domain. But there are still some reference to gaiamobile.org in the preferences on the platform (will be fixed) but you can change them via a prefs.js file dropped into the profile/ folder. | ||
The file should be called prefs.js and contains: | The file should be called prefs.js and contains: | ||
pref("dom.sms.whitelist", "file://,http://homescreen.localhost,http://sms.localhost"); | // All the privileges | ||
pref("b2g.privileged.domains", "http://browser.localhost, | |||
pref("dom.mozContacts.whitelist", "http://dialer.localhost,http://sms.localhost"); | http://calculator.localhost, | ||
http://contacts.localhost, | |||
pref("dom.power.whitelist", "http://homescreen.localhost,http://settings.localhost"); | http://camera.localhost, | ||
http://clock.localhost, | |||
http://crystalskull.localhost, | |||
http://cubevid.localhost, | |||
http://dialer.localhost, | |||
http://gallery.localhost, | |||
http://homescreen.localhost, | |||
http://maps.localhost, | |||
http://market.localhost, | |||
http://music.localhost, | |||
http://penguinpop.localhost, | |||
http://settings.localhost, | |||
http://sms.localhost, | |||
http://towerjelly.localhost, | |||
http://video.localhost"); | |||
pref("dom.telephony.app.phone.url", "http://dialer.localhost,http://homescreen.localhost"); | |||
pref("dom.mozScreenWhitelist", "http://homescreen.localhost,http://settings.localhost"); | |||
pref("dom.mozBrowserFramesWhitelist", "http://homescreen.localhost,http://browser.localhost"); | |||
pref("dom.sms.whitelist", "file://,http://homescreen.localhost,http://sms.localhost"); | |||
pref("dom.mozContacts.whitelist", "http://dialer.localhost,http://sms.localhost"); | |||
pref("dom.power.whitelist", "http://homescreen.localhost,http://settings.localhost"); | |||
Replace localhost | Replace ''localhost'' with the name of your domain. | ||
Restart and now you should have a working version of the homescreen that loads from the Offline Cache and check update on your own server! (make sure to have some file on your server that contains at least <html manifest="manifest.appcache"></html>, otherwise your | Restart and now you should have a working version of the homescreen that loads from the Offline Cache and check update on your own server! (make sure to have some file on your server that contains at least <tt><nowiki><html manifest="manifest.appcache"></html></nowiki></tt>, otherwise your offline cache will be evicted and the apps will be gone — will be fixed by {{bug|674728}}. | ||
I plan to put all that in a wiki page on http://wiki.mozilla.org/Gaia soon. This is a 'bit' complicated for the moment because of the changes of last week but think are going to be simplified in the coming weeks. I will keep the wiki page up to date once it has been written. | I plan to put all that in a wiki page on http://wiki.mozilla.org/Gaia soon. This is a 'bit' complicated for the moment because of the changes of last week but think are going to be simplified in the coming weeks. I will keep the wiki page up to date once it has been written. | ||
Vivien. | Vivien. |