Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

66 Zeilen
2.1 KiB

  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 pipi.exe
  29. echo 'int main(int argc, char *argv[], char *envp[]) { argv[0] = ".\\bin\\pipi.exe"; execve(argv[0], argv, envp); return 0; }' > run.c
  30. i586-mingw32msvc-gcc run.c -mwindows -o "${INSTALLDIR}/pipi.exe"
  31. i586-mingw32msvc-strip "${INSTALLDIR}/pipi.exe"
  32. # Install gtk-sharp
  33. cp -r "win32/gtksharp/"* "${INSTALLDIR}/"
  34. find "${INSTALLDIR}/" -name .svn -prune -exec rm -rf '{}' ';'
  35. # Install pipi-sharp
  36. mv "${INSTALLDIR}/lib/mono/gac/pipi-sharp/"*/* "${INSTALLDIR}/bin/"
  37. rm -Rf "${INSTALLDIR}/lib/mono"
  38. # Install The Pimp
  39. mv "${INSTALLDIR}/lib/ThePimp.exe" "${INSTALLDIR}/bin/"
  40. echo 'int main(int argc, char *argv[], char *envp[]) { argv[0] = ".\\bin\\ThePimp.exe"; execve(argv[0], argv, envp); return 0; }' > run.c
  41. i586-mingw32msvc-gcc run.c -mwindows -o "${INSTALLDIR}/ThePimp.exe"
  42. i586-mingw32msvc-strip "${INSTALLDIR}/ThePimp.exe"
  43. # Install documentation
  44. mkdir "${INSTALLDIR}/doc"
  45. for f in COPYING NOTES; do
  46. sed -e 's/$/ /' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
  47. done
  48. rm -f "${INSTALLDIR}/lib/"*.a
  49. rm -f "${INSTALLDIR}/lib/"*.la
  50. # Pack the directory
  51. zip "${DIRNAME}.zip" `find "${DIRNAME}"`
  52. rm -Rf "${INSTALLDIR}"