@@ -13,6 +13,7 @@ There are different ways to install Borg:
1313 that comes bundled with all dependencies.
1414- :ref: `source-install `, either:
1515
16+ - :ref: `windows-binary ` - builds a binary file for Windows using MSYS2.
1617 - :ref: `pip-installation ` - installing a source package with pip needs
1718 more installation steps and requires all dependencies with
1819 development headers and a compiler.
@@ -294,6 +295,20 @@ and commands to make FUSE work for using the mount command.
294295 kldload fuse
295296 sysctl vfs.usermount=1
296297
298+ .. _windows_deps :
299+
300+ Windows
301+ +++++++
302+
303+ .. note ::
304+ Running under Windows is experimental.
305+
306+ .. warning ::
307+ This script needs to be run in the UCRT64 environment in MSYS2.
308+
309+ Install the dependencies with the provided script::
310+
311+ ./scripts/msys2-install-deps
297312
298313Windows 10's Linux Subsystem
299314++++++++++++++++++++++++++++
@@ -318,6 +333,27 @@ Use the Cygwin installer to install the dependencies::
318333 binutils gcc-g++ git make openssh
319334
320335
336+ .. _windows-binary :
337+
338+ Building a binary on Windows
339+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
340+
341+ .. note ::
342+ This is experimental.
343+
344+ .. warning ::
345+ This needs to be run in the UCRT64 environment in MSYS2.
346+
347+ Ensure to install the dependencies as described within :ref: `Dependencies: Windows <windows_deps >`.
348+
349+ ::
350+
351+ export SETUPTOOLS_USE_DISTUTILS=stdlib # Needed for pip to work - https://www.msys2.org/docs/python/#known-issues
352+ pip install -e .
353+ pyinstaller -y scripts/borg.exe.spec
354+
355+ A standalone executable will be created in ``dist/borg.exe ``.
356+
321357.. _pip-installation :
322358
323359Using pip
0 commit comments