Html HTML5 桌面包装器/框架
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11015811/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
HTML5 Desktop Wrapper/Framework
提问by Adam H
I'm currently mid-way through building a HTML5 application.
我目前正在构建 HTML5 应用程序的中途。
I'd really like to deploy this to desktop and I've looked at solutions such as Sencha but have had no luck (I found Sencha disappointing and frustrating to work with). I'd like cross platform compatibility and ease of deployment but I haven't found anything open-source or commercial that looks like it could do the job effectively.
我真的很想将它部署到桌面,我已经查看了 Sencha 之类的解决方案,但没有运气(我发现 Sencha 令人失望且令人沮丧)。我想要跨平台兼容性和易于部署,但我还没有找到任何看起来可以有效完成工作的开源或商业软件。
Can anyone with some experience suggest a framework which might be suitable for packaging and deploying a HTML5 application on the desktop? An end requirement of this is that it will functional on both Mac OS and Windows - but for now Windows alone is great.
任何有经验的人都可以提出一个可能适合在桌面上打包和部署 HTML5 应用程序的框架吗?这样做的最终要求是它可以在 Mac OS 和 Windows 上运行 - 但现在仅 Windows 就很棒。
I've considered looking into building a C# wrapper which will render the HTML5, but a solution may already exist that I've overlooked.
我已经考虑过构建一个将呈现 HTML5 的 C# 包装器,但可能已经存在一个我忽略的解决方案。
I'd appreciate any responses from someone with experience - the other questions relating to this on the SO don't outline the solution the 'asker' went with.
我很感激有经验的人的任何回答 - 在 SO 上与此相关的其他问题没有概述“提问者”所采用的解决方案。
回答by Motin
Findings after having researched this subject for a couple of weeks:
研究这个主题几周后的发现:
- Node-Webkit- an app runtime based on Chromium (which also powers Google Chrome) 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. It's created and developed in the Intel Open Source Technology Center.
- Adobe AIR- Widely used but with a major vendor dependency and no Linux support
- PHP Desktop- Don't let the name deceive you, PHP Desktop can also act as a packager for pure HTML5/JS applications. It embeds a Chromium browser and a web server. Shipping the PHP interpreter is not required. PHP Desktop is not strongly tied to PHP, it can also act as a packager for any other scripting languages like Perl, Ruby, Python, that provide a CGI interface for executing scripts.
- XULRunner- Benefiting directly on Firefox development efforts, this is an extremely well-maintained solution with great cross platform support but with almost non-existent tooling or documentation for packaging and distribution other than those of Firefox and other open source XULRunner-based applications themselves. UPDATE 2013-06-15: Webapp XUL Wrapperbelow addresses these issues
- Chrome Web Apps- Good option if all you need is a link to your web app from your Chrome home screen
- Chrome Installable Web Apps- Like a Chrome web app with more desktop integration. No flash support.
- Mozilla Open Web Apps- Good option if all you need is a link to your web app from your Firefox home screen
- Mozilla Native Web Apps- Like a Mozilla Open Web App with better desktop integration. Still requires online installation through Firefox Marketplace.
- Flash projector- Worthwhile-to-mention low cost solution for packaging Flash-based apps as standalone desktop apps
- AppJS (Node.js)- Promising project but with little activity
- Bellite Toolkit- a commercial offering that aims for a light weight library footprint at around 1MB, which is 70x to 100x smaller than similar Chromium Embeddedbased frameworks. Multi-process architecture allows using Node, Python, Ruby, PHP or generic executables. (Note On windows requires the use of Modernizr (JS shim) in the app since Bellite's switch from Chrome Frame to use Internet Explorer)
- Webapp XUL Wrapper- A XUL-based wrapper and build scripts for packaging a webapp into distributable bundles for Mac, Windows, and Linux.
- Brackets Shell- An awesome wrapper created by the brackets.io team. Complete with build setup instructions and Grunt build tools. See more here: http://clintberry.com/2013/html5-desktop-apps-with-brackets-shell/
- Atom Shell- A wrapper created by the atom.io team. It is based on node.js and Chromium and is used in the Atom editor.
- Node-Webkit- 基于 Chromium(也支持 Google Chrome)和 node.js 的应用程序运行时。您可以使用 node-webkit 用 HTML 和 JavaScript 编写本机应用程序。它还允许您直接从 DOM 调用 Node.js 模块,并支持使用所有 Web 技术编写本机应用程序的新方法。它是在英特尔开源技术中心创建和开发的。
- Adobe AIR- 广泛使用,但主要依赖供应商且不支持 Linux
- PHP 桌面- 不要让名称欺骗您,PHP 桌面还可以充当纯 HTML5/JS 应用程序的打包器。它嵌入了一个 Chromium 浏览器和一个 Web 服务器。不需要运送 PHP 解释器。PHP Desktop 与 PHP 没有紧密的联系,它还可以充当任何其他脚本语言(如 Perl、Ruby、Python)的打包程序,这些语言为执行脚本提供 CGI 接口。
- XULRunner- 直接受益于 Firefox 开发工作,这是一个维护良好的解决方案,具有强大的跨平台支持,但除了 Firefox 和其他基于 XULRunner 的开源应用程序本身之外,几乎不存在用于打包和分发的工具或文档。更新 2013-06-15:下面的Webapp XUL Wrapper解决了这些问题
- Chrome 网络应用程序- 如果您只需要一个从 Chrome 主屏幕到您的网络应用程序的链接,这是一个不错的选择
- Chrome Installable Web Apps- 类似于具有更多桌面集成的 Chrome 网络应用程序。不支持闪光灯。
- Mozilla Open Web Apps- 如果您只需要从 Firefox 主屏幕链接到您的 Web 应用程序,这是一个不错的选择
- Mozilla Native Web Apps- 类似于具有更好桌面集成的 Mozilla Open Web App。仍然需要通过 Firefox Marketplace 在线安装。
- Flash 投影仪- 值得一提的低成本解决方案,用于将基于 Flash 的应用程序打包为独立的桌面应用程序
- AppJS (Node.js)- 有前途的项目,但活动很少
- Bellite Toolkit- 一种商业产品,旨在实现大约 1MB 的轻量级库占用空间,比类似的基于Chromium Embedded的框架小 70 到 100 倍。多进程架构允许使用 Node、Python、Ruby、PHP 或通用可执行文件。(注意 Windows 需要在应用程序中使用 Modernizr(JS shim),因为 Bellite 从 Chrome Frame 切换到使用 Internet Explorer)
- Webapp XUL Wrapper- 基于 XUL 的包装器和构建脚本,用于将 web 应用程序打包到 Mac、Windows 和 Linux 的可分发包中。
- Brackets Shell- 由rackets.io 团队创建的一个很棒的包装器。完成构建设置说明和 Grunt 构建工具。在此处查看更多信息:http: //clintberry.com/2013/html5-desktop-apps-with-brackets-shell/
- Atom Shell- 由 atom.io 团队创建的包装器。它基于 node.js 和 Chromium,用于 Atom 编辑器。
A detailed overview of the current state of things, and more: http://blog.neamlabs.com/post/36584972328/2012-11-26-web-app-cross-platform-desktop-distribution
当前状态的详细概述等:http: //blog.neamlabs.com/post/36584972328/2012-11-26-web-app-cross-platform-desktop-distribution
Another semi-detailed overview is here: http://clintberry.com/2013/html5-apps-desktop-2013/
另一个半详细概述在这里:http: //clintberry.com/2013/html5-apps-desktop-2013/
No longer active/maintained:
不再活跃/维护:
- WebRunner / Mozilla Prism- XULRunner-based approach to running web sites in an independent browser window. Abandoned three times and currently left to rot with HTML5 support but equivalent to Firefox 3.6
- TideSDK(formerly Titanium Desktop) - Last release in end of 2012 and currently without active maintainers.
- WebRunner / Mozilla Prism- 基于 XULRunner 在独立浏览器窗口中运行网站的方法。弃用 3 次,目前在支持 HTML5 的情况下腐烂,但相当于 Firefox 3.6
- TideSDK(以前的 Titanium Desktop)- 2012 年底的最后一个版本,目前没有活跃的维护者。
回答by user1449536
Did you ever find an answer for this? If so I would love to hear it, because I don't think it exists and I want it desperately.
你有没有找到这个问题的答案?如果是这样,我很乐意听到它,因为我认为它不存在,而且我非常想要它。
Here is what I have encountered while searching for the same thing:
以下是我在搜索相同内容时遇到的情况:
1) Adobe Air: Supports Windows and Mac. Dropped Linux support after version 2.?. Supposedly, if you avoid 3.0 features you can still use the previously distributed LInux version.
1) Adobe Air:支持 Windows 和 Mac。在版本 2.? 之后放弃了对 Linux 的支持。据说,如果您避免使用 3.0 功能,您仍然可以使用以前分发的 LInux 版本。
2) AppJS.org: NodeJS + Chromium. Supports Windows, Linux, and Mac (32 bit only). The lack of 64 bit support kills it for me. They say they are working on it, but I fear that they are just waiting around for Google to add 64 bit Mac support to Chromium. No idea when that will happen.
2) AppJS.org:NodeJS + Chromium。支持 Windows、Linux 和 Mac(仅限 32 位)。缺乏 64 位支持对我来说是致命的。他们说他们正在努力,但我担心他们只是在等待 Google 为 Chromium 添加 64 位 Mac 支持。不知道什么时候会发生。
3) Titanium Desktop: Abandoned by Appcelerator to the desert of open source. Hardly usable right now and no guarantees about future.
3)Titanium Desktop:被Appcelerator抛弃到开源沙漠。现在几乎不可用,也不能保证未来。
3) XULRunner: Sounds promising, but I encountered a build bug on Mac that stopped me cold. I'm going to go try the latest release right now.
3) XULRunner:听起来很有希望,但我在 Mac 上遇到了一个构建错误,这让我很不爽。我现在就去试试最新的版本。
4) Python + Tkinter: Although this is a python solution and not HTML5, this is what I am using right now. Combined with Py2App and Py2Exe, it seems like it might work.
4) Python + Tkinter:虽然这是一个 Python 解决方案而不是 HTML5,但这是我现在正在使用的。结合 Py2App 和 Py2Exe,它似乎可以工作。
Overall, I am extremely frustrated at the state of things right now.
总的来说,我对现在的状况感到非常沮丧。
回答by ellisbben
Chrome's application shortcutswork on Windows and Linux.
Chrome 的应用程序快捷方式适用于 Windows 和 Linux。
That would allow your application to run in its own window and it has the benefit of taking about three seconds to do; it does not, however, meet all your needs.
这将允许您的应用程序在自己的窗口中运行,并且它的好处是大约需要三秒钟;但是,它并不能满足您的所有需求。
回答by Adam H
I decided to use the Awesomium framework (www.awesomium.com).
我决定使用 Awesomium 框架 (www.awesomium.com)。
This allows me to fully utilise the 'web stack' whilst easily deploying a light-weight solution to the client.
这使我能够充分利用“网络堆栈”,同时轻松地向客户端部署轻量级解决方案。