# Copyright 2026, Jiri Eischmann <jiri@eischmann.cz> and the meshy contributors
# SPDX-License-Identifier: GPL-3.0-or-later

meshy_sources = [
  '__init__.py',
  'main.py',
  'application.py',
  'window.py',
  'protocol.py',
  'ble.py',
  'models.py',
  'storage.py',
  'meshcore_packets.py',
  'mesh_crypto.py',
  'transport_base.py',
  'usb_serial.py',
  'tcp.py',
  'utils.py',
  'backup.py',
  'frame_handler.py',
  'message_controller.py',
  'connection_controller.py',
  'host_integration.py',
  'theme_manager.py',
  'theme_chooser_dialog.py',
  'background_portal.py',
  'smaz.py',
]

if get_option('qr_scanner')
  meshy_sources += ['qr_scanner.py']
endif

views_sources = [
  'views/__init__.py',
  'views/chat_mixin.py',
  'views/chat_view.py',
  'views/contacts_view.py',
  'views/channels_view.py',
  'views/settings_view.py',
  'views/device_view.py',
  'views/connection_view.py',
  'views/repeater_view.py',
  'views/map_view.py',
]

py_installation.install_sources(meshy_sources, subdir: 'meshy')
py_installation.install_sources(views_sources, subdir: 'meshy' / 'views')

configure_file(
  input: 'meshy.in',
  output: 'meshy',
  configuration: conf,
  install: true,
  install_dir: get_option('bindir'),
  install_mode: 'rwxr-xr-x',
)
