Electron: creating portable windows application

Electron: creating portable windows application

How to create a portable windows application without an installer from an electron project:

Clone the electron-quick-start repo: git clone https://github.com/electron/electron-quick-start yarn Make your application - probably edit main.js to navigate to some URL yarn add electron-packager Edit package.json - update the ’name’ and add a new script ‘packager’:

1
2
3
4
5
6
7
8
{
  "name": "my-app-name",
  ...
  "scripts": {
	"start": "electron .",
    "packager": "electron-packager ./ --platform=win32"
  }
}

’npm start’ will bring up the application ’npm run packager’ will package the app for windows. You will see a new directory ‘my-app-name-win32-x64’ in the top directory of the project, with a my-app-name.exe

comments powered by Disqus
Zbudowano z Hugo
Motyw Stack zaprojektowany przez Jimmy