- 'name':'VRIGateway',
- 'license':'MIT',
- 'description':'VRI Gateway Application',
- 'dev':'electron-webpack dev',
- 'dist':'yarn compile && electron-builder',
- 'dist-win32':'yarn run dist -w --ia32',
- 'dist-linux32':'yarn run dist -l --ia32',
- 'dist-win':'yarn run dist-win32 && yarn run dist-win64',
- 'dist:dir':'yarn dist --dir -c.compression=store -c.mac.identity=null'
- 'dependencies':{
- 'electron-dl':'^1.10.0',
- 'electron-to-chromium':'^1.3.27',
- 'node-notifier':'^5.2.1',
- },
- 'electron':'2.0.0',
- 'electron-webpack':'^2.0.1',
- },
- 'publish':[
- 'provider':'generic',
- }
- 'nsis':{
- 'allowElevation':true
- 'win':{
- {
- 'arch':[
- 'ia32'
- }
- },
- 'category':'public.app-category.business',
- 'zip',
- ]
- }
- Electron-builder Mac Target Zip Dmg 2
- Electron-builder Mac Target Zip Dmg Download
- Electron-builder Mac Target Zip Dmg File
Electron - Create Single App for Windows, Linux, and macOS article
Feb 21, 2018 Electron – Cross Platform Desktop Apps Made Easy (Part 6) #ibmchampion Following part 1 – 5 of the Electron tutorial you’re probably ready with the. For windows nsis target and Linux appimage target, it works fine as expected, Ican see the license agreement on installing. But for Mac dmg target I don't see any license, am I missing anything? Macos electron licensing electron-builder dmg.
- Nov 30, 2016 The details of each option can be found on GitHub, but the most significant are those specific to the different operating systems including target types. We specify an installation executable (.exe) for Windows, an application image package (.AppImage) for Linux, and a disk image (.dmg.
- What is electron Electron is an open source library developed by GitHub to build cross platform desktop applications using HTML, CSS and JavaScript. Electron does this by merging chromium and node. JS into the same runtime environment and packaging them as applications under Mac, windows and Linux systems. Because we often switch different websites to.
Electron-builder Mac Target Zip Dmg 2
![Zip Zip](/uploads/1/2/6/0/126058276/803732556.png)
electronBuilder.js
constpackagejson=require('../package.json'); |
constbuilder=require('electron-builder'); |
constmimes=newMap(); |
mimes.set('exe','exe'); |
mimes.set('dmg','dmg'); |
mimes.set('zip','zip'); |
mimes.set('AppImage','x-executable'); |
//Development package.json, see https://goo.gl/5jVxoO |
constdevMetadata=packagejson.electronBuilder; |
//Application package.json |
constappMetadata={ |
name: packagejson.name, |
version: packagejson.version, |
description: packagejson.description, |
author: packagejson.author |
}; |
functionbuildPromise(){ |
returnnewPromise((resolve,reject)=>{ |
builder |
.build({projectDir: './', devMetadata, appMetadata }) |
.then(args=>{ |
constfilePath=args[0]; |
constfileName=filePath.substr(filePath.replace(//g,'/').lastIndexOf('/')+1); |
constext=fileName.substr(fileName.lastIndexOf('.')+1); |
letmimeType; |
if(mimes.has(ext)) |
mimeType=`application/${mimes.get(ext)}, application/octet-stream`; |
else |
console.warn(`Unsupported file type '${ext}' in file '${filePath}'; mime type will be null`); |
resolve({fileName, filePath, mimeType}); |
}).catch((error)=>{ |
console.error(error); |
}); |
}); |
} |
module.exports=buildPromise; |
electronBuilder.json
'electronBuilder': { |
'build': { |
'productName': 'Node Performance Measure', |
'appId': 'EikosPartners.NodePerformanceMeasure', |
'asar': false, |
'win': { |
'iconUrl': 'http://localhost:5000/images/eikos-logo-multi.ico', |
'target': 'nsis' |
}, |
'nsis': { |
'oneClick': false, |
'allowElevation': false |
}, |
'linux': { |
'target': 'AppImage', |
'category': 'Development' |
}, |
'mac': { |
'target': 'dmg' |
} |
}, |
'directories': { |
'output': 'electron/output', |
'app': 'electron/app', |
'buildResources': 'electron/buildResources' |
} |
} |
electronInstall.html
Electron-builder Mac Target Zip Dmg Download
<div> |
<inputtype='button' value='Electron' onclick='downloadElectron();' /> |
<spanid='spanElectron'>Build Electron Version Installer for detected OS:</span> |
</div> |
<scripttype='text/javascript'> |
varosdetect='UNKNOWN!'; |
varplatform=navigator.platform.toLowerCase(); |
if(platform.indexOf('win') >= 0) |
osdetect='Windows'; |
elseif(platform.indexOf('mac') >= 0) |
osdetect='MacOS'; |
elseif(platform.indexOf('linux') >= 0) |
osdetect='Linux'; |
document.getElementById('spanElectron').innerHTML+=' <i><strong>'+osdetect+'</strong></i>'; |
functiondownloadElectron(){ |
varhostname=location.hostname; |
varport=location.port.length>0 ? ':'+location.port : '; |
varurl='http://'+hostname+port+'/electron' |
window.open(url); |
} |
</script> |
electronRoute.js
//Install page for Electron Application |
router.get('/electron',function(req,res,next){ |
electronBuilder() |
.then(e=>fs.readFile(e.filePath,(err,data)=>{ |
res.setHeader('Content-Disposition',`attachment; filename='${e.fileName}'`); |
res.setHeader('Content-type',e.mimeType); |
res.send(data); |
})).catch((error)=>{ |
console.error(error); |
}); |
}); |
![Target Target](/uploads/1/2/6/0/126058276/451965462.png)
Electron-builder Mac Target Zip Dmg File
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment