How to package a node webkit app as a hybrid standalone desktop app

349 Views Asked by At

The nwjs docs describe very detailed How to package and distribute your apps for every single OS.

I was wondering if it's possible to package / distribute a nwjs app as a standalone version which is running on all supported platforms as a standalone (no installation required). The usecase for that would be a removable device (usb stick) which autoruns the nwjs app. Therefore it should start the appropriate executable (provided that autorun hasn't been disabled).

A second requirement to the above usecase would be, to have as little as possible redundancies to the shiped files. Therefore the HTML5 app itself and all media assets should be reused on all platforms.

Thanks for all your hints!

3

There are 3 best solutions below

2
On

Get this: https://github.com/nwjs/nw-builder

nwbuild -p platform (win32/64, linux, macos) appname

0
On

This isn't possible however there are some alternatives.

One, wrap your application in something else, which I am not even sure if that is possible. Your best bet would be Java since it is a cross platform library. The main problem is the api/library are just different on different platforms hence the multiple build files.

Two, put a slim bootable linux on the thumb drive if they didn't have an OS, as well as a partition with an autorun for other operating systems. if they don't need the bootable OS. That is going to require quite a bit of work and nothing out of box currently does all of that.

0
On

It's not possible in OSX and Linux due to security.

You might find some hacks but they will work in very specific versions of the OS's.

It makes sense if you think about it. this is how viruses get on windows machines from external hardware connected.