[Kde-bindings] KDE/kdebindings/csharp
Arno Rehn
kde at arnorehn.de
Tue Jul 1 01:23:34 UTC 2008
SVN commit 826584 by arnorehn:
* Added KMonoPluginFactory. Behaves similar to KRubyPluginFactory:
* If the keyword is Foo/Bar.dll, a class 'Bar' is searched in the
namespace 'Foo'.
* This class has to have a constructor that takes a QObject (the
parent) and a List<QVariant> (the arguments).
* Moved the runtime initialization from the static SmokeInvocation
constructor to a new method 'InitRuntime'. This is necessary for
KMonoPluginFactory to work.
CCMAIL: kde-bindings at kde.org
M +15 -0 kimono/CMakeLists.txt
M +8 -0 kimono/ChangeLog
A kimono/src/kmonopluginfactory.cpp [License: GPL (v2+)]
M +6 -0 qyoto/ChangeLog
M +10 -1 qyoto/src/SmokeInvocation.cs
--- trunk/KDE/kdebindings/csharp/kimono/CMakeLists.txt #826583:826584
@@ -1,6 +1,8 @@
PROJECT(kimono)
add_subdirectory(tutorials)
+INCLUDE(UsePkgConfig)
+
SET(SRC_CS ${CMAKE_CURRENT_SOURCE_DIR}/src/Kimono.cs
${CMAKE_CURRENT_SOURCE_DIR}/src/AssemblyInfo.cs
${CMAKE_CURRENT_SOURCE_DIR}/kde/*.cs
@@ -11,6 +13,8 @@
SET(SRC_KIMONO src/kimono.cpp src/kdehandlers.cpp)
+SET(SRC_FACTORY src/kmonopluginfactory.cpp)
+
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/smoke
${CMAKE_CURRENT_SOURCE_DIR}/../qyoto/src ${QT_INCLUDES})
LINK_DIRECTORIES (${LIBRARY_OUTPUT_PATH})
@@ -18,9 +22,20 @@
ADD_DEPENDENCIES(kimono smokekde)
TARGET_LINK_LIBRARIES(kimono smokekde qyotoshared ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+# write FindPackage modules for these
+PKGCONFIG(mono MONO_INCLUDES MONO_LINK_DIR MONO_LINK_FLAGS MONO_CFLAGS)
+PKGCONFIG(glib-2.0 GLIB_INCLUDES GLIB_LINK_DIR GLIB_LINK_FLAGS GLIB_CFLAGS)
+
+LINK_DIRECTORIES(${MONO_LINK_DIR} ${GLIB_LINK_DIR})
+INCLUDE_DIRECTORIES(${MONO_INCLUDES} ${GLIB_INCLUDES})
+ADD_DEFINITIONS(${GLIB_CFLAGS} ${MONO_CFLAGS})
+KDE4_ADD_PLUGIN(kmonopluginfactory ${SRC_FACTORY})
+TARGET_LINK_LIBRARIES(kmonopluginfactory ${KDE4_KDECORE_LIBS} qyotoshared ${MONO_LINK_FLAGS})
+
SET(CS_FLAGS -warn:0 -r:${LIBRARY_OUTPUT_PATH}/qt-dotnet.dll -keyfile:${KEYFILE})
ADD_CS_LIBRARY(kde-dotnet "${SRC_CS}" ALL)
ADD_DEPENDENCIES (kde-dotnet qt-dotnet kimono)
INSTALL(TARGETS kimono LIBRARY DESTINATION ${LIB_INSTALL_DIR})
INSTALL_GAC(kde-dotnet)
+INSTALL(TARGETS kmonopluginfactory DESTINATION ${PLUGIN_INSTALL_DIR})
--- trunk/KDE/kdebindings/csharp/kimono/ChangeLog #826583:826584
@@ -1,3 +1,11 @@
+2008-07-01 Arno Rehn <arno at arnorehn.de>
+
+ * Added KMonoPluginFactory. Behaves similar to KRubyPluginFactory:
+ * If the keyword is Foo/Bar.dll, a class 'Bar' is searched in the
+ namespace 'Foo'.
+ * This class has to have a constructor that takes a QObject (the
+ parent) and a List<QVariant> (the arguments).
+
2008-06-24 Richard Dale <richard.j.dale at gmail.com>
* Make both the smoke lib and the kimono bindings use non-const methods
--- trunk/KDE/kdebindings/csharp/qyoto/ChangeLog #826583:826584
@@ -1,3 +1,9 @@
+2008-07-01 Arno Rehn <arno at arnorehn.de>
+
+ * Moved the runtime initialization from the static SmokeInvocation
+ constructor to a new method 'InitRuntime'. This is necessary for
+ KMonoPluginFactory to work.
+
2008-06-30 Richard Dale <richard.j.dale at gmail.com>
* When a C# value was marshalled to C++, and the actual type of
--- trunk/KDE/kdebindings/csharp/qyoto/src/SmokeInvocation.cs #826583:826584
@@ -424,7 +424,11 @@
}
}
- static SmokeInvocation() {
+ static bool runtimeInitialized = false;
+
+ public static void InitRuntime() {
+ if (runtimeInitialized)
+ return;
Qyoto.Init_qyoto();
SmokeMarshallers.SetUp();
@@ -433,7 +437,12 @@
AssemblySmokeInitializer attr = (AssemblySmokeInitializer) Attribute.GetCustomAttribute(a, typeof(AssemblySmokeInitializer));
if (attr != null) attr.CallInitSmoke();
}
+ runtimeInitialized = true;
}
+
+ static SmokeInvocation() {
+ InitRuntime();
+ }
private Type classToProxy;
private Object instance;
More information about the Kde-bindings
mailing list