diff --git a/README.md b/README.md index 5fd5fec..b8fa78c 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,5 @@ ssim = core.ssimulacra2.SSIMULACRA2(ref, dist) ## Building ``zig build -Doptimize=ReleaseFast`` + +[Download](https://ziglang.org/download/) the latest zig-dev, or run the ``build.sh`` file if you're on Linux. diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..49094b2 --- /dev/null +++ b/build.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +set -x + +wget https://github.com/ziglang/www.ziglang.org/raw/master/data/releases.json +json_file="releases.json" + +VER=$(jq -r '.master.version' "${json_file}") +ZNAME="zig-linux-x86_64-${VER}" + +wget "https://ziglang.org/builds/${ZNAME}.tar.xz" +tar -xf "${ZNAME}.tar.xz" + +"${ZNAME}/zig" build -Doptimize=ReleaseFast + +sudo mv zig-out/lib/libssimulacra2.so /usr/lib/vapoursynth