electrobun-builder-for-windows
v0.1.11
Published
Packaging and signing tool for Electrobun applications on Windows (NSIS, WiX, MSIX).
Maintainers
Readme
electrobun-builder-for-windows
Packaging and signing tool for Electrobun applications on Windows. Support for NSIS, WiX (MSI), and MSIX formats.
👉 日本語のドキュメントはこちら (Japanese README)
Quick Start
- Install:
npm install -g electrobun-builder-for-windows - Configure: Create
electrobun.config.tsin your project root. - Build: Run
electrobun-builder build --target nsis
Features
- NSIS: Create a single-file EXE installer with custom icons and professional MUI2 interface.
- WiX (MSI): Create professional MSI installers with stable upgrade codes using UUIDs and automatic component scanning.
- MSIX: Create modern Windows app packages (Sparse Manifest) with automatic logo resizing via
sharp. - Code Signing: Digitally sign installers and binaries using PFX certificates via
signtool. - Auto Update: Generate
latest.jsonmetadata (including SHA-256 hash) for Electrobun'sUpdaterclass. - Resource Editing: Automatically update EXE icons and version info (Copyright, Company, etc.) using
rcedit.
Installation
npm install -g electrobun-builder-for-windowsOS Dependencies
This tool requires several Windows SDK and packaging tools. Ensure these are installed and available in your PATH:
| Target | Required Tool | Link | | --- | --- | --- | | NSIS | NSIS 3.x | Download | | WiX | WiX Toolset v3.x | Download | | MSIX / Sign | Windows SDK (SignTool, MakeAppx) | Download |
Usage
1. Basic Build
Build an installer for a specific target.
# Build NSIS (.exe)
electrobun-builder build --target nsis
# Build WiX (.msi)
electrobun-builder build --target wix
# Build MSIX (.msix)
electrobun-builder build --target msix2. Build and Sign
Apply a digital signature to the installer and the internal application binary. This works for all targets (nsis, wix, msix).
# Sign NSIS (.exe)
electrobun-builder build --target nsis --sign --pfx cert.pfx --password yourpassword
# Sign WiX (.msi)
electrobun-builder build --target wix --sign --pfx cert.pfx --password yourpassword
# Sign MSIX (.msix)
electrobun-builder build --target msix --sign --pfx cert.pfx --password yourpassword3. Auto-Update Metadata
Generate latest.json required for Electrobun's Updater. This is also available for all targets.
# Generate for NSIS
electrobun-builder build --target nsis --update --baseUrl https://your-server.com/downloads
# Generate for WiX
electrobun-builder build --target wix --update --baseUrl https://your-server.com/downloads
# Generate for MSIX
electrobun-builder build --target msix --update --baseUrl https://your-server.com/downloadsConfiguration
The builder reads electrobun.config.ts from your project root.
import { type ElectrobunConfig } from "electrobun-builder-for-windows";
const config: ElectrobunConfig = {
name: "MyApp",
version: "1.0.0",
author: "Your Company",
windows: {
icon: "assets/app.ico", // Path to your .ico file
productId: "com.example.myapp", // Used for WiX UpgradeCode and Registry
installDir: "MyApp", // Folder name in Program Files
languageCode: "1041", // Optional: WiX LCID (Default: 1041 - Japanese)
languageName: "Japanese", // Optional: NSIS Language (Default: Japanese)
msix: {
publisher: "CN=YourPublisher",
publisherDisplayName: "Your Name",
identityName: "com.example.myapp",
capabilities: ["internetClient"]
}
}
};
export default config;License
MIT - Copyright (c) 2026 Catharacta
