[Kde-bindings] KDE/kdebindings/csharp

Arno Rehn kde at arnorehn.de
Sat Jun 2 13:34:46 UTC 2007


SVN commit 670702 by arnorehn:

* Special cased the QCoreApplication constructor, too.
* Added AssemblyInfo.cs
* Added a keyfile for strong naming the qt-dotnet assembly so it can
  be added to the GAC. It won't be generated at compile time since there
  might occur problems when it is regenerated and the assembly is reinstalled.
* Added rules in CMakeLists.txt for installing libqyoto.so.
* Added rules in CMakeLists.txt for installing qt-dotnet.dll into the GAC.

CCMAIL: kde-bindings at kde.org



 M  +16 -1     CMakeLists.txt  
 M  +9 -2      qyoto/CMakeLists.txt  
 M  +10 -0     qyoto/ChangeLog  
 AM            qyoto/key.snk  
 A             qyoto/src/AssemblyInfo.cs  
 M  +3 -2      qyoto/src/qyoto.cpp  


--- trunk/KDE/kdebindings/csharp/CMakeLists.txt #670701:670702
@@ -1,6 +1,7 @@
 OPTION(ENABLE_QYOTO "build Qyoto" ON)
 
 set(QYOTO_ENABLED "no")
+
 if(ENABLE_QYOTO)
     # find 'gmcs'
     MESSAGE (STATUS "Looking for gmcs")
@@ -10,8 +11,22 @@
         MESSAGE (STATUS "gmcs was not found on your system but is needed for Qyoto. Disabling Qyoto.")
     ELSE (NOT GMCS_PATH)
         MESSAGE (STATUS "Looking for gmcs - found - ${GMCS_PATH}")
+    ENDIF (NOT GMCS_PATH)
+
+    # find 'gacutil'
+    MESSAGE (STATUS "Looking for gacutil")
+    FIND_PROGRAM (GACUTIL_PATH gacutil)
+    IF (NOT GACUTIL_PATH)
+        MESSAGE (STATUS "Looking for gacutil - not found.")
+        MESSAGE (STATUS "gacutil was not found on your system but is needed for Qyoto. Disabling Qyoto.")
+    ELSE (NOT GACUTIL_PATH)
+        MESSAGE (STATUS "Looking for gacutil - found - ${GACUTIL_PATH}")
+    ENDIF (NOT GACUTIL_PATH)
+
+    IF (GMCS_PATH AND GACUTIL_PATH)
         add_subdirectory( qyoto )
         set(QYOTO_ENABLED "yes")
-    ENDIF (NOT GMCS_PATH)
+    ENDIF (GMCS_PATH AND GACUTIL_PATH)
 endif(ENABLE_QYOTO)
+
 message(STATUS "Build Qyoto... " ${QYOTO_ENABLED})
--- trunk/KDE/kdebindings/csharp/qyoto/CMakeLists.txt #670701:670702
@@ -8,6 +8,7 @@
 	${CMAKE_CURRENT_SOURCE_DIR}/src/SmokeMarshallers.cs
 	${CMAKE_CURRENT_SOURCE_DIR}/src/Qyoto.cs
 	${CMAKE_CURRENT_SOURCE_DIR}/src/QyotoMetaData.cs
+	${CMAKE_CURRENT_SOURCE_DIR}/src/AssemblyInfo.cs
 	${CMAKE_CURRENT_SOURCE_DIR}/core/*.cs
 	${CMAKE_CURRENT_SOURCE_DIR}/gui/*.cs
 	${CMAKE_CURRENT_SOURCE_DIR}/network/*.cs
@@ -17,6 +18,8 @@
 	${CMAKE_CURRENT_SOURCE_DIR}/opengl/*.cs
 	${CMAKE_CURRENT_SOURCE_DIR}/qdbus/*.cs)
 
+SET(KEYFILE ${CMAKE_CURRENT_SOURCE_DIR}/key.snk)
+
 # find Qt4
 FIND_PACKAGE (Qt4 REQUIRED)
 
@@ -27,10 +30,14 @@
 ADD_LIBRARY (qyoto MODULE ${SRC_CPP})
 TARGET_LINK_LIBRARIES (qyoto smokeqt ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
 
-ADD_CUSTOM_TARGET (qt-dotnet ALL ${GMCS_PATH} -debug -define:DEBUG -unsafe -warn:0 -out:qt-dotnet.dll -target:library ${SRC_CS}
-	COMMENT "Building qt-dotnet.dll")
+ADD_CUSTOM_TARGET (qt-dotnet ALL ${GMCS_PATH} -debug -define:DEBUG -unsafe -warn:0
+			-out:qt-dotnet.dll -target:library -keyfile:${KEYFILE} ${SRC_CS}
+			COMMENT "Building qt-dotnet.dll")
 
 ADD_DEPENDENCIES (qt-dotnet qyoto)
 
+INSTALL(TARGETS qyoto LIBRARY DESTINATION lib)
+INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${GACUTIL_PATH} -i ${CMAKE_CURRENT_BINARY_DIR}/qt-dotnet.dll)")
+
 ADD_SUBDIRECTORY(tools)
 ADD_SUBDIRECTORY(examples)
--- trunk/KDE/kdebindings/csharp/qyoto/ChangeLog #670701:670702
@@ -1,3 +1,13 @@
+2007-06-02  Arno Rehn  <arno at arnorehn.de>
+
+	* Special cased the QCoreApplication constructor, too.
+	* Added AssemblyInfo.cs
+	* Added a keyfile for strong naming the qt-dotnet assembly so it can
+	  be added to the GAC. It won't be generated at compile time since there
+	  might occur problems when it is regenerated and the assembly is reinstalled.
+	* Added rules in CMakeLists.txt for installing libqyoto.so.
+	* Added rules in CMakeLists.txt for installing qt-dotnet.dll into the GAC.
+
 2007-06-01  Arno Rehn  <arno at arnorehn.de>
 
 	* Special cased the QApplication constructor call to work correctly
** trunk/KDE/kdebindings/csharp/qyoto/key.snk #property svn:mime-type
   + application/octet-stream
--- trunk/KDE/kdebindings/csharp/qyoto/src/qyoto.cpp #670701:670702
@@ -586,10 +586,11 @@
 		_items = -1;
 		
 		/*
-		 * special case the QApplication constructor call
+		 * special case the QApplication/QCoreApplication constructor call
 		 * the int reference has to stay valid all the time, so create an additional pointer here
 		 */
-		if (isConstructor() && strcmp(_smoke->methodNames[method().name], "QApplication") == 0) {
+		if (isConstructor() && (   strcmp(_smoke->methodNames[method().name], "QApplication") == 0
+					|| strcmp(_smoke->methodNames[method().name], "QCoreApplication") == 0)) {
 			int* i = new int(_sp[1].s_int);
 			_stack[1].s_voidp = i;
 		}



More information about the Kde-bindings mailing list