ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #01524
[Merge] lp:~ken-vandine/libindicate/mono_bindings into lp:libindicate
Ken VanDine has proposed merging lp:~ken-vandine/libindicate/mono_bindings into lp:libindicate.
Requested reviews:
Indicator Applet Developers (indicator-applet-developers)
Added mono bindings
--
https://code.launchpad.net/~ken-vandine/libindicate/mono_bindings/+merge/26588
Your team ayatana-commits is subscribed to branch lp:libindicate.
=== modified file 'Makefile.am'
--- Makefile.am 2010-02-11 19:21:21 +0000
+++ Makefile.am 2010-06-02 13:55:38 +0000
@@ -2,6 +2,7 @@
SUBDIRS = \
libindicate \
libindicate-gtk \
+ bindings \
examples \
tests \
docs
=== added directory 'bindings'
=== added file 'bindings/Makefile.am'
--- bindings/Makefile.am 1970-01-01 00:00:00 +0000
+++ bindings/Makefile.am 2010-06-02 13:55:38 +0000
@@ -0,0 +1,1 @@
+SUBDIRS = mono
=== added directory 'bindings/mono'
=== added file 'bindings/mono/Makefile.am'
--- bindings/mono/Makefile.am 1970-01-01 00:00:00 +0000
+++ bindings/mono/Makefile.am 2010-06-02 13:55:38 +0000
@@ -0,0 +1,1 @@
+SUBDIRS = indicate indicate-gtk
=== added directory 'bindings/mono/examples'
=== added file 'bindings/mono/examples/Makefile.am'
--- bindings/mono/examples/Makefile.am 1970-01-01 00:00:00 +0000
+++ bindings/mono/examples/Makefile.am 2010-06-02 13:55:38 +0000
@@ -0,0 +1,13 @@
+ASSEMBLY = IndicatorExample.exe
+CSFILES = IndicatorExample.cs
+CLEANFILES = $(ASSEMBLY)
+
+EXTRA_DIST = $(CSFILES) indicator-example.in indicator-example
+
+references = $(GTK_SHARP_LIBS) -r:$(builddir)/../indicate/indicate-sharp.dll
+
+$(ASSEMBLY): $(CSFILES) Makefile.am
+ $(CSC) $(CSFLAGS) -out:$(ASSEMBLY) -target:exe $(references) $(srcdir)/$(CSFILES)
+ chmod a+x indicator-example
+
+all: $(ASSEMBLY)
=== added directory 'bindings/mono/indicate'
=== added directory 'bindings/mono/indicate-gtk'
=== added file 'bindings/mono/indicate-gtk/AssemblyInfo.cs.in'
--- bindings/mono/indicate-gtk/AssemblyInfo.cs.in 1970-01-01 00:00:00 +0000
+++ bindings/mono/indicate-gtk/AssemblyInfo.cs.in 2010-06-02 13:55:38 +0000
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2010 Canonical Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3, as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranties of
+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Ken VanDine <ken.vandine@xxxxxxxxxxxxx>
+ */
+
+using System.Reflection;
+
+[assembly: AssemblyTitle ("IndicateGtk")]
+[assembly: AssemblyDescription ("LibIndicateGtk")]
+[assembly: AssemblyConfiguration ("")]
+[assembly: AssemblyCompany ("Canonical, Ltd.")]
+[assembly: AssemblyProduct ("Ubuntu")]
+[assembly: AssemblyCopyright ("© 2010 Canonical, Ltd.")]
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+[assembly: AssemblyVersion ("@VERSION@")]
=== added file 'bindings/mono/indicate-gtk/Indicate.custom'
=== added file 'bindings/mono/indicate-gtk/Makefile.am'
--- bindings/mono/indicate-gtk/Makefile.am 1970-01-01 00:00:00 +0000
+++ bindings/mono/indicate-gtk/Makefile.am 2010-06-02 13:55:38 +0000
@@ -0,0 +1,88 @@
+SUBDIRS = .
+
+ASSEMBLY_NAME = indicate-gtk
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = $(ASSEMBLY_NAME)-sharp-0.1.pc
+
+API = $(ASSEMBLY_NAME)-api.xml
+MIDDLE_API = $(ASSEMBLY_NAME)-api.middle
+RAW_API = $(ASSEMBLY_NAME)-api.raw
+METADATA = $(ASSEMBLY_NAME)-api.metadata
+ASSEMBLY = $(ASSEMBLY_NAME)-sharp.dll
+TARGET = $(ASSEMBLY) $(ASSEMBLY).config
+assemblydir = $(libdir)/$(ASSEMBLY_NAME)-sharp-0.1
+assembly_DATA = $(TARGET)
+CLEANFILES = $(ASSEMBLY) \
+ $(ASSEMBLY).mdb \
+ generated-stamp \
+ generated/*.cs \
+ $(API) \
+ $(MIDDLE_API) \
+ $(RAW_API) \
+ $(ASSEMBLY_NAME)-sharp-0.1.pc \
+ AssemblyInfo.cs
+DISTCLEANFILES = $(ASSEMBLY).config
+customs = Indicate.custom
+EXTRA_DIST = \
+ $(RAW_API) \
+ $(METADATA) \
+ $(ASSEMBLY_NAME)-sharp-0.1.pc.in \
+ $(ASSEMBLY_NAME)-sharp.dll.config.in \
+ $(ASSEMBLY_NAME).sources.xml \
+ $(ASSEMBLY_NAME).snk \
+ $(customs)
+
+GACUTIL_FLAGS="-package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib"
+
+references = $(GTK_SHARP_LIBS) -r\:$(abs_builddir)/../indicate/indicate-sharp.dll
+
+api:
+ PERLLIB=$(PREFIX)/share/perl5 \
+ PATH=$(PREFIX)/bin:$$PATH \
+ $(GAPI_PARSER) $(ASSEMBLY_NAME).sources.xml
+
+$(RAW_API): $(ASSEMBLY_NAME).sources.xml
+ $(GAPI_PARSER) $(ASSEMBLY_NAME).sources.xml
+
+$(MIDDLE_API): $(METADATA) $(RAW_API)
+ cp $(srcdir)/$(RAW_API) $(MIDDLE_API)
+ chmod u+w $(MIDDLE_API)
+ @if test -n '$(METADATA)'; then \
+ echo "$(GAPI_FIXUP) --api=$(MIDDLE_API) --metadata=$(srcdir)/$(METADATA)"; \
+ $(GAPI_FIXUP) --api=$(MIDDLE_API) --metadata=$(srcdir)/$(METADATA); \
+ fi
+
+$(API): $(MIDDLE_API) Makefile.am
+ sed -e "s|PROP_ID_S|ID|" \
+ -e "s|PROP_ID_S|id|" \
+ -e "s|PROP_MENU|Menu|" \
+ -e "s|PROP_MENU|menu|" \
+ -e "s|PROP_DESKTOP|Desktop|" \
+ -e "s|PROP_DESKTOP|desktop|" \
+ $< > $@
+
+api_includes = $(GTK_SHARP_CFLAGS) -I:$(builddir)/../indicate/indicate-api.xml
+
+build_customs = $(addprefix $(srcdir)/, $(customs))
+
+generated-stamp: $(API) $(build_customs)
+ rm -f generated/* && \
+ $(GAPI_CODEGEN) --generate $(API) $(api_includes) \
+ --customdir=$(srcdir) \
+ --outdir=generated --assembly-name=$(ASSEMBLY_NAME) \
+ && touch generated-stamp
+
+$(ASSEMBLY): generated-stamp
+ @rm -f $(ASSEMBLY).mdb
+ $(CSC) $(CSFLAGS) -keyfile:$(srcdir)/$(ASSEMBLY_NAME).snk -nowarn:0169,0612,0618 -unsafe -out:$(ASSEMBLY) -target:library $(references) $(builddir)/$(GENERATED_SOURCES) AssemblyInfo.cs
+
+install-data-local:
+ echo "$(GACUTIL) -i $(ASSEMBLY) -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib"; \
+ $(GACUTIL) -i $(ASSEMBLY) -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib || exit 1;
+
+uninstall-local:
+ echo "$(GACUTIL) -u $(ASSEMBLY_NAME)-sharp -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib"; \
+ $(GACUTIL) -u $(ASSEMBLY_NAME)-sharp -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib || exit 1;
+
+all: $(API)
=== added file 'bindings/mono/indicate-gtk/indicate-gtk-api.metadata'
--- bindings/mono/indicate-gtk/indicate-gtk-api.metadata 1970-01-01 00:00:00 +0000
+++ bindings/mono/indicate-gtk/indicate-gtk-api.metadata 2010-06-02 13:55:38 +0000
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<metadata>
+</metadata>
=== added file 'bindings/mono/indicate-gtk/indicate-gtk-sharp-0.1.pc.in'
--- bindings/mono/indicate-gtk/indicate-gtk-sharp-0.1.pc.in 1970-01-01 00:00:00 +0000
+++ bindings/mono/indicate-gtk/indicate-gtk-sharp-0.1.pc.in 2010-06-02 13:55:38 +0000
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+assemblies_dir=${libdir}/indicate-gtk-sharp-0.0
+
+Name: indicate-gtk-sharp
+Description: indicate-gtk for .NET
+Version: @VERSION@
+Libraries: ${assemblies_dir}/indicate-gtk-sharp.dll ${assemblies_dir}/indicate-gtk-sharp.dll.config
+Requires: gtk-sharp-2.0 indicate-sharp-0.0
+Cflags:
+Libs: -r:${assemblies_dir}/indicate-gtk-sharp.dll
=== added file 'bindings/mono/indicate-gtk/indicate-gtk-sharp.dll.config.in'
--- bindings/mono/indicate-gtk/indicate-gtk-sharp.dll.config.in 1970-01-01 00:00:00 +0000
+++ bindings/mono/indicate-gtk/indicate-gtk-sharp.dll.config.in 2010-06-02 13:55:38 +0000
@@ -0,0 +1,3 @@
+<configuration>
+ <dllmap dll="indicate-gtk-sharp.dll" target="libindicate-gtk@LIB_PREFIX@.@LIBINDICATEGTK_CURRENT@.@LIBINDICATEGTK_AGE@.@LIBINDICATEGTK_REVISION@"/>
+</configuration>
=== added file 'bindings/mono/indicate-gtk/indicate-gtk.snk'
Binary files bindings/mono/indicate-gtk/indicate-gtk.snk 1970-01-01 00:00:00 +0000 and bindings/mono/indicate-gtk/indicate-gtk.snk 2010-06-02 13:55:38 +0000 differ
=== added file 'bindings/mono/indicate-gtk/indicate-gtk.sources.xml'
--- bindings/mono/indicate-gtk/indicate-gtk.sources.xml 1970-01-01 00:00:00 +0000
+++ bindings/mono/indicate-gtk/indicate-gtk.sources.xml 2010-06-02 13:55:38 +0000
@@ -0,0 +1,10 @@
+<gapi-parser-input>
+ <api filename="indicate-gtk-api.raw">
+ <library name="indicate-gtk-sharp.dll">
+ <namespace name="Indicate">
+ <file>../../../libindicate-gtk/indicator.h</file>
+ <file>../../../libindicate-gtk/listener.h</file>
+ </namespace>
+ </library>
+ </api>
+</gapi-parser-input>
=== added file 'bindings/mono/indicate/AssemblyInfo.cs.in'
--- bindings/mono/indicate/AssemblyInfo.cs.in 1970-01-01 00:00:00 +0000
+++ bindings/mono/indicate/AssemblyInfo.cs.in 2010-06-02 13:55:38 +0000
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2010 Canonical Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3, as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranties of
+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Ken VanDine <ken.vandine@xxxxxxxxxxxxx>
+ */
+
+using System.Reflection;
+
+[assembly: AssemblyTitle ("Indicate")]
+[assembly: AssemblyDescription ("LibIndicate")]
+[assembly: AssemblyConfiguration ("")]
+[assembly: AssemblyCompany ("Canonical, Ltd.")]
+[assembly: AssemblyProduct ("Ubuntu")]
+[assembly: AssemblyCopyright ("© 2010 Canonical, Ltd.")]
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+[assembly: AssemblyVersion ("@VERSION@")]
=== added file 'bindings/mono/indicate/Indicate.custom'
=== added file 'bindings/mono/indicate/Makefile.am'
--- bindings/mono/indicate/Makefile.am 1970-01-01 00:00:00 +0000
+++ bindings/mono/indicate/Makefile.am 2010-06-02 13:55:38 +0000
@@ -0,0 +1,89 @@
+SUBDIRS = .
+
+ASSEMBLY_NAME = indicate
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = $(ASSEMBLY_NAME)-sharp-0.1.pc
+
+API = $(ASSEMBLY_NAME)-api.xml
+MIDDLE_API = $(ASSEMBLY_NAME)-api.middle
+RAW_API = $(ASSEMBLY_NAME)-api.raw
+METADATA = $(ASSEMBLY_NAME)-api.metadata
+ASSEMBLY = $(ASSEMBLY_NAME)-sharp.dll
+TARGET = $(ASSEMBLY) $(ASSEMBLY).config
+assemblydir = $(libdir)/$(ASSEMBLY_NAME)-sharp-0.1
+assembly_DATA = $(TARGET)
+CLEANFILES = $(ASSEMBLY) \
+ $(ASSEMBLY).mdb \
+ generated-stamp \
+ generated/*.cs \
+ $(API) \
+ $(MIDDLE_API) \
+ $(RAW_API) \
+ $(ASSEMBLY_NAME)-sharp-0.1.pc \
+ AssemblyInfo.cs
+
+DISTCLEANFILES = $(ASSEMBLY).config
+customs = Indicate.custom
+EXTRA_DIST = \
+ $(RAW_API) \
+ $(METADATA) \
+ $(ASSEMBLY_NAME)-sharp-0.1.pc.in \
+ $(ASSEMBLY_NAME)-sharp.dll.config.in \
+ $(ASSEMBLY_NAME).sources.xml \
+ $(ASSEMBLY_NAME).snk \
+ $(customs)
+
+GACUTIL_FLAGS="-package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib"
+
+references = $(GTK_SHARP_LIBS)
+
+api:
+ PERLLIB=$(PREFIX)/share/perl5 \
+ PATH=$(PREFIX)/bin:$$PATH \
+ $(GAPI_PARSER) $(ASSEMBLY_NAME).sources.xml
+
+$(RAW_API): $(ASSEMBLY_NAME).sources.xml
+ $(GAPI_PARSER) $(ASSEMBLY_NAME).sources.xml
+
+$(MIDDLE_API): $(METADATA) $(RAW_API)
+ cp $(srcdir)/$(RAW_API) $(MIDDLE_API)
+ chmod u+w $(MIDDLE_API)
+ @if test -n '$(METADATA)'; then \
+ echo "$(GAPI_FIXUP) --api=$(MIDDLE_API) --metadata=$(srcdir)/$(METADATA)"; \
+ $(GAPI_FIXUP) --api=$(MIDDLE_API) --metadata=$(srcdir)/$(METADATA); \
+ fi
+
+$(API): $(MIDDLE_API) Makefile.am
+ sed -e "s|PROP_ID_S|ID|" \
+ -e "s|PROP_ID_S|id|" \
+ -e "s|PROP_MENU|Menu|" \
+ -e "s|PROP_MENU|menu|" \
+ -e "s|PROP_DESKTOP|Desktop|" \
+ -e "s|PROP_DESKTOP|desktop|" \
+ $< > $@
+
+api_includes = $(GTK_SHARP_CFLAGS)
+
+build_customs = $(addprefix $(srcdir)/, $(customs))
+
+generated-stamp: $(API) $(build_customs)
+ rm -f generated/* && \
+ $(GAPI_CODEGEN) --generate $(API) $(api_includes) \
+ --customdir=$(srcdir) \
+ --outdir=generated --assembly-name=$(ASSEMBLY_NAME) \
+ && touch generated-stamp
+
+$(ASSEMBLY): generated-stamp
+ @rm -f $(ASSEMBLY).mdb
+ $(CSC) $(CSFLAGS) -keyfile:$(srcdir)/$(ASSEMBLY_NAME).snk -nowarn:0169,0612,0618 -unsafe -out:$(ASSEMBLY) -target:library $(references) $(builddir)/$(GENERATED_SOURCES) AssemblyInfo.cs
+
+install-data-local:
+ echo "$(GACUTIL) -i $(ASSEMBLY) -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib"; \
+ $(GACUTIL) -i $(ASSEMBLY) -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib || exit 1;
+
+uninstall-local:
+ echo "$(GACUTIL) -u $(ASSEMBLY_NAME)-sharp -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib"; \
+ $(GACUTIL) -u $(ASSEMBLY_NAME)-sharp -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib || exit 1;
+
+all: $(API)
=== added file 'bindings/mono/indicate/indicate-api.metadata'
--- bindings/mono/indicate/indicate-api.metadata 1970-01-01 00:00:00 +0000
+++ bindings/mono/indicate/indicate-api.metadata 2010-06-02 13:55:38 +0000
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<metadata>
+ <remove-node path="/api/namespace/object[@cname='IndicateIndicator']/method[@name='UserDisplay']" />
+ <attr path="/api/namespace/object[@cname='IndicateServer']/method[@name='SetDesktopFile']" name="name">DesktopFile</attr>
+ <add-node path="/api/namespace/object[@cname='IndicateIndicator']">
+ <signal when="LAST" field_name="user_display" name="UserDisplay" cname="user_display">
+ <return-type type="void" />
+ <parameters>
+ <parameter type="IndicateIndicator*" name="indicator" />
+ </parameters>
+ </signal>
+ </add-node>
+ <add-node path="/api/namespace/object[@cname='IndicateServer']">
+ <signal when="LAST" field_name="server_display" name="ServerDisplay" cname="server_display">
+ <return-type type="void" />
+ <parameters>
+ <parameter type="IndicateServer*" name="server" />
+ <parameter type="guint" name="timestamp" />
+ </parameters>
+ </signal>
+ </add-node>
+</metadata>
=== added file 'bindings/mono/indicate/indicate-sharp-0.1.pc.in'
--- bindings/mono/indicate/indicate-sharp-0.1.pc.in 1970-01-01 00:00:00 +0000
+++ bindings/mono/indicate/indicate-sharp-0.1.pc.in 2010-06-02 13:55:38 +0000
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+assemblies_dir=${libdir}/indicate-sharp-0.0
+
+Name: indicate-sharp
+Description: indicate for .NET
+Version: @VERSION@
+Libraries: ${assemblies_dir}/indicate-sharp.dll ${assemblies_dir}/indicate-sharp.dll.config
+Requires: gtk-sharp-2.0
+Cflags:
+Libs: -r:${assemblies_dir}/indicate-sharp.dll
=== added file 'bindings/mono/indicate/indicate-sharp.dll.config.in'
--- bindings/mono/indicate/indicate-sharp.dll.config.in 1970-01-01 00:00:00 +0000
+++ bindings/mono/indicate/indicate-sharp.dll.config.in 2010-06-02 13:55:38 +0000
@@ -0,0 +1,3 @@
+<configuration>
+ <dllmap dll="indicate-sharp.dll" target="libindicate@LIB_PREFIX@.@LIBINDICATE_CURRENT@.@LIBINDICATE_AGE@.@LIBINDICATE_REVISION@"/>
+</configuration>
=== added file 'bindings/mono/indicate/indicate.snk'
Binary files bindings/mono/indicate/indicate.snk 1970-01-01 00:00:00 +0000 and bindings/mono/indicate/indicate.snk 2010-06-02 13:55:38 +0000 differ
=== added file 'bindings/mono/indicate/indicate.sources.xml'
--- bindings/mono/indicate/indicate.sources.xml 1970-01-01 00:00:00 +0000
+++ bindings/mono/indicate/indicate.sources.xml 2010-06-02 13:55:38 +0000
@@ -0,0 +1,14 @@
+<gapi-parser-input>
+ <api filename="indicate-api.raw">
+ <library name="indicate-sharp.dll">
+ <namespace name="Indicate">
+ <file>../../../libindicate/indicate-enum-types.h</file>
+ <file>../../../libindicate/indicator.h</file>
+ <file>../../../libindicate/indicator-messages.h</file>
+ <file>../../../libindicate/interests.h</file>
+ <file>../../../libindicate/listener.h</file>
+ <file>../../../libindicate/server.h</file>
+ </namespace>
+ </library>
+ </api>
+</gapi-parser-input>
=== modified file 'configure.ac'
--- configure.ac 2010-05-03 12:38:59 +0000
+++ configure.ac 2010-06-02 13:55:38 +0000
@@ -1,10 +1,10 @@
-AC_INIT(libindicate, 0.3.6, ted@xxxxxxxxxxxxx)
+AC_INIT(libindicate, 0.3.7, ted@xxxxxxxxxxxxx)
AC_PREREQ(2.53)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libindicate, 0.3.6)
+AM_INIT_AUTOMAKE(libindicate, 0.3.7)
AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES])
@@ -88,6 +88,61 @@
AC_PATH_PROG([VALA_API_GEN], [vapigen])
###########################
+# Check for Mono support
+###########################
+
+MONO_REQUIRED_VERSION=1.0
+PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)
+
+AC_PATH_PROG(AL, al, no)
+if test "x$AL" = "xno" ; then
+ AC_MSG_ERROR([No al tool found. You need to install Mono.])
+fi
+
+if test "x$has_mono" = "xtrue" ; then
+ GENERATED_SOURCES=generated/*.cs
+ AC_PATH_PROG(RUNTIME, mono, no)
+
+ if test "x$RUNTIME" != "no" ; then
+ RUNTIME=mono
+ fi
+
+ AC_PATH_PROG(CSC, gmcs, no)
+ LIB_PREFIX=.so
+ LIB_SUFFIX=
+fi
+
+if test "x$CSC" = "xno" ; then
+ AC_MSG_ERROR([No Mono compiler found.])
+fi
+
+AC_PATH_PROG(GACUTIL, gacutil, no)
+if test "x$GACUTIL" = "xno" ; then
+ AC_MSG_ERROR([No gacutil tool found])
+fi
+
+AC_SUBST(RUNTIME)
+AC_SUBST(CSC)
+AC_SUBST(GACUTIL)
+AC_SUBST(LIB_PREFIX)
+AC_SUBST(LIB_SUFFIX)
+AC_SUBST(GENERATED_SOURCES)
+
+GLIB_SHARP_REQ_VERSION=2.12.1
+GTK_SHARP_REQ_VERSION=2.12
+PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0 >= $GTK_SHARP_REQ_VERSION)
+AC_SUBST(GTK_SHARP_LIBS)
+AC_SUBST(GTK_SHARP_CFLAGS)
+
+PKG_CHECK_MODULES(GAPI, gapi-2.0 >= $GLIB_SHARP_REQ_VERSION)
+AC_PATH_PROG(GAPI_PARSER, gapi2-parser, no)
+AC_SUBST(GAPI_PARSER)
+AC_PATH_PROG(GAPI_CODEGEN, gapi2-codegen, no)
+AC_SUBST(GAPI_CODEGEN)
+AC_PATH_PROG(GAPI_FIXUP, gapi2-fixup, no)
+AC_SUBST(GAPI_FIXUP)
+
+###########################
# GTK Doc
###########################
@@ -151,10 +206,21 @@
libindicate-gtk/Makefile
libindicate-gtk/indicate-gtk.pc
examples/Makefile
+examples/indicator-mono-example
tests/Makefile
docs/Makefile
docs/reference/Makefile
docs/reference/version.xml
+bindings/Makefile
+bindings/mono/Makefile
+bindings/mono/indicate/Makefile
+bindings/mono/indicate/indicate-sharp.dll.config
+bindings/mono/indicate/indicate-sharp-0.1.pc
+bindings/mono/indicate/AssemblyInfo.cs
+bindings/mono/indicate-gtk/Makefile
+bindings/mono/indicate-gtk/indicate-gtk-sharp.dll.config
+bindings/mono/indicate-gtk/indicate-gtk-sharp-0.1.pc
+bindings/mono/indicate-gtk/AssemblyInfo.cs
])
###########################
=== added file 'examples/IndicatorMonoExample.cs'
--- examples/IndicatorMonoExample.cs 1970-01-01 00:00:00 +0000
+++ examples/IndicatorMonoExample.cs 2010-06-02 13:55:38 +0000
@@ -0,0 +1,40 @@
+using System;
+using Indicate;
+using Gtk;
+using GLib;
+
+namespace IndicatorExample
+{
+ class MainClass
+ {
+ public static void Main(string[] args)
+ {
+ Application.Init ();
+ Indicate.Server server = Indicate.Server.RefDefault();
+ server.SetType("message.im");
+ server.DesktopFile("/usr/share/applications/empathy.desktop");
+ server.ServerDisplay += new Indicate.ServerDisplayHandler(ServerDisplay);
+ server.Show();
+
+ Indicator indicator = new Indicate.Indicator();
+ indicator.SetProperty("subtype", "im");
+ indicator.SetProperty("sender", "Barney Rubble");
+ indicator.UserDisplay += new EventHandler(UserDisplay);
+ indicator.Show();
+
+ Application.Run ();
+ }
+
+ public static void ServerDisplay (object sender, Indicate.ServerDisplayArgs args)
+ {
+ Console.WriteLine ("Server was displayed");
+ }
+
+ public static void UserDisplay (object sender, System.EventArgs args)
+ {
+ Console.WriteLine ("Indicator was displayed");
+ Indicate.Indicator indicator = sender as Indicate.Indicator;
+ indicator.Hide();
+ }
+ }
+}
=== modified file 'examples/Makefile.am'
--- examples/Makefile.am 2010-02-04 22:45:51 +0000
+++ examples/Makefile.am 2010-06-02 13:55:38 +0000
@@ -1,3 +1,6 @@
+ASSEMBLY = IndicatorMonoExample.exe
+CSFILES = IndicatorMonoExample.cs
+CLEANFILES = $(ASSEMBLY)
libexec_PROGRAMS = \
indicate-and-crash \
@@ -80,4 +83,14 @@
$(listen_and_print_SOURCES) \
$(im_client_SOURCES)
-EXTRA_DIST = $(examples_DATA)
+EXTRA_DIST = $(examples_DATA) \
+ $(CSFILES) \
+ indicator-mono-example.in
+
+references = $(GTK_SHARP_LIBS) -r:$(builddir)/../bindings/mono/indicate/indicate-sharp.dll
+
+$(ASSEMBLY): $(CSFILES) Makefile.am
+ $(CSC) $(CSFLAGS) -out:$(ASSEMBLY) -target:exe $(references) $(srcdir)/$(CSFILES)
+ chmod a+x indicator-mono-example
+
+all: $(ASSEMBLY)
=== added file 'examples/indicator-mono-example.in'
--- examples/indicator-mono-example.in 1970-01-01 00:00:00 +0000
+++ examples/indicator-mono-example.in 2010-06-02 13:55:38 +0000
@@ -0,0 +1,2 @@
+#!/bin/sh
+MONO_PATH=@top_builddir@/bindings/mono/indicate mono @srcdir@/IndicatorMonoExample.exe
Follow ups