How to Create JavaScript General Installable Exel File in Electron?
To install exe file in electron create the electron based Syncfusion application as mentioned in this link. Then package the application using Electron Packager, once packing completed JS_Electron-win32-ia32 folder will be created with Electron package file.
Usage of Electron Installer:
Step1:
Here we are going to create installable.exe file using Electron windows Installer, next open the JS_Electron-win32-ia32 folder and install the below command.
npm install --save-dev electron-winstaller |
Step2:
Create gulpfile.js file and add the below code. Refer the link for of each Configuration name usage.
var gulp = require('gulp'); var winInstaller = require('electron-windows-installer');
gulp.task('create-windows-installer', function (done) { winInstaller({ appDirectory: './node_modules/electron/dist', outputDirectory: './release', arch: 'ia32', authors: "Syncfusion", version: "1.0.0", iconUrl: "favicon.ico", setupIcon: "favicon.ico", loadingGif: "ele.gif", noMsi:true }).then().catch(); }); |
Step 3:
Add the below command for running gulp task.
gulp create-windows-installer |
Step 4:
Now the release folder is created with .exe file. Then open the .exe file and it will install automatically and opened.