2003-09-07 Alp Toker <alp@atoker.com>

* makefile.win32: New clean and release targets, and don't bother
        building the samples (sample/makefile.win32 is out of date anyway)
        * api/makefile.win32:
        * glue/makefile.win32:
        * makefile.win32: Glade# works perfectly on win32 now; include it in
        the default build
        * sample/GladeTest.cs:
        * sample/GladeViewer.cs: Remove Gnome dependency and clean up

svn path=/trunk/gtk-sharp/; revision=17967
This commit is contained in:
Alp Toker 2003-09-07 10:56:40 +00:00
parent df9c3bc1cc
commit 978a7b8819
7 changed files with 47 additions and 21 deletions

View File

@ -10,4 +10,4 @@ configure
Makefile
*.cache
*.pc
lib

View File

@ -1,3 +1,14 @@
2003-09-07 Alp Toker <alp@atoker.com>
* makefile.win32: New clean and release targets, and don't bother
building the samples (sample/makefile.win32 is out of date anyway)
* api/makefile.win32:
* glue/makefile.win32:
* makefile.win32: Glade# works perfectly on win32 now; include it in
the default build
* sample/GladeTest.cs:
* sample/GladeViewer.cs: Remove Gnome dependency and clean up
2003-09-06 Alp Toker <alp@atoker.com>
* api/gdk-api.xml:

View File

@ -1,6 +1,6 @@
all: generated-stamp
generated-stamp: atk-api.xml gdk-api.xml gdk-symbols.xml gtk-api.xml gtk-symbols.xml pango-api.xml ../generator/codegen.exe
../generator/codegen --generate atk-api.xml gdk-api.xml gdk-symbols.xml gtk-api.xml gtk-symbols.xml pango-api.xml
generated-stamp: atk-api.xml gdk-api.xml gdk-symbols.xml gtk-api.xml gtk-symbols.xml pango-api.xml glade-api.xml ../generator/codegen.exe
../generator/codegen --generate atk-api.xml gdk-api.xml gdk-symbols.xml gtk-api.xml gtk-symbols.xml pango-api.xml glade-api.xml
touch generated-stamp

View File

@ -1,5 +1,5 @@
GTK_CFLAGS=`pkg-config --cflags gtk+-win32-2.0`
GTK_LIBS=`pkg-config --libs gtk+-win32-2.0`
GTK_CFLAGS=`pkg-config --cflags gtk+-win32-2.0 libglade-2.0`
GTK_LIBS=`pkg-config --libs gtk+-win32-2.0 libglade-2.0`
CC=gcc -mno-cygwin
DLLWRAP=dllwrap -mno-cygwin --target i386-mingw32 --export-all-symbols
@ -22,6 +22,7 @@ GLUE_OBJS = \
type.o \
value.o \
widget.o \
gladexml.o \
win32dll.o
all: gtksharpglue.dll

View File

@ -1,4 +1,4 @@
DIRS=glue generator api glib pango atk gdk gtk sample
DIRS=glue generator api glib pango atk gdk gtk glade
ROOT=/cygdrive/$(subst \,/,$(subst :\,/,$(SYSTEMROOT)))
CSC=$(ROOT)/microsoft.net/framework/v1.0.3705/csc.exe /d:WIN32
@ -9,6 +9,20 @@ windows:
(cd $$i; CSC="$(CSC)" make -f makefile.win32) || exit 1;\
done;
clean:
rm -f api/generated-stamp
rm -rf lib
find -iname "*.exe" -exec rm -f \{\} \;
find -iname "*.dll" -exec rm -f \{\} \;
for i in $(DIRS); do \
rm -rf $$i/generated; \
done;
release: clean windows
mkdir lib
find $(DIRS) -iname "*.dll" -exec cp \{\} lib \;
docs:
for i in $(DIRS); do \
(cd $$i; CSC="$(CSC)" make -f makefile.win32 docs) || exit 1;\

View File

@ -8,29 +8,31 @@ namespace GladeSamples {
using System;
using Gtk;
using Gnome;
using Glade;
using GtkSharp;
using System.IO;
using System.Reflection;
public class GladeTest : Program
public class GladeTest
{
[Glade.Widget("main_window")]
[Glade.Widget]
Gtk.Window main_window;
public static void Main (string[] args)
{
new GladeTest (args).Run ();
Application.Init ();
GladeTest gt = new GladeTest ();
Application.Run ();
}
public GladeTest (string[] args, params object[] props)
: base ("GladeTest", "0.1", Modules.UI, args, props)
public GladeTest ()
{
/* Note that we load the XML info from the assembly instead of using
an external file. You don't have to distribute the .glade file if
you don't want */
Glade.XML gxml = new Glade.XML (null, "test.glade", "main_window", null);
gxml.Autoconnect (this);
if (main_window != null)
Console.WriteLine ("Main Window Title: \"{0}\"", main_window.Title);
else
@ -39,7 +41,7 @@ namespace GladeSamples {
public void OnWindowDeleteEvent (object o, DeleteEventArgs args)
{
Quit ();
Application.Quit ();
args.RetVal = true;
}

View File

@ -6,10 +6,8 @@
namespace GladeSamples {
using System;
using System.Runtime.InteropServices;
using Gtk;
using Gnome;
using Glade;
public class GladeDemo {
@ -17,11 +15,11 @@ namespace GladeSamples {
public static void Main (string[] args)
{
if (args.Length < 2) {
Console.WriteLine ("Use: mono ./glade-viewer.exe \"fname\" \"root\"");
Console.WriteLine ("Use: ./glade-viewer.exe \"fname\" \"root\"");
return;
}
Program viewer = new Program ("GladeViewer", "0.1", Modules.UI, args);
Application.Init ();
string fname = args [0];
string root = args [1];
@ -34,7 +32,7 @@ namespace GladeSamples {
Console.WriteLine ("A relative filename: {0}", gxml.RelativeFile ("image.png"));
Console.WriteLine ("The name of the root widget: {0}", Glade.XML.GetWidgetName (wid));
Console.WriteLine ("BTW, it's {0} that it was created using from a Glade.XML object",
Console.WriteLine ("It is {0} that it was created using a Glade.XML object",
Glade.XML.GetWidgetTree (wid) != null);
Console.WriteLine ("\nList of created widgets:");
@ -45,7 +43,7 @@ namespace GladeSamples {
Glade.XML.GetWidgetName (w));
}
viewer.Run ();
Application.Run ();
}
}