From 401519531426abe6d4795bd84611f32400227498 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 20 Feb 2017 20:59:37 +0100 Subject: [PATCH] doc/user: instructions to compile the Windows binary --- doc/user.xml | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/doc/user.xml b/doc/user.xml index 8f4c9e77b..865369c23 100644 --- a/doc/user.xml +++ b/doc/user.xml @@ -135,6 +135,91 @@ apt-get install g++ \ make install + +
+ Compiling for Windows + + + Even though it does not "feel" like a Windows application, + MPD works well under Windows. + Its build process follows the "Linux style", and may seem + awkward for Windows people (who are not used to compiling + their software, anyway). + + + + Basically, there are three ways to compile + MPD for Windows: + + + + + + Build on Windows for Windows. All you need to do is + described above already: configure and make. + + + + For Windows users, this is kind of unusual, because few + Windows users have a GNU toolchain and a UNIX shell + installed. + + + + + + Build on Linux for Windows. This is described above + already: configure and make. You need the mingw-w64 + cross compiler. Pass + --host=i686-w64-mingw32 (32 bit) + or --host=x86_64-w64-mingw32 (64 + bit) to configure. + + + + This is somewhat natural for Linux users. Many + distributions have mingw-w64 + packages. The remaining difficulty here is installing + all the external libraries. And + MPD usually needs many, + making this method cumbersome for the casual user. + + + + + + Build on Linux for Windows using the + MPD's library build script. + + + + + + This section is about the latter. + + + + Just like with the native build, unpack the + MPD source tarball and change + into the directory. Then, instead of + ./configure, type: + + + ./win32/build.py --64 + + + This downloads various library sources, and then configures + and builds MPD (for x64; to build + a 32 bit binary, pass --32). The + resulting EXE files is linked statically, i.e. it contains + all the libraries already, and you do not need carry DLLs + around. It is large, but easy to use. If you wish to have + a small mpd.exe with DLLs, you need to + compile manually, without the build.py + script. + +