appId: dev.openpencil.app
productName: OpenPencil
copyright: Copyright (c) 2024-2026 OpenPencil contributors

directories:
  output: dist-electron
  buildResources: build

files:
  - electron-dist/**/*
  - "!node_modules"

extraResources:
  - from: .output/server
    to: server
  - from: .output/public
    to: public
  - from: dist/mcp-server.cjs
    to: mcp-server.cjs

mac:
  category: public.app-category.graphics-design
  icon: build/icon.icns
  artifactName: "${productName}-${version}-${arch}-mac.${ext}"
  target:
    - dmg
    - zip
  hardenedRuntime: true
  gatekeeperAssess: false
  notarize: true

dmg:
  title: "${productName} ${version}"

win:
  icon: build/icon.ico
  artifactName: "${productName}-${version}-${arch}-win.${ext}"
  target:
    - nsis
    - portable

nsis:
  artifactName: "${productName}-${version}-${arch}-win-setup.${ext}"
  oneClick: false
  perMachine: false
  allowToChangeInstallationDirectory: true
  createDesktopShortcut: true
  createStartMenuShortcut: true

linux:
  icon: build/icon.png
  category: Graphics
  artifactName: "${productName}-${version}-${arch}-linux.${ext}"
  desktop:
    entry: |
      [Desktop Entry]
      Name=OpenPencil
      Exec=AppRun --no-sandbox %U
      Terminal=false
      Type=Application
      Icon=openpencil
      StartupWMClass=openpencil
      Categories=Graphics;
      MimeType=application/x-openpencil;
  target:
    - AppImage
    - deb

fileAssociations:
  - ext: op
    name: OpenPencil Document
    description: OpenPencil Design File
    mimeType: application/x-openpencil
    role: Editor
    icon: build/icon

asar: true
