[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] PyQt + kde-cygwin Qt 3.3.3 success!
From:       James Lamanna <jlamanna () gmail ! com>
Date:       2005-01-10 1:38:34
Message-ID: aa4c40ff05010917385a8d1904 () mail ! gmail ! com
[Download RAW message or body]

I've successfully built PyQt against the kde-cygwin native port of Qt
3.3.3 to Windows.
The native port is available at http://kde-cygwin.sourceforge.net
It compiled easily for me using the MSVC.NET instructions found here:
http://kde-cygwin.sourceforge.net/qt3-win32/compile-net.php
They also have compile instructions for Borland, MinGW and MSVC 6.0.

In order to get PyQt to build I had to make some slight modifications.
My patches to SIP 4.1.1 and PyQt 3.13-x11 are attached.
The SIP patch fixes a problem where the kde-cygin distribution
generates qt-mt3.lib whereas SIP normally expects qt-mt333.lib
The PyQt patch adds in some missing types.

In the tests I have run so far, it seems to work great!

-- James Lamanna

["PyQt-x11-3.13.diff" (application/octet-stream)]

diff -dur PyQt-x11-gpl-3.13-orig/configure.py PyQt-x11-gpl-3.13/configure.py
--- PyQt-x11-gpl-3.13-orig/configure.py	2004-09-21 07:17:42.000000000 -0700
+++ PyQt-x11-gpl-3.13/configure.py	2005-01-09 17:32:45.000000000 -0800
@@ -678,8 +678,8 @@
     sipconfig.inform("This is the %s version of PyQt %s (licensed under the %s) for \
Python %s on %s." % (ltype, pyqt_version_str, lname, string.split(sys.version)[0], \
sys.platform))  
     # Common checks.
-    if ltype == "GPL" and sys.platform == "win32":
-        error("You cannot use the GPL version of PyQt under Windows.")
+    #if ltype == "GPL" and sys.platform == "win32":
+    #    error("You cannot use the GPL version of PyQt under Windows.")
 
     try:
         qted = sipcfg.qt_edition
diff -dur PyQt-x11-gpl-3.13-orig/sip/qt/qnamespace.sip \
                PyQt-x11-gpl-3.13/sip/qt/qnamespace.sip
--- PyQt-x11-gpl-3.13-orig/sip/qt/qnamespace.sip	2004-09-21 07:17:46.000000000 -0700
+++ PyQt-x11-gpl-3.13/sip/qt/qnamespace.sip	2005-01-09 03:05:44.000000000 -0800
@@ -863,6 +863,11 @@
 %If (WS_X11)
 	typedef unsigned long HANDLE;
 %End
+
+%If (WS_WIN)
+	typedef void* HANDLE;
+%End
+
 %End
 };
 
diff -dur PyQt-x11-gpl-3.13-orig/sip/qt/qwindowdefs.sip \
                PyQt-x11-gpl-3.13/sip/qt/qwindowdefs.sip
--- PyQt-x11-gpl-3.13-orig/sip/qt/qwindowdefs.sip	2004-09-21 07:17:46.000000000 -0700
+++ PyQt-x11-gpl-3.13/sip/qt/qwindowdefs.sip	2005-01-09 17:32:24.000000000 -0800
@@ -28,11 +28,22 @@
 </Sect2>
 %End
 
-
 %ModuleHeaderCode
 #include <qwindowdefs.h>
 %End
 
+%MappedType WId
+{
+%ConvertFromTypeCode
+	return sipBuildResult(NULL, "V", sipCpp);
+%End
+%ConvertToTypeCode
+	sipParseResult(NULL, NULL, sipPy, "V", *sipCppPtr);
+	return 1;
+%End
+};
+
+typedef void * PID;
 
 %OptionalInclude qwindowdefs_mac.sip
 %OptionalInclude qwindowdefs_qws.sip


["sip-4.1.1.diff" (application/octet-stream)]

diff -dur sip-4.1.1/siputils.py sip-4.1.1-new/siputils.py
--- sip-4.1.1/siputils.py	2004-09-24 18:56:00.000000000 -0700
+++ sip-4.1.1-new/siputils.py	2005-01-09 02:41:17.000000000 -0800
@@ -441,7 +441,7 @@
             qt_lib = self.config.qt_lib
 
             if self.generator in ("MSVC", "MSVC.NET", "BMAKE") and win_shared:
-                qt_lib = qt_lib + string.replace(version_to_string(self.config.qt_version), ".", "")
+                qt_lib = qt_lib + string.replace(version_to_string(self.config.qt_version), ".", "")[0]
 
                 if self.config.qt_edition == "non-commercial":
                     qt_lib = qt_lib + "nc"


_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic