Safa
Safa

Reputation: 107

Packaging node webkit application trouble

I want to package a nodewebkit application for windows. I followed this tutorial https://github.com/nwjs/nw.js/wiki/How-to-package-and-distribute-your-apps#mac-os-x

I got the .exe file, but can't execute it.

Upvotes: 0

Views: 697

Answers (2)

Kuf
Kuf

Reputation: 17828

The exe file alone will not work. You need to add the 'nw.pak' file:

And please note that the nw.pak file must also be in the same directory with the app file, otherwise you would expect blank page for some features.

As well as a few DLLs:

The nw.pak and icudt.dll must be shipped along with nw.exe, the former one contains important javascript lib files, and the latter one is a important network library.

ffmpegsumo.dll are media library, if you want to use and tag, or other media related features, you should ship it.

libEGL.dll and libGLESv2.dll are used for WebGL and GPU acceleration, you had better ship them. And D3DCompiler_43.dll and d3dx9_43.dll as well if you want to make sure WebGL works on more hardware. These 2 files are from DirectX redistributable.

Eventually, It should look something like this: enter image description here

My recommendation is that you won't do it manually. Instead use grunt to build the exe file. To get started, use yeoman and generator-node-webkit for a basic project layout and build script.

Than, making win executable (or mac) is easy as:

grunt dist-mac
grunt dist-win

Upvotes: 0

vivek321
vivek321

Reputation: 199

First, copy app.nw file into folder where nw.exe exists. Then you can try following command in cmd:

path_to_folder_which_contains_nw.exe>copy nw.exe+app.nw app.exe You will get the message "1 file copied" after successful app.exe created. It will create a single executable file but it will not run outside that folder. Then you can use windows installer like iexplore.exe(defualt windows installer) to create installer exe.

Upvotes: 0

Related Questions