diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-12-23 16:27:24 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-12-23 16:27:24 +0000 |
commit | d1cfc0855275b55794810162e7ce04a1e16d5188 (patch) | |
tree | 2e2626ee0e4738e8d6b6624c2d7fafe506b3dbfb /Build/source/libs/gd/libgd-src/windows | |
parent | 932a0f6f62cb2f33be1bade4059504d9c2749f9c (diff) |
libgd 2.2.3
git-svn-id: svn://tug.org/texlive/trunk@42778 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/gd/libgd-src/windows')
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/Makefile.vc | 400 | ||||
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/gentest.bat | 35 | ||||
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/libgd.rc | 118 | ||||
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/msys/Makefile | 2 | ||||
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/msys/README.MSYS.md | 130 | ||||
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/msys/deps.mk | 2 | ||||
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/readme.md | 20 | ||||
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/run_tests.bat | 10 |
8 files changed, 388 insertions, 329 deletions
diff --git a/Build/source/libs/gd/libgd-src/windows/Makefile.vc b/Build/source/libs/gd/libgd-src/windows/Makefile.vc index be02557fc92..afc0e3c753c 100644 --- a/Build/source/libs/gd/libgd-src/windows/Makefile.vc +++ b/Build/source/libs/gd/libgd-src/windows/Makefile.vc @@ -1,183 +1,217 @@ -# To build locally get a copy of the dependancies (https://github.com/imazen/gd-win-dependencies)
-# Then run 'nmake /f windows\Makefile.vc' in MS dev console
-# To build tests as well 'nmake /f windows\Makefile.vc all'
-# To build tests and execute them 'nmake /f windows\Makefile.vc check'
-
-CC=cl
-LD=link
-LB=lib
-
-
-!IFNDEF PLATFORM
-PLATFORM=x86
-!ENDIF
-# detect x64 cross-compiler env
-!IF "$(PREFERREDTOOLARCHITECTURE)" == "x64"
-PLATFORM=x64
-!ENDIF
-PLATFORM=$(PLATFORM:X=x)
-
-
-BUILD_DIR=build_msvc12_$(PLATFORM)
-GD_DLL=libgd.dll
-GD_LIB=libgd_a.lib
-
-SDR=$(BUILD_DIR)\obj^\
-TDR=$(BUILD_DIR)\tests^\
-TARGETDLL=$(BUILD_DIR)\$(GD_DLL)
-TARGETLIB=$(BUILD_DIR)\$(GD_LIB)
-
-OBJECTS=$(SDR)gd.obj $(SDR)gd_color.obj $(SDR)gd_color_map.obj $(SDR)gd_transform.obj $(SDR)gdfx.obj $(SDR)gd_security.obj $(SDR)gd_gd.obj $(SDR)gd_gd2.obj $(SDR)gd_io.obj $(SDR)gd_io_dp.obj $(SDR)gd_gif_in.obj $(SDR)gd_gif_out.obj $(SDR)gd_io_file.obj $(SDR)gd_io_ss.obj $(SDR)gd_jpeg.obj $(SDR)gd_png.obj $(SDR)gd_ss.obj $(SDR)gd_topal.obj $(SDR)gd_wbmp.obj $(SDR)gdcache.obj $(SDR)gdfontg.obj $(SDR)gdfontl.obj $(SDR)gdfontmb.obj $(SDR)gdfonts.obj $(SDR)gdfontt.obj $(SDR)gdft.obj $(SDR)gdhelpers.obj $(SDR)gdkanji.obj $(SDR)gdtables.obj $(SDR)gdxpm.obj $(SDR)wbmp.obj $(SDR)gd_filter.obj $(SDR)gd_nnquant.obj $(SDR)gd_rotate.obj $(SDR)gd_matrix.obj $(SDR)gd_interpolation.obj $(SDR)gd_crop.obj $(SDR)webpimg.obj $(SDR)gd_webp.obj $(SDR)gd_tiff.obj $(SDR)gd_tga.obj $(SDR)gd_bmp.obj $(SDR)gd_xbm.obj $(SDR)gd_color_match.obj $(SDR)gd_version.obj $(SDR)gd_filename.obj
-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 gdimagearc\bug00079 gdimagecolorclosest\gdimagecolorclosest gdimagecolordeallocate\gdimagecolordeallocate gdimagecolorexact\gdimagecolorexact gdimagecolorreplace\gdimagecolorreplace gdimagecolorresolve\gdimagecolorresolve gdimagecolortransparent\gdimagecolortransparent gdimagecopy\bug00007 gdimagecopy\bug00081 gdimagecopyrotated\bug00020 gdimagefile\gdnametest gdimagefill\bug00002_1 gdimagefill\bug00002_2 gdimagefill\bug00002_3 gdimagefill\bug00002_4 gdimagefilledellipse\bug00010 gdimagefilledellipse\bug00191 gdimagefilledpolygon\bug00100 gdimagefilledpolygon\gdimagefilledpolygon0 gdimagefilledpolygon\gdimagefilledpolygon1 gdimagefilledpolygon\gdimagefilledpolygon2 gdimagefilledpolygon\gdimagefilledpolygon3 gdimagefilledrectangle\bug00004 gdimagefilledrectangle\bug00078 gdimagefilledrectangle\bug00106_gdimagefilledrectangle gdimagefilltoborder\bug00037 gdimagefilter\gdCopyBlurred gdimageline\bug00072 gdimageline\bug00077 gdimageline\bug00111 gdimageline\gdImageAALine_thickness gdimageline\gdimageline_aa gdimageline\gdimageline_aa_outofrange gdimageline\gdimageline_bug5 gdimageopenpolygon\gdimageopenpolygon0 gdimageopenpolygon\gdimageopenpolygon1 gdimageopenpolygon\gdimageopenpolygon2 gdimageopenpolygon\gdimageopenpolygon3 gdimagepixelate\gdimagepixelate gdimagepolygon\gdimagepolygon0 gdimagepolygon\gdimagepolygon1 gdimagepolygon\gdimagepolygon2 gdimagepolygon\gdimagepolygon3 gdimagerectangle\bug00003 gdimagerectangle\bug00106_gdimagerectangle gdimagerotate\bug00067 gdimagerotate\php_bug_64898 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 gif\bug00005 gif\bug00005_2 gif\bug00006 gif\bug00060 gif\bug00066 gif\bug00181 gif\bug00227 gif\gif_im2im gif\gif_null 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\tga_null
-#tiff\tiff_im2im tiff\tiff_null wbmp\wbmp_im2im wbmp\wbmp_null xpm\bug00166 xpm\bug00185 xpm\color_name
-
-LIBS=kernel32.lib ole32.lib user32.lib advapi32.lib shell32.lib ws2_32.lib Dnsapi.lib Gdi32.Lib
-LIBS_GD=turbojpeg-static.lib freetype_a.lib libpng_a.lib libiconv_a.lib zlib_a.lib
-
-INCLUDES=/Isrc /Igd-win-dependencies\$(PLATFORM)\include -Igd-win-dependencies\$(PLATFORM)\include\libjpeg-turbo -Igd-win-dependencies\$(PLATFORM)\include\libpng15 -Igd-win-dependencies\$(PLATFORM)\include\freetype /Itests /Itests\gdtest
-
-LDFLAGS=/nologo /nodefaultlib:libcmt /libpath:gd-win-dependencies\$(PLATFORM)\lib /MACHINE:$(PLATFORM)
-
-CFLAGS=/nologo /O2 /Qvec-report:1 /MD /TC\
- /DWIN32=1\
- /D_WIN32=1\
- /DMSWIN32=1\
- /DBGDWIN32=1\
- /DHAVE_FT2BUILD_H=1\
- /DHAVE_GD_H=1\
- /DHAVE_PNG_H=1\
- /DHAVE_ICONV_H=1\
- /DHAVE_GD_BUNDLED=1\
- /DHAVE_LIBFREETYPE=1\
- /DHAVE_LIBJPEG=1\
- /DHAVE_LIBPNG=1\
- /DHAVE_LIBZ=1\
- $(INCLUDES)
-
-# /DHAVE_LIBXPM
-
-# These flags are not present in this fork of libgd (they may be used in php's):
-# /DHAVE_GD_WBMP
-# /DHAVE_GD_GIF_READ=1\
-# /DHAVE_GD_GIF_CREATE=1\
-# /DHAVE_GD_GD2=1\
-# /DHAVE_GDIMAGECOLORRESOLVE=1\
-# /DHAVE_GD_IMAGESETBRUSH=1\
-# /DHAVE_GD_IMAGESETTILE=1\
-# /DHAVE_GD_FONTCACHESHUTDOWN=1\
-# /DHAVE_GD_FONTMUTEX=1\
-# /DHAVE_GD_STRINGFTEX=1\
-# /DHAVE_GD_STRINGTTF=1\
-# /DHAVE_GD_FREETYPE=1\
-# /DHAVE_LIBGD13=1\
-# /DHAVE_LIBGD15=1\
-# /DHAVE_LIBGD20=1\
-# /DHAVE_LIBGD204=1\
-# /DHAVE_COLORCLOSESTHWB\
-# /DUSE_GD_IMGSTRTTF\
-# /DUSE_GD_IOCTX\
-# /DHAVE_GD_JPG\
-# /DHAVE_GD_PNG\
-# /DHAVE_GD_DYNAMIC_CTX_EX=1\
-# /DHAVE_XPM\
-# /DHAVE_GD_XBM\
-# /DHAVE_GD_XPM\
-# /DHAVE_XPM_H=1\
-
-# These flags may be set wrong; not sure of precise purpose
-# HAVE_GD_BUNDLED
-# NDEBUG
-
-
-
-
-
-TEST_CFLAGS=$(CFLAGS) /FItest_config.h
-TEST_LDFLAGS=$(LDFLAGS) $(SDR)gdtest.obj $(BUILD_DIR)\libgd.lib
-TEST_CONFIG=tests\test_config.h
-TEST_LIST=$(TDR)testlist.txt
-TEST_MK=$(TDR)Maketests.vc
-
-
-
-# generate test makefile from TESTS macro
-
-!IF [if not exist $(BUILD_DIR) mkdir $(BUILD_DIR)]
-!ENDIF
-!IF [if not exist $(TDR) mkdir $(TDR)]
-!ENDIF
-!IF [@copy NUL $(TEST_MK) > nul]
-!ENDIF
-!IF [@for %F in ($(TESTS)) do @echo TEST_EXES=$(TDR)%~nF.exe ^$(TEST_EXES) >> $(TEST_MK)]
-!ENDIF
-!IF [@for %F in ($(TESTS)) do @echo $(SDR)%~nF.obj: tests\%F.c; @^$(CC) ^$(TEST_CFLAGS) /c ^$** /Fo:^$@ >> $(TEST_MK)]
-!ENDIF
-!IF [@for %F in ($(TESTS)) do @echo $(TDR)%~nF.exe: $(SDR)%~nF.obj; @$(LD) $(TEST_LDFLAGS) ^$** /out:^$@ >> $(TEST_MK)]
-!ENDIF
-TEST_OBJS=$(TEST_EXES:tests=obj)
-TEST_OBJS=$(TEST_OBJS:exe=obj)
-
-
-
-
-
-
-# pseudotargets
-
-build_libs: make_dirs $(TARGETDLL) $(TARGETLIB)
-all: build_libs build_tests
-check: all run_tests
-
-clean:
- @if exist $(SDR) rd $(SDR) /s /q
- @if exist $(TDR) rd $(TDR) /s /q
- @if exist $(BUILD_DIR)\*.exe del $(BUILD_DIR)\*.exe /q
- @if exist tests\test_config.h del tests\test_config.h /q
-
-
-
-
-# helpers
-
-make_dirs:
- @if not exist $(BUILD_DIR) mkdir $(BUILD_DIR)
- @if not exist $(SDR) mkdir $(SDR)
-
-run_tests:
- @windows\run_tests
-
-
-
-
-# libgd
-
-$(TARGETDLL): $(OBJECTS)
- @$(LD) /DLL /OUT:$@ $(OBJECTS) $(LIBS_GD) $(LIBS) $(LDFLAGS)
-
-$(TARGETLIB): $(OBJECTS)
- @$(LB) /OUT:$@ $(OBJECTS) $(LDFLAGS)
-
-{src\}.c{$(SDR)}.obj::
- @$(CC) $(CFLAGS) /c $< /Fo$(SDR)
-
-
-
-
-# tests
-
-!INCLUDE $(TEST_MK)
-
-build_tests: $(TEST_LIST) $(SDR)gdtest.obj $(TEST_EXES)
-
-$(SDR)gdtest.obj: $(TARGETDLL) $(TEST_CONFIG) tests\gdtest\gdtest.c
- @$(CC) $(CFLAGS) /c tests\gdtest\gdtest.c /Fo$(SDR)gdtest.obj
-
-$(TEST_CONFIG):
- @echo #define GDTEST_TOP_DIR "$(MAKEDIR:\=\\)\\tests" > tests\test_config.h
- @echo #define snprintf _snprintf >> tests\test_config.h
-
-$(TEST_LIST): $(TARGETDLL)
- @if not exist $(TDR) mkdir $(TDR)
- @copy $(TARGETDLL) $(TDR)$(GD_DLL)
- @copy NUL $(TDR)testlist.txt
- @for %%F in ($(TESTS)) do @echo %%F >> $(TDR)testlist.txt
\ No newline at end of file +# To build locally get a copy of the dependancies (http://windows.php.net/downloads/php-sdk/deps/) +# These are the dependencies used by PHP and largely used and tested. These binaries are built using +# the sources available at https://github.com/winlibs +# Then run 'nmake /f windows\Makefile.vc' in MS dev console +# To build tests as well 'nmake /f windows\Makefile.vc all' +# To build tests and execute them 'nmake /f windows\Makefile.vc check' + +CC=cl +LD=link +LB=lib + +!IFNDEF DEBUG +DEBUG=0 +!ENDIF + +!IFNDEF WITH_DEVEL +WITH_DEVEL=..\deps +!ENDIF + +!IFNDEF WITH_BUILD +WITH_BUILD=..\gdbuild +!ENDIF + +LIBGD_SRC_DIR=src +LIBGD_OBJ_DIR=$(WITH_BUILD) +LIBGD_BIN_DIR=$(WITH_BUILD)\bin +LIBGD_TEST_DIR=test + +!IFNDEF PLATFORM +PLATFORM=x86 +!ENDIF +# detect x64 cross-compiler env +!IF "$(PREFERREDTOOLARCHITECTURE)" == "x64" +PLATFORM=x64 +!ENDIF +PLATFORM=$(PLATFORM:X=x) + +BUILD_DIR=$(WITH_BUILD) + +!MESSAGE library source: $(LIBGD_SRC_DIR) + +GD_DLL=libgd.dll +GD_LIB=libgd_a.lib + +SDR=$(BUILD_DIR)^\ +TDR=$(BUILD_DIR)\tests^\ +TARGETDLL=$(BUILD_DIR)\$(GD_DLL) +TARGETLIB=$(BUILD_DIR)\$(GD_LIB) + +LIB_OBJS= \ + $(LIBGD_OBJ_DIR)\gd.obj \ + $(LIBGD_OBJ_DIR)\gdcache.obj \ + $(LIBGD_OBJ_DIR)\gd_color.obj \ + $(LIBGD_OBJ_DIR)\gd_color_match.obj \ + $(LIBGD_OBJ_DIR)\gdfontg.obj \ + $(LIBGD_OBJ_DIR)\gdfontl.obj \ + $(LIBGD_OBJ_DIR)\gdfontmb.obj \ + $(LIBGD_OBJ_DIR)\gdfonts.obj \ + $(LIBGD_OBJ_DIR)\gdfontt.obj \ + $(LIBGD_OBJ_DIR)\gdft.obj \ + $(LIBGD_OBJ_DIR)\gdfx.obj \ + $(LIBGD_OBJ_DIR)\gd_filename.obj \ + $(LIBGD_OBJ_DIR)\gd_filter.obj \ + $(LIBGD_OBJ_DIR)\gd_bmp.obj \ + $(LIBGD_OBJ_DIR)\gd_gd2.obj \ + $(LIBGD_OBJ_DIR)\gd_gd.obj \ + $(LIBGD_OBJ_DIR)\gd_gif_in.obj \ + $(LIBGD_OBJ_DIR)\gd_gif_out.obj \ + $(LIBGD_OBJ_DIR)\gdhelpers.obj \ + $(LIBGD_OBJ_DIR)\gd_io.obj \ + $(LIBGD_OBJ_DIR)\gd_io_dp.obj \ + $(LIBGD_OBJ_DIR)\gd_io_file.obj \ + $(LIBGD_OBJ_DIR)\gd_io_ss.obj \ + $(LIBGD_OBJ_DIR)\gd_jpeg.obj \ + $(LIBGD_OBJ_DIR)\gd_security.obj \ + $(LIBGD_OBJ_DIR)\gd_tga.obj \ + $(LIBGD_OBJ_DIR)\gd_tiff.obj \ + $(LIBGD_OBJ_DIR)\gd_xbm.obj \ + $(LIBGD_OBJ_DIR)\gdkanji.obj \ + $(LIBGD_OBJ_DIR)\gd_nnquant.obj \ + $(LIBGD_OBJ_DIR)\gd_png.obj \ + $(LIBGD_OBJ_DIR)\gd_ss.obj \ + $(LIBGD_OBJ_DIR)\gdtables.obj \ + $(LIBGD_OBJ_DIR)\gd_topal.obj \ + $(LIBGD_OBJ_DIR)\gd_transform.obj \ + $(LIBGD_OBJ_DIR)\gd_wbmp.obj \ + $(LIBGD_OBJ_DIR)\gdxpm.obj \ + $(LIBGD_OBJ_DIR)\wbmp.obj \ + $(LIBGD_OBJ_DIR)\gd_interpolation.obj \ + $(LIBGD_OBJ_DIR)\gd_matrix.obj \ + $(LIBGD_OBJ_DIR)\gd_rotate.obj \ + $(LIBGD_OBJ_DIR)\gd_version.obj \ + $(LIBGD_OBJ_DIR)\gd_crop.obj \ + $(LIBGD_OBJ_DIR)\gd_color_map.obj \ + $(LIBGD_OBJ_DIR)\gd_webp.obj + +LIBS=kernel32.lib ole32.lib user32.lib advapi32.lib shell32.lib ws2_32.lib Dnsapi.lib Gdi32.Lib +LIBS_GD=libjpeg_a.lib freetype_a.lib libpng_a.lib libiconv_a.lib zlib_a.lib libwebp_a.lib libxpm_a.lib + +INCLUDES=/Isrc /I$(WITH_DEVEL)\include -I$(WITH_DEVEL)\include\libpng16 -I$(WITH_DEVEL)\include\freetype /Itests /Itests\gdtest -I$(WITH_DEVEL)\include\ + +LDFLAGS=/nologo /nodefaultlib:libcmt /libpath:$(WITH_DEVEL)\lib /MACHINE:$(PLATFORM) + +!IF $(DEBUG) +CFLAGS=/nologo /Qvec-report:1 /MD /TC /Zi /Debug +!ELSE +CFLAGS=/nologo /O2 /Qvec-report:1 /MD /TC +!ENDIF + +CFLAGS= $(CFLAGS) \ + /DWIN32=1\ + /D_WIN32=1\ + /DMSWIN32=1\ + /DBGDWIN32=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_LIBZ=1\ + /DHAVE_LIBXPM=1\ + $(INCLUDES) + +TEST_CFLAGS=$(CFLAGS) /FItest_config.h +TEST_LDFLAGS=$(LDFLAGS) $(SDR)readdir.obj $(SDR)gdtest.obj $(BUILD_DIR)\libgd.lib +TEST_CONFIG=tests\test_config.h +TEST_LIST=$(TDR)testlist.txt +TEST_MK=$(TDR)Maketests.vc + +# generate test makefile from TESTS macro +# generate test makefile from TESTS macro +!IF [if not exist $(BUILD_DIR) mkdir $(BUILD_DIR)] +!ENDIF +!IF [if not exist $(TDR) mkdir $(TDR)] +!ENDIF + +!IF [$(MAKEDIR)\windows\gentest.bat tests $(BUILD_DIR) "$(TEST_CFLAGS)" "$(TEST_LDFLAGS)" $(CC) $(LD) "$(TEST_MK)" "$(TEST_LIST)"] +!ENDIF + +TEST_OBJS=$(TEST_EXES:tests=obj) +TEST_OBJS=$(TEST_OBJS:exe=obj) + +# pseudotargets +build_libs: make_dirs $(TARGETDLL) $(TARGETLIB) +all: build_libs build_tests +check: all run_tests + +clean: + @if exist $(SDR) rd $(SDR) /s /q + @if exist $(TDR) rd $(TDR) /s /q + @if exist $(BUILD_DIR)\*.exe del $(BUILD_DIR)\*.exe /q + @if exist tests\test_config.h del tests\test_config.h /q + +# helpers + +make_dirs: + @if not exist $(BUILD_DIR) mkdir $(BUILD_DIR) + @if not exist $(SDR) mkdir $(SDR) + +run_tests: + @cd $(TDR) + @$(MAKEDIR)\windows\run_tests + +# libgd +$(LIBGD_OBJ_DIR): + @if not exist $(LIBGD_OBJ_DIR) mkdir $(LIBGD_OBJ_DIR) + +$(LIBGD_BIN_DIR): + @if not exist $(LIBGD_BIN_DIR) mkdir $(LIBGD_BIN_DIR) + +$(TARGETDLL): $(LIB_OBJS) + @$(LD) /DLL /OUT:$@ $(LIB_OBJS) $(LIBS_GD) $(LIBS) $(LDFLAGS) + +$(TARGETLIB): $(LIB_OBJS) + @$(LB) /OUT:$@ $(LIB_OBJS) $(LDFLAGS) + +{$(LIBGD_SRC_DIR)\}.c{$(LIBGD_OBJ_DIR)\}.obj: + $(CC) $(CFLAGS) /Fo"$@" $< + +all: $(LIBGD_OBJ_DIR) $(LIBGD_BIN_DIR) $(LIB_OBJS) $(STATICLIB) + +.SUFFIXES: .c .obj .res + +{$(LIBGD_SRC_DIR)\}.c{$(LIBGD_OBJ_DIR)\}.obj: + $(CC) $(CFLAGS) /Fo"$@" $< + +{src\}.c{$(SDR)}.obj:: + $(CC) $(CFLAGS) /c $< /Fo$(SDR) + +# tests + +!INCLUDE $(TEST_MK) +build_tests: $(TEST_LIST) $(SDR)readdir.obj $(SDR)gdtest.obj $(TEST_EXES) + +$(SDR)gdtest.obj: $(TARGETDLL) $(TEST_CONFIG) tests\gdtest\gdtest.c + @$(CC) $(CFLAGS) /c tests\gdtest\gdtest.c /Fo$(SDR)gdtest.obj + +$(SDR)readdir.obj: $(TARGETDLL) $(TEST_CONFIG) tests\gdtest\readdir.c + @$(CC) $(CFLAGS) /c tests\gdtest\readdir.c /Fo$(SDR)readdir.obj + +$(TEST_CONFIG): + @echo #ifndef GD_TEST_CONFIG_H> tests\test_config.h + @echo #define GD_TEST_CONFIG_H>> tests\test_config.h + @echo #ifndef GDTEST_TOP_DIR>> tests\test_config.h + @echo #define GDTEST_TOP_DIR "$(MAKEDIR:\=\\)\\tests">> tests\test_config.h + @echo #endif>> tests\test_config.h + @echo #ifndef _WIN32>> tests\test_config.h + @echo #define snprintf _snprintf>> tests\test_config.h + @echo #endif>> tests\test_config.h + @echo #endif>> tests\test_config.h + +$(TEST_LIST): $(TARGETDLL) + if not exist $(TDR) mkdir $(TDR) + copy $(TARGETDLL) $(TDR)$(GD_DLL)
\ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/windows/gentest.bat b/Build/source/libs/gd/libgd-src/windows/gentest.bat new file mode 100644 index 00000000000..9c2cbeb7ed6 --- /dev/null +++ b/Build/source/libs/gd/libgd-src/windows/gentest.bat @@ -0,0 +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"=="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"=="gdtest" for %%f in (!testsdir!/%%d/*.c) do ( + echo !builddir!\%%d_%%~nf.obj: !testsdir!\%%d\%%f; ^$^(CC^) ^$^(TEST_CFLAGS^) /c ^$** /Fo:$@ >> !TESTMK! + ) +) + +for /D %%d in (!testsdir!/*) do ( + 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 diff --git a/Build/source/libs/gd/libgd-src/windows/libgd.rc b/Build/source/libs/gd/libgd-src/windows/libgd.rc index c0aa0cedf3e..dfe6ff0aa78 100644 --- a/Build/source/libs/gd/libgd-src/windows/libgd.rc +++ b/Build/source/libs/gd/libgd-src/windows/libgd.rc @@ -1,59 +1,59 @@ -/* This is a template RC file.
- * $Id$
- * Do not edit with MSVC */
-#ifdef APSTUDIO_INVOKED
-# error dont edit with MSVC
-#endif
-
-#include "winres.h"
-#include "../gd.h"
-
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-
-#ifdef WANT_LOGO
-0 ICON gdlib.ico
-#endif
-
-//Version
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION GD_MAJOR_VERSION,GD_MINOR_VERSION,GD_RELEASE_VERSION,0
- PRODUCTVERSION GD_MAJOR_VERSION,GD_MINOR_VERSION,GD_RELEASE_VERSION,0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS VS_FF_DEBUG
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS VOS__WINDOWS32
- FILETYPE VFT_DLL
- FILESUBTYPE VFT2_UNKNOWN
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "Comments", "Thanks to Thomas Boutell" "\0"
- VALUE "CompanyName", "LIBGD Development Team\0"
- 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 "LegalTrademarks", "Thomas Boutell, Pierre A. Joye and contributors\0"
- VALUE "OriginalFilename", "bgd.dll" "\0"
- VALUE "PrivateBuild", "\0"
- VALUE "ProductName", "LIBGD dynamic link library" "\0"
- VALUE "SpecialBuild", "win32" "\0"
- VALUE "URL", "http://www.libgd.org/"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
-
-#ifdef MC_INCLUDE
-#include MC_INCLUDE
-#endif
-
+/* This is a template RC file. + * $Id$ + * Do not edit with MSVC */ +#ifdef APSTUDIO_INVOKED +# error dont edit with MSVC +#endif + +#include "winres.h" +#include "../gd.h" + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + +#ifdef WANT_LOGO +0 ICON gdlib.ico +#endif + +//Version +VS_VERSION_INFO VERSIONINFO + FILEVERSION GD_MAJOR_VERSION,GD_MINOR_VERSION,GD_RELEASE_VERSION,0 + PRODUCTVERSION GD_MAJOR_VERSION,GD_MINOR_VERSION,GD_RELEASE_VERSION,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE VFT2_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Thanks to Thomas Boutell" "\0" + VALUE "CompanyName", "LIBGD Development Team\0" + 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 "LegalTrademarks", "Thomas Boutell, Pierre A. Joye and contributors\0" + VALUE "OriginalFilename", "bgd.dll" "\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "LIBGD dynamic link library" "\0" + VALUE "SpecialBuild", "win32" "\0" + VALUE "URL", "http://www.libgd.org/" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +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 7e7f155885e..3b1ced42b64 100644 --- a/Build/source/libs/gd/libgd-src/windows/msys/Makefile +++ b/Build/source/libs/gd/libgd-src/windows/msys/Makefile @@ -97,7 +97,7 @@ gd_gif_out.c gd_io_file.c gd_io_ss.c gd_jpeg.c gd_png.c gd_ss.c \ gd_topal.c gd_wbmp.c gdcache.c gdfontg.c gdfontl.c gdfontmb.c \ gdfonts.c gdfontt.c gdft.c gdhelpers.c gdkanji.c gdtables.c gdxpm.c \ wbmp.c gd_filter.c gd_nnquant.c gd_rotate.c gd_matrix.c \ -gd_interpolation.c gd_crop.c webpimg.c gd_webp.c gd_tiff.c gd_tga.c \ +gd_interpolation.c gd_crop.c gd_webp.c gd_tiff.c gd_tga.c \ gd_bmp.c gd_xbm.c gd_color_match.c gd_version.c gd_filename.c OBJ=$(SRC:.c=.o) 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 60289badb2d..601802dd8e0 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,65 +1,65 @@ -
-# MSYS Fallback Makefile
-
-This is a simple, straightforward Makefile for building LibGD with
-MinGW on MSYS (or possibly Cygwin). It is here for anyone who doesn't
-want to deal with autotools or CMake on Windows or who can't get
-either of them working on their particular setup.
-
-Note that this Makefile only builds the library and test cases; the
-standalone utilities are ignored. If you need those, you'll need to
-use one of the other build systems (or add them yourself.)
-
-## To build LibGD:
-
-1. Install MinGW and MSYS (see <http://www.mingw.org/wiki/Getting_Started>).
- You will need to install zip and unzip as well as the 32-bit C compiler
- and related tools.
-
-2. Install LibJpeg, LibPng, LibTiff, Zlib and FreeType from
- <http://gnuwin32.sourceforge.net> and install them all in
- `c:/tools/GnuWin32/`. (You can get these libraries from other
- places and/or install them in different locations, but you'll need to
- edit the Makefile accordingly if you do.)
-
-3. Skip ahead to the next step. If that doesn't work, edit the
- Makefile to fix what went wrong. Things to try include:
- * Ensure SRC contains an up-to-date list of source files. (Take a
- look at libgd_la_SOURCES src/Makefile.am for a reference.)
- * Ensure that the paths and #defines for unsupported libraries
- are commented out. They're nicely grouped into clusters to
- simplify that.
-
-4. `cd` to this directory and type:
-
- make
- make check
-
- If both commands succeed, you're done. (Note that some of the
- testcases will fail, just because they test features not enabled
- here. This is fine. As long as most tests pass, you're probably
- okay.)
-
-5. Type
-
- make dist
-
- This will create libgd-win.zip, a zip file containing the new
- library and its dependants. Note that this step may pick up extra
- DLLs; it sweeps up all of the DLLs in the directories pointed to
- by *_DLLDIR Makefile variables.
-
- Alternately, you can copy the lib (in src/) to wherever it needs
- to go.
-
-
-## Stuff that Doesn't Work
-
-* LibXpm: It's probably nothing serious, just more trouble than it's
- worth.
-* LibFontconfig: I couldn't find Windows binaries for it anywhere
- reputable.
-
-
-
-
+ +# MSYS Fallback Makefile + +This is a simple, straightforward Makefile for building LibGD with +MinGW on MSYS (or possibly Cygwin). It is here for anyone who doesn't +want to deal with autotools or CMake on Windows or who can't get +either of them working on their particular setup. + +Note that this Makefile only builds the library and test cases; the +standalone utilities are ignored. If you need those, you'll need to +use one of the other build systems (or add them yourself.) + +## To build LibGD: + +1. Install MinGW and MSYS (see <http://www.mingw.org/wiki/Getting_Started>). + You will need to install zip and unzip as well as the 32-bit C compiler + and related tools. + +2. Install LibJpeg, LibPng, LibTiff, Zlib and FreeType from + <http://gnuwin32.sourceforge.net> and install them all in + `c:/tools/GnuWin32/`. (You can get these libraries from other + places and/or install them in different locations, but you'll need to + edit the Makefile accordingly if you do.) + +3. Skip ahead to the next step. If that doesn't work, edit the + Makefile to fix what went wrong. Things to try include: + * Ensure SRC contains an up-to-date list of source files. (Take a + look at libgd_la_SOURCES src/Makefile.am for a reference.) + * Ensure that the paths and #defines for unsupported libraries + are commented out. They're nicely grouped into clusters to + simplify that. + +4. `cd` to this directory and type: + + make + make check + + If both commands succeed, you're done. (Note that some of the + testcases will fail, just because they test features not enabled + here. This is fine. As long as most tests pass, you're probably + okay.) + +5. Type + + make dist + + This will create libgd-win.zip, a zip file containing the new + library and its dependants. Note that this step may pick up extra + DLLs; it sweeps up all of the DLLs in the directories pointed to + by *_DLLDIR Makefile variables. + + Alternately, you can copy the lib (in src/) to wherever it needs + to go. + + +## Stuff that Doesn't Work + +* LibXpm: It's probably nothing serious, just more trouble than it's + worth. +* LibFontconfig: I couldn't find Windows binaries for it anywhere + reputable. + + + + diff --git a/Build/source/libs/gd/libgd-src/windows/msys/deps.mk b/Build/source/libs/gd/libgd-src/windows/msys/deps.mk index a27c0781fed..9b531b3103d 100644 --- a/Build/source/libs/gd/libgd-src/windows/msys/deps.mk +++ b/Build/source/libs/gd/libgd-src/windows/msys/deps.mk @@ -1 +1 @@ -# Nothing to see here. (But it shuts up make.)
+# Nothing to see here. (But it shuts up make.) diff --git a/Build/source/libs/gd/libgd-src/windows/readme.md b/Build/source/libs/gd/libgd-src/windows/readme.md index 21d741ab253..8753b704723 100644 --- a/Build/source/libs/gd/libgd-src/windows/readme.md +++ b/Build/source/libs/gd/libgd-src/windows/readme.md @@ -1,11 +1,11 @@ -# Building on Windows with Visual Studio 2013
-
-Open the VS2013 x64 Native Tools Command Prompt. 2012 will *not* work.
-Change to the gd-libgd folder.
-git clone https://github.com/imazen/gd-win-dependencies into the folder.
-Run
-nmake /f windows/Makefile.vc all
-nmake /f windows/Makefile.vc check
-
-Before rebuilding, run:
+# Building on Windows with Visual Studio 2013 + +Open the VS2013 x64 Native Tools Command Prompt. 2012 will *not* work. +Change to the gd-libgd folder. +git clone https://github.com/imazen/gd-win-dependencies into the folder. +Run +nmake /f windows/Makefile.vc all +nmake /f windows/Makefile.vc check + +Before rebuilding, run: nmake /f windows/Makefile.vc clean
\ No newline at end of file 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 5dadb059407..9e9c5e4d93e 100644 --- a/Build/source/libs/gd/libgd-src/windows/run_tests.bat +++ b/Build/source/libs/gd/libgd-src/windows/run_tests.bat @@ -4,19 +4,9 @@ if [%PLATFORM%]==[] set PLATFORM=x86 if [%PREFERREDTOOLARCHITECTURE%]==[x64] set PLATFORM=x64 set PLATFORM=%PLATFORM:X=x% -if exist build_msvc12_%PLATFORM%\tests (cd build_msvc12_%PLATFORM%\tests) else ( - if exist ..\build_%PLATFORM%\tests (cd ..\build_msvc12_%PLATFORM%\tests) else ( - echo unable to find test dir - exit /b 1 - ) -) - - - 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) |