README.Windows: Make this also a markdown file

This commit is contained in:
Sebastian Schuberth 2015-05-08 12:36:38 +02:00
parent 1752f977c7
commit f25d9293de

View File

@ -13,10 +13,9 @@ the new C++11 standard that even the newest C++ compilers from
Microsoft simply don't support. Therefore the old project files that Microsoft simply don't support. Therefore the old project files that
enabled building with Visual Studio 8 or newer were removed. enabled building with Visual Studio 8 or newer were removed.
Section 1 -- Building with a mingw cross compiler # 1. Building with a mingw cross compiler
-------------------------------------------------
1.1. Preparations ## 1.1. Preparations
You will need: You will need:
@ -24,8 +23,8 @@ You will need:
- roughly 2 GB of free space available - roughly 2 GB of free space available
Earlier versions of this document described in painful details how to Earlier versions of this document described in painful details how to
build each library. Luckily there's the "mingw-cross-env" project at build each library. Luckily there's the [mingw-cross-env project]
http://mingw-cross-env.nongnu.org/ that provides an easy-to-use way of (http://mingw-cross-env.nongnu.org/) that provides an easy-to-use way of
setting up everything we need. setting up everything we need.
Unfortunately current versions of mingw-cross-env use a compiler Unfortunately current versions of mingw-cross-env use a compiler
@ -33,74 +32,74 @@ version that is known to cause issues upon runtime. Therefore the
author maintains his own fork that is known to work. In order to author maintains his own fork that is known to work. In order to
retrieve that fork you need `git`. Then to the following: retrieve that fork you need `git`. Then to the following:
git clone https://github.com/mbunkus/mxe $HOME/mingw-cross-env git clone https://github.com/mbunkus/mxe $HOME/mingw-cross-env
The rest of this guide assumes that you've unpacked mingw-cross-env The rest of this guide assumes that you've unpacked mingw-cross-env
into the directory $HOME/mingw-cross-env. into the directory `$HOME/mingw-cross-env`.
1.2. Automatic build script ## 1.2. Automatic build script
mkvtoolnix contains a script that can download, compile and install mkvtoolnix contains a script that can download, compile and install
all required libraries into the directory $HOME/mingw-cross-env. all required libraries into the directory `$HOME/mingw-cross-env`.
If the script does not work or you want to do everything yourself If the script does not work or you want to do everything yourself
you'll find instructions for manual compilation in section 1.3. you'll find instructions for manual compilation in section 1.3.
1.2.1. Script configuration ### 1.2.1. Script configuration
The script is called winbuild/setup_cross_compilation_env.sh. It The script is called `winbuild/setup_cross_compilation_env.sh`. It
contains the following variables that can be adjusted to fit your contains the following variables that can be adjusted to fit your
needs: needs:
TARGET=i686-pc-mingw32 TARGET=i686-pc-mingw32
The target specification for the standard configure scripts. The target specification for the standard configure scripts.
INSTALL_DIR=$HOME/mingw-cross-env INSTALL_DIR=$HOME/mingw-cross-env
Base installation directory Base installation directory
PARALLEL= PARALLEL=
Number of processes to execute in parallel. Will be set to the number Number of processes to execute in parallel. Will be set to the number
of cores available if left empty. of cores available if left empty.
1.2.2. Execution ### 1.2.2. Execution
From the mkvtoolnix source directory run: From the mkvtoolnix source directory run:
./winbuild/setup_cross_compilation_env.sh ./winbuild/setup_cross_compilation_env.sh
If everything works fine you'll end up with a configured mkvtoolnix If everything works fine you'll end up with a configured mkvtoolnix
source tree. You just have to run 'drake' afterwards. source tree. You just have to run `drake` afterwards.
1.3. Manual installation ## 1.3. Manual installation
First you will need the mingw-cross-env build scripts. Get them by First you will need the mingw-cross-env build scripts. Get them by
downloading them (see above) and unpacking them into downloading them (see above) and unpacking them into
$HOME/mingw-cross-env. `$HOME/mingw-cross-env`.
Next, build the required libraries: Next, build the required libraries:
cd $HOME/mingw-cross-env cd $HOME/mingw-cross-env
make gcc w32api mingwrt gettext boost bzip2 curl file flac libiconv \ make gcc w32api mingwrt gettext boost bzip2 curl file flac libiconv \
lzo ogg pthreads vorbis wxwidgets zlib lzo ogg pthreads vorbis wxwidgets zlib
Append the installation directory to your PATH variable: Append the installation directory to your `PATH` variable:
export PATH=$PATH:$HOME/mingw-cross-env/usr/bin export PATH=$PATH:$HOME/mingw-cross-env/usr/bin
hash -r hash -r
Finally, configure mkvtoolnix: Finally, configure mkvtoolnix:
cd $HOME/path/to/mkvtoolnix-source cd $HOME/path/to/mkvtoolnix-source
./configure \ ./configure \
--host=i686-pc-mingw32 \ --host=i686-pc-mingw32 \
--with-boost=$HOME/mingw-cross-env/usr/i686-pc-mingw32 \ --with-boost=$HOME/mingw-cross-env/usr/i686-pc-mingw32 \
--with-wx-config=$HOME/mingw-cross-env/usr/bin/i686-pc-mingw32-wx-config --with-wx-config=$HOME/mingw-cross-env/usr/bin/i686-pc-mingw32-wx-config
If everything works then build it: If everything works then build it:
./drake ./drake
You're done. You're done.