- io.github.bemagri.nomines.yml: builds libsigc++/glibmm/cairomm/pangomm/gtkmm from tarballs against the GNOME 46 runtime, then the app from the v1.0.0 tag - Icon: app-id-named PNGs (128/512) for flatpak export, svg kept for native installs; desktop file Icon updated - README/AGENTS.md: flatpak build instructions and version traps
82 lines
2.2 KiB
Meson
82 lines
2.2 KiB
Meson
project('nomines', 'cpp',
|
|
version : '1.0.0',
|
|
default_options : ['warning_level=3', 'cpp_std=c++20'])
|
|
|
|
gnome = import('gnome')
|
|
|
|
res = gnome.compile_resources(
|
|
'resources', 'resources/gresource.xml',
|
|
source_dir: 'resources',
|
|
c_name: 'gresources'
|
|
)
|
|
|
|
# Dependencies
|
|
deps = [
|
|
dependency('gtkmm-4.0'),
|
|
dependency('sigc++-3.0')
|
|
]
|
|
|
|
# Source files
|
|
src = [
|
|
'src/main.cpp',
|
|
'src/window.cpp',
|
|
'src/window.hpp',
|
|
'src/minefield.hpp',
|
|
'src/minefield.cpp',
|
|
'src/board_widget.hpp',
|
|
'src/board_widget.cpp',
|
|
'src/leaderboard.hpp',
|
|
'src/leaderboard.cpp',
|
|
res
|
|
]
|
|
|
|
# Executable
|
|
executable('nomines',
|
|
src,
|
|
dependencies : deps,
|
|
install : true
|
|
)
|
|
|
|
# Install icon (named after the app id so flatpak export picks it up;
|
|
# PNG sizes are required by flatpak/flathub icon validation)
|
|
install_data(
|
|
'resources/nomines.svg',
|
|
install_dir: join_paths(get_option('datadir'), 'icons/hicolor/scalable/apps'),
|
|
rename: 'io.github.bemagri.nomines.svg'
|
|
)
|
|
install_data(
|
|
'resources/nomines-128.png',
|
|
install_dir: join_paths(get_option('datadir'), 'icons/hicolor/128x128/apps'),
|
|
rename: 'io.github.bemagri.nomines.png'
|
|
)
|
|
install_data(
|
|
'resources/nomines-512.png',
|
|
install_dir: join_paths(get_option('datadir'), 'icons/hicolor/512x512/apps'),
|
|
rename: 'io.github.bemagri.nomines.png'
|
|
)
|
|
|
|
# Install desktop file
|
|
install_data(
|
|
'resources/io.github.bemagri.nomines.desktop',
|
|
install_dir: join_paths(get_option('datadir'), 'applications')
|
|
)
|
|
|
|
# Install AppStream metadata
|
|
install_data(
|
|
'resources/io.github.bemagri.nomines.metainfo.xml',
|
|
install_dir: join_paths(get_option('datadir'), 'metainfo')
|
|
)
|
|
|
|
# Release validation (best-effort, only when the tools are installed)
|
|
desktop_file_validate = find_program('desktop-file-validate', required: false)
|
|
if desktop_file_validate.found()
|
|
test('validate-desktop', desktop_file_validate,
|
|
args: ['resources/io.github.bemagri.nomines.desktop'])
|
|
endif
|
|
|
|
appstreamcli = find_program('appstreamcli', required: false)
|
|
if appstreamcli.found()
|
|
test('validate-metainfo', appstreamcli,
|
|
args: ['validate', '--no-net', 'resources/io.github.bemagri.nomines.metainfo.xml'])
|
|
endif
|