Explorar el Código

libpipi: the GDI+ codec can now compile using mingw32, unfortunately it

does not link yet due to a bug in mingw's ld.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@3074 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam hace 16 años
padre
commit
8067d945dc
Se han modificado 8 ficheros con 30 adiciones y 4 borrados
  1. +1
    -1
      build-win32
  2. +15
    -1
      configure.ac
  3. +7
    -0
      pipi/codec/gdiplus.cpp
  4. +5
    -0
      pipi/pipi_internals.h
  5. +1
    -1
      win32/gdiplus/include/GdiplusEnums.h
  6. +1
    -1
      win32/gdiplus/include/GdiplusFlat.h
  7. +0
    -0
      win32/gdiplus/lib/libgdiplus.a
  8. +0
    -0
      win32/gdiplus/lib/libgdiplus.dll

+ 1
- 1
build-win32 Ver fichero

@@ -21,7 +21,7 @@ make distclean || true

cd "${BUILDDIR}"
# Build for win32
"${SRCDIR}/configure" --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib "$@"
"${SRCDIR}/configure" --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib CPPFLAGS="-I${SRCDIR}/win32/gdiplus/include" LIBS="-L${SRCDIR}/win32/gdiplus/lib" "$@"
make pkglibdir=/lib pkgdatadir=/data bindir=/bin
# Install into our private directory
make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/


+ 15
- 1
configure.ac Ver fichero

@@ -20,6 +20,8 @@ AC_SUBST(LT_VERSION)

AM_PROG_CC_C_O
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_OBJC
_AM_DEPENDENCIES([OBJC])
OBJC="${CC}"
@@ -148,7 +150,19 @@ if test "${ac_cv_my_have_gdi}" != "no"; then
AC_DEFINE(USE_GDI, 1, Define to 1 to use GDI)
fi
AM_CONDITIONAL(USE_GDI, test "${ac_cv_my_have_gdi}" = "yes")
AM_CONDITIONAL(USE_GDIPLUS, test "${ac_cv_my_have_gdi}" = "yes")

# Use Windows GDI+?
ac_cv_my_have_gdiplus="no"
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS(Gdiplus.h,
[ac_cv_my_have_gdiplus="yes"],
[ac_cv_my_have_gdiplus="no"],
[#include <windows.h>])
AC_LANG_POP(C++)
if test "${ac_cv_my_have_gdiplus}" != "no"; then
AC_DEFINE(USE_GDIPLUS, 1, Define to 1 to use GDI+)
fi
AM_CONDITIONAL(USE_GDIPLUS, test "${ac_cv_my_have_gdiplus}" = "yes")

# Use Cocoa?
ac_cv_my_have_cocoa="no"


+ 7
- 0
pipi/codec/gdiplus.cpp Ver fichero

@@ -26,11 +26,14 @@

#include <Gdiplus.h>

extern "C" {
#include "pipi.h"
#include "pipi_internals.h"
}

extern "C" pipi_image_t *pipi_load_gdiplus(const char *name)
{
#if 0
size_t len;
len = mbstowcs(NULL, name, 0);
wchar_t *wname = new wchar_t[len + 1];
@@ -75,10 +78,13 @@ extern "C" pipi_image_t *pipi_load_gdiplus(const char *name)
img->u8 = 1;

return img;
#endif
return NULL;
}

extern "C" int pipi_save_gdiplus(pipi_image_t *img, const char *name)
{
#if 0
wchar_t const *fmt;
if(strstr(name, ".gif"))
fmt = L"image/gif";
@@ -148,6 +154,7 @@ extern "C" int pipi_save_gdiplus(pipi_image_t *img, const char *name)
delete[] wname;
delete b;

#endif
return 0;
}



+ 5
- 0
pipi/pipi_internals.h Ver fichero

@@ -82,6 +82,11 @@ pipi_image_t *pipi_load_sdl(const char *name);
int pipi_save_sdl(pipi_image_t *img, const char *name);
#endif

#ifdef USE_GDIPLUS
pipi_image_t *pipi_load_gdiplus(const char *name);
int pipi_save_gdiplus(pipi_image_t *img, const char *name);
#endif

#ifdef USE_GDI
pipi_image_t *pipi_load_gdi(const char *name);
int pipi_save_gdi(pipi_image_t *img, const char *name);


+ 1
- 1
win32/gdiplus/include/GdiplusEnums.h Ver fichero

@@ -530,7 +530,7 @@ enum ObjectType
inline BOOL
ObjectTypeIsValid(
ObjectType type
enum ObjectType type
)
{
return ((type >= ObjectTypeMin) && (type <= ObjectTypeMax));


+ 1
- 1
win32/gdiplus/include/GdiplusFlat.h Ver fichero

@@ -32,7 +32,7 @@ extern "C" {
VOID
WINGDIPAPI
GdipDisplayPaletteWindowNotify(WindowNotifyEnum notify);
GdipDisplayPaletteWindowNotify(enum WindowNotifyEnum notify);
#endif


win32/gdiplus/lib/gdiplus.lib → win32/gdiplus/lib/libgdiplus.a Ver fichero


win32/gdiplus/lib/gdiplus.dll → win32/gdiplus/lib/libgdiplus.dll Ver fichero


Cargando…
Cancelar
Guardar