Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. Electron.js Desktop App Development

Lesson 16 of 28 · javascript

Creating Installers – NSIS (Windows), DMG (macOS), AppImage (Linux)

Duration: 10 mins

Creating Installers – NSIS (Windows), DMG (macOS), AppImage (Linux)

NSIS (Windows)

electron-builder uses NSIS under the hood. You can customise the installer via the nsis object in package.json:

"nsis": {
  "oneClick": false,
  "perMachine": true,
  "allowToChangeInstallationDirectory": true,
  "include": "build/installer.nsh"
}

A custom NSIS script (installer.nsh) can add extra steps (e.g., install a service).

DMG (macOS)

electron-builder creates a DMG that displays a drag‑to‑Applications window. You can tweak the appearance:

"dmg": {
  "icon": "build/icon.icns",
  "background": "build/dmg-bg.png",
  "contents": [
    { "x": 130, "y": 220 },
    { "x": 410, "y": 220, "type": "link", "path": "/Applications" }
  ]
}

AppImage (Linux)

electron-builder bundles everything into a self‑extracting AppImage. Add Linux specific config if you need desktop icons:

"linux": {
  "target": "AppImage",
  "category": "Utility",
  "icon": "build/icon.png"
}

Run npm run build and you’ll find MyApp-Setup.exe, MyApp.dmg, and MyApp.AppImage in the dist/ folder.

Previous: Code Signing – macOS & WindowsNext: Debugging – DevTools, Remote Debugging & Logging