10

I assumed Node Webkit would make it simple to package up and add to Windows as a single executable file, however it seems it doesn't and they recommend using https://github.com/evshiron/nwjs-builder

So I installed nw-builder and managed to get a build folder containing all the files needed and the .exe file.

What next? There are no other clear instructions on that page! How is this then installed onto windows?

Can anyone help direct me to or provide simple step by step instructions for dummies? I find all this really confusing.

please help, thanks :)

hygull
  • 8,464
  • 2
  • 43
  • 52
LeeTee
  • 6,401
  • 16
  • 79
  • 139
  • Are you try run `nwbuild` command in project dir? And do you have `build` folder after this? – Stan Kondrat Aug 03 '16 at 01:09
  • by project dir do you mean the app folder? If so, yes I have run the command form in there and get no build folder. – LeeTee Aug 10 '16 at 15:37

1 Answers1

6
  1. Zip up your entire application directory package.json should be in the root of the zip file.

  2. Rename the zip to app.nw

  3. Run this command from the command line copy /b nw.exe+app.nw app.exe

Please note that you must distribute the file nw.pak alongside with your newly created app.exe

This is a NullSoft Installer script you can use to package and distribute your app:

Name "App-name"
OutFile "app-installer.exe"
Requestexecutionlevel user

InstallDir $PROGRAMFILES\app-name

Page instfiles

Section "instfiles"

    SetOutPath $INSTDIR
    File "app.exe"
    File "nw.pak"
    File "icudtl.dat"


    WriteUninstaller $INSTDIR\Uninstall.exe
    CreateDirectory "$SMPROGRAMS\app-name"
    CreateShortCut "$SMPROGRAMS\app-name\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
    CreateShortCut "$SMPROGRAMS\app-name\run-app.lnk" "$INSTDIR\app.exe"
SectionEnd



Section "uninstall"
    Delete $INSTDIR\*
    Delete $INSTDIR\uninstall.exe
    RMDir $INSTDIR

    Delete "$SMPROGRAMS\app-name\*"
    RMDir "$SMPROGRAMS\app-name"
SectionEnd

It's stripped down version of my own script I used for distributing a nw.js app.

Jorgen
  • 176
  • 1
  • 5
  • Sorry for the delay, I have been away. Where am I supposed to run this script from exactly? I have assumed from the app folder but it doesn't work, it says, "The system cannot find the file specified". I assume that's because nw.exe isnt in the same folder as app.nw? Its in the nw folder. Please clarify, it woud be much appreciated – LeeTee Aug 10 '16 at 15:15
  • Why define INSTDIR when you're only going to use it in the uninstall section? – Aurelia Aug 17 '16 at 14:48