aboutsummaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'bindings')
-rw-r--r--bindings/mono/Makefile.am64
-rw-r--r--bindings/mono/app-indicator.sources.xml8
-rw-r--r--bindings/mono/appindicator-sharp-0.1.pc.in2
-rw-r--r--bindings/mono/libappindicator-api.metadata46
-rw-r--r--bindings/mono/policy.0.0.appindicator-sharp.config.in10
-rw-r--r--bindings/python/appindicator.override4
6 files changed, 89 insertions, 45 deletions
diff --git a/bindings/mono/Makefile.am b/bindings/mono/Makefile.am
index 7e2b0d2..98fe6f9 100644
--- a/bindings/mono/Makefile.am
+++ b/bindings/mono/Makefile.am
@@ -10,11 +10,33 @@ MIDDLE_API = libappindicator-api.middle
RAW_API = libappindicator-api.raw
METADATA = libappindicator-api.metadata
ASSEMBLY_NAME = appindicator-sharp
-ASSEMBLY = appindicator-sharp.dll
-TARGET = $(ASSEMBLY) $(ASSEMBLY).config
-assemblydir = $(libdir)/appindicator-sharp-0.1
+ASSEMBLY_VERSION = 0.1.0.0
+ASSEMBLY = $(ASSEMBLY_NAME).dll
+POLICY = policy.$(POLICY_VERSION).$(ASSEMBLY_NAME)
+POLICY_VERSION = 0.0
+DLLPOLICY = $(POLICY).dll
+
+TARGET = \
+ $(ASSEMBLY) \
+ $(ASSEMBLY).config \
+ $(DLLPOLICY) \
+ $(POLICY).config
+
+assemblydir = $(libdir)/cli/appindicator-sharp-0.1
assembly_DATA = $(TARGET)
-CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb generated-stamp generated/*.cs $(API) $(MIDDLE_API) $(RAW_API) $(TEST)
+
+CLEANFILES = \
+ $(ASSEMBLY) \
+ $(ASSEMBLY).mdb \
+ generated-stamp \
+ generated/*.cs \
+ $(API) \
+ $(MIDDLE_API) \
+ $(RAW_API) \
+ $(TEST) \
+ $(DLLPOLICY) \
+ $(POLICY).config
+
DISTCLEANFILES = $(ASSEMBLY).config
TEST_SOURCES = TestIndicator.cs
customs = ApplicationIndicator.custom
@@ -26,10 +48,11 @@ EXTRA_DIST = \
appindicator-sharp.dll.config.in \
app-indicator.sources.xml \
$(ASSEMBLY_NAME).snk \
+ $(POLICY).config.in \
$(customs) \
$(TEST_SOURCES)
-GACUTIL_FLAGS="-package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib"
+GACUTIL_FLAGS=-package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib
references = $(GTK_SHARP_LIBS)
test_references = $(GTK_SHARP_LIBS) $(NUNIT_LIBS) -r:$(ASSEMBLY)
@@ -46,21 +69,13 @@ $(MIDDLE_API): $(METADATA) $(RAW_API)
fi
$(API): $(MIDDLE_API) Makefile.am
- sed -e "s|PROP_ID_S|ID|" \
- -e "s|PROP_ID_S|id|" \
- -e "s|PROP_STATUS_S|Status|" \
+ sed -e "s|PROP_ID_S|id|" \
-e "s|PROP_STATUS_S|status|" \
- -e "s|PROP_CATEGORY_S|Category|" \
-e "s|PROP_CATEGORY_S|category|" \
- -e "s|PROP_ICON_NAME_S|IconName|" \
-e "s|PROP_ICON_NAME_S|icon-name|" \
- -e "s|PROP_ATTENTION_ICON_NAME_S|AttentionIconName|" \
-e "s|PROP_ATTENTION_ICON_NAME_S|attention-icon-name|" \
- -e "s|PROP_ICON_THEME_PATH_S|IconThemePath|" \
-e "s|PROP_ICON_THEME_PATH_S|icon-theme-path|" \
- -e "s|PROP_MENU_S|Menu|" \
-e "s|PROP_MENU_S|menu|" \
- -e "s|PROP_CONNECTED_S|Connected|" \
-e "s|PROP_CONNECTED_S|connected|" \
$< > $@
@@ -80,14 +95,27 @@ $(ASSEMBLY): generated-stamp $(srcdir)/AssemblyInfo.cs
$(CSC) $(CSFLAGS) -keyfile:$(srcdir)/$(ASSEMBLY_NAME).snk -nowarn:0169,0612,0618 -unsafe -out:$(ASSEMBLY) -target:library $(references) $(builddir)/$(GENERATED_SOURCES) $(srcdir)/AssemblyInfo.cs
install-data-local:
- echo "$(GACUTIL) -i $(ASSEMBLY_NAME).dll -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib"; \
- $(GACUTIL) -i $(ASSEMBLY_NAME).dll -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib || exit 1;
+ echo "$(GACUTIL) -i $(ASSEMBLY_NAME).dll $(GACUTIL_FLAGS)"; \
+ $(GACUTIL) -i $(ASSEMBLY_NAME).dll $(GACUTIL_FLAGS) || exit 1;
+ echo "$(GACUTIL) -i $(DLLPOLICY) $(GACUTIL_FLAGS)"; \
+ $(GACUTIL) -i $(DLLPOLICY) $(GACUTIL_FLAGS) || exit 1;
uninstall-local:
- echo "$(GACUTIL) -u $(ASSEMBLY_NAME) -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib"; \
- $(GACUTIL) -u $(ASSEMBLY_NAME) -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib || exit 1;
+ echo "$(GACUTIL) -u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \
+ $(GACUTIL) -u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1;
+ echo "$(GACUTIL) -u $(DLLPOLICY) $(GACUTIL_FLAGS)"; \
+ $(GACUTIL) -u $(POLICY) $(GACUTIL_FLAGS) || exit 1;
$(TEST): $(ASSEMBLY) $(TEST_SOURCES)
$(CSC) -out:$(TEST) -target:library $(test_references) $(srcdir)/$(TEST_SOURCES)
all: $(TEST)
+
+$(POLICY).config: $(POLICY).config.in Makefile
+ sed -e "s|@ASSEMBLY_NAME@|$(ASSEMBLY_NAME)|" \
+ -e "s|@ASSEMBLY_VERSION@|$(ASSEMBLY_VERSION)|g" \
+ $< > $@
+
+$(DLLPOLICY): $(POLICY).config $(ASSEMBLY_NAME).snk Makefile
+ $(AL) -link:$(POLICY).config -out:$(DLLPOLICY) -keyfile:$(srcdir)/$(ASSEMBLY_NAME).snk
+
diff --git a/bindings/mono/app-indicator.sources.xml b/bindings/mono/app-indicator.sources.xml
index 3585c44..2649eb4 100644
--- a/bindings/mono/app-indicator.sources.xml
+++ b/bindings/mono/app-indicator.sources.xml
@@ -2,10 +2,10 @@
<api filename="libappindicator-api.raw">
<library name="libappindicator.so.0">
<namespace name="AppIndicator">
- <directory path="../../src/libappindicator">
- <exclude>app-indicator-enum-types.h.in</exclude>
- <exclude>app-indicator-enum-types.c.in</exclude>
- </directory>
+ <file>../../src/app-indicator.c</file>
+ <file>../../src/app-indicator-enum-types.c</file>
+ <file>../../src/app-indicator-enum-types.h</file>
+ <file>../../src/app-indicator.h</file>
</namespace>
</library>
</api>
diff --git a/bindings/mono/appindicator-sharp-0.1.pc.in b/bindings/mono/appindicator-sharp-0.1.pc.in
index 33ff1d7..11ae719 100644
--- a/bindings/mono/appindicator-sharp-0.1.pc.in
+++ b/bindings/mono/appindicator-sharp-0.1.pc.in
@@ -1,7 +1,7 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-assemblies_dir=${libdir}/appindicator-sharp-0.1
+assemblies_dir=${libdir}/cli/appindicator-sharp-0.1
Name: appindicator-sharp
Description: application indicators for .NET
diff --git a/bindings/mono/libappindicator-api.metadata b/bindings/mono/libappindicator-api.metadata
index c94cc5b..8f9df53 100644
--- a/bindings/mono/libappindicator-api.metadata
+++ b/bindings/mono/libappindicator-api.metadata
@@ -9,27 +9,33 @@
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='connection_changed']" name="cname">connection-changed</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon']" name="name">NewIcon</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon']" name="cname">new-icon</attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='id']" name="name">ID</attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_CATEGORY_S']" name="hidden"></attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_CATEGORY_S']" name="hidden"></attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_STATUS_S']" name="hidden"></attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_STATUS_S']" name="hidden"></attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='icon-name']" name="name">IconName</attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='attention-icon-name']" name="name">AttentionIconName</attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='menu']" name="name">Menu</attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='menu']" name="type">GtkMenu*</attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='connected']" name="name">Connected</attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/method[@name='SetMenu']" name="name">SetMenu</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ID_S']" name="name">ID</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_CATEGORY_S']" name="hidden">true</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_STATUS_S']" name="hidden">true</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ICON_NAME_S']" name="name">IconName</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ATTENTION_ICON_NAME_S']" name="name">AttentionIconName</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ICON_THEME_PATH_S']" name="name">IconThemePath</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_MENU_S']" name="name">Menu</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_MENU_S']" name="type">GtkMenu*</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_CONNECTED_S']" name="name">Connected</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/method[@name='SetMenu']" name="name">SetMenu</attr>
- <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_id']" />
- <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_status']" />
- <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_icon']" />
- <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_category']" />
- <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_attention_icon']" />
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new']/*/*[@name='id']" name="property_name">id</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new']/*/*[@name='icon_name']" name="property_name">icon-name</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new']/*/*[@name='category']" name="property_name">category</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='id']" name="property_name">id</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='icon_name']" name="property_name">icon-name</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='category']" name="property_name">category</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='icon_path']" name="property_name">icon-theme-path</attr>
+
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_id']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_status']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_icon']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_category']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_attention_icon']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_set_id']" />
- <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_status']" />
- <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_icon']" />
- <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_category']" />
- <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_attention_icon']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_status']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_icon']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_attention_icon']" />
</metadata>
diff --git a/bindings/mono/policy.0.0.appindicator-sharp.config.in b/bindings/mono/policy.0.0.appindicator-sharp.config.in
new file mode 100644
index 0000000..95c21ed
--- /dev/null
+++ b/bindings/mono/policy.0.0.appindicator-sharp.config.in
@@ -0,0 +1,10 @@
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="@ASSEMBLY_NAME@" publicKeyToken="bcae265d1c7ab4c2" />
+ <bindingRedirect oldVersion="0.0.0.0-@ASSEMBLY_VERSION@" newVersion="@ASSEMBLY_VERSION@"/>
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration>
diff --git a/bindings/python/appindicator.override b/bindings/python/appindicator.override
index a01a9a6..b252994 100644
--- a/bindings/python/appindicator.override
+++ b/bindings/python/appindicator.override
@@ -28,8 +28,8 @@ License version 3 and version 2.1 along with this program. If not, see
%%
headers
#include <Python.h>
-#include "../src/libappindicator/app-indicator.h"
-#include "../src/libappindicator/app-indicator-enum-types.h"
+#include "../src/app-indicator.h"
+#include "../src/app-indicator-enum-types.h"
#include <glib.h>
#include "pygobject.h"
#include "pyglib.h"