From 72971d33297c9ee2e288612baac142a33752427d Mon Sep 17 00:00:00 2001 From: Catalin Date: Fri, 6 Jan 2017 18:16:00 +0200 Subject: [PATCH] Add libpng upgrade example for MSW. --- .../how-to-update-third-party-library.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/contributing/how-to-update-third-party-library.md b/docs/contributing/how-to-update-third-party-library.md index 0414c6f3a7..5c16d2114d 100644 --- a/docs/contributing/how-to-update-third-party-library.md +++ b/docs/contributing/how-to-update-third-party-library.md @@ -125,3 +125,22 @@ versions there. Notice that config.h generated by libpng configure is not used, we build it without -DHAVE_CONFIG_H as it works just fine without it on any ANSI C system (i.e. anywhere by now). + + +Example updating libpng files under MSW: + Since configure looked for zlib, the following 2 steps were also needed: + a) get zlib source code (www.zlib.net) to a separate location; + b) in zlib root dir run: mingw32-make -fwin32/Makefile.gcc + (will generate zlib1.dll) +1) get libpng source code (libpng.sourceforge.net) to a separate location; +2) in libpng root dir run: + configure --with-libpng-prefix=wx_ + Alternatively, if configure still cannot find zlib, run: + export CPPFLAGS="-I zlib-root-dir" + export LDFLAGS="-L zlib-root-dir" + configure --with-libpng-prefix=wx_ +3) in libpng root dir run: + mingw32-make png.lo + (will generate pnglibconf.h and pngprefix.h, among others) +4) copy files from libpng root dir and scripts subfolder to src/png, updating old files only (other new files were not needed); +5) commit the changes.