diff --git a/docs/devel/changelog_staging.md b/docs/devel/changelog_staging.md index 56ab5e5f2..eb9ebb531 100644 --- a/docs/devel/changelog_staging.md +++ b/docs/devel/changelog_staging.md @@ -7,6 +7,7 @@ - `PdfPage.get_objects()`: Don't register pageobjects as children, because they don't need to be closed by the caller when part of a page. This avoids excessive caching of weakrefs that are not cleaned up with the object they refer to. - Fixed another dotted filepath blunder in the `extract-images` CLI. (The `PdfImage.extract()` API is not affected this time.) - Fixed installation with reference bindings (`PDFIUM_BINDINGS=reference`) by adding a missing `mkdir` call. (In older versions, this can be worked around by unpacking the sdist and creating the missing directory manually before installation.) +- Fixed sourcebuild on windows by syncing patches with pdfium-binaries. - Updated test expectations: due to changes in pdfium, some numbers are now slightly different. - Fixed conda packaging: It is now required to explicitly specify `-c defaults` with `--override-channels`, presumably due to an upstream change. - Autorelease: Swapped default condition for minor/patch update, as pypdfium2 changes are likely more API-significant than pdfium updates. Added ability for manual override. diff --git a/setupsrc/pypdfium2_setup/build_pdfium.py b/setupsrc/pypdfium2_setup/build_pdfium.py index b2424bc4e..036669b4b 100755 --- a/setupsrc/pypdfium2_setup/build_pdfium.py +++ b/setupsrc/pypdfium2_setup/build_pdfium.py @@ -26,7 +26,6 @@ (PatchDir/"public_headers.patch", PDFiumDir), ] PatchesWindows = [ - (PatchDir/"win"/"pdfium.patch", PDFiumDir), (PatchDir/"win"/"build.patch", PDFiumDir/"build"), ] diff --git a/sourcebuild/patches/win/build.patch b/sourcebuild/patches/win/build.patch index 5a62bb1d7..129438faa 100644 --- a/sourcebuild/patches/win/build.patch +++ b/sourcebuild/patches/win/build.patch @@ -1,13 +1,13 @@ diff --git a/toolchain/win/toolchain.gni b/toolchain/win/toolchain.gni -index 968a4a20e..536295050 100644 +index abb7d6228..3b74bda76 100644 --- a/toolchain/win/toolchain.gni +++ b/toolchain/win/toolchain.gni -@@ -235,7 +235,7 @@ template("single_msvc_toolchain") { +@@ -259,7 +259,7 @@ template("msvc_toolchain") { } tool("rc") { - command = "\"$python_path\" $_tool_wrapper_path rc-wrapper $env rc.exe /nologo $sys_include_flags{{defines}} {{include_dirs}} /fo{{output}} {{source}}" -+ command = "rc.exe /nologo $sys_include_flags{{defines}} {{include_dirs}} /fo{{output}} {{source}}" ++ command = "rc.exe /nologo $sys_include_flags{{defines}} {{include_dirs}} /fo{{output}} /dENV=$env {{source}}" depsformat = "msvc" outputs = [ "$object_subdir/{{source_name_part}}.res" ] description = "RC {{output}}" diff --git a/sourcebuild/patches/win/pdfium.patch b/sourcebuild/patches/win/pdfium.patch deleted file mode 100644 index 9c244fa63..000000000 --- a/sourcebuild/patches/win/pdfium.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/core/fxge/win32/cgdi_printer_driver.cpp b/core/fxge/win32/cgdi_printer_driver.cpp -index 28bc516bc..aa4cb0452 100644 ---- a/core/fxge/win32/cgdi_printer_driver.cpp -+++ b/core/fxge/win32/cgdi_printer_driver.cpp -@@ -15,6 +15,7 @@ - #include "core/fxcrt/fx_memory.h" - #include "core/fxcrt/fx_system.h" - #include "core/fxcrt/retain_ptr.h" -+#include "core/fxcrt/widestring.h" - #include "core/fxge/cfx_font.h" - #include "core/fxge/cfx_windowsrenderdevice.h" - #include "core/fxge/dib/cfx_dibbase.h"