Skip to content

Commit

Permalink
fixup! doc: Update for CMake-based build system
Browse files Browse the repository at this point in the history
Avoid unnecessarily breaking external links to `doc/build-windows.md`.
  • Loading branch information
hebasto committed Jul 25, 2024
1 parent 79b5464 commit 6dd0d19
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build_msvc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To build Bitcoin Core from the command-line, it is sufficient to only install th

The "Desktop development with C++" workload must be installed as well.

Building with Visual Studio is an alternative to the Linux based [cross-compiler build](../doc/build-windows-mingw.md).
Building with Visual Studio is an alternative to the Linux based [cross-compiler build](../doc/build-windows.md).


Prerequisites
Expand Down
2 changes: 1 addition & 1 deletion depends/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ For more information, see [SDK Extraction](../contrib/macdeploy/README.md#sdk-ex

#### For Win64 cross compilation

- see [build-windows-mingw.md](../doc/build-windows-mingw.md#cross-compilation-for-ubuntu-and-windows-subsystem-for-linux)
- see [build-windows.md](../doc/build-windows.md#cross-compilation-for-ubuntu-and-windows-subsystem-for-linux)

#### For linux (including i386, ARM) cross compilation

Expand Down
2 changes: 1 addition & 1 deletion doc/build-windows-msvc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This guide describes how to build bitcoind, command-line utilities, and GUI on Windows using Micsrosoft Visual Studio.

For cross-compiling options, please see [`build-windows-mingw.md`](./build-windows-mingw.md).
For cross-compiling options, please see [`build-windows.md`](./build-windows.md).

## Preparation

Expand Down
15 changes: 8 additions & 7 deletions doc/build-windows-mingw.md → doc/build-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The options known to work for building Bitcoin Core on Windows are:

* On Linux, using the [Mingw-w64](https://www.mingw-w64.org/) cross compiler tool chain.
* On Windows, using [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/about) and Mingw-w64.
* On Windows, using [Microsoft Visual Studio](https://visualstudio.microsoft.com). See [`build-windows-msvc.md`](./build-windows-msvc.md).
* On Windows, using [Microsoft Visual Studio](https://visualstudio.microsoft.com). See [README.md](/build_msvc/README.md).

Other options which may work, but which have not been extensively tested are (please contribute instructions):

Expand All @@ -29,7 +29,7 @@ First, install the general dependencies:

sudo apt update
sudo apt upgrade
sudo apt install build-essential cmake libtool autotools-dev automake pkg-config bsdmainutils curl git
sudo apt install build-essential 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.
Expand Down Expand Up @@ -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 configure scripts being able to execute Windows Portable Executable files. This can cause
results in `Autoconf` 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.

Expand All @@ -71,8 +71,9 @@ Build using:
cd depends
make HOST=x86_64-w64-mingw32
cd ..
cmake -B build --toolchain depends/x86_64-w64-mingw32/toolchain.cmake
cmake --build build # use "-j N" for N parallel jobs
./autogen.sh
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/
make # 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
Expand All @@ -87,8 +88,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:

cmake --install build --prefix /mnt/c/workspace/bitcoin
make install DESTDIR=/mnt/c/workspace/bitcoin

You can also create an installer using:

cmake --build build --target deploy
make deploy

0 comments on commit 6dd0d19

Please sign in to comment.