summaryrefslogtreecommitdiff
path: root/Build/source/libs/gd/libgd-src/windows
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/gd/libgd-src/windows')
-rw-r--r--Build/source/libs/gd/libgd-src/windows/Makefile.vc6
-rw-r--r--Build/source/libs/gd/libgd-src/windows/Makefiletest.vc117
-rw-r--r--Build/source/libs/gd/libgd-src/windows/gentest.bat70
-rw-r--r--Build/source/libs/gd/libgd-src/windows/libgd.rc4
-rw-r--r--Build/source/libs/gd/libgd-src/windows/msys/Makefile18
-rw-r--r--Build/source/libs/gd/libgd-src/windows/msys/README.MSYS.md13
-rwxr-xr-xBuild/source/libs/gd/libgd-src/windows/msys/run_tests.sh11
-rw-r--r--Build/source/libs/gd/libgd-src/windows/readme.md106
-rw-r--r--Build/source/libs/gd/libgd-src/windows/run_tests.bat86
9 files changed, 268 insertions, 163 deletions
diff --git a/Build/source/libs/gd/libgd-src/windows/Makefile.vc b/Build/source/libs/gd/libgd-src/windows/Makefile.vc
index c87583c5089..67a8014196b 100644
--- a/Build/source/libs/gd/libgd-src/windows/Makefile.vc
+++ b/Build/source/libs/gd/libgd-src/windows/Makefile.vc
@@ -130,16 +130,16 @@ CFLAGS= $(CFLAGS) \
/D_WIN32=1\
/DMSWIN32=1\
/DBGDWIN32=1\
+ /DENABLE_GD_FORMATS=1\
/DHAVE_FT2BUILD_H=1\
/DHAVE_GD_H=1\
/DHAVE_ICONV_H=1\
- /DHAVE_GD_BUNDLED=1\
/DHAVE_LIBFREETYPE=1\
/DHAVE_LIBJPEG=1\
/DHAVE_LIBPNG=1\
- /DHAVE_LIBWEBP=1\
+ /DHAVE_LIBWEBP=1\
/DHAVE_LIBZ=1\
- /DHAVE_LIBXPM=1\
+ /DHAVE_LIBXPM=1\
/DHAVE_LIBTIFF=1\
$(INCLUDES)
diff --git a/Build/source/libs/gd/libgd-src/windows/Makefiletest.vc b/Build/source/libs/gd/libgd-src/windows/Makefiletest.vc
new file mode 100644
index 00000000000..827a4e79e04
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/windows/Makefiletest.vc
@@ -0,0 +1,117 @@
+TESTS=bmp\bmp_im2im \
+bmp\bmp_null \
+freetype\bug00132 \
+gd\gd_im2im \
+gd\gd_null \
+gd\gd_num_colors \
+gd\gd_versiontest \
+gd2\gd2_empty_file \
+gd2\gd2_im2im \
+gd2\gd2_null \
+gd2\gd2_read \
+gd2\gd2_read_corrupt \
+gd2\php_bug_72339 \
+gdimagearc\bug00079 \
+gdimagecolorclosest\gdimagecolorclosest \
+gdimagecolordeallocate\gdimagecolordeallocate \
+gdimagecolorexact\gdimagecolorexact \
+gdimagecolorreplace\gdimagecolorreplace \
+gdimagecolorresolve\gdimagecolorresolve \
+gdimagecolortransparent\gdimagecolortransparent \
+gdimagecopy\bug00007 \
+gdimagecopy\bug00081 \
+gdimagecopyrotated\bug00020 \
+gdimagecrop\php_bug_72494 \
+gdimagefile\gdnametest \
+gdimagefill\bug00002_1 \
+gdimagefill\bug00002_2 \
+gdimagefill\bug00002_3 \
+gdimagefill\bug00002_4 \
+gdimagefill\bug00104_1 \
+gdimagefilledellipse\bug00010 \
+gdimagefilledellipse\bug00191 \
+gdimagefilledellipse\github_bug_00238 \
+gdimagefilledpolygon\bug00100 \
+gdimagefilledpolygon\gdimagefilledpolygon0 \
+gdimagefilledpolygon\gdimagefilledpolygon1 \
+gdimagefilledpolygon\gdimagefilledpolygon2 \
+gdimagefilledpolygon\gdimagefilledpolygon3 \
+gdimagefilledpolygon\php_bug_64641 \
+gdimagefilledrectangle\bug00004 \
+gdimagefilledrectangle\bug00078 \
+gdimagefilledrectangle\bug00106_gdimagefilledrectangle \
+gdimagefilltoborder\bug00037 \
+gdimagefilltoborder\github_bug_215 \
+gdimagefilter\gdCopyBlurred \
+gdimageline\bug00072 \
+gdimageline\bug00077 \
+gdimageline\bug00111 \
+gdimageline\gdImageAALine_thickness \
+gdimageline\gdimageline_aa \
+gdimageline\gdimageline_aa_outofrange \
+gdimageline\gdimageline_bug5 \
+gdimageline\github_bug_167 \
+gdimageopenpolygon\gdimageopenpolygon0 \
+gdimageopenpolygon\gdimageopenpolygon1 \
+gdimageopenpolygon\gdimageopenpolygon2 \
+gdimageopenpolygon\gdimageopenpolygon3 \
+gdimagepixelate\gdimagepixelate \
+gdimagepolygon\gdimagepolygon0 \
+gdimagepolygon\gdimagepolygon1 \
+gdimagepolygon\gdimagepolygon2 \
+gdimagepolygon\gdimagepolygon3 \
+gdimagerectangle\bug00003 \
+gdimagerectangle\bug00106_gdimagerectangle \
+gdimagerectangle\github_bug_00172 \
+gdimagerotate\bug00067 \
+gdimagerotate\php_bug_64898 \
+gdimagescale\github_bug_00218 \
+gdimagescatterex\bug00208_1 \
+gdimagescatterex\bug00208_2 \
+gdimagesetpixel\bug00186 \
+gdimagesetpixel\gdeffectmultiply \
+gdimagesetpixel\gdeffectoverlay \
+gdimagestringft\gdimagestringft_bbox \
+gdimagestringftex\gdimagestringftex_returnfontpathname \
+gdinterpolatedscale\gdModesAndPalettes \
+gdinterpolatedscale\gdTrivialResize \
+gdnewfilectx\gdnewfilectx_null \
+gdtiled\bug00032 \
+gdtransformaffineboundingbox\github_bug_00221 \
+gif\bug00005 \
+gif\bug00005_2 \
+gif\bug00006 \
+gif\bug00060 \
+gif\bug00066 \
+gif\bug00181 \
+gif\bug00227 \
+gif\gif_im2im \
+gif\gif_null \
+jpeg\bug_github_18 \
+jpeg\jpeg_empty_file \
+jpeg\jpeg_im2im \
+jpeg\jpeg_null \
+jpeg\jpeg_read \
+jpeg\jpeg_resolution \
+png\bug00011 \
+png\bug00033 \
+png\bug00086 \
+png\bug00088 \
+png\bug00193 \
+png\png_im2im \
+png\png_null \
+png\png_resolution \
+tga\bug00084 \
+tga\bug00247 \
+tga\bug00247a \
+tga\tga_null \
+tiff\tiff_dpi \
+tiff\tiff_im2im \
+tiff\tiff_null \
+wbmp\wbmp_im2im \
+wbmp\wbmp_null \
+webp\bug00111 \
+xbm\github_bug_170 \
+xpm\bug00166 \
+xpm\bug00185 \
+xpm\color_name
diff --git a/Build/source/libs/gd/libgd-src/windows/gentest.bat b/Build/source/libs/gd/libgd-src/windows/gentest.bat
index f57d08b6708..756e0f91bb2 100644
--- a/Build/source/libs/gd/libgd-src/windows/gentest.bat
+++ b/Build/source/libs/gd/libgd-src/windows/gentest.bat
@@ -1,35 +1,35 @@
-SETLOCAL ENABLEDELAYEDEXPANSION
-@echo off
-set testsdir=%~1
-set builddir=%~2
-set CFLAGS=%~3
-set LDFLAGS=%~4
-set CC=%~5
-set LD=%~6
-set TESTMK=%~7
-set TESTLIST=%~8
-echo %*
-echo recieved !testsdir! !builddir! !CFLAGS! !LDFLAGS! !CC!
-
-copy NUL !TESTMK! > nul
-copy NUL !TESTLIST! > nul
-
-for /D %%d in (!testsdir!/*) do (
- if NOT "%%d"=="fontconfig" if NOT "%%d"=="gdtest" for %%f in (!testsdir!/%%d/*.c) do (
- echo TEST_EXES=!builddir!\tests\%%d_%%~nf.exe ^$^(TEST_EXES^) >> !TESTMK!
- )
-)
-
-for /D %%d in (!testsdir!/*) do (
- if NOT "%%d"=="fontconfig" if NOT "%%d"=="gdtest" for %%f in (!testsdir!/%%d/*.c) do (
- echo !builddir!\%%d_%%~nf.obj: !testsdir!\%%d\%%f; ^$^(CC^) ^$^(TEST_CFLAGS^) /c ^$** /Fd$*.pdb /Fo:$@ >> !TESTMK!
- )
-)
-
-for /D %%d in (!testsdir!/*) do (
- if NOT "%%d"=="fontconfig" if NOT "%%d"=="gdtest" for %%f in (!testsdir!/%%d/*.c) do (
- echo !builddir!\tests\%%d_%%~nf.exe: !builddir!\%%d_%%~nf.obj; !LD! !LDFLAGS! $** /out:$@ >> !TESTMK!
- echo %%d_%%~nf.exe >> !TESTLIST!
- )
-)
-ENDLOCAL \ No newline at end of file
+SETLOCAL ENABLEDELAYEDEXPANSION
+@echo off
+set testsdir=%~1
+set builddir=%~2
+set CFLAGS=%~3
+set LDFLAGS=%~4
+set CC=%~5
+set LD=%~6
+set TESTMK=%~7
+set TESTLIST=%~8
+echo %*
+echo recieved !testsdir! !builddir! !CFLAGS! !LDFLAGS! !CC!
+
+copy NUL !TESTMK! > nul
+copy NUL !TESTLIST! > nul
+
+for /D %%d in (!testsdir!/*) do (
+ if NOT "%%d"=="fontconfig" if NOT "%%d"=="gdtest" for %%f in (!testsdir!/%%d/*.c) do (
+ echo TEST_EXES=!builddir!\tests\%%d_%%~nf.exe ^$^(TEST_EXES^) >> !TESTMK!
+ )
+)
+
+for /D %%d in (!testsdir!/*) do (
+ if NOT "%%d"=="fontconfig" if NOT "%%d"=="gdtest" for %%f in (!testsdir!/%%d/*.c) do (
+ echo !builddir!\%%d_%%~nf.obj: !testsdir!\%%d\%%f; ^$^(CC^) ^$^(TEST_CFLAGS^) /c ^$** /Fd$*.pdb /Fo:$@ >> !TESTMK!
+ )
+)
+
+for /D %%d in (!testsdir!/*) do (
+ if NOT "%%d"=="fontconfig" if NOT "%%d"=="gdtest" for %%f in (!testsdir!/%%d/*.c) do (
+ echo !builddir!\tests\%%d_%%~nf.exe: !builddir!\%%d_%%~nf.obj; !LD! !LDFLAGS! $** /out:$@ >> !TESTMK!
+ echo %%d_%%~nf.exe >> !TESTLIST!
+ )
+)
+ENDLOCAL
diff --git a/Build/source/libs/gd/libgd-src/windows/libgd.rc b/Build/source/libs/gd/libgd-src/windows/libgd.rc
index dfe6ff0aa78..803b3462123 100644
--- a/Build/source/libs/gd/libgd-src/windows/libgd.rc
+++ b/Build/source/libs/gd/libgd-src/windows/libgd.rc
@@ -1,5 +1,4 @@
/* This is a template RC file.
- * $Id$
* Do not edit with MSVC */
#ifdef APSTUDIO_INVOKED
# error dont edit with MSVC
@@ -38,7 +37,7 @@ BEGIN
VALUE "FileDescription", "LIBGD" "\0"
VALUE "FileVersion", GD_VERSION_STRING "\0"
VALUE "InternalName", "bgd.dll" "\0"
- VALUE "LegalCopyright", "Copyright © 1997-2008 Thomas Boutell, Pierre A. Joye and contributors, see COPYING\0"
+ VALUE "LegalCopyright", "Copyright © 1997-2008 Thomas Boutell, Pierre A. Joye and contributors, see COPYING\0"
VALUE "LegalTrademarks", "Thomas Boutell, Pierre A. Joye and contributors\0"
VALUE "OriginalFilename", "bgd.dll" "\0"
VALUE "PrivateBuild", "\0"
@@ -56,4 +55,3 @@ END
#ifdef MC_INCLUDE
#include MC_INCLUDE
#endif
-
diff --git a/Build/source/libs/gd/libgd-src/windows/msys/Makefile b/Build/source/libs/gd/libgd-src/windows/msys/Makefile
index 3b1ced42b64..d4acaafc324 100644
--- a/Build/source/libs/gd/libgd-src/windows/msys/Makefile
+++ b/Build/source/libs/gd/libgd-src/windows/msys/Makefile
@@ -1,4 +1,3 @@
-
# Simple makefile for building and testing libgd under MSYS/MinGW on
# Windows
@@ -7,9 +6,10 @@
LIBVER=3.0.1
# Misc. config flags.
-CDEFS=-DHAVE_ERRNO_H -DHAVE_ICONV -DHAVE_ICONV_H \
--DHAVE_ICONV_T_DEF -DHAVE_INTTYPES_H -DHAVE_LIMITS_H -DHAVE_STDDEF_H \
--DHAVE_STDINT_H -DHAVE_STDLIB_H -DHAVE_VISIBILITY -DICONV_CONST
+CDEFS=-DHAVE_ICONV -DHAVE_ICONV_H \
+-DHAVE_ICONV_T_DEF -DHAVE_INTTYPES_H \
+-DHAVE_STDINT_H -DHAVE_VISIBILITY -DICONV_CONST \
+-DENABLE_GD_FORMATS=1
# GnuWin32 libs should all be installed in one place.
GNUDIR=/c/tools/GnuWin32
@@ -131,13 +131,3 @@ $(TARGET): $(OBJ)
$(OBJ) $(LIBS)
include deps.mk
-
-
-
-
-
-
-
-
-
-
diff --git a/Build/source/libs/gd/libgd-src/windows/msys/README.MSYS.md b/Build/source/libs/gd/libgd-src/windows/msys/README.MSYS.md
index 601802dd8e0..e45adc64a3e 100644
--- a/Build/source/libs/gd/libgd-src/windows/msys/README.MSYS.md
+++ b/Build/source/libs/gd/libgd-src/windows/msys/README.MSYS.md
@@ -1,4 +1,3 @@
-
# MSYS Fallback Makefile
This is a simple, straightforward Makefile for building LibGD with
@@ -49,6 +48,14 @@ use one of the other build systems (or add them yourself.)
DLLs; it sweeps up all of the DLLs in the directories pointed to
by *_DLLDIR Makefile variables.
+ Before type "make dist", please make sure you have installed
+ zip command in msys. Or you can try:
+ * If you use msys, you can install msys-zip(lib, docs, lic)
+ in MinGW Installation Manager/all package.
+ * If you use msys2, you can install msys/zip by pacman and running:
+
+ pacman -S msys/zip
+
Alternately, you can copy the lib (in src/) to wherever it needs
to go.
@@ -59,7 +66,3 @@ use one of the other build systems (or add them yourself.)
worth.
* LibFontconfig: I couldn't find Windows binaries for it anywhere
reputable.
-
-
-
-
diff --git a/Build/source/libs/gd/libgd-src/windows/msys/run_tests.sh b/Build/source/libs/gd/libgd-src/windows/msys/run_tests.sh
index 22de13c4036..f7c4b44cf51 100755
--- a/Build/source/libs/gd/libgd-src/windows/msys/run_tests.sh
+++ b/Build/source/libs/gd/libgd-src/windows/msys/run_tests.sh
@@ -5,11 +5,11 @@ set -e
# Parameters
DLLPATH_EXTRA=$1 # Path to supporting DLLs
CFLAGS_EXTRA=$2 # Extra C flags
-
+
LOG=run_tests.log
-CFLAGS="-g -Igdtest/ -I. -I../src/ -D_WIN32 $CFLAGS_EXTRA"
+CFLAGS="-g -Igdtest/ -I. -I../src/ -D_WIN32 -DHAVE_SYS_STAT_H $CFLAGS_EXTRA"
LDFLAGS='-L../src -llibgd'
DLLPATH=../src:$DLLPATH_EXTRA
@@ -38,7 +38,7 @@ echo "Running tests:"
count=0
failures=0
compile_failures=0
-for test in `find . -name \*.c | grep -v '^./gdtest'`; do
+for test in `find . -name \*.c | grep -vE '^./(fontconfig|gdtest|gdhelpers|xpm)'`; do
count=`expr $count + 1`
exe=${test%.c}.exe
@@ -49,7 +49,7 @@ for test in `find . -name \*.c | grep -v '^./gdtest'`; do
compile_failures=`expr $compile_failures + 1`
continue
fi
-
+
echo "Running $exe:" >> $LOG
if $exe 2>&1 >> $LOG; then
echo "PASS: $test"
@@ -62,6 +62,3 @@ done
echo "$failures failures and $compile_failures compile failures out of $count tests."
echo "Error messages in $LOG"
-
-
-
diff --git a/Build/source/libs/gd/libgd-src/windows/readme.md b/Build/source/libs/gd/libgd-src/windows/readme.md
index cd95b790331..dce52026e62 100644
--- a/Build/source/libs/gd/libgd-src/windows/readme.md
+++ b/Build/source/libs/gd/libgd-src/windows/readme.md
@@ -1,53 +1,53 @@
-# Building on Windows with Visual Studio 2015
-
-* Get the required dependencies from
- http://windows.php.net/downloads/php-sdk/deps/vc14/ and
- http://windows.php.net/downloads/pecl/deps/, respectively. Choose the x86 or
- x64 packages depending on your needs.
-
- * freetype
- * libiconv
- * libjpeg
- * libpng
- * libtiff
- * libwebp
- * libxpm
- * zlib
-
-* Unpack all dependency packages into the same folder.
-
-* Open the VS2015 x86 or x64 Native Tools Command Prompt.
-
-* Set the environment variable `WITH_DEVEL` to the path where you have unpacked
- the dependencies. `WITH_DEVEL` defaults to `..\deps`.
-
-* If you want a debug build, do
-````
-set DEBUG=1
-````
-
-* `cd` into the libgd source folder.
-
-* To build the libraries, do:
-```
-nmake /f windows\Makefile.vc
-```
-
-* To build and run the tests, do:
-````
-nmake /f windows\Makefile.vc check
-````
-
-* To build the executable programs, do:
-````
-nmake /f windows\Makefile.vc build_progs
-````
-
-* After a successful build, you find the libraries and test executables in
- `..\gdbuild`. You can change the build folder by setting the environment
- variable `WITH_BUILD` to the desired path.
-
-* Before rebuilding, you may have to run:
-```
-nmake /f windows\Makefile.vc clean
-```
+# Building on Windows with Visual Studio 2015
+
+* Get the required dependencies from
+ http://windows.php.net/downloads/php-sdk/deps/vc14/ and
+ http://windows.php.net/downloads/pecl/deps/, respectively. Choose the x86 or
+ x64 packages depending on your needs.
+
+ * freetype
+ * libiconv
+ * libjpeg
+ * libpng
+ * libtiff
+ * libwebp
+ * libxpm
+ * zlib
+
+* Unpack all dependency packages into the same folder.
+
+* Open the VS2015 x86 or x64 Native Tools Command Prompt.
+
+* Set the environment variable `WITH_DEVEL` to the path where you have unpacked
+ the dependencies. `WITH_DEVEL` defaults to `..\deps`.
+
+* If you want a debug build, do
+````
+set DEBUG=1
+````
+
+* `cd` into the libgd source folder.
+
+* To build the libraries, do:
+```
+nmake /f windows\Makefile.vc
+```
+
+* To build and run the tests, do:
+````
+nmake /f windows\Makefile.vc check
+````
+
+* To build the executable programs, do:
+````
+nmake /f windows\Makefile.vc build_progs
+````
+
+* After a successful build, you find the libraries and test executables in
+ `..\gdbuild`. You can change the build folder by setting the environment
+ variable `WITH_BUILD` to the desired path.
+
+* Before rebuilding, you may have to run:
+```
+nmake /f windows\Makefile.vc clean
+```
diff --git a/Build/source/libs/gd/libgd-src/windows/run_tests.bat b/Build/source/libs/gd/libgd-src/windows/run_tests.bat
index bd739469d2a..097d3b9094d 100644
--- a/Build/source/libs/gd/libgd-src/windows/run_tests.bat
+++ b/Build/source/libs/gd/libgd-src/windows/run_tests.bat
@@ -1,43 +1,43 @@
-@echo off
-setlocal EnableDelayedExpansion
-if [%PLATFORM%]==[] set PLATFORM=x86
-if [%PREFERREDTOOLARCHITECTURE%]==[x64] set PLATFORM=x64
-set PLATFORM=%PLATFORM:X=x%
-
-set total=0
-set total_passed=0
-set total_failed=0
-set total_missing=0
-
-for /f %%T in (testlist.txt) do (
- set test=%%T
- set output=test: !test!....................................................................
- set target=%%~nT.exe
- if not exist !target! SET result=NotFound
- call !target! && (SET result=Passed) || (SET result=Failed)
-
- rem > last_test.out 2> last_test.err
- rem set /p testerr=<last_test.err
- rem set /p testout=<last_test.out
-
- echo !output:~0,70!!result!
-
- rem if defined testerr echo error: !testerr!
- rem if defined testout echo msg: !testout!
-
- set /a total=total+1
- if "!result!"=="Passed" set /a total_passed=total_passed+1
- if "!result!"=="Failed" set /a total_failed=total_failed+1
- if "!result!"=="NotFound" set /a total_missing=total_missing+1
-
- if defined APPVEYOR (
- appveyor AddTest "!test! %PLATFORM%" -Outcome !result! -Framework Custom -Filename %%~nT.exe -Duration 0
- )
-)
-echo.
-echo Tests: !total!
-echo Passed: !total_passed!
-echo Failed: !total_failed!
-echo Missing: !total_missing!
-
-exit /b 0 \ No newline at end of file
+@echo off
+setlocal EnableDelayedExpansion
+if [%PLATFORM%]==[] set PLATFORM=x86
+if [%PREFERREDTOOLARCHITECTURE%]==[x64] set PLATFORM=x64
+set PLATFORM=%PLATFORM:X=x%
+
+set total=0
+set total_passed=0
+set total_failed=0
+set total_missing=0
+
+for /f %%T in (testlist.txt) do (
+ set test=%%T
+ set output=test: !test!....................................................................
+ set target=%%~nT.exe
+ if not exist !target! SET result=NotFound
+ call !target! && (SET result=Passed) || (SET result=Failed)
+
+ rem > last_test.out 2> last_test.err
+ rem set /p testerr=<last_test.err
+ rem set /p testout=<last_test.out
+
+ echo !output:~0,70!!result!
+
+ rem if defined testerr echo error: !testerr!
+ rem if defined testout echo msg: !testout!
+
+ set /a total=total+1
+ if "!result!"=="Passed" set /a total_passed=total_passed+1
+ if "!result!"=="Failed" set /a total_failed=total_failed+1
+ if "!result!"=="NotFound" set /a total_missing=total_missing+1
+
+ if defined APPVEYOR (
+ appveyor AddTest "!test! %PLATFORM%" -Outcome !result! -Framework Custom -Filename %%~nT.exe -Duration 0
+ )
+)
+echo.
+echo Tests: !total!
+echo Passed: !total_passed!
+echo Failed: !total_failed!
+echo Missing: !total_missing!
+
+exit /b 0