From 2bed0739f4d68b3329295263259808241537dfe4 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 30 Jun 2026 23:17:49 +0000 Subject: [PATCH 1/2] Fix malformed if(APPLE) block in CMakeLists.txt that broke CMake configure A bad merge left an unterminated add_executable(LabRecorderCLI ...) with a duplicate nested add_executable inside the if(APPLE) branch, causing a 'Parse error. Function missing ending ")".' on every platform. Remove the stray duplicate so the file parses and the project configures/builds. Co-authored-by: Pho Hale --- CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86e1188..311cdf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,10 +126,6 @@ add_executable(LabRecorderCLI MACOSX_BUNDLE src/clirecorder.cpp src/recording.h src/recording.cpp -add_executable(LabRecorderCLI - src/clirecorder.cpp - src/recording.h - src/recording.cpp ) else() add_executable(LabRecorderCLI From f4bdb4f48303f70a81c3a85bdd92ecf5dd43701b Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 30 Jun 2026 23:17:49 +0000 Subject: [PATCH 2/2] Add AGENTS.md with Cursor Cloud setup/run instructions Co-authored-by: Pho Hale --- AGENTS.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..03504f7 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,41 @@ +# AGENTS.md + +## Cursor Cloud specific instructions + +LabRecorder is a C++/Qt6 desktop app (plus a `LabRecorderCLI` command-line recorder and an +in-tree `xdfwriter` static library + `testxdfwriter` test exe) for recording Lab Streaming +Layer (LSL) streams to `.xdf` files. There are no databases/servers; "services" here are just +the recorder binaries plus at least one live LSL stream to record. Build is CMake-only; +standard build commands are documented in `BUILD.md` and `CMakePresets.json`. + +### Build / configure (Linux) +- Use the `linux-gcc-release` preset: + - `cmake --preset linux-gcc-release` + - `cmake --build --preset linux-release -j` +- Binaries land in `out/build/linux-gcc-release/` (`LabRecorder`, `LabRecorderCLI`, + `xdfwriter/testxdfwriter`). +- `liblsl` is installed system-wide (deb), so `find_package(LSL)` resolves via + `/usr/lib/cmake/LSL` with no `LSL_INSTALL_ROOT` needed. + +### Non-obvious caveats +- The default C++ compiler (`/usr/bin/c++`) is **clang**, which uses the gcc-14 toolchain and + therefore needs `libstdc++-14-dev` (the update script installs it). Without it, even the + CMake compiler check fails with `cannot find -lstdc++`. +- The committed `LabRecorder.cfg` (copied next to the GUI binary at build time) has a + Windows `StudyRoot`/save path (`E:/Dropbox...`) that is not writable on Linux. Before + recording with the GUI, set the **Study Root** field to a writable dir (e.g. `/tmp/lr_recordings`) + and a simple **File Name/Template** (e.g. `gui_test.xdf`). The GUI auto-creates the directory. +- `CMakeUserPresets.json` only defines Windows presets; ignore it on Linux. + +### Running / testing end-to-end +- A running X display is available at `DISPLAY=:1` (TigerVNC + xfce4); launch the GUI with + `DISPLAY=:1 ./LabRecorder`. +- To exercise the recorder you need a live LSL stream. There are no bundled example senders, + so create a tiny one against the installed `liblsl` headers (`/usr/include/lsl_cpp.h`, + link with `-llsl`) that opens an `lsl::stream_outlet` and pushes samples. +- CLI flow: `./LabRecorderCLI out.xdf 'type="EEG"'` resolves matching streams, records, and + stops on Enter (so e.g. `(sleep 5; echo) | ./LabRecorderCLI ...` records ~5s). +- Verify a recording by checking the file starts with the `XDF:` magic and contains the + expected stream name/type. +- Unit check: run `out/build/linux-gcc-release/xdfwriter/testxdfwriter` (exit 0 = pass; it + writes a sample `test.xdf`).