Changes between Version 4 and Version 5 of BuildingTransmissionQtWindows


Ignore:
Timestamp:
Jun 7, 2009, 1:30:32 AM (13 years ago)
Author:
rb07
Comment:

Changed to T 1.70

Legend:

Unmodified
Added
Removed
Modified
  • BuildingTransmissionQtWindows

    v4 v5  
    1414Once you have it, log in, su to root, and install the cross-development tools:
    1515
    16  * Create the file /etc/yum.repos.d/mingw.repo with:
     16 * Create the file /etc/yum.repos.d/mingw.repo running:
    1717{{{
    18 [mingw]
    19 name=Fedora Windows cross-compiler, libraries and tools
     18echo "[mingw]
     19name=Fedora Windows cross-compiler, libraries, and tools.
    2020baseurl=http://homes.merjis.com/~rich/mingw/fedora-rawhide/x86_64/
    2121enabled=1
    2222gpgcheck=0
     23" > /etc/yum.repos.d/mingw.repo
    2324}}}
    2425 * yum install mingw32-gcc mingw32-gtk2 mingw32-crossreport mingw32-nsiswrapper wine
     
    3435== Building Transmission library ==
    3536 
    36 For MinGW replace mingw32-configure with ./configure, qmake-qt4 with qmake, and i686-pc-mingw32-g++ with g++.
     37For native MinGW replace mingw32-configure with ./configure, qmake-qt4 with qmake, and i686-pc-mingw32-g++ with g++.
    3738
    3839Start by downloading and installing the source in your workspace:
    3940
    40  * curl http://download.m0k.org/transmission/files/transmission-1.61.tar.bz2 -O
    41  * tar xvf transmission-1.61.tar.bz2
     41 * curl http://download.m0k.org/transmission/files/transmission-1.70.tar.bz2 -O
     42 * tar xvf transmission-1.70.tar.bz2
    4243
    43 Download the following patch [wiki:BuildingTransmissionQtWindows/transmission-1.61-Qt-build.diff]
     44We are using a couple of patches [wiki:BuildingTransmissionQtWindows/transmission-1.70-Qt-build.diff] and [wiki:BuildingTransmissionQtWindows/nsiswrapper.diff]; the download is done as one of the steps below.
    4445
    4546Then:
    4647 
    47  * cd transmission-1.61
    48  * patch -p1 < transmission-1.61-Qt-build.diff
    49  * mingw32-configure --disable-nls --disable-cli --disable-shared --disable-gtk --disable-daemon
     48 * cd transmission-1.70
     49 * curl "!http://trac.transmissionbt.com/wiki/BuildingTransmissionQtWindows/transmission-1.70-Qt-build.diff?format=txt" -O transmission-1.70-Qt-build.diff
     50 * patch -p1 < transmission-1.70-Qt-build.diff
     51 * mingw32-configure --disable-nls --disable-largefile --disable-cli --disable-gtk
    5052 * make CFLAGS="-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -DSTATICLIB"
    5153 * make install
     
    5961 * perl -pi -e 's/-fno-rtti//' Makefile.Debug Makefile.Release
    6062 * make clean &&  make release
    61  * 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 -lQtGui4 -lQtNetwork4 -lQtCore4 -lintl
     63 * i686-pc-mingw32-g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o release/qtr.exe object_script.qtr.Release  -L"/usr/i686-pc-mingw32/sys-root/mingw/lib" -lmingw32 -lqtmain release/qtr_resource_res.o ../libtransmission/libtransmission.a -Wl,-Bstatic -L../third-party/libevent/.libs -levent -Wl,-Bdynamic ../third-party/dht/libdht.a ../third-party/miniupnp/libminiupnp.a ../third-party/libnatpmp/libnatpmp.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 -lgdi32 -lz -lQtGui4 -lQtNetwork4 -lQtCore4 -lws2_32
    6264 * INSTALL_ROOT=/usr/i686-pc-mingw32/sys-root/mingw make release-install
    6365
    64 Note: 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.
     66Note: 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 missing libraries.
    6567
    6668== Make the Windows installer ==
    6769
    68 I 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]   Also, since this tool searches in a case sensitive way, it complains about dependencies that it doesn't find... I had to make a little workaround by linking the Qt libraries like this: 'ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/QtCore4.dll /usr/i686-pc-mingw32/sys-root/mingw/bin/qtcore4.dll'; do the same for !QtGui4.dll and !QtNetwork4.dll .
     70I had to change the Fedora tool a little and I sent the patch to them, perhaps there is no longer a need for the first 3 steps, the last 3 are to correct that the tool searches in a case sensitive way:
     71
     72 * cp /usr/bin/nsiswrapper /usr/bin/nsiswrapper.orig
     73 * curl "!http://trac.transmissionbt.com/wiki/BuildingTransmissionQtWindows/nsiswrapper.diff?format=txt" -O nsiswrapper.diff
     74 * patch < nsiswrapper.diff
     75 * ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/QtCore4.dll    /usr/i686-pc-mingw32/sys-root/mingw/bin/qtcore4.dll
     76 * ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/QtGui4.dll     /usr/i686-pc-mingw32/sys-root/mingw/bin/qtgui4.dll
     77 * ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/QtNetwork4.dll /usr/i686-pc-mingw32/sys-root/mingw/bin/qtnetwork4.dll
    6978
    7079Finally create the installer:
    7180
    72  * 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
     81 * nsiswrapper --run --name "!QtTransmission" --outfile !QtTransmission-1.70_installer.exe --installdir 'C:\Program Files\Transmission-1.70' /usr/i686-pc-mingw32/sys-root/mingw/bin/qtr.exe
    7382
    7483That'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.
    7584
    7685----
     86== Comments ==