Wednesday, 30 July 2008

Silverlight Desktop Application Launcher

So I’ve done my first (very rough version) of my Silverlight Launcher.

This application allows you to run any silverlight application locally on your desktop.

You can download the application from my skydrive

The difference between this application (and running under the file system) is that you can make network calls. I’ve include a Digg Sample to prove my point.

At the moment the application is restricted port 1234 however I will expand this in the future. I will also talk about the source etc in the future.

If your silverlight application needs to talk back to your web server (then you should use an absolute http reference for your WCF call in your silverlight application, and have clientaccesspolicy.xml or crossdomain.xml server).

Usage

SilverlightLauncher.exe mysilverlightapplication.xap

You can download the application from my skydrive

In my sample application try searching for Apple i haven't put any exception handling

I’m gonna be taking this application a lot further in the future

P.S. If you run in Vista you need to run this as an administrator (in future i will do the prompt)

7 comments:

Mark Monster said...

A very interesting article. Are you thinking about support for calling Javascript of some kind? Maybe a builtin proxy server is nice idea! Sounds very interesting, can you explain more about the inner workings?

Keep up the good work!

chrishayuk said...

Heya Mark,

Thanks for the comments.

I will post up the source (and talk about it). It is really crude. However I'm really wanting to start the conversation and people with longer attention spans than me will hopefully go off and build cooler things based on the concepts.

However I do plan to expand it in time :)

冷血儿 said...

Looks like a local web server?

chrishayuk said...

It is a very very small cutdown local web server which serves up the Silverlight Page and then shuts down.

This then allows Silverlight to believe that it is a website giving your application full access to the browser networking stack etc.

Hannes Preishuber said...

realy cool, you are smart guy. That is/was a wish from me (see my blog weblogs.asp.net/hpreishuber) as missing feature.

Echtelion said...

Interesting, but it may be more simple to load a simple webserver, and launch/generate a html page ?
Here is a sample with TINY, a light webserver :

START C:\TINY.EXE C:\Inetpub\wwwroot 2048 127.0.0.1
START "C:\Program Files\Internet Explorer\iexplore.exe" http://localhost:2048/

where C:\Inetpub\wwwroot contains a index.html file including the silverlight app.
This make easier the support of javascript.

Sameer C Thiruthikad said...

We have developed a tool named Desklighter that can convert a Silverlight XAP file into a windows exe. Read more about it at http://blendables.com/labs/Desklighter/Default.aspx

Also see this post (http://ctlabs.blogspot.com/2008/09/desklighter-carry-light-along.html) for more details