Skip to main content

Build commands

CommandOutput
npm run package:mac.dmg + .zip for macOS (Apple Silicon / arm64 only)
npm run package:winNSIS .exe installer + portable .exe for Windows (x64)
npm run package:linux.AppImage + .deb + .rpm for Linux (x64)
npm run package:allAll three platforms (requires macOS host for mac signing)
Each command runs in sequence:
  1. npm run clean — removes out/ and dist/
  2. npm run download-python — downloads the platform-specific bundled Python 3.11 distribution
  3. npm run compile-enginescompiles rlm_context/, nae_context/, and both bridge scripts to .pyc bytecode using the bundled Python interpreter (ensures magic numbers match at runtime)
  4. npm run build — bundles TypeScript via electron-vite (main, renderer, preload)
  5. electron-builder — packages and optionally signs the app

macOS code signing

Set these environment variables before building:
export CSC_LINK="path/to/your/certificate.p12"
export CSC_KEY_PASSWORD="your-p12-password"
export APPLE_ID="your@apple.id"
export APPLE_APP_SPECIFIC_PASSWORD="xxxx-xxxx-xxxx-xxxx"
export APPLE_TEAM_ID="XXXXXXXXXX"
MIRA uses hardened runtime with the entitlements in resources/entitlements.mac.plist. After signing, electron-builder submits to Apple for notarisation automatically.

Windows code signing

export CSC_LINK="path/to/your/certificate.pfx"
export CSC_KEY_PASSWORD="your-pfx-password"
Use an EV certificate to avoid SmartScreen warnings.

Linux (no signing required)

No environment variables needed. The AppImage and deb packages are unsigned.

Bundled Python

The build pipeline downloads a platform-specific Python 3.11 distribution and bundles it into the app using scripts/download-python.js. The bundled Python is ~50 MB and is included in the final installer. To pre-download Python before building:
node scripts/download-python.js

Build output

Packaged apps are written to dist/:
dist/
├── MIRA-0.1.0-beta.1-arm64.dmg            # macOS Apple Silicon
├── MIRA-0.1.0-beta.1-arm64-mac.zip        # macOS Apple Silicon (zip)
├── MIRA-Setup-0.1.0-beta.1-x64.exe        # Windows NSIS installer
├── MIRA-0.1.0-beta.1-x64.exe              # Windows portable
├── MIRA-0.1.0-beta.1-x64.AppImage         # Linux AppImage
├── mira_0.1.0-beta.1_amd64.deb            # Linux deb
└── mira-0.1.0-beta.1.x86_64.rpm           # Linux rpm
Edit this page — Open a pull request