[Kde-bindings] Patches for Qyoto on Windows (final)

Steven Boswell II ulatekh at yahoo.com
Fri Dec 9 00:07:40 UTC 2011


Here is the final version of my patches to smokegen, smokeqt, and qyoto to get them to compile and run under Windows.  I was going to integrate in Dimitar's changes that he mentioned earlier, but I don't see them in the qyoto git repository?  I'm looking at https://projects.kde.org/projects/kde/kdebindings/csharp/qyoto/repository -- that's the right place, isn't it?

Here is a summary of what I did to each project, suitable for the commit message.

smokegen:
Adds CMAKE_EXECUTABLE_SUFFIX to the end of 
SMOKE_GEN_BIN and SMOKE_API_BIN, so that the installed SmokeConfig.cmake will have proper paths to the executables.
Put quotes around several references to path variables, so that spaces can appear in the installation path.
Added ARCHIVE DESTINATION and RUNTIME DESTINATION to the install line of cppparser.  (No apparent effect under Linux.)
Put Windows DLLs into the bin directory (i.e. no change for Linux).  find_library() in SmokeConfig.cmake.in modified to account for this.
Got rid of the "lib" prefix on Windows DLLs/archives.


smokeqt:
Put quotes around the reference to SMOKE_CMAKE_MODULE_DIR, so that spaces can appear in the installation path.
Added ARCHIVE DESTINATION and RUNTIME DESTINATION to the install line of all the DLLs.  (No apparent effect under Linux.)
Got rid of the "lib" prefix on Windows DLLs/archives.


qyoto:
Modified paths to C# sources under Windows, changing forward-slashes to 
backward-slashes.  (Apparently, Microsoft's C# compiler can't handle 
forward slashes.)
When looking for the C# compiler, if the 
environment variable CSC refers to the 2.0 compiler, don't use it.  (The Qyoto C# files use .NET 3.0 features.)
If CMakeDetermineCSharpCompiler.cmake has to look for a Microsoft compiler, use the 3.5 version.
Don't compile QtDBus-related items unless the related library was found (i.e. only if SMOKE_QTDBUS_LIBRARY is defined).Changed the external definition of Qyoto_handlers[] in src/qyoto.cpp from 
Q_DECL_IMPORT to Q_DECL_EXPORT, to match the way it's declared 
elsewhere.
Define QDESIGNER_UILIB_LIBRARY when compiling uics for Win32, to get rid of a ton of linker errors.
Added ARCHIVE DESTINATION and RUNTIME DESTINATION to the install line of all the DLLs.  (No apparent effect under Linux.)
Got rid of the "lib" prefix on Windows DLLs/archives.


The next step is to write a Windows installer, similar to the one for GTK#, i.e. to install the Qyoto DLLs/executables/etc. as well as the Qt libraries on which it depends, and to add the bin directory to the system path.  But I've never written a Windows installer before, so this is a bit of a research project for me.  Until then, anyone interested in developing using Qyoto under Windows can at least do so with their own copy.

Steven Boswell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20111208/b37dc80f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qyoto-windows-patches.tar.bz2
Type: application/x-bzip
Size: 5997 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20111208/b37dc80f/attachment-0001.bz2>


More information about the Kde-bindings mailing list