下载nw.js 地址:https://nwjs.io/php
下载Enigma Virtual Box 地址:http://enigmaprotector.com/en/aboutvb.htmlhtml
解压nw.js ,在根目录建立项目文件夹appjson
在app文件夹下建立index.htmlapp
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>demo</title> </head> <body> <script> window.location.href = "http://XXXXXX/public/index.php"; </script> </body> </html>
建立 package.json网站
{ "name": "demo", "version": "1.0.0", "main": "index.html", "window": { "width": 1024, "height": 768, "title": "xtycgl" } }
main是入口文件,也能够是远程网站地址命令行
而后把这两个文件添加到压缩文件 app.zipcode
改后缀zip为nwhtm
把app.nw拖进nw.exe看下效果blog
须要分发运行的话把nw.exe和app.nw打到一块儿ip
命令行:
注意nw.exe在前面打开安装好的Enigma Virtual Box 添加app.exe 和重命名在file里添加nw运行必须的文件dll等和文件夹下的文件。点击右下角process,成功!copy /b nw.exe+app.nw app.exe