Skip to content

Add optional shared library build - #5

Open
BoatsMcGee wants to merge 2 commits into
halidecx:mainfrom
BoatsMcGee:add-windows-shared-build
Open

BoatsMcGee wants to merge 2 commits into
halidecx:mainfrom
BoatsMcGee:add-windows-shared-build

Conversation

@BoatsMcGee

Copy link
Copy Markdown
  • Add -Dshared=true option to additionally output a shared library (.so, .dll, .dylib).
  • Add fmetrics.def to define what the Windows DLL exports.
  • Patches fcvvdp to fix building on Windows. The patch was made by an LLM so I will not be making a PR for it unless someone more knowledgeable about the codebase determines it is good. Assuming that happens I recommend updating to whatever version has that change and deleting the patch.
  • Updated README with instructions for building on Windows as it requires patching before running the build.

I built the CLI and ran it on a png and a y4m - both compared to themselves as a smoke test:

fmetrics.exe ssimu2 .\sample.y4m .\sample.y4m
fmetrics by Halide Compression, LLC | 0.1.0
99.977191

Thanks,
- Boats M.

Add Windows support patch and build
A patch is data applied to files whose line endings are fixed by whoever
fetched them. With core.autocrlf=true the working copy was rewritten to CRLF,
and git apply then failed with 'patch does not apply' because the context no
longer matched the LF cvvdp.c that Zig extracts.

Marking *.patch -text stops git converting it, so the file is committed and
checked out byte for byte.
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