2 Star 13 Fork 6

Solo/WebAppLauncher

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Solo 自解压格式 5472718 6 years ago
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

WebAppLauncher

利用nw.js, 打包html+js编写的Web应用, 使其可在mac/window/linux上双击执行(.exe)

demo

代码中的demo就是将 http://fluttergo.com/PK/demo/index.html 打包为本地桌面应用.

GetStart

  1. 克隆代码
  2. 拷贝你打包的webApp的html,js,css等文件到./package目录下(没有该目录则创建)
  3. 解压nwjs-*.zip到根目录,双击nw.exe启动app

ps :默认窗口大小800*600,可通过修改package.json修改

最终目录架构如下:

1568716220316

原理

nw.js(内部集成有chrome+node.js) + 本地http静态资源服务器,运行html和js

优缺点

优点:打包简单,可选配置自动更新

缺点:打包体积过大.空包80M

补充

针对win平台,可以用zip压缩软件将零散的文件打包成一个自解压格式的exe,

解压后自动运行指定的exe.

具体如下图所示

1568961758665

1568961936999

其他

引用第三方组件

nw.js

http://docs.nwjs.io/en/latest/References/Manifest Format/#window-subfields

server-static

https://github.com/expressjs/serve-static

Empty file

About

一个可以将Web程序打包为桌面应用的工具,支持linux/mac/windows expand collapse
Cancel

Releases

No release

Contributors

All

Activities

can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/geliang/WebAppLauncher.git
git@gitee.com:geliang/WebAppLauncher.git
geliang
WebAppLauncher
WebAppLauncher
master

Search