The tree now compiles on macOS. Each Linux-only call gets a Darwin branch, and the Linux branch stays as it was: - io::fdatasync uses fcntl(F_FULLFSYNC): fsync alone only reaches the drive cache on APFS, and the store's crash atomicity relies on it. - Control socket: FD_CLOEXEC set after socket/accept/recvmsg (no SOCK_CLOEXEC, accept4 or MSG_CMSG_CLOEXEC), SO_NOSIGPIPE, peer credentials from LOCAL_PEERCRED + LOCAL_PEERPID, getgrouplist with int groups and a growing buffer. launchd has no RuntimeDirectory, so the socket directory is created (0750, access group) when missing. Default socket path is /var/run/strawberry/control.sock. - CRC32C detects ARMv8 CRC with hw.optional.armv8_crc32 (no auxv). - stat mtime via st_mtimespec; the BPF shared header uses stdint typedefs off Linux. - Background threads join the PRIO_DARWIN_BG band (lower CPU and I/O); crash safety zeroes RLIMIT_CORE in place of PR_SET_DUMPABLE. - The desktop app drops Qt DBus off Linux and shows notifications as tray messages (app/notifier_tray.cpp). - make setup passes Homebrew's keg-only libarchive to meson. Tests: behavior_live (Linux ptrace API) builds on Linux only, the control-server fd count reads /dev/fd, the crash test checks the core limit on macOS, and the runtime pipeline test no longer references a YARA-only helper when YARA is absent (that also broke Linux builds without libyara). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
1.1 KiB
Meson
49 lines
1.1 KiB
Meson
# strawberry-tray: Qt6 desktop app + tray indicator
|
|
|
|
qt6 = import('qt6')
|
|
|
|
app_moc = qt6.compile_moc(
|
|
headers: files(
|
|
'app_controller.hpp',
|
|
'daemon_client.hpp',
|
|
'main_window.hpp',
|
|
'notifier.hpp',
|
|
'tray.hpp',
|
|
),
|
|
dependencies: qt6_dep,
|
|
)
|
|
|
|
# Pure tray logic: no Qt, unit-tested without a display.
|
|
app_tray_state = static_library('strawberry_tray_state',
|
|
files('tray_state.cpp'),
|
|
include_directories: inc_dirs,
|
|
)
|
|
|
|
executable('strawberry-tray',
|
|
files(
|
|
'main.cpp',
|
|
'app_controller.cpp',
|
|
'daemon_client.cpp',
|
|
'main_window.cpp',
|
|
'main_window_policy.cpp',
|
|
host_machine.system() == 'linux' ? 'notifier.cpp' : 'notifier_tray.cpp',
|
|
'tray.cpp',
|
|
),
|
|
app_moc,
|
|
link_with: app_tray_state,
|
|
dependencies: [qt6_dep, strawberry_core_dep],
|
|
install: true,
|
|
install_dir: get_option('bindir'),
|
|
)
|
|
|
|
install_data('../packaging/strawberry-tray.desktop',
|
|
install_dir: join_paths(get_option('datadir'), 'applications'),
|
|
)
|
|
|
|
if get_option('enable_tests')
|
|
test('tray_state', executable('test_tray_state',
|
|
files('tests/test_tray_state.cpp'),
|
|
include_directories: inc_dirs,
|
|
link_with: app_tray_state,
|
|
))
|
|
endif
|