Install Google Gears in a XULRunner app in 3 quick steps
As I mentioned in my previous post, I’m now using Google Reader in WebRunner as my main RSS aggregator.
A few days ago, Google released Google Gears – it’s a browser add-on that allows various Web apps to work offline by providing them with ways to store and retrieve information locally. As one of its first implementations, Google Gears allows Google Reader to work offline.
While Google Gears installs and works seamlessly with Google Reader in Firefox, there are a few things that need to be tweaked in order to make it work in WebRunner or any other XulRunner application. The actions below are somewhat Windows specific, but something very similar can be done on any platform.
- Register as a global extension – by default, Google Gears installs itself as a Firefox global extension in Windows registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Firefox\Extensions]
{000a9d1c-beef-4f90-9363-039d445309b8}=C:\\Program Files\\Google\\Google Gears\\Firefox\\
In order to add it to WebRunner we need to add the following key to the registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\WebRunner\Extensions]
{000a9d1c-beef-4f90-9363-039d445309b8}=C:\\Program Files\\Google\\Google Gears\\Firefox\\The exact registry path is different for every XulRunner application, but the basic structure is “HKLM\Software\VENDOR\APP_NAME\Extensions”. In WebRunner case there is no “Vendor”, so it’s just “HKLM\Software\APP_NAME\Extensions”.
- Add WebRunner compatibility to Gears manifest. Locate the Gears extension manifest install.rdf file (typically in C:\Program Files\Google\Google Gears\Firefox), and add the following lines:
<em:targetApplication>
<Description>
<em:id>webrunner@webapps.org</em:id>
<em:minVersion>0.1</em:minVersion>
<em:maxVersion>10.0</em:maxVersion>
</Description>
</em:targetApplication>“webrunner@webapps.org” is the ID of your WebRunner XulRunner application. For other XulRunner apps, you can find out the correct ID in their application.ini file.
- Add Extension Manager support to WebRunner. Locate the main WebRunner application manifest file – application.ini (typically found in C:\Program Files\WebRunner) and add the following lines:
[XRE]
EnableExtensionManager=1
Basically, the first step makes sure that WebRunner detects the extension, the second one makes Gears compatible with WebRunner and the third makes WebRunner load the Google Gears extension. Once you complete these three steps, Google Reader and any other supported Web app will detect and use Google Gears for offline functionality.
August 7th, 2007 at 5:09 pm
I tried to modify your suggestions so that this would work on OS X. Where exactly do you enter
webrunner@webapps.org
0.1
10.0
Into the install.rdf file?
August 7th, 2007 at 5:10 pm
I mean, where do you add the WebRunner compatibility text into the install.rdf file? At the end? The middle?
August 7th, 2007 at 10:35 pm
@Alex – the new ‘targetApplication’ xml tag should be added as a sibling to the existing ‘targetApplication’ tags in the file
August 8th, 2007 at 4:35 pm
This is really great stuff. I think google reader w/ gears in webrunner with a normal icon that shows up in the taskbar, no chrome nubbins, no statusbar, no browser menus etc is the best rss reader by far. Using webrunner also allows the original page links to open in your default browser, so your webrunner instance is not opening new windows/tabs.
September 15th, 2007 at 2:31 am
Can’t a similar procedure be used to enable extension support on WebRunner once and for all? Or just for the Google Reader Notifier extension, so as to provide alerts when there are new feed items available?
September 27th, 2007 at 8:20 pm
[…] Install Google Gears in a XULRunner app in 3 quick steps Installing Google Gears in WebRunner (XULRunner) so that Google Reader (& others) can be used in offline mode (tags: google-reader google-gears webrunner browser configuration) […]
September 29th, 2007 at 10:19 am
unfortunately, the webrunner keeps crashing after i do this.
October 5th, 2007 at 12:53 am
[…] Install Google Gears in a XULRunner app in 3 quick steps things that need to be tweaked in order to make it work in WebRunner or any other XulRunner application: Register as a global extension Add WebRunner compatibility to Gears manifest Add Extension Manager support to WebRunner (tags: googlereader webrunner xulrunner googlegears firefox extension howto) […]
October 12th, 2007 at 9:38 am
I posted an updated version of this hack for WebRunner 0.7 :
http://www.neyric.com/blog/webrunnerxulrunner-and-google-gears
However, I wasn’t able to make it work. Same problem as robert.
October 12th, 2007 at 9:05 pm
[…] listed above. Its not visual, so there shouldn’t be an overlay problem. It is possible to hack support for Gears into WebRunner. The best plan for Gears might be to suggest a patch to the Gears […]
October 16th, 2007 at 9:21 am
WebRunner 0.7 is using Mozilla 1.9 codebase. As you know Mozilla 1.8.1 and 1.9 are using different dll architecture (for instance mozilla 1.9 don’t use xpcom_core.dll). But google gear is still making based on 1.8 codebase for performance issues. by that reason webrunner 0.7 can not use google gears now. when firefox 3(1.9 codebase) open, maybe google gears can support webrunner 0.7. BUT I’m not sure when firefox 3 will be opened.
October 24th, 2007 at 6:08 am
No luck getting fireftp to work in webrunner either. Anyone know if that’s a possibility?
October 30th, 2007 at 3:31 am
[…] found this parts of this bit of magic on Alex Sirota’s website along with the tip to check in the applicaiton.ini file for any […]
December 10th, 2007 at 9:34 am
What is the least XULRunner framework version that supports Google Gears ?.
December 10th, 2007 at 10:07 am
On Windows, i tried to integrate Google Gears Firefox extension
with
XULRunner 1.8.0.9, its not working. but it works fine with XULRunner
1.8.1.3. Is there any patches available to make it work with 1.8.0.9.
Please, could any one shed some light on this.
February 6th, 2008 at 5:54 pm
[…] I get even more excited when I found out that Alex Sirota added Google Gears support on WebRunner. […]
February 8th, 2008 at 2:06 pm
It is installed. But what next?
April 5th, 2008 at 2:23 pm
[…] é o primeiro passo para aplicativos web off-line, o segundo passo foi narrado pelo Mark Finkle; o resultado é bem interessante (via Planet Mozilla) EDIT 200706051718: Um uso mais ‘concreto’ é o do Remember the […]
June 7th, 2008 at 5:21 am
how can i do this on linux?
August 17th, 2008 at 5:53 am
i tried to do this today on Prism 0.9 without success, i dont found the registry key::
[HKEY_LOCAL_MACHINE\SOFTWARE\WebRunner\Extensions]
so i create this:
[HKEY_LOCAL_MACHINE\SOFTWARE\Prism\Extensions]
in the 2 step i put this:
prism@developer.mozilla.org
0.4
1.0.0.*
the 3 step is not necesary,
But i have not success… any ideas?