[Kde-bindings] Qyoto on Windows

Steven Boswell II ulatekh at yahoo.com
Fri Dec 2 13:50:00 UTC 2011


OK, I'll try your changes sometime today.

I wanted to build my own binaries because I wanted the opportunity to 
track down bugs.  Your binaries aren't totally functional yet, after 
all.  Also, I was hoping that someone on this mailing list would know how to modify the existing projects the right way to cope with the Windows build issues.


Looking forward to your complete build instructions.

Steven Boswell



________________________________
 From: Dimitar Dobrev <dpldobrev at yahoo.com>
To: Steven Boswell II <ulatekh at yahoo.com>; KDE bindings for other programming languages <kde-bindings at kde.org> 
Sent: Friday, December 2, 2011 1:12 AM
Subject: Re: [Kde-bindings] Qyoto on Windows
 

Make sure you check your /lib dir as well, most files are sent there (in fact, just the qyoto-*-native.dll libs are placed in /bin). Another thing: the generated managed assemblies P/Invoke qyoto-*-native.dll while the compiled libs are named libqyoto-*-native.dll. To avoid this, after you generate you CMake files for Qyoto do a Find and Replace of "libqyoto" with "qyoto" in all text files  (Notepad++ can do this) in your build dir.
Sorry for not posting all of these earlier but I didn't quite have the time. Besides, building Qyoto on Windows was quite a horrible experience and I thought nobody would be willing to do this when there are binaries (my binaries) available.



________________________________
 From: Steven Boswell II <ulatekh at yahoo.com>
To: KDE bindings <kde-bindings at kde.org> 
Sent: Thursday, December 1, 2011 11:53 PM
Subject: Re: [Kde-bindings] Qyoto on Windows
 

I got qyoto to build under Windows, but it's not running.  Again, I followed the spirit of the instructions that Dimitar previously posted to this list regarding how to build smokegen.

First of all, it appears that qyoto expects smokegen and smokeqt to be installed to the same directory.  (It was looking for the smokeqt DLLs in the smokegen directory tree.)  So I rebuilt smokegen and installed it in c:\qtcs_stuff\SMOKEQT4 .

DBus doesn't exist under Windows, so I hacked out the references to SMOKE_QTDBUS_LIBRARY and src/qdbus_interop.cpp from CMakeLists.txt .  I'm sure there must be a proper way to detect that DBus is missing in the CMake files and to dike this out properly, but I only saw CMake for the first time a few days ago.

I had to add ARCHIVE DESTINATION, set to the same value as LIBRARY DESTINATION, in all the places that CMake complained that it was missing.
I had to change Q_DECL_IMPORT to Q_DECL_EXPORT on the extern reference to Qyoto_handlers in qyoto.cpp , to avoid linker errors.  (This may be a general bug fix.)

I had to undefine QDESIGNER_UILIB_EXPORT in ui4.h , to avoid linker errors.


CMake kept setting CMAKE_CSharp_COMPILER to MS.NET's 2.0 compiler.  It was supposedly getting that from the CSC environment variable, though no such variable appears to be defined on my system.  I finally hacked the code to find MS.NET's 3.5 compiler.  My installation of MonoDevelop apparently didn't come with the Mono C# compilers, which seems weird to me.

For some reason, the C# compiler ignored the subdirectories that the .cs files were in, and instead tried to find everything at the root.  So I just cd'd to the qyoto directory and ran "ln */*.cs ." from MinGW.  I had to do that for the qtscript, qttest, qtuitools, and qtwebkit directories too.

After all this, it built, and I installed it to the same directory that contains the smokegen and smokeqt packages.

When I tried to run my C# project with the packages I had just built, it died quickly because it couldn't find libqyoto.dll .  There's a libqyoto.dll.a in my bin directory, but the DLL itself it missing.  It's in my qyoto build directory, though, so I just copied it myself.  But still, it complains that it can't find libqyoto.dll .


-----

So there you go, kdebindings mailing list -- this is where Dimitar and I have gotten to with our attempt to build Qyoto for Windows.  I'm sure there are people out there that have proper solutions to a lot of these problems.  Are you willing to help?

Steven Boswell



________________________________
 From: Steven Boswell II <ulatekh at yahoo.com>
To: Dimitar Dobrev <dpldobrev at yahoo.com>; KDE bindings <kde-bindings at kde.org> 
Sent: Thursday, December 1, 2011 10:51 AM
Subject: Re: Qyoto on Windows
 

OK, I finally got smokeqt to build under Windows, following the spirit of the instructions you previously posted to this list regarding how to build smokegen.

Setting SMOKE_BASE_LIBRARY got rid of the "Could not find SMOKE" message.  For some reason, Smoke_DIR keeps getting set to the location of my built smokegen, instead of my installed smokegen, so I keep having to change it by hand.  Finally, I renamed "smokegen-build" to "smokegen-build-installed" and it stopped magically finding that directory.


But the biggest obstacle was that the smokeqt cmake files can't handle paths with spaces in them.  smokegen was previously installed in "C:\Program Files (x86)\smokegenerator".  I set CMAKE_INSTALL_PREFIX to install it in "C:\qtcs_stuff\smokegenerator" and now CMake could find the rest of the files it couldn't find before, e.g. MacroOptionalFindPackage.

Later, during smokeqt cmake configuration, cmTryCompileExec.exe couldn't start because libgcc_s_dw2-1.dl was missing.  That was in C:\MinGW\bin, but that wasn't in the Windows PATH variable.  So I copied that DLL to CMake's bin directory (i.e. C:\Program Files (x86)\CMake 2.8\bin).

I got four warnings about missing packages (QImageBlitz, Qwt5, Phonon, 
and QScintilla2); I don't know if any of them are significant.

Finally, I could launch Qt Creator and build.  I had to hand-edit the installed SmokeConfig.cmake (in C:\qtcs_stuff\smokegenerator\share\smoke\cmake) to add ".exe" to the end of the values for SMOKE_GEN_BIN and SMOKE_API_BIN, because otherwise the various smokedata.cpp files couldn't resolve their dependencies.

I had to finally add C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin to my Windows PATH variable, because smokegen.exe wouldn't run otherwise.


It took forever to build smokeqt, but eventually it succeeded!  There were 589 warnings, most of them related to inline methods that were declared to be dllimport.


On to building qyoto!  Hopefully that's not as much of an adventure.


Steven Boswell



________________________________
 From: Dimitar Dobrev <dpldobrev at yahoo.com>
To: Steven Boswell II <ulatekh at yahoo.com>; KDE bindings <kde-bindings at kde.org> 
Sent: Thursday, December 1, 2011 12:55 AM
Subject: Re: Qyoto on Windows
 

Not sure about QFileDialog, haven't used it yet. All widgets in Qt have a parent, so try passing one (say, your main application window) to the QFileDialog constructor.
Your Smoke_DIR seems correct so I don't know what is wrong there. Make sure you set SMOKE_BASE_LIBRARY to point to libsmokebase.dll.



________________________________
 From: Steven Boswell II <ulatekh at yahoo.com>
To: Dimitar Dobrev <dpldobrev at yahoo.com> 
Sent: Thursday, December 1, 2011 12:13 AM
Subject: Re: Qyoto on Windows
 

Sweet, that took care of the problem under Windows, and it works just fine under Linux!  (Plus, I learned something new about Qt. :-)  Thank you!

The next problem is that, under Windows, QFileDialog seems to freeze the entire application.  Specifically, I'm calling QFileDialog.GetExistingDirectory (this, "Select a directory", 0x25u).  Have you tried that yet?

I have successfully built smokegen, and finally figured out how to install it: cd to the smokegen build directory, and run "mingw32-make install".  That put it in "C:\Program Files (x86)\smokegenerator".  Now I'm trying to build smokeqt, but CMake keeps telling me "Could not find SMOKE".  I set Smoke_DIR to "C:\Program Files (x86)\smokegenerator\share\smoke\cmake", but that didn't help.  It also doesn't seem to be running the SmokeConfig.cmake in that directory; I modified all four "Could not find SMOKE" messages in there, and it's not showing any of the modified messages, so I think I'm missing a bigger point somewhere.  Can you steer me in the right direction?

Steven Boswell



________________________________
 From: Dimitar Dobrev <dpldobrev at yahoo.com>
To: Steven Boswell II <ulatekh at yahoo.com>; KDE bindings <kde-bindings at kde.org> 
Sent: Wednesday, November 30, 2011 2:10 PM
Subject: Re: Qyoto on Windows
 

I get exactly the same error, however Connect(cb, SIGNAL(string), this, SLOT(string)), where your slot method is marked with [Q_SLOT], works. You may check this example, just replace calls to SetWindowTitle(arg) with WindowTitle = arg. I have no idea why the other way does not work and it is a shame because it is more convenient. Mail me if you manage to fix it.



________________________________
 From: Steven Boswell II <ulatekh at yahoo.com>
To: Dimitar Dobrev <dpldobrev at yahoo.com> 
Sent: Wednesday, November 30, 2011 9:03 PM
Subject: Re: Qyoto on Windows
 

Thanks.  I'll grab assemblygen when I get home & work on getting all these projects to build.


I messed with my app under Qyoto/Windows today.  Almost everything seems to work; QSettings preserves my window geometry, and resizing works as expected.  But it seems to crash every time I hook up an action with "QObject.Connect(QObject,string,SlotFunc)".  The call to QObject.Connect() succeeds, but as soon as that event happens, I get a System.ArgumentException that says "Type must derive from Delegate.  Parameter name: t".  Are you seeing this problem in your own code?

If this is an easy fix on your part, I would really appreciate it...after all, I'm still working up to building these libraries, and am still a ways from being able to run DLLs in a debugger.

Steven Boswell



________________________________
 From: Dimitar Dobrev <dpldobrev at yahoo.com>
To: Steven Boswell II <ulatekh at yahoo.com>; KDE bindings <kde-bindings at kde.org> 
Sent: Wednesday, November 30, 2011 1:09 AM
Subject: Re: Qyoto on Windows
 

Here you can find 2 of the repositories you need: smokegen and smokeqt (the latter are the Smoke Qt bindings which produce the libsmokeqt*.dll-s). Here you can find assemblygen (check out the branch of "assemblies"), the tool that generates the managed assemblies (qyoto-*.dll) from the Smoke libraries.
Some more build instructions: that LIBRARY thing I described on the mailing list for smokegen must be done for all CMakeLists. Another thing about CMakeLists is that the dependent libs will look for lib*.so and thus fail. You must change that to lib*.dll. Of course, these cannot be sent as patches because they are Windows-specific so for now everyone who wants to build Qyoto has to fix them on his own.



________________________________
 From: Steven Boswell II <ulatekh at yahoo.com>
To: Dimitar Dobrev <dpldobrev at yahoo.com> 
Sent: Wednesday, November 30, 2011 3:43 AM
Subject: Re: Qyoto on Windows
 

I put mingw10.dll into my application folder and still no luck.  But I put C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin into my path and my app finally runs!  So I can figure out what's left.  Thanks so much for your help!  I look forward to testing the heck out of the Windows port of Qyoto!

BTW, in the kdebindings mailing list, from 11/12 to around 11/19, you have some commits.  What were they to?  I was looking at the only kdebindings version-control databases I know of, e.g. https://projects.kde.org/projects/kde/kdebindings/smoke/smokegen/repository , and I don't see any new commits.  I wanted to get your latest changes so I could practice building them on my own.

Thanks again!  Let me know if there's anything I can do for you (aside from testing your stuff on my end).


Steven Boswell




_______________________________________________
Kde-bindings mailing list
Kde-bindings at kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20111202/c58d9040/attachment-0001.html>


More information about the Kde-bindings mailing list