To create a DMG installer for our Electron app we can use the electron-installer-dmg package.
In this tutorial we'll create a DMG installer for the Electron tutorial app. To create a DMG installer you first need to package the app. Read that tutorial first if you haven't already.
DMG files are commonly used for distributing application 'installers'. Electron-builder supports dmg as a build target. Last time we created a dmg installer for macOS. Now it's time to look at an Electron Windows installer with Electron-winstaller.
1. Installing package
Open up a terminal and run these commands:
2. Creating the DMG installer
Electron Build Dmg Download
This is the basics that we need to create the DMG. First run the package-mac script that we created to create a package for the mac in the electron packager tutorial:
This will create a package for us in the release-builds folder. So now we can create the DMG with this command:
This will create a file called electron-tutorial-app.dmg in the root folder of the application. The dmg will use default settings. In the next step we'll look at what settings we can do to it.
3. Usage
Electron Build Dmg On Linux
Unit 5ancient indiamr. macs 6th grade. If we look at the file usage.txt we can see that we have some options to make when it comes to the installer:
As you see above we can set the out path of the .dmg file that is generated. We can set an icon that the dmg-window will use (By default this was the electron icon when i tried). We can set the icon size and custom background for the window.
Since the packages are created in the release-builds folder we'll create the installers there as well. We also already have the icon created for the application (this is done in the icon tutorial)
The command to run now looks like this: Big mac carbonator manual.
4. Creating a script
I am one of those that won't be able to memorize that string. So we can add it to our scripts package.json:
And now you can run:
Electron Build Dmg Build
Next post in this tutorial covers how to create a Windows installer. Snow leopard 10.6 8 retail dmg torrent pirate bay.