選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

58 行
1.6 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 "$@"
  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/gtksharp/"* "${INSTALLDIR}/"
  34. find "${INSTALLDIR}/" -name .svn -prune -exec rm -rf '{}' ';'
  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}"