Version 15 (modified by rb07, 13 years ago) (diff)

Updated up to version 2.01

Building Transmission Qt for Windows

The following procedure in not the only one possible, it was just the easiest for me.

If you have a MinGW development environment (Qt SDK installs the basic tools but with an old winapi that is not enough) then you can skip the first part, add as many ported packages as you can find, port the rest, and try the 2nd part.

Cross build environment

Using the excellent tools from the Fedora project(*) we can build Transmission for running on Windows (XP and above).

You don't need to install Fedora 11 (or 12, or 13), I run it under Windows on a virtual machine (VMWare Player, the Fedora 11 image is from one of the available options

Once you have it, log in, su to root, and install the cross-development tools:

  • Create the file /etc/yum.repos.d/mingw.repo running:
    echo "[mingw]
    name=Fedora Windows cross-compiler, libraries, and tools.
    " > /etc/yum.repos.d/mingw.repo
  • yum install mingw32-gcc mingw32-gtk2 mingw32-crossreport mingw32-nsiswrapper wine
  • yum install mingw32-curl
  • yum install mingw32-qt
  • yum install mingw32-gcc-c++
  • yum install patch

Curl and its dependencies was already ported, so we got that for free. If you are working on MinGW, go to the Curl site, the downloads include libraries and everything ported to Windows. I'm not building a multi-language version, just English, so I'm skipping the step about installing intltool (which is not in the yum repository, you have to build it, and I did for the Gtk version which requires it; not difficult).

(*) Note: I've also used "Mingw Cross Compiling Environment" which can be installed in any Linux (I used Gentoo) and build static linked versions very similar to what I describe here, Qt is part of that environment... but I had to change it to build dynamic apps for Transmission 2.00b1 since DBus is a new requirement and I couldn't make it link statically (a Qt problem really).

Building Transmission library

For native MinGW replace mingw32-configure with ./configure, qmake-qt4 with qmake, and i686-pc-mingw32-g++ with g++.

Start by downloading and installing the source in your workspace (change version number to latest you can find):

We are using one patch BuildingTransmissionQtWindows/transmission-1.83-Qt-build.diff; the download is done in one of the steps below.

Newer versions require different patches:

Note for version 2.00+ : This version uses DBUS and only the latest development version of DBUS works in Windows, I just build it (version 1.3.1) and added the library changing its name (because Qt looks for a fixed-number older version), so you build libdbus-1-3.dll and copy it or change its name to dbus-1.dll; since DBUS is not really used by anything else (except probably Gnome desktop) I didn't add the DBUS daemon or anything else, and you get to see some complaints by the qtr application if you run it in a console, but it doesn't need it unless you run the app more than once).


  • cd transmission-1.83
  • curl "" -O transmission-1.83-Qt-build.diff
  • patch -p1 < transmission-1.83-Qt-build.diff
  • mingw32-configure --disable-nls --disable-largefile --disable-cli --disable-gtk
  • make CFLAGS="-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -DSTATICLIB"
  • make install

Build Transmission Qt

  • cd qt
  • export QMAKESPEC=fedora-win32-cross
  • export PKG_CONFIG_LIBDIR=/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig
  • qmake-qt4 -win32 QT_LIBINFIX=4
  • perl -pi -e 's/-fno-rtti' Makefile.Debug Makefile.Release
  • make clean && make release
  • INSTALL_ROOT=/usr/i686-pc-mingw32/sys-root/mingw make release-install

Make the Windows installer

The following steps are to correct a deficiency of nsiswrapper :

  • ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/QtCore4.dll /usr/i686-pc-mingw32/sys-root/mingw/bin/qtcore4.dll
  • ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/QtGui4.dll /usr/i686-pc-mingw32/sys-root/mingw/bin/qtgui4.dll
  • ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/QtNetwork4.dll /usr/i686-pc-mingw32/sys-root/mingw/bin/qtnetwork4.dll

You may also have to set the PATH to include /usr/i686-pc-mingw32/sys-root/mingw/bin (unless my latest patch is already included in the distributed nsiswrapper).

Finally create the installer:

  • nsiswrapper --run --name "QtTransmission" --outfile QtTransmission-1.83_installer.exe --installdir 'C:\Program Files\Transmission' /usr/i686-pc-mingw32/sys-root/mingw/bin/qtr.exe

That's it, now just copy the installer to Windows, I use ftp but of course I have a ftp server... haven't tried other means but scp (putty or OpenSSH) should work, also using a flash drive, or a Windows/Samba? share.