From b598108bd71748ab0dc7088a36835864f5f96e22 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Sun, 19 Sep 2010 20:41:59 +0100 Subject: gapi2-parser cannot cope with multiple signals connected to the same method - it will bail out, complaining it cannot find a method to match the second signal. This patch modifies the build system to copy app-indicator.c locally, with the "bad" X_NEW_LABEL signal removed, and use that copy to build the binding. --- bindings/mono/Makefile.am | 8 +++++++- bindings/mono/app-indicator.sources.xml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'bindings') diff --git a/bindings/mono/Makefile.am b/bindings/mono/Makefile.am index 98fe6f9..b504d9a 100644 --- a/bindings/mono/Makefile.am +++ b/bindings/mono/Makefile.am @@ -15,6 +15,8 @@ ASSEMBLY = $(ASSEMBLY_NAME).dll POLICY = policy.$(POLICY_VERSION).$(ASSEMBLY_NAME) POLICY_VERSION = 0.0 DLLPOLICY = $(POLICY).dll +WRAPPER_FREE_BINDING_SRC = ../../src/app-indicator.c +WRAPPER_FREE_BINDING = app-indicator.c TARGET = \ $(ASSEMBLY) \ @@ -35,6 +37,7 @@ CLEANFILES = \ $(RAW_API) \ $(TEST) \ $(DLLPOLICY) \ + $(WRAPPER_FREE_BINDING) \ $(POLICY).config DISTCLEANFILES = $(ASSEMBLY).config @@ -57,9 +60,12 @@ GACUTIL_FLAGS=-package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib references = $(GTK_SHARP_LIBS) test_references = $(GTK_SHARP_LIBS) $(NUNIT_LIBS) -r:$(ASSEMBLY) -$(RAW_API): app-indicator.sources.xml +$(RAW_API): app-indicator.sources.xml $(WRAPPER_FREE_BINDING) $(GAPI_PARSER) app-indicator.sources.xml +$(WRAPPER_FREE_BINDING): $(WRAPPER_FREE_BINDING_SRC) + sed '/signals\[X_NEW_LABEL\] /,+6d' $(WRAPPER_FREE_BINDING_SRC) > $(WRAPPER_FREE_BINDING) + $(MIDDLE_API): $(METADATA) $(RAW_API) cp $(srcdir)/$(RAW_API) $(MIDDLE_API) chmod u+w $(MIDDLE_API) diff --git a/bindings/mono/app-indicator.sources.xml b/bindings/mono/app-indicator.sources.xml index 2649eb4..97faadf 100644 --- a/bindings/mono/app-indicator.sources.xml +++ b/bindings/mono/app-indicator.sources.xml @@ -2,7 +2,7 @@ - ../../src/app-indicator.c + app-indicator.c ../../src/app-indicator-enum-types.c ../../src/app-indicator-enum-types.h ../../src/app-indicator.h -- cgit v1.2.3 From 4247b7e6e67ab79cea4f5b80566ab1e8def6f6f2 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Sun, 19 Sep 2010 20:47:07 +0100 Subject: The purpose of a dllmap is to turn a DllImport for "foo" into a dlopen of "bar". This is most commonly used to make apps more cross-platform, by specifying the Windows library name (foo.dll) into a Linux/OSX/etc filename (libfoo.so.0). indicator-application has been binding directly to libappindicator.so.0, which means multiple places to update if the SONAME changes, and makes it less portable - this commit fixes this. --- bindings/mono/ApplicationIndicator.custom | 8 ++++---- bindings/mono/app-indicator.sources.xml | 2 +- bindings/mono/appindicator-sharp.dll.config.in | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'bindings') diff --git a/bindings/mono/ApplicationIndicator.custom b/bindings/mono/ApplicationIndicator.custom index 11d16a8..fcc52d7 100644 --- a/bindings/mono/ApplicationIndicator.custom +++ b/bindings/mono/ApplicationIndicator.custom @@ -1,10 +1,10 @@ -[DllImport ("libappindicator.so.0")] +[DllImport ("appindicator.dll")] static extern int app_indicator_get_status (IntPtr i); -[DllImport ("libappindicator.so.0")] +[DllImport ("appindicator.dll")] static extern int app_indicator_get_category (IntPtr i); -[DllImport ("libappindicator.so.0")] +[DllImport ("appindicator.dll")] static extern void app_indicator_set_status (IntPtr i, int s); [GLib.Property ("status")] @@ -23,4 +23,4 @@ static extern void app_indicator_set_status (IntPtr i, int s); get { return (Category) app_indicator_get_category (Handle); } - } \ No newline at end of file + } diff --git a/bindings/mono/app-indicator.sources.xml b/bindings/mono/app-indicator.sources.xml index 97faadf..6cf28e9 100644 --- a/bindings/mono/app-indicator.sources.xml +++ b/bindings/mono/app-indicator.sources.xml @@ -1,6 +1,6 @@ - + app-indicator.c ../../src/app-indicator-enum-types.c diff --git a/bindings/mono/appindicator-sharp.dll.config.in b/bindings/mono/appindicator-sharp.dll.config.in index d0e9e1e..6422a93 100644 --- a/bindings/mono/appindicator-sharp.dll.config.in +++ b/bindings/mono/appindicator-sharp.dll.config.in @@ -1,5 +1,5 @@ - + -- cgit v1.2.3 From 316dbc5d675e78b92334dc087d95c795a3a108d0 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Sun, 19 Sep 2010 20:49:32 +0100 Subject: Bump SONAME in Mono binding to libappindicator.so.1 --- bindings/mono/appindicator-sharp.dll.config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bindings') diff --git a/bindings/mono/appindicator-sharp.dll.config.in b/bindings/mono/appindicator-sharp.dll.config.in index 6422a93..2d21d00 100644 --- a/bindings/mono/appindicator-sharp.dll.config.in +++ b/bindings/mono/appindicator-sharp.dll.config.in @@ -1,5 +1,5 @@ - + -- cgit v1.2.3