How to deploy an Electron app as an executable or installable in Windows?

后端 未结 9 1419
渐次进展
渐次进展 2020-11-30 20:14

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

9条回答
  •  囚心锁ツ
    2020-11-30 20:38

    Since most answers dont have step by step instructions on packaging, let me post how i got to package the electron app.

    We will be installing electron-packager first.

    Electron Packager is a command line tool and Node.js library that bundles Electron-based application source code with a renamed Electron executable and supporting files into folders ready for distribution.

    Install electron-packager : run following command in windows cmd

    npm install -g electron-packager --save-dev
    

    Next, lets package our app for windowsx64:

    electron-packager appdirectory appName --platform=win32 --arch=x64 --electron-version=1.4.3
    

提交回复
热议问题