Electron Build Dmg



To create a DMG installer for our Electron app we can use the electron-installer-dmg package.

  1. Electron Build Dmg Mod
  2. Electron Build Dmg Download

Electerm is a terminal/ssh/sftp client(linux, mac, win) based on electron/ssh2/node-pty/xterm/antd/subx and many other libs. # Build Command. The build command consists of three main phases: render build, main build, and electron-builder build: Render build: This phase calls vue-cli-service build with some custom configuration so it works properly with electron. (The render process is your standard app.).

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.

1. Installing package

Build

Processes-1.0.0.dmg (OSX) Note that the Windows executable is a setup program, not the application itself. Also, OSX targets can only be built on a Mac, but Windows/Linux targets can be built on any platform. To change the version number, copyright notice, and other attributes, edit electron.manifest.json before creating the installation media. The electron-builder project is used to create installers for the platforms Windows and OS X. It's built to work together with the electron-packager. If you are looking for a complete set up on how to use the electron-packager and electron-builder check the 'How we use it section below'.

Open up a terminal and run these commands:

2. Creating the DMG installer

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.

Electron build dmg build

3. Usage

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:

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 Mod

Next post in this tutorial covers how to create a Windows installer.

Electron Build Dmg Download

I hope you find this post valuable. If you click the ad below I get paid by someone else and can continue to publish posts for free. I would appreciate it very much.