diff --git a/ChangeLog b/ChangeLog index c20adc8a6..eb4dd67f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-01-09 Mike Kestner + + * configure.in.in: don't hardcode CC when cross-compiling. + * gapi-cdecl-insert: monodis support on mono. + * Makefile.am: add a cross-compile bundling target. The goal is to + build a .zip which can be extracted on win32 to run candle and light, + avoiding cygwin to produce installers. Hopefully some day wix will + run on linux. + 2009-01-08 Mike Kestner * cairo/Makefile.am: use mono.snk to sign the Mono.Cairo assembly diff --git a/Makefile.am b/Makefile.am index 478629aa1..d580f3f74 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,3 +20,20 @@ win32-installer: all light.exe gtk-sharp-2.0-lib.wixobj candle.exe gtk-sharp-2.0-dev.wxs light.exe gtk-sharp-2.0-dev.wixobj + +assembly_dirs = glib gio pango atk gdk gtk glade gtkdotnet + +cross-bundle: all + mkdir -p gtk-sharp-cross-$(VERSION) + rm -rf gtk-sharp-cross-$(VERSION)/* + cp *.wxs gtk-sharp-cross-$(VERSION) + cp generator/gapi_codegen.exe gtk-sharp-cross-$(VERSION) + cp */glue/.libs/*.dll gtk-sharp-cross-$(VERSION) + @for a in $(assembly_dirs); do \ + mkdir -p gtk-sharp-cross-$(VERSION)/$$a; \ + cp $$a/*.dll gtk-sharp-cross-$(VERSION)/$$a; \ + done + cp sample/GtkDemo/GtkDemo.exe gtk-sharp-cross-$(VERSION) + zip -9r gtk-sharp-cross-$(VERSION).zip gtk-sharp-cross-$(VERSION) + rm -rf gtk-sharp-cross-$(VERSION) + diff --git a/configure.in.in b/configure.in.in index 327f1d5c8..65d6b1667 100644 --- a/configure.in.in +++ b/configure.in.in @@ -20,14 +20,18 @@ case "$host" in WIN64DEFINES="-define:WIN64LONGS" platform_win32=yes AC_DEFINE(PLATFORM_WIN32,1,[Platform is Win32]) - CC="gcc -mno-cygwin -g" - HOST_CC="gcc" + if test "x$cross_compiling" = "xno"; then + CC="gcc -mno-cygwin -g" + HOST_CC="gcc" + fi ;; *-*-mingw*|*-*-cygwin*) platform_win32=yes AC_DEFINE(PLATFORM_WIN32,1,[Platform is Win32]) - CC="gcc -mno-cygwin -g" - HOST_CC="gcc" + if test "x$cross_compiling" = "xno"; then + CC="gcc -mno-cygwin -g" + HOST_CC="gcc" + fi ;; *) platform_win32=no diff --git a/gapi-cdecl-insert b/gapi-cdecl-insert index 968949da5..dad2a7848 100755 --- a/gapi-cdecl-insert +++ b/gapi-cdecl-insert @@ -31,15 +31,21 @@ foreach $arg (@ARGV) { } } +if (`which ildasm 2> /dev/null`) { + $dasm = "ildasm /out:"; +} else { + $dasm = "monodis --output="; +} + if ($assembly =~ /(.*)\.dll/) { $basename = $1; - `ildasm $assembly /out:$basename.raw`; + `$dasm$basename.raw $assembly`; open(INFILE, $basename . ".raw") || die "Couldn't open $basename.raw\n"; open(OUTFILE, "> $basename.il") || die "Couldn't open $basename.il\n"; while ($line = ) { $insert = 1 if ($line =~ /\.custom instance void .*GLib\.CDeclCallbackAttribute/); - if ($insert && $line =~ /(.*)\s+(Invoke\(.*)/) { + if ($insert && $line =~ /(.*)\s+(Invoke\s*\(.*)/) { print OUTFILE "$1 modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) $2"; $insert = 0; next;