From 939434da7599aea165836cbb577f2039ceade84c Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:30:11 +0100 Subject: [PATCH] cmake, doc: Update `build-windows-mingw.md` --- doc/build-windows-mingw.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/build-windows-mingw.md b/doc/build-windows-mingw.md index 19fc7ff209182..40897316a4f5c 100644 --- a/doc/build-windows-mingw.md +++ b/doc/build-windows-mingw.md @@ -29,7 +29,7 @@ First, install the general dependencies: sudo apt update sudo apt upgrade - sudo apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git + sudo apt install build-essential cmake libtool autotools-dev automake pkg-config bsdmainutils curl git A host toolchain (`build-essential`) is necessary because some dependency packages need to build host utilities that are used in the build process. @@ -60,7 +60,7 @@ example /usr/src/bitcoin, AND not under /mnt/d/. If this is not the case the dep This means you cannot use a directory that is located directly on the host Windows file system to perform the build. Additional WSL Note: WSL support for [launching Win32 applications](https://learn.microsoft.com/en-us/archive/blogs/wsl/windows-and-ubuntu-interoperability#launching-win32-applications-from-within-wsl) -results in `Autoconf` configure scripts being able to execute Windows Portable Executable files. This can cause +results in configure scripts being able to execute Windows Portable Executable files. This can cause unexpected behaviour during the build, such as Win32 error dialogs for missing libraries. The recommended approach is to temporarily disable WSL support for Win32 applications. @@ -71,9 +71,8 @@ Build using: cd depends make HOST=x86_64-w64-mingw32 cd .. - ./autogen.sh - CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/ - make # use "-j N" for N parallel jobs + cmake -B build --toolchain depends/x86_64-w64-mingw32/toolchain.cmake + cmake --build build # use "-j N" for N parallel jobs sudo bash -c "echo 1 > /proc/sys/fs/binfmt_misc/status" # Enable WSL support for Win32 applications. ## Depends system @@ -88,8 +87,8 @@ executables to a directory on the Windows drive in the same directory structure as they appear in the release `.zip` archive. This can be done in the following way. This will install to `c:\workspace\bitcoin`, for example: - make install DESTDIR=/mnt/c/workspace/bitcoin + cmake --install build --prefix /mnt/c/workspace/bitcoin You can also create an installer using: - make deploy + cmake --build build --target deploy