From 78d6c2f331dae8a13d0924e86408058d0a9cc822 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Sun, 8 May 2016 14:30:09 +0200 Subject: [PATCH] Describe cross-compilation with MXE MXE is really a great project: It provides a cross-compilation environment for compiling windows binaries using mingw from any unix system, and includes lots of prepackaged libraries. The latter distinguishes it from the mingw cross-compilers packaged with some linux distros such as debian. I was even able to run the resulting lyx.exe using wine! --- INSTALL.Win32 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/INSTALL.Win32 b/INSTALL.Win32 index abd3601d50..1cc9928216 100644 --- a/INSTALL.Win32 +++ b/INSTALL.Win32 @@ -121,3 +121,31 @@ Compiling with GCC with MinGW64 + MSYS2 Environment using autotools make make install + +Cross-Compiling on unix with MXE using autotools +================================================= +1 Install MXE: http://mxe.cc + You can either install from sources, the generic .tar binaries or debian .deb packages. + Installing the following .deb packages will drag in all needed dependencies: + mxe-x86-64-w64-mingw32.shared-file + mxe-x86-64-w64-mingw32.shared-gcc + mxe-x86-64-w64-mingw32.shared-libiconv + mxe-x86-64-w64-mingw32.shared-qtimageformats + mxe-x86-64-w64-mingw32.shared-qtsvg + mxe-x86-64-w64-mingw32.shared-qtwinextras + Of course you can also use the static and/or 32bit versions. +2 Run the standard autotools install (Adapt paths and arguments accordingly) + ./autogen.sh + mkdir builddir-mingw + cd builddir-mingw + PATH="/usr/lib/mxe/usr/bin:$PATH" ../configure --host=x86-64-w64-mingw32.shared --with-qt-dir=/usr/lib/mxe/usr/x86_64-w64-mingw32.shared/qt5 --enable-qt5 --with-included-boost --with-included-hunspell --with-included-mythes --disable-debug --enable-optimization --prefix=/mingw64 + PATH="/usr/lib/mxe/usr/bin:$PATH" make + PATH="/usr/lib/mxe/usr/bin:$PATH" DESTDIR=/tmp/lyxinstall make install + This uses the paths from the 64bit shared MXE version installed from .deb packages. +3 If you want to run the resulting lyx.exe from the build directory using wine, + create symlinks for all needed .dlls: + cd builddir-mingw/src + ln -s /usr/lib/mxe/usr/x86_64-w64-mingw32.shared/bin/*.dll . + ln -s /usr/lib/mxe/usr/x86_64-w64-mingw32.shared/qt5/bin/*.dll . + wine64 lyx.exe +