Changeset 3076 for libpipi


Ignore:
Timestamp:
Oct 23, 2008, 5:44:51 PM (12 years ago)
Author:
Sam Hocevar
Message:

libpipi: improve GDI+ codec cross-compilation.

Location:
libpipi/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/build-win32

    r3074 r3076  
    2626# Install into our private directory
    2727make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
    28 # Create a launcher
    29 echo 'int main(int argc, char *argv[], char *envp[]) { argv[0] = ".\\bin\\ThePimp.exe"; execve(argv[0], argv, envp); return 0; }' > run.c
    30 i586-mingw32msvc-gcc run.c -mwindows -o "${INSTALLDIR}/ThePimp.exe"
    31 i586-mingw32msvc-strip "${INSTALLDIR}/ThePimp.exe"
    3228# Clean up
    3329cd "${SRCDIR}"
     
    4541rm -Rf "${INSTALLDIR}/lib/mono"
    4642
     43# Install The Pimp
     44mv "${INSTALLDIR}/lib/ThePimp.exe" "${INSTALLDIR}/bin/"
     45echo 'int main(int argc, char *argv[], char *envp[]) { argv[0] = ".\\bin\\ThePimp.exe"; execve(argv[0], argv, envp); return 0; }' > run.c
     46i586-mingw32msvc-gcc run.c -mwindows -o "${INSTALLDIR}/ThePimp.exe"
     47i586-mingw32msvc-strip "${INSTALLDIR}/ThePimp.exe"
     48
     49# Install documentation
    4750mkdir "${INSTALLDIR}/doc"
    4851for f in COPYING NOTES; do
  • libpipi/trunk/pipi/Makefile.am

    r3075 r3076  
    114114
    115115if USE_GDIPLUS
    116 codec_libs += -lgdiplus
     116codec_libs += -Wl,--exclude-symbols,$$(printf '\x7f')gdiplus_NULL_THUNK_DATA -lgdiplus
    117117codec_sources += codec/gdiplus.cpp
    118118endif
  • libpipi/trunk/pipi/codec/gdiplus.cpp

    r3074 r3076  
    3434extern "C" pipi_image_t *pipi_load_gdiplus(const char *name)
    3535{
    36 #if 0
    3736    size_t len;
    3837    len = mbstowcs(NULL, name, 0);
    3938    wchar_t *wname = new wchar_t[len + 1];
    40     if(mbstowcs(wname, name, len + 1) != (size_t)-1)
     39    if(mbstowcs(wname, name, len + 1) == (size_t)-1)
    4140    {
    4241        delete[] wname;
     
    7978
    8079    return img;
    81 #endif
    82 return NULL;
    8380}
    8481
    8582extern "C" int pipi_save_gdiplus(pipi_image_t *img, const char *name)
    8683{
    87 #if 0
    8884    wchar_t const *fmt;
    8985    if(strstr(name, ".gif"))
     
    118114    len = mbstowcs(NULL, name, 0);
    119115    wchar_t *wname = new wchar_t[len + 1];
    120     if(mbstowcs(wname, name, len + 1) != (size_t)-1)
     116    if(mbstowcs(wname, name, len + 1) == (size_t)-1)
    121117    {
    122118        delete[] wname;
     
    155151    delete b;
    156152
    157 #endif
    158153    return 0;
    159154}
Note: See TracChangeset for help on using the changeset viewer.