From fa1e02d6d5503bfdff0ac52163e1f40f1fb3b60c Mon Sep 17 00:00:00 2001 From: sam Date: Sun, 12 Oct 2008 14:04:00 +0000 Subject: [PATCH] Improve the Win32 cross-build script. Still doesn't work well. git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2937 92316355-f0b4-4df1-b90c-862c8a59935f --- ThePimp/Makefile.am | 25 +++++++++++++++++-------- build-win32 | 24 ++++++++++++------------ configure.ac | 2 +- 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/ThePimp/Makefile.am b/ThePimp/Makefile.am index 14ad272..53923c2 100644 --- a/ThePimp/Makefile.am +++ b/ThePimp/Makefile.am @@ -6,8 +6,8 @@ pimp_sources = \ AboutWindow.cs \ ErrorWindow.cs \ MainWindow.cs \ - OpenFile.cs \ NewFile.cs \ + OpenFile.cs \ PictureView.cs \ SaveFile.cs \ ToolBox.cs \ @@ -15,8 +15,8 @@ pimp_sources = \ gtk-gui/ThePimp.AboutWindow.cs \ gtk-gui/ThePimp.ErrorWindow.cs \ gtk-gui/ThePimp.MainWindow.cs \ - gtk-gui/ThePimp.OpenFile.cs \ gtk-gui/ThePimp.NewFile.cs \ + gtk-gui/ThePimp.OpenFile.cs \ gtk-gui/ThePimp.PictureView.cs \ gtk-gui/ThePimp.SaveFile.cs \ gtk-gui/ThePimp.ToolBox.cs @@ -30,22 +30,31 @@ image_sources = \ images/about.svg if USE_CSHARP -if USE_GTKSHARP bin_SCRIPTS = ThePimp.exe endif + +if USE_GTKSHARP +pimp_flags = -pkg:gtk-sharp-2.0 -r:Mono.Posix +else +pimp_flags = \ + -r:$(top_srcdir)/win32/assembly/pango-sharp.dll \ + -r:$(top_srcdir)/win32/assembly/atk-sharp.dll \ + -r:$(top_srcdir)/win32/assembly/gdk-sharp.dll \ + -r:$(top_srcdir)/win32/assembly/gtk-sharp.dll \ + -r:$(top_srcdir)/win32/assembly/glib-sharp.dll endif EXTRA_DIST = $(pimp_sources) $(pimp_resources) $(image_sources) ThePimp.exe: ../pipi-sharp/pipi-sharp.dll $(pimp_sources) $(pimp_resources) - cp ../pipi-sharp/pipi-sharp.dll . - cp ../pipi-sharp/pipi-sharp.dll.config . - cp ../pipi-sharp/pipi-sharp.dll.mdb . - $(GMCS) -debug -codepage:utf8 -out:$@ -lib:./ \ + $(GMCS) -debug -codepage:utf8 -out:$@ $(pimp_flags) -lib:./ \ $(addprefix $(srcdir)/, $(pimp_sources)) \ $(foreach x, $(pimp_resources), \ -resource:$(srcdir)/$x,ThePimp.$(subst /,.,$x)) \ - -pkg:gtk-sharp-2.0 -r:Mono.Posix -r:pipi-sharp.dll + -r:pipi-sharp.dll + cp ../pipi-sharp/pipi-sharp.dll . + cp ../pipi-sharp/pipi-sharp.dll.config . + cp ../pipi-sharp/pipi-sharp.dll.mdb . clean-local: rm -f pipi-sharp.dll.config diff --git a/build-win32 b/build-win32 index 7e55196..5df0b97 100755 --- a/build-win32 +++ b/build-win32 @@ -27,23 +27,23 @@ make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/ cd "${SRCDIR}" rm -Rf "${BUILDDIR}" -mv "${INSTALLDIR}/bin/"* "${INSTALLDIR}/" -mv "${INSTALLDIR}/lib/"* "${INSTALLDIR}/" -i586-mingw32msvc-strip "${INSTALLDIR}/"*.exe || true -i586-mingw32msvc-strip "${INSTALLDIR}/"*.dll || true -rmdir "${INSTALLDIR}/bin" -rmdir "${INSTALLDIR}/lib" +i586-mingw32msvc-strip "${INSTALLDIR}/bin/"*.exe || true +i586-mingw32msvc-strip "${INSTALLDIR}/lib/"*.dll || true + +# Install gtk-sharp +cp -r "win32/dist/"* "${INSTALLDIR}/" +cp -r "win32/assembly/"* "${INSTALLDIR}/bin/" + +# Install pipi-sharp +mv "${INSTALLDIR}/lib/pipi-sharp/"* "${INSTALLDIR}/bin/" +rm -Rf "${INSTALLDIR}/lib/pipi-sharp" mkdir "${INSTALLDIR}/doc" for f in COPYING NOTES; do sed -e 's/$/ /' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt" done -rm -Rf "${INSTALLDIR}/share" -rm -Rf "${INSTALLDIR}/man" -rm -Rf "${INSTALLDIR}/include" -rm -Rf "${INSTALLDIR}/pkg-config" -rm -f "${INSTALLDIR}/"*.a -rm -f "${INSTALLDIR}/"*.la +rm -f "${INSTALLDIR}/lib/"*.a +rm -f "${INSTALLDIR}/lib/"*.la # Pack the directory zip "${DIRNAME}.zip" `find "${DIRNAME}"` diff --git a/configure.ac b/configure.ac index b4fe2b8..e393a65 100644 --- a/configure.ac +++ b/configure.ac @@ -44,7 +44,7 @@ if test "${build}" != "${host}" -a "${PKG_CONFIG_LIBDIR}" = ""; then fi AC_MSG_CHECKING(for library suffix) -LT_SUFFIX="`./libtool -n --mode=link gcc -o libTEST.la -no-undefined -version-number 123:666:999 -rpath / | xargs -n 1 | sed -ne 's/.*libTEST\(@<:@^, ()0-9@:>@*\)123\(@<:@^, ()0-9@:>@*\).*/\1'$LT_MAJOR'\2/p' | grep -v '\.$' | head -n 1`" +LT_SUFFIX="`./libtool -n --tag CC --mode=link gcc -o libTEST.la -no-undefined -version-number 123:666:999 -rpath / | xargs -n 1 | sed -ne 's/.*libTEST\(@<:@^, ()0-9@:>@*\)123\(@<:@^, ()0-9@:>@*\).*/\1'$LT_MAJOR'\2/p' | grep -v '\.$' | head -n 1`" if test "$LT_SUFFIX" = ""; then LT_SUFFIX=".so.$LT_MAJOR" AC_MSG_RESULT([unknown, defaulting to $LT_SUFFIX])