Skip to content

Building

Standard C++17 (std::filesystem). The CLI tools have no third-party dependencies, with one exception: bookmark_sync vendors SQLite (public domain, third_party/sqlite3) to read/write Firefox's places.sqlite — no system install needed, it's compiled in. mullion-fileman additionally pulls FTXUI (MIT) via CMake, and the optional AI agent embeds llama.cpp (statically — the resulting exe is self-contained).

Build variants at a glance

Variant What you get Windows Any platform (CMake)
CLI tools folder_* only (no deps) .\build.ps1 ./build.sh
+ mullion-fileman TUI (FTXUI) build-mullion-fileman.bat cmake -B build && cmake --build build
+ AI (CPU) mullion-fileman with the embedded Gemma agent, self-contained build-mullion-fileman.bat -DBUILD_MULLION_FILEMAN_AI=ON cmake -B build -DBUILD_MULLION_FILEMAN_AI=ON && cmake --build build
+ AI (GPU/CUDA) AI agent on an NVIDIA GPU (needs CUDA toolkit) build-mullion-fileman.bat -DBUILD_MULLION_FILEMAN_AI=ON -DMULLION_FILEMAN_AI_CUDA=ON cmake -B build -DBUILD_MULLION_FILEMAN_AI=ON -DMULLION_FILEMAN_AI_CUDA=ON && cmake --build build

All executables land in the project root. The AI build fetches + statically links llama.cpp (a few minutes the first time). See the AI agent section for the model + runtime.

CLI tools

.\build.ps1            # build all CLI tools
.\build.ps1 -Test      # also build + run the unit tests

Or one tool manually from a Developer Command Prompt:

cl /std:c++17 /O2 /EHsc /I include src\folder_parity.cpp /Fe:folder_parity.exe
./build.sh             # build all CLI tools
./build.sh --test      # also build + run the unit tests

Or manually:

g++ -std=c++17 -O2 -pthread -I include src/folder_parity.cpp -o folder_parity
# clang++ works too; on GCC < 9 add -lstdc++fs
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
ctest --test-dir build --output-on-failure

mullion-fileman (TUI)

mullion-fileman needs FTXUI, so it builds via CMake (not the single-command path).

build-mullion-fileman.bat

Uses the CMake + Ninja bundled with Visual Studio (added to PATH by the script) and drops every executable in the project root.

cmake -B build && cmake --build build

Pass -DBUILD_MULLION_FILEMAN=OFF to build only the dependency-free CLI tools.

Testing

A tiny pytest-style harness lives in tests/. build.ps1 -Test / build.sh --test / ctest all run it. Coverage: byte/duration formatting, CSV escaping, FNV-1a hashing, recursive + parallel scanning, the diff classifier (size vs. hash), sync routing, the file-op helpers, and an end-to-end scan → diff → sync → re-verify flow.

Windows: "An Application Control policy has blocked this file"

Smart App Control / WDAC can block a freshly built, unsigned executable. Any of these lets it run:

  • Right-click the .exePropertiesUnblock (or Unblock-File).
  • Allow it once at the Windows Security prompt.
  • Sign the executable.
  • Set Smart App Control to evaluation/off (note: re-enabling needs a Windows reset — prefer the per-file options for development).

This is a Windows code-signing/reputation gate only; it does not occur on macOS or Linux.