开发者

How do you distribute an HTML/Javascript web app?

I've built a web page using HTML and Javascript that acts like a desktop app. I'd like to distri开发者_如何学Gobute it to users in the methods they are most familiar with. For Windows users, I think this is an installable application or a "setup.exe" file.

My app, however, works perfectly in the browser. Specifically it can be opened in a javascript popup.

What is the best way to distribute this web app so that it can simply be "installed" on a windows machine? Maybe I use the open source Inno Setup tool to create a setup that somehow opens the browser. Will I need to write a small app that actually opens the browser?


Best thing about HTML & Javascript apps is that they are OS independent. Sharing the app in a zipped file seems best to me. Why would you want to take extra trouble to make an executable for different OS?

If you are specifically looking to do it that way, you could try out cherrypy & pyinstaller. I had done a small app with them once.


Create an Inno Setup Project and add an entries to the [icon] section for creating start menu and/or desktop shortcuts. Set the filename parameter to the start page of your app (i.e. http://MyDomain.com/index.html) That way, when the user clicks on the shortcut, Windows automatically starts the standard browser and loads your start page.

There are two possible problems with this approach:

  1. If the user has Firefox, Opera or Chrome set as his standard browser, your app will be opened in this browser, not in IE. If your app needs to be cross browser compatible for this to work.

  2. If the user somehow has messed up his filetype association for html (which I once managed to do), the browser and therefore your app will not start at all.


If it will run on the HFS.exe file server, then you could package it with that.

I'm the only guy that really answered this question. Nobody else tells you how to handle the web server that hosts the Javascript app, but I covered it.


Download Visual Studio Express, then build a form with a browser frame (i believe its a standard .net form element) in it, point this browser frame towards the files which are installed along with this program. VS 2008 will build an installer file for you so just add your html and javascript files to the project and then build the distribution using Visual Studio 2008.


Read about AIR technology by Adobe Inc. http://en.wikipedia.org/wiki/Adobe_Integrated_Runtime It's a thing you search.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜