User Tools

Site Tools


compilingwithmingw

This is an old revision of the document!


Compiling with MinGW

To compile yourself:

  1. Download Qt development kit, cmake and install; install Qt with the supplied MinGW into C:\MinGW
  2. Download and install Git for Windows
  3. Download the pre-compiled dependencies and extract them into the MinGW-root created by Qt-Installation (C:\MinGW)
  4. Get the current sources (from git)
  5. run qmake -r in main directory
  6. run 'make' at the same location

Alternatively to running qmake -r and make manually, you might also want to build the project using 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:

  1. Obtain Qt runtime libs (if you don't already have them installed: these two dlls should be enough: qtdllpack.zip with QtGui4.dll and QtCore4.dll).
  2. Obtain precompiled lib bundle, extract to some dir in you Windows search path or in the same directory as the main executable.
  3. Obtain the QHiMDTransfer and himdtest executable

Pre-Compiled dependencies

Download everything and extract into your mingw root. It usually is C:\MinGW. 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 Qt development kit for Windows. Additionally, you need CMake

runtime development files
libmad (compiled by us) libmad-runtime.ziplibmad-devel.zip
libmcrypt (compiled by us) libmcrypt-runtime.ziplibmcrypt-devel.zip
glib (official release for mingw) glib_2.20.1-1_win32.zipglib-dev_2.20.1-1_win32.zip
gettext (release for mingw, offered by the gnome project) gettext-runtime-0.17-1.zipgettext-runtime-dev-0.17-1.zip
pkg-config (release for mingw, offered by the gnome project) pkg-config-0.23-2.zip
sox libraries(static) sox-devel.zip

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.

  1. Get libmad-0.15.1b.tar.gz, local copy at libmad-0.15.1b.tar.gz for GPL reasons (I am distributing a binary)
  2. 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.

  1. Get libmcrypt-2.5.8.tar.bz2 via Sourceforge Download system, local copy at libmcrypt-2.5.8.tar.bz2 for GPL reasons (I am distributing a binary)
  2. 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.

  1. Get sox-14.2.0.tar.gz via Sourceforge Download system, local copy at sox-14.2.0.tar.gz for GPL reasons (I am distributing a binary)
  2. 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
compilingwithmingw.1243903379.txt.gz · Last modified: 2009/06/02 00:42 by megadiscman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki