Changes between Initial Version and Version 1 of BuildingTransmissionQtWindows

May 29, 2009, 3:43:20 AM (13 years ago)

New: build Qtr for Windows.


  • BuildingTransmissionQtWindows

    v1 v1  
     1= Building Transmission Qt for Windows =
     4The following procedure in not the only one possible, it was just the easiest for me.
     6If you have a MinGW [] development environment (Qt SDK [] installs the basic tools) then you can skip the first part, add as many ported packages as you can find [], and try the 2nd part.
     8== Cross build environment ==
     10Using the excellent tools from the Fedora project [] we can build Transmission for running on Windows (XP and above).
     12You don't need to install Fedora 11, I run it under Windows on a virtual machine (VMWare Player []), the Fedora 11 image is from VMplanet [].
     14Once you have it, log in, su to root, and install the cross-development tools:
     16 * yum install mingw32-gcc mingw32-gtk2 mingw32-crossreport mingw32-nsiswrapper wine
     17 * yum install mingw32-curl
     18 * yum install mingw32-qt
     19 * yum install mingw32-gcc-c++
     21Curl 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.
     23I'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).
     25== Building Transmission library ==
     27For MinGW replace mingw32-configure with ./configure, qmake-qt4 with qmake, and i686-pc-mingw32-g++ with g++.
     29Start by downloading and installing the source in your workspace:
     31 * curl -O
     32 * tar xvf transmission-1.61.tar.bz2
     34Download the following patch [wiki:BuildingTransmissionQtWindows/transmission-1.61-Qt-build.diff]
     38 * cd transmission-1.61
     39 * patch -p1 < transmission-1.61-Qt-build.diff
     40 * mingw32-configure --disable-nls --disable-cli --disable-shared --disable-gtk --disable-daemon
     41 * make CFLAGS="-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -DSTATICLIB"
     42 * make install
     44== Build Transmission Qt ==
     46 * cd qt
     47 * export QMAKESPEC=fedora-win32-cross
     48 * export PKG_CONFIG_LIBDIR=/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig
     49 * qmake-qt4 -win32
     50 * perl -pi -e 's/-fno-rtti//' Makefile.Debug Makefile.Release
     51 * make clean &&  make release
     52 * i686-pc-mingw32-g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug/qtr.exe object_script.qtr.Debug  -L"/usr/i686-pc-mingw32/sys-root/mingw/lib" -lmingw32 -lqtmaind debug/qtr_resource_res.o ../libtransmission/libtransmission.a ../third-party/miniupnp/libminiupnp.a ../third-party/libnatpmp/libnatpmp.a ../third-party/libevent/.libs/libevent.a -L/usr/i686-pc-mingw32/sys-root/mingw/lib -lfontconfig -L/usr/i686-pc-mingw32/sys-root/mingw/lib -lcurl -L/usr/i686-pc-mingw32/sys-root/mingw/lib -lssl -lcrypto -lwsock32 -lws2_32 -lgdi32 -lz -lQtGuid4 -lQtNetworkd4 -lQtCored4 -lintl
     53 * INSTALL_ROOT=/usr/i686-pc-mingw32/sys-root/mingw make release-install
     55Note: after 'make release' everything is compiled but linking fails, that's what the line after that does: links with the correct library names, and the two missing libraries.
     57== Make the Windows installer ==
     59I had to change the Fedora tool a little, make a backup of /usr/bin/nsiswrapper (i.e. cp /usr/bin/nsiswrapper /usr/bin/nsiswrapper.orig), then apply this patch [wiki:BuildingTransmissionQtWindows/nsiswrapper.diff]
     61Finally create the installer:
     63 * nsiswrapper --run --name "!QtTransmission" --outfile QTransmission-1.61_installer.exe --installdir 'C:\Program Files\Transmission-1.61' /usr/i686-pc-mingw32/sys-root/mingw/bin/qtr.exe
     65That'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, a floppy if enabled on the VM.