Claude.md
This is a C++ program for Windows, using mostly win32 windows API functions
We don't use STL but our own string / helper / container functions implemented in src\utils directory
Assume that Visual Studio command-line tools are available in the PATH environment variable (cl.exe, msbuild.exe etc.)
Our code is in src/ directory. External dependencies are in ext/ directory and mupdf\ directory
To build run: bun ./cmd/build.ts
This creates ./out/dbg64/SumatraPDF.exe executable
To debug run: windbgx -Q -o -g ./out/dbg64/SumatraPDF.exe
After making a change to .cpp, .c or .h file (and before running build.ts), run clang-format on those files to reformat them in place
When commiting changes also commit ailog.txt (if changed)
The Bash tool runs under Git Bash (MSYS2), not cmd.exe. This causes critical issues with Windows-style commands:
2>nul — Bash interprets this literally and creates a file called nul. On Windows NTFS, nul is a reserved device name, making the file extremely difficult to delete (requires UAC/admin privileges). Use 2>/dev/null instead.rmdir /s /q — Bash rmdir does not understand cmd.exe flags. Use rm -rf instead.del — Not available in Bash. Use rm instead.dir — Use ls instead.cmd /c "..." explicitly.