How to deploy an Electron app as a executable or i

2019-01-13 02:49发布

I want to generate an unique .exe file to execute the app or an .msi to install the application. How to do that?

6条回答
爷、活的狠高调
2楼-- · 2019-01-13 02:56

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)

查看更多
Fickle 薄情
3楼-- · 2019-01-13 02:56

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.

查看更多
做个烂人
4楼-- · 2019-01-13 03:00

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...

查看更多
别忘想泡老子
5楼-- · 2019-01-13 03:15

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楼-- · 2019-01-13 03:17

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.

查看更多
你好瞎i
7楼-- · 2019-01-13 03:18

You can package your program using electron-packager and then build a single setup EXE file using InnoSetup.

查看更多
登录 后发表回答