* add support for systemd, OpenRC, SysVinit, and Dinit * add automatic init-system detection through CMake * make libsystemd optional for non-systemd builds * add native service definitions for all supported init systems * add Gentoo ebuild and Alpine APKBUILD packaging support * publish the official BastionGuard source repository * update the README with supported distributions, init systems, repository information, and build documentation
91 lines
2.5 KiB
Meson
91 lines
2.5 KiB
Meson
gtkmm = dependency('gtkmm-4.0', required: true)
|
|
glibmm = dependency('glibmm-2.68', required: true)
|
|
giomm = dependency('giomm-2.68', required: true)
|
|
libsystemd = dependency('libsystemd', required: false)
|
|
shumate = dependency('shumate-1.0', required: true)
|
|
jsondep = dependency('nlohmann_json', required: true)
|
|
threads = dependency('threads', required: true)
|
|
|
|
sources = [
|
|
'src/main.cpp',
|
|
'src/Application.cpp',
|
|
'src/MainWindow.cpp',
|
|
'src/ipc/UIServer.cpp',
|
|
'src/util/ProxyDetect.cpp',
|
|
'src/util/GeoResolver.cpp',
|
|
'src/util/AppResolver.cpp',
|
|
'src/dialogs/AlertDialog.cpp',
|
|
'src/dialogs/LanguageDialog.cpp',
|
|
'src/pages/ConnectionsPage.cpp',
|
|
'src/pages/AppsPage.cpp',
|
|
'src/pages/NetworkPage.cpp',
|
|
'src/pages/RulesPage.cpp',
|
|
'src/pages/StatsPage.cpp',
|
|
'src/pages/AboutPage.cpp',
|
|
'src/pages/SettingsPage.cpp',
|
|
libsystemd.found() ? 'src/TrayIcon.cpp' : 'src/TrayIconStub.cpp',
|
|
]
|
|
|
|
inc = include_directories('src')
|
|
|
|
deps = [
|
|
gtkmm, glibmm, giomm, shumate, jsondep, threads,
|
|
]
|
|
|
|
if libsystemd.found()
|
|
deps += [libsystemd]
|
|
tray_cpp_args = ['-DBSC_HAS_SDBUS=1']
|
|
message('Secure Connection tray: sd-bus enabled')
|
|
else
|
|
tray_cpp_args = ['-DBSC_HAS_SDBUS=0']
|
|
warning('libsystemd not found: Secure Connection tray disabled; UI remains available')
|
|
endif
|
|
|
|
executable('bastionguard-sc-ui',
|
|
sources,
|
|
include_directories : [inc, common_include_dir, root_include_dir],
|
|
dependencies : deps,
|
|
cpp_args : tray_cpp_args,
|
|
install : true,
|
|
install_dir : get_option('bindir'),
|
|
)
|
|
|
|
install_data(
|
|
'data/bastionguard-sc.desktop',
|
|
install_dir : join_paths(get_option('datadir'), 'applications'),
|
|
)
|
|
|
|
install_data(
|
|
'data/bastionguard-sc-autostart.desktop',
|
|
install_dir : join_paths(get_option('sysconfdir'), 'xdg', 'autostart'),
|
|
)
|
|
|
|
install_data(
|
|
'data/BSC.css',
|
|
'data/BSC-dark.css',
|
|
'data/icon-close.png',
|
|
'data/icon-minimize.png',
|
|
'data/logo-sidebar.png',
|
|
'data/logo.svg',
|
|
install_dir : join_paths(get_option('datadir'), 'bastionguard-sc', 'data'),
|
|
)
|
|
|
|
install_data(
|
|
'data/icons/connections.svg',
|
|
'data/icons/apps.svg',
|
|
'data/icons/network.svg',
|
|
'data/icons/rules.svg',
|
|
'data/icons/stats.svg',
|
|
'data/icons/about.svg',
|
|
install_dir : join_paths(get_option('datadir'), 'bastionguard-sc', 'data/icons'),
|
|
)
|
|
|
|
install_data(
|
|
'data/icons/bastionguard-sc.svg',
|
|
install_dir : join_paths(get_option('datadir'), 'icons', 'hicolor', 'scalable', 'apps'),
|
|
)
|
|
|
|
meson.add_install_script(
|
|
'sh', '-c',
|
|
'gtk-update-icon-cache -qtf "$MESON_INSTALL_DESTDIR_PREFIX/' + get_option('datadir') + '/icons/hicolor" || true'
|
|
)
|