appId: io.ipfs.desktop
generateUpdatesFilesForAllChannels: true

files:
  - filter:
    - src/**/*
    - assets/**/*
    - node_modules/**/*
    - package.json

directories:
  buildResources: assets/build

asarUnpack: 'src/**/scripts/**/*'

afterSign: './pkgs/macos/notarize-build.js'

mac:
  artifactName: ${name}-${version}-squirrel.${ext}
  category: public.app-category.utilities
  darkModeSupport: true
  hardenedRuntime: true
  gatekeeperAssess: false
  entitlements: './pkgs/macos/entitlements.mac.plist'
  entitlementsInherit: './pkgs/macos/entitlements.mac.plist'
  target:
    - target: default
      arch: ['universal']

dmg:
  artifactName: ${name}-${version}-mac.${ext}
  iconSize: 160
  iconTextSize: 12
  window:
    width: 660
    height: 400
  contents:
    - x: 180
      y: 170
      type: file
    - x: 480
      y: 170
      type: link
      path: /Applications

win:
  target:
    - nsis
    # TODO - portable
  azureSignOptions:
    # multiple publisher names for auto-update compatibility across certificate changes.
    # electron-updater accepts updates if ANY name matches the certificate's CN field.
    publisherName:
      - 'Protocol Labs, Inc'
      - 'IPFS Project'
      - 'Interplanetary File System Foundation'
      - 'Interplanetary Shipyard, Inc'
    endpoint: 'https://eus.codesigning.azure.net'
    certificateProfileName: 'ipfs-desktop'
    codeSigningAccountName: 'pl-code-signing'

nsis:
  artifactName: ${name}-setup-${version}-${os}-${arch}.${ext}
  include: assets/build/nsis.nsh
  oneClick: false
  warningsAsErrors: false
  perMachine: false
  allowElevation: true
  allowToChangeInstallationDirectory: true

portable:
  artifactName: ${name}-portable-${version}-${os}-${arch}.${ext}

linux:
  artifactName: ${name}-${version}-${os}-${arch}.${ext}
  executableName: ipfs-desktop
  executableArgs:
    - --no-sandbox
  icon: icon.png
  category: Network;FileTransfer;P2P
  synopsis: A desktop client for IPFS
  maintainer: gui@ipfs.tech
  target:
    - tar.xz
    - AppImage
    - deb
    - rpm
    - snap
    - freebsd

snap:
  confinement: strict
  plugs:
    - default
    - network
    - network-bind
    - removable-media
  publish:
    - github

publish:
  - github

protocols:
  - name: IPFS
    role: Viewer
    schemes:
      - ipfs
  - name: IPNS
    role: Viewer
    schemes:
      - ipns