First, the Environment configuration
Windows system
CNPM Install node
Download Nw.js
Https://github.com/nwjs/nw.js
Find download to download the appropriate version
Second, the development
The project directory is as follows:
Node_modules Storage node module, Package.json is the portal file
Package.json content is
{
"Name": "Nw-app",
"Version": "1.0.0",
"description": "",
"Main": "Index.html",
"Author": "",
"Window": {
"Toolbar": true,
"width": 800,
"Height": 500
}
}
Main defines the main page as index.html
Third, add node module
Win+r
Cmd
To the project directory
CNPM Install FS
CNPM Install Node=xlsx
Node module is added to the Node_module folder
Four, commissioning
Put the project folder into the Nwjs folder
Drag the project folder to Nw.exe to execute the project
Right-select check (that is, debug) after opening the project
Five, packaging
1. Package a zip file in the project folder to ensure that the Package.json is in the root directory
The extracted files should be
2, the modified file suffix is. NW
3. Put the app.nw file in the Nwjs folder, and Nw.exe in the same directory
4, the CD to Nwjs folder execution:
copy/b NW.EXE+APP.NW App.exe
Create a new App.exe
5. Download Enigma Virtual Box
Http://enigmaprotector.com/en/downloads.html
Note that box is not protector.
Installation
6. Run box
Synthetic App.exe added to the main thread with packets
Then drag the separate files and locales folders in the Nwjs into the file,
Finally click on the Execute Packet button
Until App_box.exe generation
The resulting executable file can be forwarded directly to someone else using the
Nw.js development of the first program (HTML Development Desktop program EXE)