diff --git a/depends/install_libavif.sh b/depends/install_libavif.sh index 1e414668804..39d69d481db 100755 --- a/depends/install_libavif.sh +++ b/depends/install_libavif.sh @@ -77,7 +77,7 @@ cmake .. \ -DCMAKE_BUILD_TYPE=Release \ "${LIBAVIF_CMAKE_FLAGS[@]}" make -sudo make install +make install || sudo make install popd popd diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 1dcf4962e30..26f8f1c2a20 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -370,6 +370,15 @@ def cmd_msbuild( ], "bins": [r"*.dll"], }, + "rav1e": { + "url": "https://github.com/xiph/rav1e/releases/download/v0.6.6/rav1e-0.6.6-windows-msvc-generic.zip", + "filename": "rav1e-0.6.6-windows-msvc-generic.zip", + "dir": "rav1e-windows-msvc-sdk", + "license": [], + "build": [], + "libs": [r"lib\*.lib"], + "headers": [r"include"], + }, "libavif": { "url": "https://github.com/AOMediaCodec/libavif/archive/v1.0.1.zip", "filename": "libavif-1.0.1.zip", @@ -377,14 +386,13 @@ def cmd_msbuild( "license": "LICENSE", "build": [ cmd_cd("ext"), - cmd_rmdir("aom"), - 'cmd.exe /c "aom.cmd"', cmd_rmdir("dav1d"), 'cmd.exe /c "dav1d.cmd"', cmd_cd(".."), *cmds_cmake( "avif", "-DBUILD_SHARED_LIBS=OFF", + "-DAVIF_CODEC_RAV1E=ON", "-DAVIF_CODEC_AOM=ON", "-DAVIF_LOCAL_AOM=ON", "-DAVIF_CODEC_DAV1D=ON", @@ -394,6 +402,7 @@ def cmd_msbuild( cmd_lib_combine( r"avif_combined.lib", r"avif.lib", + r"{lib_dir}\rav1e.lib", r"ext\aom\build.libavif\aom.lib", r"ext\dav1d\build\src\libdav1d.a", ), @@ -578,10 +587,11 @@ def build_dep(name: str) -> str: if "license_pattern" in dep: match = re.search(dep["license_pattern"], license_text, re.DOTALL) license_text = "\n".join(match.groups()) - assert len(license_text) > 50 - with open(os.path.join(license_dir, f"{dir}.txt"), "w") as f: - print(f"Writing license {dir}.txt") - f.write(license_text) + if licenses: + assert len(license_text) > 50 + with open(os.path.join(license_dir, f"{dir}.txt"), "w") as f: + print(f"Writing license {dir}.txt") + f.write(license_text) for patch_file, patch_list in dep.get("patch", {}).items(): patch_file = os.path.join(sources_dir, dir, patch_file.format(**prefs))