# AppImageBuilder recipe for Fincept Terminal
# Build with: appimage-builder --recipe AppImageBuilder.yml
# Requires: appimage-builder >= 1.0 (pip install appimage-builder)
#
# Before running:
#   cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DDEPLOY_QT=ON
#   cmake --build build --parallel
#   cmake --install build --prefix AppDir/usr

version: 1

AppDir:
  path: ./AppDir

  app_info:
    id: com.fincept.terminal
    name: Fincept Terminal
    icon: fincept-terminal
    version: !ENV ${FINCEPT_VERSION:-4.3.0}
    exec: usr/bin/FinceptTerminal
    exec_args: $@

  apt:
    arch: amd64
    sources:
      - sourceline: deb [arch=amd64] http://archive.ubuntu.com/ubuntu jammy main restricted universe

    include:
      - libqt6core6
      - libqt6widgets6
      - libqt6network6
      - libqt6sql6
      - libqt6sql6-sqlite
      - libqt6concurrent6
      - libqt6multimedia6
      - libqt6charts6
      - libssl3
      - libglib2.0-0
      - libdbus-1-3
      - libpulse0
      - libasound2
      - libspeechd2       # speech-dispatcher for TTS
      - libfontconfig1
      - libfreetype6

  files:
    exclude:
      - usr/share/man
      - usr/share/doc/*/changelog.Debian.gz

  runtime:
    env:
      APPDIR_LIBRARY_PATH: $APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu
      QT_PLUGIN_PATH: $APPDIR/usr/lib/qt6/plugins

AppImage:
  arch: x86_64
  comp: xz
  file_name: FinceptTerminal-!ENV ${FINCEPT_VERSION:-4.3.0}-x86_64.AppImage
  sign-key: None
  update-information: gh-releases-zsync|Fincept-Corporation|FinceptTerminal|latest|FinceptTerminal-*x86_64.AppImage.zsync
