====== Compiling with MinGW ====== To compile yourself: - Download [[http://qt.nokia.com/downloads|Qt development kit]] (choose "Go LGPL", then click on "Qt SDK for Windows") and install in a directory of your choice (default: C:\2010.xx.x , where 2010.xx.x is the version of your Qt installation) ; MinGW will be installed in Qt directory automatically - Add some paths to your environment variables: \bin;\qt\bin;\mingw\bin ( means the directory where Qt is installed, usually C:\2010.xx.x) - Download and install [[http://code.google.com/p/msysgit/|Git for Windows]] - Download the pre-compiled dependencies and extract them into the MinGW-root created by Qt-Installation - Get the current sources (from git) - run ''qmake -r'' in main directory (will build the debug configuration which is faster to build, but uses **big** dll files; use ''qmake -r CONFIG+=release'' for the release configuration) - run 'make' at the same location Alternatively to running ''qmake -r'' and ''make'' manually, you might also want to build the project using [[http://www.qtsoftware.com/products/developer-tools|Qt Creator by Qt Software]]. To do that, open the file ''himd.pro'' located in the root directory of the source tree. If you want to run the GUI QHiMDTransfer tool, make sure to choose the run configuration qhimdtransfer instead of himdtest. The latter will just exit with an error code if no command line parameters are provided. To test QHiMDTransfer: Download and install [[http://users.physik.fu-berlin.de/~glaubitz/linux-minidisc/qhimdtransfer-win.exe|QHiMDTransfer]] windows self installer. Updated EXE file (now with recorder autodetection!) at [[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/himd-executables.zip|zipped QHiMDTransfer.exe]], will be merged to the installer soon. ===== Pre-Compiled dependencies ===== Download everything and extract into your mingw root. It is ''\mingw'' ( means the directory where Qt is installed, usually C:\2010.xx.x). To run QHiMDTransfer, you just need the files from the runtime column. To compile QHiMDTransfer, you also need the development stuff. MinGW automatically gets installed if you install the [[http://www.qtsoftware.com/downloads|Qt development kit]] for Windows. ^ ^ runtime ^ development files ^ |libmad (compiled by us) |[[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/libmad-runtime.zip|libmad-runtime.zip]]|[[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/libmad-devel.zip|libmad-devel.zip]]| |libmcrypt (compiled by us) |[[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/libmcrypt-runtime.zip|libmcrypt-runtime.zip]]|[[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/libmcrypt-devel.zip|libmcrypt-devel.zip]]| |taglib (compiled by us) |[[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/taglib-runtime.zip|taglib-runtime.zip]]|[[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/taglib-devel.zip|taglib-devel.zip]]| |glib (official release for mingw) |[[http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.24/glib_2.24.1-1_win32.zip|glib_2.24.1-1_win32.zip]]|[[http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.24/glib-dev_2.24.1-1_win32.zip|glib-dev_2.24.1-1_win32.zip]]| |gettext (release for mingw, offered by the gnome project) |[[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-0.17-1.zip|gettext-runtime-0.17-1.zip]]|[[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-dev-0.17-1.zip|gettext-runtime-dev-0.17-1.zip]]| |pkg-config (release for mingw, offered by the gnome project)| |[[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip|pkg-config-0.23-3_win32.zip]]| |sox libraries(static)| |[[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/sox-devel.zip|sox-devel.zip]]| |zlib (official release) |[[http://gnuwin32.sourceforge.net/downlinks/zlib-bin-zip.php|zlib-bin.zip]]| [[http://gnuwin32.sourceforge.net/downlinks/zlib-lib-zip.php|zlib-lib.zip]]*| |libid3tag | | [[http://users.physik.fu-berlin.de/~glaubitz/linux-minidisc/libid3tag_mingw32.zip|libid3tag_mingw32.zip ]]| * Note: you need the zlib development files only for recompiling taglib, **not** for recompiling QHiMDTransfer ===== Rebuild instructions for GPL reasons ===== This stuff is not needed. It produces just the zip files linked above. The instructions shown should work on debian Linux. ==== Cross-compile libmad ==== Perform the following steps. - Get [[ftp://ftp.mars.org/pub/mpeg/libmad-0.15.1b.tar.gz|libmad-0.15.1b.tar.gz]], local copy at [[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/libmad-0.15.1b.tar.gz|libmad-0.15.1b.tar.gz]] for GPL reasons (I am distributing a binary) - Get [[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/libmad.patch|libmad.patch]] - In the directory both files were saved to, enter: tar -xvzf libmad-0.15.1b.tar.gz patch -p0 < libmad.patch cd libmad-0.15.1b autoconf touch -d '1/1/1970' configure.ac ./configure --host=i586-mingw32msvc --prefix=/ --disable-static make make DESTDIR=`pwd`/tmp install cd tmp i586-mingw32msvc-strip bin/libmad-0.dll mkdir manifest echo bin/libmad-0.dll manifest/libmad-runtime.mft > manifest/libmad-runtime.mft echo lib/libmad.* include/mad.h manifest/libmad-devel.mft > manifest/libmad-devel.mft zip ../../libmad-runtime.zip bin/libmad-0.dll manifest/libmad-runtime.mft zip ../../libmad-devel.zip lib/libmad.* include/mad.h manifest/libmad-devel.mft ==== Cross-compile libmcrypt ==== Perform the following steps. - Get [[http://sourceforge.net/project/downloading.php?group_id=87941&filename=libmcrypt-2.5.8.tar.bz2&a=57092632|libmcrypt-2.5.8.tar.bz2 via Sourceforge Download system]], local copy at [[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/libmcrypt-2.5.8.tar.bz2|libmcrypt-2.5.8.tar.bz2]] for GPL reasons (I am distributing a binary) - Get [[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/libmcrypt.patch|libmcrypt.patch]] - In the directory both files were saved to, enter: tar -xvjf libmcrypt-2.5.8.tar.bz2 patch -p0 < libmcrypt.patch cd libmcrypt-2.5.8 autoconf touch -d '1/1/1970' configure.in ./configure --host=i586-mingw32msvc --prefix=/ --disable-static make make DESTDIR=`pwd`/tmp install cd tmp i586-mingw32msvc-strip bin/libmcrypt-4.dll mkdir manifest echo bin/libmcrypt-4.dll manifest/libmcrypt-runtime.mft | tr ' ' '\n' > manifest/libmcrypt-runtime.mft echo bin/libmcrypt-config include/mcrypt.h include/mutils/mcrypt.h lib/libmcrypt* share/aclocal/libmcrypt.m4 share/man/man3/* manifest/libmcrypt-devel.mft | tr ' ' '\n' > manifest/libmcrypt-devel.mft zip ../../libmcrypt-devel.zip -@ < manifest/libmcrypt-devel.mft zip ../../libmcrypt-runtime.zip -@ < manifest/libmcrypt-runtime.mft ==== Cross-compile libsox ==== Perform the following steps. It will build a static (minimal) sox library. mad support is disabled, as it won't link with a dynamic mad library because limitations of the Windows executable file format that would need an annotation in the mad include file (so it is essentially a bug in our mad build). As sox is only used to write wave files, disabling mad is no problem. - Get [[http://sourceforge.net/project/downloading.php?group_id=10706&filename=sox-14.2.0.tar.gz&a=84518201|sox-14.2.0.tar.gz via Sourceforge Download system]], local copy at [[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/sox-14.2.0.tar.gz|sox-14.2.0.tar.gz]] for GPL reasons (I am distributing a binary) - In the directory both files were saved to, enter: tar -xvzf sox-14.2.0.tar.gz cd sox-14.2.0 ./configure --host=i586-mingw32msvc --prefix=/ --disable-symlinks --without-mad make make DESTDIR=`pwd`/tmp install cd tmp i586-mingw32msvc-strip --strip-unneeded lib/libsox.a mkdir manifest find lib -type f > manifest/sox-devel.mft echo include/* manifest/sox-devel.mft | tr ' ' '\n' >> manifest/sox-devel.mft zip ../../sox-devel.zip -@ < manifest/sox-devel.mft ==== Compile libtag in Windows (using MinGW) ==== This has been done manually, so there is no ready-made script for it. - Get the zlib development files (linked above) and put them into your MinGW path. - Get [[http://developer.kde.org/~wheeler/files/src/taglib-1.6.3.tar.gz|taglib-1.6.3.tar.gz]], local copy at [[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/taglib-1.6.3.tar.gz|taglib-1.6.3.tar.gz]] for GPL reasons (I am distributing a binary) - Apply this patch to the CMakeLists.txt to help cmake find zlib: [[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/taglib-cmake.diff|taglib-cmake.diff]] - run ''cmake -G "MinGW Makefiles"'' to create the Makefiles - run ''mingw32-make'' to build libtag - run ''mingw32-make install'' to install (default destination: ''%Program Files%\taglib'') - run ''strip'' on libtag.dll to reduce the size by removing debugging symbols - put libtag.dll into a zip file to obtain the "runtime" zip file linked above. - We don't need the C bindings, so you can remove ''lib\taglib_c.dll.a'', ''lib\pkgconfig\taglib_c.pc'', ''include\tag_c.h'' - Add the missing pkg-config file from [[http://users.physik.fu-berlin.de/~mkarcher/mingwstuff/taglib.pc|taglib.pc]] into ''lib\pkgconfig'' - pack the contents of ''include'' and ''lib'' to get ''taglib-devel.zip''