25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

build-win32 1.8 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #! /bin/sh
  2. ## Win32 cross-compilation for libpipi -- Sam Hocevar <sam@zoy.org>
  3. ## $Id$
  4. set -x
  5. set -e
  6. # Clean up our working directory
  7. PROJECT="ThePimp"
  8. SRCDIR="`pwd`"
  9. DIRNAME="${PROJECT}-`sed -ne 's/^AC_INIT(.*, \(.*\)).*/\1/p' configure.ac`"
  10. INSTALLDIR="`pwd`/${DIRNAME}"
  11. BUILDDIR="${INSTALLDIR}/build"
  12. rm -Rf "${INSTALLDIR}"
  13. rm -f "${INSTALLDIR}.zip"
  14. mkdir "${INSTALLDIR}"
  15. mkdir "${BUILDDIR}"
  16. make distclean || true
  17. cd "${BUILDDIR}"
  18. # Build for win32
  19. "${SRCDIR}/configure" --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib CPPFLAGS="-I${SRCDIR}/win32/gdiplus/include" LIBS="-L${SRCDIR}/win32/gdiplus/lib" "$@"
  20. make pkglibdir=/lib pkgdatadir=/data bindir=/bin
  21. # Install into our private directory
  22. make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
  23. # Clean up
  24. cd "${SRCDIR}"
  25. rm -Rf "${BUILDDIR}"
  26. #i586-mingw32msvc-strip "${INSTALLDIR}/bin/"*.exe || true
  27. #i586-mingw32msvc-strip "${INSTALLDIR}/lib/"*.dll || true
  28. # Install gtk-sharp
  29. cp -r "win32/gtksharp/"* "${INSTALLDIR}/"
  30. find "${INSTALLDIR}/" -name .svn -prune -exec rm -rf '{}' ';'
  31. # Install pipi-sharp
  32. mv "${INSTALLDIR}/lib/mono/gac/pipi-sharp/"*/* "${INSTALLDIR}/bin/"
  33. rm -Rf "${INSTALLDIR}/lib/mono"
  34. # Install The Pimp
  35. mv "${INSTALLDIR}/lib/ThePimp.exe" "${INSTALLDIR}/bin/"
  36. echo 'int main(int argc, char *argv[], char *envp[]) { argv[0] = ".\\bin\\ThePimp.exe"; execve(argv[0], argv, envp); return 0; }' > run.c
  37. i586-mingw32msvc-gcc run.c -mwindows -o "${INSTALLDIR}/ThePimp.exe"
  38. i586-mingw32msvc-strip "${INSTALLDIR}/ThePimp.exe"
  39. # Install documentation
  40. mkdir "${INSTALLDIR}/doc"
  41. for f in COPYING NOTES; do
  42. sed -e 's/$/ /' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
  43. done
  44. rm -f "${INSTALLDIR}/lib/"*.a
  45. rm -f "${INSTALLDIR}/lib/"*.la
  46. # Pack the directory
  47. zip "${DIRNAME}.zip" `find "${DIRNAME}"`
  48. rm -Rf "${INSTALLDIR}"