From 89c05dfe33f9542e60e66dd383f7a514849b5947 Mon Sep 17 00:00:00 2001 From: Friedrich Beckmann Date: Fri, 31 Dec 2021 18:40:43 +0100 Subject: [PATCH] windows cross build: Add example build instructions in documentation I added a description of the required steps to do a windows cross build. --- INSTALL | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/INSTALL b/INSTALL index 252dc6f5ca..ff46f98eb5 100644 --- a/INSTALL +++ b/INSTALL @@ -222,6 +222,43 @@ will need not only the dependent libraries for your target, but also for the build machine. This is because the native version is used to create examples for the user manual. +To do a windows cross compilation on a debian build machine, the mingw64 +cross build system can be used. First you have to install the build +dependencies with + +sudo apt install -y build-essential python3 perl texinfo texlive \ + libgsl-dev libgtk-3-dev libgtksourceview-3.0-dev \ + pkg-config gperf git zip curl autoconf libtool \ + gettext libreadline-dev appstream \ + mingw-w64 meson ninja-build \ + imagemagick wget nsis texlive-plain-generic + +To build windows 64bit installers from the latest nightly do the following steps + +mkdir sandbox +sandboxdir=`pwd`/sandbox +curl -o pspp.tgz https://benpfaff.org/~blp/pspp-master/latest-source.tar.gz +tar -xzf pspp.tgz +./pspp-/Windows/build-dependencies --arch=x86_64-w64-mingw32 --sandbox=$sandboxdir +mkdir build +cd build +../pspp-/configure --host="x86_64-w64-mingw32" \ + CPPFLAGS="-I$sandboxdir/Install/include" \ + LDFLAGS="-L$sandboxdir/Install/lib" \ + PKG_CONFIG_LIBDIR="$sandboxdir/Install/lib/pkgconfig" \ + --prefix=$sandboxdir/psppinst \ + --enable-relocatable +make -j4 +make install +make install-html +make install-pdf +make Windows/installers + +The windows installers are then available in the build/Windows directory. Note that +building via mingw64-configure/make does not work because some example outputs for the +documentation are created during the build process. That requires a native version also +during the cross compile build which does not work with mingw64-configure. + See "Defining Variables", below, for more details. Installation Names -- 2.30.2