Ctrl K
ComunidadGuías…

electron-builder.yml

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
appId: com.beacon.app
productName: Beacon
artifactName: ${productName}-${version}-${os}-${arch}.${ext}
files:
    - 'out/**/*'
    - 'package.json'
    # Files the main process loads by path (`import ... from '...?asset'`,
    # see src/main/index.ts's taskbar icons). Unpacked, so they are real
    # files on disk rather than entries inside app.asar.
    - 'resources/**/*'
asarUnpack:
    - 'resources/**/*'
npmRebuild: false

# Bundled connect backend (see src/main/index.ts's startConnectServer()) —
# built by `npm run package:connect` (connect/packaging/build-binary.py),
# which must run before electron-builder does. Like any PyInstaller output,
# this is platform/arch-specific — it has to be built *on* whatever
# platform/arch you're packaging for, no cross-compiling.
extraResources:
    - from: connect/dist/connect-server
      to: connect-server
      filter:
          - '**/*'
    # The audio-only ffmpeg the backend runs, built by
    # scripts/build-ffmpeg.sh (see build/ffmpeg/README.md). Same
    # platform/arch rule as the backend binary above. Optional on purpose:
    # a checkout that hasn't built one packages without it, and the backend
    # falls back to PATH exactly as it did before this existed.
    - from: build/ffmpeg
      to: ffmpeg
      filter:
          - 'ffmpeg'
          - 'ffmpeg.exe'

# build/icon.png (1024x1024, the mdi-lighthouse-on glyph rendered straight
# from @mdi/font's own TTF in the app's primary theme color — same source
# as the DefaultLayout.vue/MobileLayout.vue app-bar icon and the web
# favicon, just at full resolution instead of downscaled) is the source
# every icon here is generated from: build/icons/icon.ico is a real
# multi-resolution ICO (16 through 256px), and build/icons/NxN.png are the
# freedesktop sizes Linux needs.
#
# Linux points at the *directory*, not at icon.png, and that distinction is
# the whole reason a packaged Linux build shows an icon at all. Handed a
# single .png, electron-builder ships exactly that one file at exactly its
# own resolution (see app-builder-lib's iconConverter: "source is already a
# .png — return as-is with its dimensions"), which put the only copy in
# hicolor/1024x1024/. No spec-conforming icon lookup ever finds it: the
# freedesktop hicolor theme declares sizes up to 512x512 and nothing
# beyond, so a directory it doesn't know about is skipped entirely, and
# every launcher fell back to a generic icon. Handed a directory, the same
# converter collects every NxN.png in it — icon.ico is ignored, its name
# doesn't match — and each one lands in the hicolor size it belongs to.

win:
    icon: build/icons/icon.ico
    target:
        - target: nsis
          arch:
              - x64
              - arm64

nsis:
    allowToChangeInstallationDirectory: true
    oneClick: false
    shortcutName: ${productName}
    uninstallDisplayName: ${productName}
    createDesktopShortcut: always

mac:
    icon: build/icon.png
    target:
        # arm64 only: the bundled Connect backend binary is built by PyInstaller
        # on the (Apple Silicon) CI runner and cannot cross-compile to x64.
        - target: dmg
          arch:
              - arm64
        - target: zip
          arch:
              - arm64
    category: public.app-category.music
    # Ad-hoc signed ('-'), since there is no Apple Developer ID. `null` (no
    # signature at all) is not an option: electron-builder rewrites the
    # bundle after Electron signed it, and on Apple Silicon a downloaded app
    # with a broken signature is reported as "damaged" with no way to open
    # it but the terminal (#46). Ad-hoc signed, Gatekeeper still warns, but
    # System Settings > Privacy & Security offers "Open Anyway".
    identity: '-'
    hardenedRuntime: false
    # Required on macOS 14+ (Sonoma) for the local-network-access permission
    # prompt to work at all — without it, macOS can't show a proper prompt
    # for what this app actually needs local network for, and discovery can
    # silently fail. Beacon genuinely needs this for both casting (mDNS/SSDP
    # discovery of Sonos/Chromecast/DLNA/AirPlay targets) and Remote Control
    # (LAN-pairing a phone against this desktop instance).
    extendInfo:
        NSLocalNetworkUsageDescription: 'Local network access is required to discover casting devices (Sonos, Chromecast, DLNA, AirPlay) and to pair Remote Control with your phone.'

linux:
    # A directory, deliberately — see the icon comment above.
    icon: build/icons
    target:
        - AppImage
        - deb
        - tar.xz
    category: AudioVideo;Audio;Player
    artifactName: ${productName}-${os}-${arch}.${ext}
    # Without this, desktop environments can't reliably associate a running
    # window with this .desktop entry (taskbar grouping/icon pinning) — the
    # runtime WM_CLASS wouldn't match the shipped .desktop file's name
    # (package.json's own top-level `desktopName`, not a linux.* option —
    # see https://www.electron.build/linux#window-association-desktopname--syncdesktopname).
    # This makes Electron itself report that exact name at runtime instead
    # of falling back to a generic/mismatched one.
    syncDesktopName: true

# Auto-updates (see src/main/index.ts's checkForUpdates()) target this
# repo's own GitHub releases — electron-updater reads this at runtime via
# the app-update.yml electron-builder bakes into the packaged app.
publish:
    provider: github
    owner: mihaitom
    repo: beacon
    channel: latest