Skip to content

Latest commit

 

History

History
172 lines (142 loc) · 3.41 KB

File metadata and controls

172 lines (142 loc) · 3.41 KB

Deployment Guide

This guide covers building, packaging, and distributing your Voltz application across different platforms. Learn how to create production builds, configure code signing, and deploy to various channels.

Table of Contents

Production Build

Basic Production Build

# Build the application for production
npm run build

# This creates optimized builds in:
# - out/main/ (main process)
# - out/preload/ (preload scripts)
# - out/renderer/ (renderer process)

Environment Variables for Production

# Set production environment
$env:NODE_ENV="production"

# Disable source maps for production
$env:GENERATE_SOURCEMAP="false"

# Build with production settings
npm run build

Platform-Specific Builds

Windows Builds

# Build for Windows (x64)
npm run build:win

# Build for specific architectures
npx electron-builder --win --x64
npx electron-builder --win --ia32
npx electron-builder --win --arm64

Configure Windows builds in electron-builder.yml:

win:
  target:
    - target: nsis
      arch:
        - x64
        - ia32
    - target: portable
      arch:
        - x64
    - target: msi
      arch:
        - x64
  icon: resources/icon.ico
  publisherName: 'Your Company'
  executableName: 'your-app'

nsis:
  oneClick: false
  allowToChangeInstallationDirectory: true
  createDesktopShortcut: always
  createStartMenuShortcut: true
  shortcutName: '${productName}'
  include: 'build/installer.nsh'
  artifactName: '${name}-${version}-setup.${ext}'
  deleteAppDataOnUninstall: true

macOS Builds

# Build for macOS (requires macOS)
npm run build:mac

# Build for specific architectures
npx electron-builder --mac --x64
npx electron-builder --mac --arm64
npx electron-builder --mac --universal

Configure macOS builds:

mac:
  target:
    - target: dmg
      arch:
        - x64
        - arm64
    - target: zip
      arch:
        - universal
  icon: resources/icon.icns
  category: public.app-category.productivity
  hardenedRuntime: true
  gatekeeperAssess: false
  entitlements: build/entitlements.mac.plist
  entitlementsInherit: build/entitlements.mac.plist
  notarize: true

dmg:
  sign: false
  contents:
    - x: 410
      y: 150
      type: link
      path: /Applications
    - x: 130
      y: 150
      type: file

Linux Builds

# Build for Linux
npm run build:linux

# Build specific formats
npx electron-builder --linux --x64
npx electron-builder --linux deb
npx electron-builder --linux AppImage
npx electron-builder --linux snap

Configure Linux builds:

linux:
  target:
    - target: AppImage
      arch:
        - x64
    - target: deb
      arch:
        - x64
    - target: rpm
      arch:
        - x64
    - target: snap
      arch:
        - x64
  icon: resources/icon.png
  category: Office
  maintainer: 'your-email@example.com'
  vendor: 'Your Company'
  synopsis: 'Your app description'
  description: 'Longer description of your application'

snap:
  summary: 'Your app summary'
  grade: stable
  confinement: strict