No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

build-win32 1.6 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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}-win32-`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 "$@"
  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. # Create a launcher
  24. echo 'int main(int argc, char *argv[], char *envp[]) { argv[0] = ".\\bin\\ThePimp.exe"; execve(argv[0], argv, envp); return 0; }' > run.c
  25. i586-mingw32msvc-gcc run.c -mwindows -o "${INSTALLDIR}/ThePimp.exe"
  26. i586-mingw32msvc-strip "${INSTALLDIR}/ThePimp.exe"
  27. # Clean up
  28. cd "${SRCDIR}"
  29. rm -Rf "${BUILDDIR}"
  30. #i586-mingw32msvc-strip "${INSTALLDIR}/bin/"*.exe || true
  31. #i586-mingw32msvc-strip "${INSTALLDIR}/lib/"*.dll || true
  32. # Install gtk-sharp
  33. cp -r "win32/dist/"* "${INSTALLDIR}/"
  34. cp -r "win32/assembly/"* "${INSTALLDIR}/bin/"
  35. # Install pipi-sharp
  36. mv "${INSTALLDIR}/lib/pipi-sharp/"* "${INSTALLDIR}/bin/"
  37. rm -Rf "${INSTALLDIR}/lib/pipi-sharp"
  38. mkdir "${INSTALLDIR}/doc"
  39. for f in COPYING NOTES; do
  40. sed -e 's/$/ /' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
  41. done
  42. rm -f "${INSTALLDIR}/lib/"*.a
  43. rm -f "${INSTALLDIR}/lib/"*.la
  44. # Pack the directory
  45. zip "${DIRNAME}.zip" `find "${DIRNAME}"`
  46. rm -Rf "${INSTALLDIR}"