Solutions for distributing HTML5 applications as d

2019-01-12 14:18发布

What are some solutions for distributing an HTML5 based desktop application?

I want to be able to distribute my HTML5 app as a standalone desktop application on Windows, OSX, and Linux. I would like for people to be able to double click my app icon shortcut to run my program.

I don't want the browser window showing at all, just my app. Is this possible?

16条回答
Animai°情兽
2楼-- · 2019-01-12 14:40

If you just need it for Windows, you should consider HTML Applications (HTA), it's been part of Internet Explorer since IE 5 (10+ years).

No server required, full HTML formatting, full access to local resources (even COM / USB ports), awesome. Also, easy to debug with Visual Studio, just bind to MSHTA.exe

You can enable HTML 5 in HTA's with the following meta tag:

<!-- enable html5 features --> 
<meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
查看更多
太酷不给撩
3楼-- · 2019-01-12 14:44

Adobe AIR is meant to let you work primarily in HTML, CSS, and JavaScript while providing a desktop application. (Caveat: I haven't actually used it myself.)

查看更多
Explosion°爆炸
4楼-- · 2019-01-12 14:44

Hmmm... a virtual machine for HTML5/CSS/JS... sounds like a browser. :)

Maybe Adobe AIR would do the trick, because it's based on the idea of bringing rich Internet apps to the desktop. I've never used it, however.

One thing you could do is develop a very basic desktop app that uses some kind of prepackaged web browser control (e.g. if you're developing for a Mac, just drop a WebView in the window and add some basic code to load your html upon app startup).

查看更多
Rolldiameter
5楼-- · 2019-01-12 14:45

A bit late, but you can use a portable version of google chrome, and then create a small windows app to install it, and create a .ink shortcut to its --kiosk and app mode.
Kinda like chrome application shortcuts, but where you install chrome for them.

查看更多
叼着烟拽天下
6楼-- · 2019-01-12 14:46

You can use a embedded server like Tomcat or maybe Apache.

I use tomcat for a complete java web application. Run inside browser, but the application need be installed. The shortcut to start the app, start the service and open the browser.

Or try use webkit

查看更多
smile是对你的礼貌
7楼-- · 2019-01-12 14:49

chrome can do what prism does See -- Tools-> Create application Shortcut

查看更多
登录 后发表回答