From: glenlow Date: Tue, 4 Mar 2008 12:03:00 +0000 (+0000) Subject: once more into the breach to integrate the GDI+ plugin: must specify Platform SDK... X-Git-Tag: LAST_LIBGRAPH~32^2~4581 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad83aaaf5389ae7cd25250f3e9b27e5770507be8;p=graphviz once more into the breach to integrate the GDI+ plugin: must specify Platform SDK directories during configure, correct dependency rules for patched/unpatched headers, pass GDI+ import library direct to linker --- diff --git a/configure.ac b/configure.ac index 385024efe..c9e7ab9de 100644 --- a/configure.ac +++ b/configure.ac @@ -1930,29 +1930,41 @@ AC_SUBST(QUARTZ_LIBS) AM_CONDITIONAL(WITH_QUARTZ, [test "x$HAVE_QUARTZ" != "x"]) dnl ----------------------------------- -dnl INCLUDES and LIBS for GDIPLUS +dnl INCLUDES and LIBS for PLATFORMSDK + +AC_ARG_WITH(platformsdkincludedir, + [AC_HELP_STRING([--with-platformsdkincludedir=DIR], [use Platform SDK (Windows) includes from DIR])], + [PLATFORMSDKINCLUDE=$withval; PLATFORMSDKINCLUDE_ESCAPED=${PLATFORMSDKINCLUDE//'\\'/\\\\}; PLATFORMSDKINCLUDE_ESCAPED=${PLATFORMSDKINCLUDE_ESCAPED// /\\ }]) + +AC_ARG_WITH(platformsdklibdir, + [AC_HELP_STRING([--with-platformsdklibdir=DIR], [use Platform SDK (Windows) libraries from DIR])], + [PLATFORMSDKLIB=$withval]) + +AC_SUBST(PLATFORMSDKINCLUDE) +AC_SUBST(PLATFORMSDKINCLUDE_ESCAPED) +AC_SUBST(PLATFORMSDKLIB) + +dnl ----------------------------------- +dnl INCLUDES and LIBS for GDI+ AC_ARG_WITH(gdiplus, - [AC_HELP_STRING([--with-gdiplus=no], [GDIPLUS framework (Windows)])], + [AC_HELP_STRING([--with-gdiplus=no], [GDI+ framework (Windows)])], [], [with_gdiplus=no]) if test "x$with_gdiplus" = "xyes"; then -if test "x$PLATFORMSDK" != x; then -GDIPLUS_PLATFORMSDK="$PLATFORMSDK" -else -GDIPLUS_PLATFORMSDK="$VS80COMNTOOLS/../../VC/PlatformSDK" -fi - -if test -d "$GDIPLUS_PLATFORMSDK"; then +if test -f "$PLATFORMSDKINCLUDE\GdiPlus.h" -a -f "$PLATFORMSDKLIB\GdiPlus.lib"; then HAVE_GDIPLUS=1 -AC_DEFINE_UNQUOTED(HAVE_GDIPLUS,1,[Define if you have the GdiPlus framework for Windows]) +AC_DEFINE_UNQUOTED(HAVE_GDIPLUS,1,[Define if you have the GDI+ framework for Windows]) +GDIPLUS_HEADS=`cd "$PLATFORMSDKINCLUDE" && echo GdiPlus*.h` GDIPLUS_CFLAGS='' GDIPLUS_LIBS='' +else +AC_MSG_WARN(--with-gdiplus requires valid --with-platformsdkincludedir and --with-platformsdklibdir.) fi fi -AC_SUBST(GDIPLUS_PLATFORMSDK) +AC_SUBST(GDIPLUS_HEADS) AC_SUBST(GDIPLUS_CFLAGS) AC_SUBST(GDIPLUS_LIBS) AM_CONDITIONAL(WITH_GDIPLUS, [test "x$HAVE_GDIPLUS" != "x"]) diff --git a/plugin/gdiplus/gdiplus.diff b/plugin/gdiplus/gdiplus.diff deleted file mode 100755 index 2ce56554b..000000000 --- a/plugin/gdiplus/gdiplus.diff +++ /dev/null @@ -1,50 +0,0 @@ ---- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusEnums.h Thu Apr 14 16:54:44 2005 -+++ ./GdiPlusEnums.h Mon Feb 25 17:19:13 2008 -@@ -531,11 +531,9 @@ - // We have to change the WMF record numbers so that they don't conflict with - // the EMF and EMF+ record numbers. - --enum EmfPlusRecordType; -- - #define GDIP_EMFPLUS_RECORD_BASE 0x00004000 - #define GDIP_WMF_RECORD_BASE 0x00010000 --#define GDIP_WMF_RECORD_TO_EMFPLUS(n) ((EmfPlusRecordType)((n) | GDIP_WMF_RECORD_BASE)) -+#define GDIP_WMF_RECORD_TO_EMFPLUS(n) ((n) | GDIP_WMF_RECORD_BASE) - #define GDIP_EMFPLUS_RECORD_TO_WMF(n) ((n) & (~GDIP_WMF_RECORD_BASE)) - #define GDIP_IS_WMF_RECORDTYPE(n) (((n) & GDIP_WMF_RECORD_BASE) != 0) - ---- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusHeaders.h Thu Apr 14 16:54:44 2005 -+++ ./GdiPlusHeaders.h Mon Feb 25 17:20:22 2008 -@@ -650,7 +650,7 @@ - - class CachedBitmap : public GdiplusBase - { -- friend Graphics; -+ friend class Graphics; - - public: - CachedBitmap(IN Bitmap *bitmap, ---- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusImaging.h Thu Apr 14 16:54:44 2005 -+++ ./GdiPlusImaging.h Mon Feb 25 17:23:08 2008 -@@ -153,7 +153,7 @@ - UINT Width; - UINT Height; - INT Stride; -- PixelFormat PixelFormat; -+ Gdiplus::PixelFormat PixelFormat; - VOID* Scan0; - UINT_PTR Reserved; - }; ---- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusimageAttributes.h Thu Apr 14 16:54:44 2005 -+++ ./GdiPlusimageAttributes.h Mon Feb 25 17:21:58 2008 -@@ -231,8 +231,8 @@ - nativeImageAttr, - type, - FALSE, -- NULL, -- NULL)); -+ (ARGB)0, -+ (ARGB)0)); - } - - Status SetOutputChannel(