2004-02-07 Gustavo Giraldez <gustavo.giraldez@gmx.net>
* atk/Makefile.in : fix copy/paste error in --assembly-name. * generator/ObjectGen.cs : rework ObjectManager generation code. * glade/Makefile.in : fix copy/paste error in --assembly-name. svn path=/trunk/gtk-sharp/; revision=22865
This commit is contained in:
parent
dc7145103d
commit
f91aeb5425
4 changed files with 26 additions and 9 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-02-07 Gustavo Giraldez <gustavo.giraldez@gmx.net>
|
||||
|
||||
* atk/Makefile.in : fix copy/paste error in --assembly-name.
|
||||
* generator/ObjectGen.cs : rework ObjectManager generation code.
|
||||
* glade/Makefile.in : fix copy/paste error in --assembly-name.
|
||||
|
||||
2004-02-06 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* generator/Method.cs : for Opaque/Object retvals, if raw_ret is
|
||||
|
|
|
@ -12,7 +12,7 @@ generated-stamp: $(APIS) ../generator/gapi_codegen.exe Atk.metadata
|
|||
$(RUNTIME) ../parser/gapi-fixup.exe --api=atk-api.xml --metadata=Atk.metadata && \
|
||||
$(RUNTIME) ../generator/gapi_codegen.exe --generate $(APIS) \
|
||||
--include $(INCLUDE_APIS) --outdir=generated --customdir=. \
|
||||
--assembly-name=art-sharp && touch generated-stamp
|
||||
--assembly-name=atk-sharp && touch generated-stamp
|
||||
|
||||
$(ASSEMBLY): generated-stamp
|
||||
$(MCS) --unsafe --target library \
|
||||
|
|
|
@ -195,19 +195,26 @@ namespace GtkSharp.Generation {
|
|||
for (int i = 0; i < cname.Length; i++)
|
||||
{
|
||||
if (needs_dot && i > 0 && Char.IsUpper (cname[i])) {
|
||||
ns = expected.ToString ().ToLower ();
|
||||
expected.Append ('.');
|
||||
if (expected.Length == 1 && expected[0] == 'G') {
|
||||
ns = "glib";
|
||||
expected = new StringBuilder ("GLib.");
|
||||
} else {
|
||||
ns = expected.ToString ().ToLower ();
|
||||
expected.Append ('.');
|
||||
}
|
||||
needs_dot = false;
|
||||
}
|
||||
expected.Append (cname[i]);
|
||||
}
|
||||
expected.AppendFormat (",{0}-sharp", ns);
|
||||
|
||||
return expected.ToString ();
|
||||
}
|
||||
|
||||
private static bool NeedsMap (Hashtable objs)
|
||||
private static bool NeedsMap (Hashtable objs, string assembly_name)
|
||||
{
|
||||
foreach (string key in objs.Keys)
|
||||
if (GetExpected (key) != ((string) objs[key]))
|
||||
if (GetExpected (key) != ((string) objs[key] + "," + assembly_name))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -230,7 +237,7 @@ namespace GtkSharp.Generation {
|
|||
|
||||
DirectoryInfo di = dirs[dir] as DirectoryInfo;
|
||||
|
||||
if (!NeedsMap (di.objects))
|
||||
if (!NeedsMap (di.objects, di.assembly_name))
|
||||
continue;
|
||||
|
||||
GenerationInfo gen_info = new GenerationInfo (dir, di.assembly_name);
|
||||
|
@ -251,9 +258,13 @@ namespace GtkSharp.Generation {
|
|||
sw.WriteLine ("\t\tpublic static void Initialize ()");
|
||||
sw.WriteLine ("\t\t{");
|
||||
|
||||
foreach (string key in dir_info.objects.Keys)
|
||||
if (GetExpected(key) != ((string) dir_info.objects[key]))
|
||||
Console.WriteLine ("Generating mappers");
|
||||
foreach (string key in dir_info.objects.Keys) {
|
||||
Console.WriteLine ("Expected: " + GetExpected(key));
|
||||
Console.WriteLine ("dir_info.objects[key]+assname: " + ((string) dir_info.objects[key]) + "," + dir_info.assembly_name);
|
||||
if (GetExpected(key) != ((string) dir_info.objects[key] + "," + dir_info.assembly_name))
|
||||
sw.WriteLine ("\t\t\tGtkSharp.ObjectManager.RegisterType(\"" + key + "\", \"" + dir_info.objects [key] + "," + dir_info.assembly_name + "\");");
|
||||
}
|
||||
|
||||
sw.WriteLine ("\t\t}");
|
||||
sw.WriteLine ("\t}");
|
||||
|
|
|
@ -17,7 +17,7 @@ ASSEMBLY=glade-sharp.dll
|
|||
generated-stamp: $(APIS) *.custom ../generator/gapi_codegen.exe
|
||||
$(RUNTIME) ../generator/gapi_codegen.exe --generate $(APIS) \
|
||||
--include $(INCLUDE_APIS) --outdir=generated --customdir=. \
|
||||
--assembly-name=art-sharp && touch generated-stamp
|
||||
--assembly-name=glade-sharp && touch generated-stamp
|
||||
|
||||
$(ASSEMBLY): *.cs generated-stamp
|
||||
$(MCS) --unsafe --target library \
|
||||
|
|
Loading…
Reference in a new issue