TetroniMike

Upgrading Construct 2 NW.JS builds

Construct 2’s NW.JS build system uses VERY old versions of NW.JS – this causes issues. Let’s upgrade your Construct 2 game’s build’s NW.JS version to address these issues!

Preparation

  1. Make an NWJS build in Construct 2 (these instructions will not be going over the details on how to do this step)
  1. From your build folder: copy your Mac build to your Mac, your Linux build to your Linux machine, and your Windows build to your Windows machine.
  2. Download the version of NW.JS that you’d like to use, from here: https://nwjs.io/downloads/

Windows

(coming soon, maybe?)

Mac

  1. Find your build on your Mac, open it in Finder. Find the NWJS version you downloaded, open it in another Finder window.
  2. Right-click nwjs.app -> Show Package Contents
  3. Right-click your-build.app -> Show Package Contents
  4. Open the Contents folder in both
  5. DELETE the Resources folder in the nwjs app folder
  6. COPY the Resources folder from your build to the nwjs app folder. Ensure the copied Resources folder is in the same place of the one you just deleted!

mac folder screenshots

Note: For Hypnospace, we also have an external “data” folder in the root folder alongside the executable. In Mac builds, that data folder must go INSIDE the .app, alongside the Contents folder.

  1. Rename nwjs.app to your-game.app, as applicable, and test it!
  2. Package.json (where you update chromium-args, see below) is found here: foo.app/Contents/Resources/app.nw/package.json

Linux

(coming soon, maybe?)

Package.json chromium-args

Here’s Hypnospace’s “chromium-args” from package.json, this is what works for us, your milage may vary:

"--disable-plugins --disable-internal-flash --disable-popup-blocking --enable-gamepad --enable-html5-camera --allow-file-access-from-files --disable-devtools --in-process-gpu"


|