QTRuby + QT4 + Win32

I would like to use the fantastic QT4 for Win32
using the Qtruby bindings.

Even though I made some progress, reading from
Richard Dale’s blog, the effort didn’t pay out.

The guidelines were a bit too fuzzy, plus the
GNU build environment is constantly at odds
with the Windows way. Using 3 different shells,
perl, and dealing with autotools is a pain.
It shouldn’t be this difficult.

Has anyone managed to compile QTRuby QT4
for Windows ? (Open Source edition)

I don’t expect you to throw me a binary package
with the thing compiled, but a good detailed
list of tools and dependencies required, and a
step by step guide would greatly help.

best,
UG

Uma G.

Uma G. wrote:

It shouldn’t be this difficult.
UG

Uma G.
http://umageller.wordpress.com

I am a passive observer here (no windows here), but check out this
recent thread:
http://rubyforge.org/forum/forum.php?thread_id=6307&forum_id=723

On Mar 12, 1:56 am, “Uma G.” [email protected] wrote:

It shouldn’t be this difficult.
UG

Uma G.http://umageller.wordpress.com
We’ve recently got Qt4 QtRuby building with cmake on both Linux and
Mac OS X, which is a giant step forward. In theory it should be just
as easy to build on Windows now, but as none of the developers (ie
Caleb Tennnis or myself) are particularly Windows oriented we haven’t
had time to try it yet. The next release will be quite soon and use
cmake and so I’m really hoping that normal humans will finally be able
to easily build QtRuby in all enviroments without having to deal with
‘autohell’.

– Richard

Has anyone managed to compile QTRuby QT4
for Windows ? (Open Source edition)

If you can get the build system installed on Windows, I can probably
help with the rest of the steps. I tried installing the build system
via the steps here (at least, the first 8 or so):

http://kdelibs.com/wiki/index.php/
Building_KDElibs_4_using_GCC_and_MinGW_with_Qt_4.2

But installing the GnuWin32 didn’t work for me and I gave up.

Maybe I’ll add some instructions for how I build qtruby qt4 to the
KDE techbase. I think that will apply here as well

Caleb

I’ve been using Linux openSUSE 10.2 and it already comes
with Qtruby prepackaged, and great support for
Ruby development in KDevelop, and I really love it.
Richard’s work is impressive, kudos for Richard.

The problem is, I also have customers who live in Windows
and honestly, there’s certain tasks where a web interface
just won’t cut it, no matter how polished your AJAX or
Flash patch-tech is.

They will move to Linux or some Unix eventually, but the
burden is on us the developers to build the necessary
bridges for them to cross the chasm.

I have a relatively acceptable GNU tools system installed and
working on Windows, crafted on top of Msys and other
packages I gathered from around the web.
The problem is there is not a single regular incompatibility pattern
you see repeating everywhere: that would take effort, but would be
a solvable problem.

The problem with ported apps on Windows is that different
applications and libs build things differently under different
assumptions.
For example, most GTK apps rely on pkg-config to tell whether
certain packages are installed.
Many cross-ported apps from the unix/linux world sometimes
assume Cygwin is the only posix-like system on Win32-land,
some others (like QT4) rely on a Mingw32-only system.
This leads to an neverending

There’s just no way a one woman effort can patch the entire
codebase of ports to make it work on Windows, even
too complex to document it.

This is not a Windows problem, this is a problem about assumptions
and lack of know-how by porters or unix/linux developers targeting
the Windows-based platforms (for a moment I will be forgiving and
will omit other possible reasons I have considered)

The build systems they choose for a given package aren’t interoperable.

This problem is calling for a resolution, and it’s probably even
beyond GNU’s abilities to address it, it takes a concerted effort
from all developers targeting one of the Win32-based platforms,
be it mswin32, cygwin, or mingw32.

Richard probably knows a lot more about build systems than I do,
and he’s expecting CMake to address this pain, so I’m confident
we’ll really have it solved in the near future.

That being said, if CMake is good enough to solve the problem,
all porters and unix developers should review their build
systems.

So we really are talking about two different problems of different
size and scope here.

  1. Building QTRuby for Windows

  2. Fixing the build system so that Unix/Linux developers
    have a single target to port for.

thanks Hans, will look into it !

Thanks for your efforts, Richard.

I’ll keep trying and will report back if I manage to succeed.

You shouldn’t need to build kdelibs in order to build Qt4 QtRuby
though. Is that what you did to build it on Mac OS X?

No, that site has instructions on how to install all of the build system
stuff
(subversion, gnuwin32, cmake etc ) needed to build kdelibs for windows,
so if you
follow the first 8 steps or so it’s about the same required information
for building
qtruby for windows.

Caleb

On Mar 12, 10:35 am, Caleb T. [email protected] wrote:

But installing the GnuWin32 didn’t work for me and I gave up.

Maybe I’ll add some instructions for how I build qtruby qt4 to the
KDE techbase. I think that will apply here as well

Caleb
You shouldn’t need to build kdelibs in order to build Qt4 QtRuby
though. Is that what you did to build it on Mac OS X? I changed to top
level CMakeLists.txt in kdebindings to not have any kde dependencies,
and I would expect it to work for Windows:

project(kdebindings)

where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/

is checked
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )

search packages used by KDE

FIND_PACKAGE (Qt4 REQUIRED)

add_definitions (${QT_DEFINITIONS} -DHAVE_CONFIG_H=1)
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} $
{QT_INCLUDES} )

FIND_PACKAGE (RUBY REQUIRED)
FIND_PACKAGE (OpenGL REQUIRED)

add_subdirectory(smoke)

if(RUBY_EXECUTABLE)
add_subdirectory( qtruby )
endif(RUBY_EXECUTABLE)

Then we need to make the CMakeLists.txts underneath work for both KDE
and Qt only builds, and I think they do.

– Richard

On 3/12/07, [email protected] [email protected] wrote:

We’ve recently got Qt4 QtRuby building with cmake on both Linux and
Mac OS X, which is a giant step forward. In theory it should be just
as easy to build on Windows now, but as none of the developers (ie
Caleb Tennnis or myself) are particularly Windows oriented we haven’t
had time to try it yet. The next release will be quite soon and use
cmake and so I’m really hoping that normal humans will finally be able
to easily build QtRuby in all enviroments without having to deal with
‘autohell’.

I’ve got a similar but completely different problem on Mac OS X :slight_smile:
I installed the precompiled Qt version available as dmg (4.2.3) in my
Mac before downloading qtruby-1.4.7.
But somehow I cannot get the qtruby configure script to find the qt
libs or headers. It complains that it cannot find Qt >= 4.1. (This Qt
version is divided into separate frameworks, and I found on the forum
this may cause some trouble)

Will this issue be fixed in the next qtruby version or do I need to
uninstall the precompiled qt and install from source? How do I
uninstall previous Qt version?

Thanks,
Ed

Encontrá a “Tu psicópata favorito” http://tuxmaniac.blogspot.com

The future is not what it used to be.
– Paul Valéry

I’ve got a similar but completely different problem on Mac OS X :slight_smile:
I installed the precompiled Qt version available as dmg (4.2.3) in my
Mac before downloading qtruby-1.4.7.
But somehow I cannot get the qtruby configure script to find the qt
libs or headers. It complains that it cannot find Qt >= 4.1. (This Qt
version is divided into separate frameworks, and I found on the forum
this may cause some trouble)

I’m pretty sure that 1.4.7 doesn’t find frameworks. I think to use it
you’ll have
to install Qt from source, and build it with -no-frameworks (or whatever
the
configure switch is called).

Will this issue be fixed in the next qtruby version or do I need to
uninstall the precompiled qt and install from source? How do I
uninstall previous Qt version?

It’s definitely fixed in subversion, as I’ve built qtruby on OSX last
week using the
downloaded Qt 4.2.3 .dmg. However, this verison of QtRuby hasn’t been
released yet
as a package. I’m not sure what the release timeframe is (soon I
hope!). If you
want to check out the subversion sources and build qtruby all you need
it subversion
and cmake and a little persistence. :slight_smile:

Caleb