justifun I'm not sure if I ever got the bat file to work or not, but you will have to do an export and then run the exe-file to test the "Run file" action. But you probably already tried that since you were able to run exe-files.
I did some research about nwjs and learned that it doesn't use any web server (which I originally thought) but instead it reads directly from disk. The export produces a file called package.nw if you rename this to package.zip and look in the zip-archive you find all your files there. However these files only work when run in the nodewebkit environment, which means I can't just "server" these file from a web server because there would be dependency errors.
So why do we need a web server? Well we need the "controllers" to be able to connect to something. What I have done to make this work is:
- add server.js as a project file
- modified the nwjs plugin and added a start web server action
- In the Start event sheet I've added Start Web Server and Run "node server.js"
- Export with Nwjs exporter
- Open package.nw (rename to zip and open)
- Export with html5 exported
- Create a directory called "controller" and add html5 export to it
- Add the "controller" directory to the package.zip file
- rename package.zip to package.nw
- run the exe
When you run the exe it will start a web server that will "serve" the html5 export on port 50000, so when you connect to ip-of-host-machine:50000 you will see the controller, as you normally would. The main game also starts the server.js file so the main game an controllers can connect to one another.
This is a step in the right direction towards being able to package CrowdGaming games to the masses. The problem with showing the ip-that the "controllers" should connect to still remains.