|
1 | 1 | WINDOWS BUILD NOTES
|
2 | 2 | ====================
|
3 | 3 |
|
4 |
| -Some notes on how to build Bitcoin Core for Windows. |
| 4 | +Below are some notes on how to build Bitcoin Core for Windows. |
5 | 5 |
|
6 | 6 | Most developers use cross-compilation from Ubuntu to build executables for
|
7 | 7 | Windows. This is also used to build the release binaries.
|
8 | 8 |
|
9 |
| -Building on Windows itself is possible (for example using msys / mingw-w64), |
10 |
| -but no one documented the steps to do this. If you are doing this, please contribute them. |
| 9 | +While there are potentially a number of ways to build on Windows (for example using msys / mingw-w64), |
| 10 | +using the Windows Subsystem For Linux is the most straight forward. If you are building with |
| 11 | +an alternative method, please contribute the instructions here for others who are running versions |
| 12 | +of Windows that are not compatible with the Windows Subsystem for Linux. |
| 13 | + |
| 14 | +Compiling with the Windows Subsystem For Linux |
| 15 | +------------------- |
| 16 | + |
| 17 | +With Windows 10, Microsoft has released a new feature named the |
| 18 | +[Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about). This feature allows you to run a bash shell directly on Windows in an Ubuntu based |
| 19 | +environment. Within this environment you can cross compile for Windows without the need for a separate Linux VM or Server. |
| 20 | + |
| 21 | +This feature is not supported in versions of Windows prior to Windows 10 or on Windows Server SKUs. |
| 22 | + |
| 23 | +To get the bash shell, you must first activate the feature in Windows. |
| 24 | + |
| 25 | +1. Turn on Developer Mode |
| 26 | + * Open Settings -> Update and Security -> For developers |
| 27 | + * Select the Developer Mode radio button |
| 28 | + * Restart if necessary |
| 29 | +2. Enable the Windows Subsystem for Linux feature |
| 30 | + * From Start, search for "Turn Windows features on or off" (type 'turn') |
| 31 | + * Select Windows Subsystem for Linux (beta) |
| 32 | + * Click OK |
| 33 | + * Restart if necessary |
| 34 | +3. Complete Installation |
| 35 | + * Open a cmd prompt and type "bash" |
| 36 | + * Accept the license |
| 37 | + * Create a new UNIX user account (this is a separate account from your Windows account) |
| 38 | + |
| 39 | +After the bash shell is active, you can follow the instructions below for Windows 64-bit Cross-compilation. |
| 40 | +When building dependencies within the 'depends' folder, you may encounter an error building |
| 41 | +the protobuf dependency. If this occurs, re-run the command with sudo. This is likely |
| 42 | +a bug with the Windows Subsystem for Linux feature and may be fixed with a future update. |
11 | 43 |
|
12 | 44 | Cross-compilation
|
13 | 45 | -------------------
|
@@ -41,4 +73,3 @@ To build executables for Windows 64-bit:
|
41 | 73 | make
|
42 | 74 |
|
43 | 75 | For further documentation on the depends system see [README.md](../depends/README.md) in the depends directory.
|
44 |
| - |
|
0 commit comments