I want to generate an unique .exe file to execute the app or an .msi to install the application. How to do that?
问题:
回答1:
You can package your program using electron-packager and then build a single setup EXE file using InnoSetup.
回答2:
You can also try with the electron-boilerplate. Which has 'release' task of gulp and it will create single ready to go executable file for all cross platform. You only need to build application from all three platform to generate particular platform executable.So you don't need to install any third party tool.
回答3:
well ... this will work but the idea is to run the .exe without need of install it in the pc ... another solution is use Autoplay media Studio for wrap you package generated by electron and make one executable or other solution is to use thinstall vmware... The cons both are commercial so you have to paid for them...
回答4:
There are so many good modules which generate single installer *exe file. Check out any of these:
electron-builder (genrates executable for Windows,Mac and Linux, have server-less app auto-update feature,code signing, publishing etc, less boilerplate)
electron-forge (genrates executable for Windows,Mac and Linux, it not just package apps but helps you create them as well, more boilerplate)
windows-installer (easy to use, light weight, and generates only exe file)
(still confused which one to pick? compare here)
回答5:
I first tried the electron-packager but it produced a lot of .dll files and still could not run.
What did work for me was:
npm install
npm run dist --ia32
This produced a single self contained exe, no other files needed to run the application.
回答6:
You might be able to "wrap" the entire electron app in a .NET project. Then the single executable that it creates can then just "internally" run the electron app.