Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I create self-contained executables in Windows and GNU/Linux? #243

Closed
jviotti opened this issue Jan 24, 2016 · 10 comments
Closed

How can I create self-contained executables in Windows and GNU/Linux? #243

jviotti opened this issue Jan 24, 2016 · 10 comments
Labels
question ❓ Question about using Electron Packager. Not supported in this issue tracker.

Comments

@jviotti
Copy link

jviotti commented Jan 24, 2016

Is there a way to create a self contained executable that includes all the files from the output directory in Windows and GNU/Linux?

@malept malept added the question ❓ Question about using Electron Packager. Not supported in this issue tracker. label Jan 24, 2016
@malept
Copy link
Member

malept commented Jan 24, 2016

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.

@malept
Copy link
Member

malept commented Jan 28, 2016

Here's the answer the Electron people gave a while ago: electron/electron#914

@malept malept closed this as completed Jan 28, 2016
@jviotti
Copy link
Author

jviotti commented Jan 28, 2016

@malept Thank you very much to the link!

@danielehrhardt
Copy link

Something new here? Is it possible to pack app in to a single .exe file

@malept
Copy link
Member

malept commented Oct 4, 2017

No.

@develar
Copy link
Contributor

develar commented Oct 5, 2017

@danielehrhardt You can use portable target in the electron-builder.

@abicorios
Copy link

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\Local\your_new_app, and rewrite it in each run. But user see alone executable, and almost all software work in a similar way.

@JulsSmile
Copy link

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

@gregnr
Copy link

gregnr commented Jun 23, 2022

For those using electron-forge, we've built a Maker plugin that builds a portable Windows .exe file using electron-builder's portable target under the hood:

https://github.com/rabbit-hole-syndrome/electron-forge-maker-portable

@edxu96
Copy link

edxu96 commented Jun 29, 2022

For those using electron-forge, we've built a Maker plugin that builds a portable Windows .exe file using electron-builder's portable target under the hood:

https://github.com/rabbit-hole-syndrome/electron-forge-maker-portable

That's interesting. A quick question, is a portable app able to update itself?

Based on https://www.electronjs.org/docs/latest/api/auto-updater#windows, the app can only update itself, when it's installed:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question ❓ Question about using Electron Packager. Not supported in this issue tracker.
Projects
None yet
Development

No branches or pull requests

8 participants