Skip to content

feat: add compat.pdfium 8165 - #883

Open
FarnaHerry wants to merge 2 commits into
mcpplibs:mainfrom
FarnaHerry:add-pdfium
Open

FarnaHerry wants to merge 2 commits into
mcpplibs:mainfrom
FarnaHerry:add-pdfium

Conversation

@FarnaHerry

Copy link
Copy Markdown
Collaborator

Summary

Add compat.pdfium 8165 (design notes: .agents/docs/2026-11-23-add-pdfium-plan.md).

  • Form: Prebuilt C SDK (pkgs/c/compat.pdfium.lua) consuming bblanchon/pdfium-binaries release chromium/8165 (PDFium 160.0.8165.0, standalone build with V8/XFA disabled) across linux x64, macosx arm64, and windows x64 (upstream PDFium has no standalone source release outside Chromium's GN/depot_tools graph).
  • Layout, ABI Anchor & Runtime: Flat archive layout (include, include/cpp), C11 arch/ABI anchor (#include <stdlib.h> + <fpdfview.h>), license_files = { "LICENSE", "licenses/*" }, and per-platform runtime library/search paths (pdfium on Linux/macOS, pdfium.dll + bin on Windows).
  • Test: tests/examples/pdfium creates a PDF in memory (FPDF_CreateNewDocument, FPDFPage_New, FPDF_SaveAsCopy), reloads it (FPDF_LoadMemDocument), verifies dimensions, and renders a bitmap (FPDF_RenderPageBitmap).

Mirror & Automatic Updates

  • Mirror: No mcpp-res write credentials locally; xpm.<plat>.["8165"].url uses plain GitHub release URLs (docs/zh/cn-mirror.md fallback).
  • Autoupdate: extensions.autoupdate declares tag = "chromium/${version}" with per-platform tarball URLs.

Verification (mcpp 2026.11.18.1, MCPP_INDEX_MIRROR=GLOBAL)

  • Lint & mcpp xpkg parse pkgs/c/compat.pdfium.lua: parse OK, ALL LINT PASS
  • bash tests/run_members.sh pdfium: compat.pdfium 8165 roundtrip test: ok (pdf=549 bytes, pages=1, 200x100) (test result ok)
  • compat.pdfium mcpp build --strict + mcpp pack --mode self-contained --pkg-format dir: bundles libpdfium.so and share/licenses/compat.pdfium/* and runs cleanly in a relocated env -i environment (ld-linux --list resolves all shared libraries within the bundle)
  • xpkgindex_update: ci.py audit, inspect --package compat:pdfium, and check --package compat:pdfium (status = "up-to-date")
  • macOS / Windows native builds will be verified by PR CI.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant