LeeTee
LeeTee

Reputation: 6601

nw-builder - usage instructions

I am using Node Webkit to create desktop app. I now need to create a single executable file so have installed the following: https://github.com/nwjs/nw-builder

I am struggling understanding the instructions, especially the command line stuff. The documentation states the below:

Usage: nwbuild [options] [path]

Options: -p, --platforms Platforms to build, comma-sperated, can be: win32,win64,osx32,osx64,linux32,linux64 ['osx32', 'osx64', 'win32', 'win64'] -v, --version The nw version, eg. 0.8.4
[default: "latest"] -r, --run Runs NW.js for the current platform [default: false] -o, --buildDir The build folder [default: "./build"] -f, --forceDownload Force download of NW.js
[default: false] --cacheDir The cache folder --quiet
Disables logging
[default: false]

I have two folders, one containing the app files and the package.json, the other folder containing all the NW files. I have also created a third folder that merges the these two folders and where I have changed the .zip file of the app to a .nw file.

Where do I run the buildDir command from?

and what would the exact command be? I have tried the below commands:

nwbuild -o build

nwbuild --buildDir /build

nwbuild -o, --buildDir /build

but all come back showing the above usage info and none of the folders contain a /build/ folder

Can anyone please help? Many thanks

Upvotes: 4

Views: 4538

Answers (1)

Aurora0001
Aurora0001

Reputation: 13547

You don't need to set the buildDir, just pass in the path like this:

nwbuild -p win64 <PATH TO APP FILES>

The options are all optional, so you don't need to set any if you don't want. You can change the build platform that I set in the example if you prefer.

Upvotes: 7

Related Questions