项目文件夹

文件
caorushizi dfcdf6a6a5 fix(installer): show version in title bar, set installer FileDescription (#637)
- `installer/installer.nsh`: customHeader macro sets Caption to
  "Setup - ${PRODUCT_NAME} ${VERSION}" so users can see which release
  they're installing from the window title (the default $(^SetupCaption)
  omits the version, and re-setting Name trips NSIS warning 6029 which
  electron-builder's -WX flag treats as a hard error).
- `scripts/build.ts`: afterAllArtifactBuild hook runs the app-builder
  rcedit helper on the generated NSIS installer to rewrite its
  FileDescription to "${APP_NAME} installer". electron-builder's
  NsisTarget.computeVersionKey() hardcodes VIAddVersionKey /LANG=1033
  "FileDescription" "${appInfo.description}", binding the installer's
  FileDescription to the app binary's (both drawn from package.json
  description); any in-NSIS override collides on the same LANG+key
  with a hard "already defined!" error that -WX does not gate.
  Post-processing with rcedit sidesteps this and lets installer and
  app binary carry distinct descriptions — same approach VS Code's
  Inno Setup pipeline uses (where "{AppName} Setup" is the default).

Closes #637

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 23:23:51 +08:00
..
2026-04-21 18:16:07 +08:00
2025-11-02 20:56:39 +08:00

Electron Main Process

The Electron main process that handles the desktop application lifecycle, window management, and system integration for MediaGo.

Overview

This package contains the Electron main process code that:

  • Creates and manages application windows
  • Handles system tray integration
  • Manages application menus and shortcuts
  • Provides native file system access
  • Handles auto-updates and app packaging
  • Communicates with the frontend renderer process

Key Features

  • Window Management: Creates and manages the main application window
  • System Integration: System tray, notifications, and OS-specific features
  • Security: Implements secure IPC communication with the renderer
  • Auto-Updates: Built-in update mechanism for the desktop app
  • Cross-Platform: Supports Windows, macOS, and Linux

Technologies

  • Electron: Desktop application framework
  • Node.js: Backend runtime for main process
  • IPC: Inter-process communication with frontend
  • Native APIs: File system, OS integration

Development

# Start development mode
pnpm dev

# Build electron app
pnpm build:electron

# Package for release
pnpm release

# Create beta build
pnpm beta

Architecture

The electron app loads the frontend React application in a BrowserWindow and provides native desktop functionality through Electron's main process APIs.