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':
{
"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
Maybe making it based on portableapps project platform. This is by far the best portable platform on Windows. Everything related to the program will be kept into a single directory, no changes to registry. On the other hand Electron applications are the easiest to place into portableapps project, yet you won't find any help on the net. Sad.