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条回答
▲ chillily
2楼-- · 2019-01-12 14:52

HTML5 Apps in 2014

Frames by chrome/webkit

  • Electron (former Atom Shell)

    Electron is an open source library developed by GitHub for building cross-platform desktop applications with HTML, CSS, and JavaScript. Electron accomplishes this by combining Chromium and Node.js into a single runtime and apps can be packaged for Mac, Windows, and Linux. (source)

    The folks at github use this to provide their code editor Atom as an app. It has an documented api and a help channel on the official atom forums.

  • Node-Webkit, the most minimal approach

    node-webkit is an app runtime based on Chromium and node.js. You can write native apps in HTML and JavaScript with node-webkit. It also lets you call Node.js modules directly from the DOM and enables a new way of writing native applications with all Web technologies.

    Intel is behind this (?). I've been told it's very rough around the edges.

  • Brackets Shell, the sandbox of Adobes code editor (and base of Adobe Edge)

    Note: The brackets-shell is only maintained for use by the Brackets project. Although some people have definitely had success using it as an app shell for other projects, we don't provide any official support for that and we haven't done a ton of work to make the app shell easily reusable. Many people will likely find it easier to use a project like node-webkit, which is more generic by design.

    says the readme, but there are quite a lot of folks out there who did it nevertheless.

Frameworks + Tools

  • Adobe AIR, as another answers suggested.

    The Adobe® AIR® runtime enables developers to package the same code into native apps for Windows and Mac OS desktops as well as iPhone, iPad, Kindle Fire, Nook Tablet, and other Android™ devices, reaching the mobile app stores for over 500 million devices.

  • Sencha is a company which sells tools for app developers, including html5 app development and distribution.

Inactive approaches

查看更多
我想做一个坏孩纸
3楼-- · 2019-01-12 14:53
Juvenile、少年°
5楼-- · 2019-01-12 15:00

Currently the answer is that are different solutions of each platform.

  • For MAC OSX You will create a Cocoa Desktop App with a UIWebView
  • For Windows you will make a .NET desktop app with a browser component.
查看更多
女痞
6楼-- · 2019-01-12 15:01

You can try Phonegap, there is a Windows Desktop Port: https://github.com/davejohnson/phonegap-windows

I tried the mac-port, it worked well. I didn't try the windows version yet.

查看更多
Lonely孤独者°
7楼-- · 2019-01-12 15:02

You might want to look at XULRunner from Mozilla. At a 10000 foot level, the FireFox browser is a XULRunner application (obviously a very sophisticated one, but...). But XULRunner lets you use Javascript and XML to create applications, and the browser window is one of those components, so you once you get your basic window up, you can likely do pretty much anything you want.

Also, depending on the sophistication of your application, there are several "widget" frameworks (like Dashboard on the Mac, Yahoo Widgets, Windows Gadgets) which are basically HTML runtimes as well.

查看更多
登录 后发表回答