GtkSharp/mapdllnames.pl
Mike Kestner b2f04c1d80 2002-10-26 Mike Kestner <mkestner@speakeasy.net>
Much of this patch from Vlad, with substantial rework by mk.
	* */makefile.win32 : introduce mapdllnames.pl, api, and glue
	* generator/CallbackGen.cs : rework namespacing for csc compilation
	* generator/Parameters.cs : ditto
	* generator/Signal.cs : ditto
	* generator/SignalHandler.cs : ditto
	* glue/win32dll.c : new dll construction source
	* glib/Value.cs : new ushort ctor/cast operator
	* gtk/Table.custom : comment this out until we add a default ctor tag
	* gtk/ThreadNotify.cs : make ReadyEvent public
	* sources/Gdk.metadata : mark a Parse() param as ref

svn path=/trunk/gtk-sharp/; revision=8590
2002-10-27 02:30:51 +00:00

38 lines
943 B
Perl
Executable file

#!/usr/bin/perl
#
# mapdllnames.pl : remaps the DllImport libnames for a specified source dir.
#
# Author: Mike Kestner <mkestner@speakeasy.net>
#
# <c> 2002 Mike Kestner
#############################################################################
%map = (
'glib-2.0', "libglib-2.0-0.dll",
'gobject-2.0', "libgobject-2.0-0.dll",
'pango-1.0', "libpango-1.0-0.dll",
'atk-1.0', "libatk-1.0-0.dll",
'gdk-x11-2.0', "libgdk-win32-2.0-0.dll",
'gdk-pixbuf-2.0', "libgdk_pixbuf-2.0-0.dll",
'gtk-x11-2.0', "libgtk-win32-2.0-0.dll"
);
foreach $filename (@ARGV) {
chomp($filename);
open(INFILE, $filename) || die "Couldn't open $filename\n";
open(OUTFILE, ">$filename.tmp") || die "Couldn't open $filename.tmp\n";
while ($line = <INFILE>) {
if ($line =~ /DllImport\(\"(.*)\"/ && exists($map{$1})) {
$line =~ s/\"(.*)\"/\"$map{$1}\"/;
}
print OUTFILE $line;
}
close(INFILE);
close(OUTFILE);
`mv $filename.tmp $filename`;
}