[Kde-bindings] Windows patch

Ilmar Kruis ikruis at gmail.com
Tue Jun 10 16:46:06 UTC 2008


With the help of a fresh set of Qt 4.4.0 and kdebindings sources, I've put
together a proper way to build Qyoto on Windows. The attached archive
constists of a couple of things:


   1. A patch fixing the Qyoto-only CMake build
   2. Two patches to fix compiler errors on Windows (mostly to get the
   dllimport / dllexport attributes right, currently functions are only
   exported, GCC will autoresolve most of it, but MSVC just can't find any
   externals if they aren't properly dllimport-ed)
   3. The patch I send before for the C# marshalling
   4. A set of qmake projects to build the sources that are generated by the
   perl script.
   5. A shell script that:


   - sets CMake up for a Qyoto only build
   - adds the troublesome Qt headers to the exclusionlist in the generate.pl
   perl script that's been created by CMake
   - builds Smoke & Qyoto using make (generating the sources we need in the
   process)
   - removes the makefiles to make room for new ones from qmake (qmake
   doesn't like it when there are Makefiles already)


This reduces the work for a Windows build to running ./windowsbuild.sh,
after it's finished copy the whole bunch to windows and run qmake. The .NET
assemblies are portable, so don't have to be rebuild on Windows and ofcourse
you should use the same Qt version on both Linux and Windows. It works with
both mingw and msvc, but for msvc you'll have to change
"xthis->QByteRef::operator char();" to "xthis->QByteRef::operator const
char();" in smoke/qt/x_2.cpp. I've excluded the headers that are not
available in the mingw-based binary distribution of (current) Qt 4.4.0. If
you compile Qt/Win yourself with less options, you'll have to extend the
exclusionlist in windowsbuild.sh yourself.

The ui and resource compilers are qmake projects by themselfs. I've patched
the project files to behave properly on Windows, so just go to their
directory and run qmake to build them.

I hope this will be useful. If you'd like to add it to the main repository,
I think that there's little that will interfere with normal Linux operation.
The shell script's work can probably be done with some fancy CMake options,
but I'm not much of a CMake wizard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20080610/97a473c9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qyotowindows.tar.gz
Type: application/x-gzip
Size: 5157 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20080610/97a473c9/attachment.gz>


More information about the Kde-bindings mailing list