diff options
Diffstat (limited to 'Build/source/libs/gd/libgd-src/windows')
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/Makefile.vc | 183 | ||||
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/libgd.rc | 59 | ||||
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/msys/Makefile | 143 | ||||
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/msys/README.MSYS.md | 65 | ||||
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/msys/deps.mk | 1 | ||||
-rwxr-xr-x | Build/source/libs/gd/libgd-src/windows/msys/run_tests.sh | 67 | ||||
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/readme.md | 11 | ||||
-rw-r--r-- | Build/source/libs/gd/libgd-src/windows/run_tests.bat | 38 |
8 files changed, 567 insertions, 0 deletions
diff --git a/Build/source/libs/gd/libgd-src/windows/Makefile.vc b/Build/source/libs/gd/libgd-src/windows/Makefile.vc new file mode 100644 index 00000000000..be02557fc92 --- /dev/null +++ b/Build/source/libs/gd/libgd-src/windows/Makefile.vc @@ -0,0 +1,183 @@ +# 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 diff --git a/Build/source/libs/gd/libgd-src/windows/libgd.rc b/Build/source/libs/gd/libgd-src/windows/libgd.rc new file mode 100644 index 00000000000..c0aa0cedf3e --- /dev/null +++ b/Build/source/libs/gd/libgd-src/windows/libgd.rc @@ -0,0 +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
+
diff --git a/Build/source/libs/gd/libgd-src/windows/msys/Makefile b/Build/source/libs/gd/libgd-src/windows/msys/Makefile new file mode 100644 index 00000000000..7e7f155885e --- /dev/null +++ b/Build/source/libs/gd/libgd-src/windows/msys/Makefile @@ -0,0 +1,143 @@ + +# Simple makefile for building and testing libgd under MSYS/MinGW on +# Windows + + +# The version +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 + +# GnuWin32 libs should all be installed in one place. +GNUDIR=/c/tools/GnuWin32 +GNUINC=-I$(GNUDIR)/include +GNULIB=-L$(GNUDIR)/lib +GNUDLL=$(GNUDIR)/bin/ + +# Various optional components. Comment-out the ones you don't have +# and edit the paths and options as needed if you do. The default +# assumes GnuWin32 packages installed in /c/Program Files/GnuWin32. +JPEG_D=-DHAVE_LIBJPEG +JPEG_L=-ljpeg +JPEG_I=$(GNUINC) +JPEG_LIBDIR=$(GNULIB) +JPEG_DLLDIR=$(GNUDLL) + +PNG_D=-DHAVE_LIBPNG +PNG_L=-lpng +PNG_I= #$(GNUINC) +PNG_LIBDIR= #$(GNULIB) +PNG_DLLDIR= #$(GNUDLL) + +TIFF_D=-DHAVE_LIBTIFF +TIFF_L=-ltiff +TIFF_I= #$(GNUINC) +TIFF_LIBDIR= #$(GNULIB) +TIFF_DLLDIR= #$(GNUDLL) + +LIBZ_D=-DHAVE_LIBZ +LIBZ_L=-lz +LIBZ_I= #$(GNUINC) +LIBZ_LIBDIR= #$(GNULIB) +LIBZ_DLLDIR= #$(GNUDLL) + +# LIBXPM_D=-DHAVE_LIBXPM +# LIBXPM_L=-lxpm +# LIBXPM_I= #$(GNUINC) +# LIBXPM_LIBDIR= #$(GNULIB) + +FREETYPE_D=-DHAVE_LIBFREETYPE -DHAVE_FT2BUILD_H +FREETYPE_L=-lfreetype +FREETYPE_I=$(GNUINC)/freetype2/ +FREETYPE_LIBDIR= #$(GNULIB) +FREETYPE_DLLDIR= #$(GNUDLL) + +# FONTCONFIG_D=-DHAVE_LIBFONTCONFIG +# FONTCONFIG_L= +# FONTCONFIG_I= +# FONTCONFIG_LIBDIR= + +ALL_D=$(FREETYPE_D) $(JPEG_D) $(PNG_D) $(TIFF_D) $(LIBZ_D) $(LIBXPM_D) +ALL_L=$(FREETYPE_L) $(JPEG_L) $(PNG_L) $(TIFF_L) $(LIBZ_L) $(LIBXPM_L) +ALL_I=$(FREETYPE_I) $(JPEG_I) $(PNG_I) $(TIFF_I) $(LIBZ_I) $(LIBXPM_I) +ALL_LIBDIR=$(FREETYPE_LIBDIR) $(JPEG_LIBDIR) $(PNG_LIBDIR) $(TIFF_LIBDIR) \ + $(LIBZ_LIBDIR) $(LIBXPM_LIBDIR) +ALL_DLLDIR=$(FREETYPE_DLLDIR) $(JPEG_DLLDIR) $(PNG_DLLDIR) $(TIFF_DLLDIR) \ + $(LIBZ_DLLDIR) $(LIBXPM_DLLDIR) + +# We need libiconv for internationalization. We default to static +# linking because that reduces the number of dependencies. However, +# libiconv is released under the GNU GPL which may impose extra +# restrictions on redistribution. +LIBICONV=/c/MinGW/lib/libiconv.a +#LIBICONV=-liconv + + +DEFS=$(CDEFS) $(ALL_D) +INCLUDES=$(ALL_I) + +CC=gcc +CFLAGS=-g -O2 -I. -std=gnu99 -fvisibility=hidden -static-libgcc \ + -D_WIN32 -DBGDWIN32 $(DEFS) $(INCLUDES) + +LD=gcc +LDFLAGS=-g -O2 -fvisibility=hidden -static-libgcc $(ALL_LIBDIR) +LIBS=$(ALL_L) $(LIBICONV) + +ZIP=zip -j9 +DIST=libgd-win.zip + +# Get this list from c files in libgd_la_SOURCES in Makefile.mk +SRC=gd.c gd_color.c gd_color_map.c gd_transform.c gdfx.c \ +gd_security.c gd_gd.c gd_gd2.c gd_io.c gd_io_dp.c gd_gif_in.c \ +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_bmp.c gd_xbm.c gd_color_match.c gd_version.c gd_filename.c + +OBJ=$(SRC:.c=.o) + +TARGETBASE=libgd +TARGET=$(TARGETBASE).dll +TARGET_A=$(TARGETBASE).a + +all: + (cd ../../src; make -f ../windows/msys/Makefile $(TARGET)) + +# BUG: this sucks in all the DLLs in the lib installation directory, +# including those you may not need. +dist: all + (cd ../..; $(ZIP) $(DIST) src/*.dll src/*.a $$(for d in $(ALL_DLLDIR); do echo $$d/*.dll; done | sort -u) ) + + +clean: + -rm ../../$(DIST) + (cd ../../src; rm -f *.dll *.a $(OBJ) deps.mk; true) + +check: all + bash run_tests.sh "$(GNUDIR)/bin" "$(INCLUDES)" + +deps.mk: + [ -f gd.h ] # Sanity check: we're in src/, right? + gcc -MM $(DEFS) $(INCLUDES) $(SRC) > deps.mk + +$(TARGET): $(OBJ) + gcc -shared -o $(TARGET) $(LDFLAGS) -Wl,--out-implib,$(TARGET_A) \ + $(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 new file mode 100644 index 00000000000..60289badb2d --- /dev/null +++ b/Build/source/libs/gd/libgd-src/windows/msys/README.MSYS.md @@ -0,0 +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.
+
+
+
+
diff --git a/Build/source/libs/gd/libgd-src/windows/msys/deps.mk b/Build/source/libs/gd/libgd-src/windows/msys/deps.mk new file mode 100644 index 00000000000..a27c0781fed --- /dev/null +++ b/Build/source/libs/gd/libgd-src/windows/msys/deps.mk @@ -0,0 +1 @@ +# Nothing to see here. (But it shuts up make.)
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 new file mode 100755 index 00000000000..22de13c4036 --- /dev/null +++ b/Build/source/libs/gd/libgd-src/windows/msys/run_tests.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +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" +LDFLAGS='-L../src -llibgd' +DLLPATH=../src:$DLLPATH_EXTRA + +function run_gcc { + if msg=`gcc $* 2>&1`; then + true + else + echo "COMMAND: gcc $*" >> $LOG + echo $msg >> $LOG + false + fi +} + +# Switch to the working directory +export PATH=$PATH:$DLLPATH +cd ../../tests + +# Initial setup +echo "Setting up..." +[ -f $LOG ] && rm -f $LOG +[ -f test_config.h ] || echo '#define GDTEST_TOP_DIR "."' > test_config.h +run_gcc -c $CFLAGS gdtest/gdtest.c + + +echo "Running tests:" +count=0 +failures=0 +compile_failures=0 +for test in `find . -name \*.c | grep -v '^./gdtest'`; do + count=`expr $count + 1` + + exe=${test%.c}.exe + if run_gcc -o $exe $CFLAGS $LDFLAGS $test gdtest.o; then + true; + else + echo "COMPILE_FAIL: $test" + compile_failures=`expr $compile_failures + 1` + continue + fi + + echo "Running $exe:" >> $LOG + if $exe 2>&1 >> $LOG; then + echo "PASS: $test" + else + failures=`expr $failures + 1` + echo "FAIL: $test" + fi + echo >> $LOG +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 new file mode 100644 index 00000000000..21d741ab253 --- /dev/null +++ b/Build/source/libs/gd/libgd-src/windows/readme.md @@ -0,0 +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:
+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 new file mode 100644 index 00000000000..5dadb059407 --- /dev/null +++ b/Build/source/libs/gd/libgd-src/windows/run_tests.bat @@ -0,0 +1,38 @@ +@echo off +setlocal EnableDelayedExpansion +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) + + 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! + + if defined APPVEYOR ( + appveyor AddTest "!test! %PLATFORM%" -Outcome !result! -Framework Custom -Filename %%~nT.exe -Duration 0 + ) +) + +exit /b 0
\ No newline at end of file |