Skip to content

Commit

Permalink
attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
fdintino committed Sep 24, 2023
1 parent d006a9d commit e2c2bfe
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions winbuild/build_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,18 @@ 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",
"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": [],
"build": [
cmd_copy(r"lib\pkgconfig\rav1e.pc", r"{lib_dir}\pkgconfig"),
],
"headers": [r"include"],
"bins": [r"*.dll"],
},
"libavif": {
"url": "https://github.com/AOMediaCodec/libavif/archive/v1.0.1.zip",
Expand All @@ -384,24 +391,20 @@ def cmd_msbuild(
"license": "LICENSE",
"build": [
cmd_cd("ext"),
cmd_mkdir(r"rav1e\rav1e\build.libavif"),
cmd_xcopy(r"..\rav1e-windows-msvc-sdk", r"rav1e\rav1e\build.libavif\usr"),
cmd_rmdir("dav1d"),
'cmd.exe /c "dav1d.cmd"',
cmd_cd(".."),
*cmds_cmake(
"avif",
"-DBUILD_SHARED_LIBS=OFF",
"-DAVIF_CODEC_RAV1E=ON",
"-DAVIF_LOCAL_RAV1E=ON",
"-DAVIF_CODEC_DAV1D=ON",
"-DAVIF_LOCAL_DAV1D=ON",
),
cmd_nmake(),
cmd_lib_combine(
r"avif_combined.lib",
r"avif.lib",
r"ext\rav1e\rav1e\build.libavif\usr\lib\rav1e.lib",
r"ext\dav1d\build\src\libdav1d.a",
),
cmd_copy(r"avif_combined.lib", r"avif.lib"),
Expand Down Expand Up @@ -559,6 +562,8 @@ def build_env() -> None:
cmd_set("INCLIB", "{lib_dir}"),
cmd_set("LIB", "{lib_dir}"),
cmd_append("PATH", "{bin_dir}"),
cmd_mkdir(r"{lib_dir}\pkgconfig"),
cmd_append("PKG_CONFIG_PATH", r"{lib_dir}\pkgconfig"),
"call {vcvarsall} {vcvars_arch}",
cmd_set("DISTUTILS_USE_SDK", "1"), # use same compiler to build Pillow
cmd_set("py_vcruntime_redist", "true"), # always use /MD, never /MT
Expand Down

0 comments on commit e2c2bfe

Please sign in to comment.