* PhoneGap Desktop

Posted on April 20th, 2010 by Dave Johnson. Filed under phonegap.


So if PhoneGap was running on the desktop, what would you call it? Well I have not come up with a good name yet but after a few nights of hacking we threw together a version of PhoneGap for Mac OS http://github.com/shazron/phonegap-mac and a version for Windows http://github.com/davejohnson/phonegap-windows.

@shazron has implemented the sound API on the Mac version and I did Geolocation on the Windows version using a simple GeoIP lookup.

Check it out, write some code, and let us know what you think!

For the Windows version I have used the awesome WebKit .NET project written by Peter Nelson. If you use the Visual Studio 2008 solution file, you will have to download the source or binary versions of WebKit .NET and setup the references correctly. I have so far used the 0.3 release of WebKit .NET. It is pretty cool being able to write a native Windows app (or Mac OS) in Canvas using all free and open source code :)

One other caveat on the Windows side is that you might need to install some Visual Studio C++ redistributables for building it … check the WebKit .NET forum on SourceForge for all the details.

Tags: , ,



8 Responses to “PhoneGap Desktop”

  1. Alexei Says:

    Whohoo! This is cool. You should do a video overview of those.

  2. sam Says:

    Yeah, this is very cool !
    So now, our phonegap ipad applications can also run on a PC or a MAC.
    I was thinking about adapting my phonegap apps to Flex / AIR (evil, I know i know…), beacause Flex also embed webkit.

    But your solution looks really better.
    I will test it when I have free time. DO you know if it’s support client database (sqlite) and all the fancy CSS3 transition ?

  3. Dave Johnson Says:

    @sam I have not checked on SQLite and CSS3 as of yet. I would bet they both do work though … let me know when you find out!

  4. Dave Johnson Says:

    @sam yes CSS transitions appear to work! window.openDatabase is there but is returning null at the moment … would be easy to fix up with PhoneGap though!

  5. pedalpete Says:

    So cool. I was thinking of this just two nights ago for a new project I’m looking at!
    I’ll take a closer look (though it may be a while).

  6. Bill McCoy Says:

    Really cool - I got it to build and run, but only after commenting out line 39 in phonegap.cs (”this.browser.InvokeScript(response);”). WebKit.WebKitBrowser doesn’t appear to have this method, and some googling seemed to indicate external script invocation is MIA from WebKit.NET. So not sure how this could could have possibly compiled, although not being a C# guy nor experienced with webkit I may well be missing something obvious. Of course without this call the “gap:” URLs won’t work, and they are kind of the whole point. Any tips would be much appreciated.

  7. Dave Johnson Says:

    @bill good point… I need to look into the licensing details for WebKit.NET and will include the updated source where I implemented the InvokeScript method!

  8. Bill McCoy Says:

    Just checking back - would love to leverage PG-Desktop esp. if it’s going to get “real”. Feel free to email me the InvokeScript source privately, and/or perhaps I could help investigate the licensing details.

Trackback URI | Comments RSS

Leave a Reply