Build and Verification
This document is for developers building from source. To use a release package, see Using the Application.
Prerequisites
- Windows 10 or 11
- PowerShell
g++available onPATHthird_party/pdfium/lib/pdfium.dll.libthird_party/pdfium/bin/pdfium.dll- The repository version is managed in
REPO_VERSION.txt.
Dependencies are vendored in the repository. The build and the application must not make external network connections.
Build
./build.ps1
build.ps1 builds the Full edition, Lite edition, and read-only viewer in the Release configuration and writes ready-to-package executables below out/.
To build individual targets:
./scripts/build/build_workspace.ps1 -Edition Full
./scripts/build/build_workspace.ps1 -Edition Lite
./scripts/build/build_readonly_viewer.ps1
./scripts/build/build_workspace.ps1 -Edition Full -Rebuild
Full includes Office-to-PDF conversion; Lite does not. The normal application and read-only viewer are written to out/bin/; the Lite application is written to out/bin_lite/.
Verification
powershell -NoProfile -ExecutionPolicy Bypass -File tests/scripts/run_repo_checks.ps1
python tests/python/validate_codebase.py
python -m unittest tests/python/test_python_tools.py
List checks with ./tests/scripts/run_repo_checks.ps1 -ListSteps. Select related steps from PowerShell as shown below. A partial run does not establish a full pass; provide the selected checks' prerequisites and existing artifacts. Optional checks still require their -Include... switches. A requested step that is skipped fails the run. The no-argument command above runs the normal full suite; optional checks require separate switches.
./tests/scripts/run_repo_checks.ps1 -OnlyStep 'Text Integrity Gate','Safety Scans'
Select active-content resistance checks with ./tests/scripts/run_repo_checks.ps1 -OnlyStep 'Script Resistance Tests'. They cover passive PDFium processing and related static contracts; passing does not establish that the entire application is free of vulnerabilities.
When changing saving behavior, also run:
powershell -NoProfile -ExecutionPolicy Bypass -File tests/scripts/run_atomic_write_tests.ps1
Create a release set
./release.ps1
Do not distribute out/ directly. Use the Full or Lite folder or ZIP created in a release set. ZIP filenames include locale and edition; their extracted top-level folder is PDF-Note-Workspace-<version>. The Full edition includes the verified LibreOffice conversion runtime; Lite does not. To make a short development build of Lite only, use ./build.ps1 -Lite.
Use scripts/release/make_release_set.ps1 or scripts/release/pack_release.ps1 only when adjusting release names, output paths, or bundled contents.
Full groups the LibreOffice conversion runtime and app-private fonts under lo/, with fonts at lo/image/Fonts/. Lite bundles only the fonts at libreoffice/image/Fonts/. Both editions keep the notices at licenses/libreoffice/. Font lookup also supports older package layouts; existing release sets retain their original layout.