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
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Creating Installers | Electron.js Desktop App Development le | BraveProgrammer
  1. Courses
  2. /
  3. Electron.js Desktop App Development

Lesson 16 of 28

·javascript

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

10 mins

Course progress57%

What you'll learn

Keep these ideas in mind as you work through the lesson.

4 points
  • NSIS creates a Windows installer (EXE) – you can customise UI and actions via an NSIS script.
  • DMG gives macOS users a drag‑to‑Applications installer; you can set background images and icons.
  • AppImage packages a portable Linux binary that runs on most distributions without root.
  • All three installers are generated automatically by **electron‑builder** when the appropriate targets are declared.

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.

Make it stickPractice what you've learned1 quiz · 5 practical tests · Optional activities from Electron.js Desktop App DevelopmentBrowse activities
Previous lessonCode Signing – macOS & WindowsContinue to lesson 17Debugging – DevTools, Remote Debugging & LoggingBack to Electron.js Desktop App Development curriculum