Is there a way to create a self contained executable that includes all the files from the output directory in Windows and GNU/Linux?
This is not currently a feature of electron-packager. (Even for Mac apps, they're not technically "self contained executables", it's a special folder.)
That being said, if someone creates a Node module that transforms an Electron-based app into a self-contained executable, we would be open to a pull request that adds integration via an optional parameter.
Here's the answer the Electron people gave a while ago: https://github.com/atom/electron/issues/914
@malept Thank you very much to the link!
Something new here? Is it possible to pack app in to a single .exe file
No.
@danielehrhardt You can use portable target in the electron-builder.
Also, it is possible by electron-forge make
See https://github.com/electron-userland/electron-forge
By default in Windows the single exe is created by squirrel. After running it is extracted in C:\Users\user\AppData\Localyour_new_app, and rewrite it in each run. But user see alone executable, and almost all software work in a similar way.
Also looking for the answer to this question.
Alternatively, you can pack an Electron application into an executable using a packer. For example this guide: How to pack an Electron Application into a single executable file