From 4501a6ba440c319cf42918ac5faf33b343dafed4 Mon Sep 17 00:00:00 2001 From: Itay Cohen Date: Thu, 18 Feb 2021 16:35:53 +0200 Subject: [PATCH] Update Windows building instructions (#2590) --- docs/source/building.rst | 48 +++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/docs/source/building.rst b/docs/source/building.rst index c53a0bbc..7dd86ba2 100644 --- a/docs/source/building.rst +++ b/docs/source/building.rst @@ -113,30 +113,52 @@ Requirements Cutter works on Windows 7 or newer. To compile Cutter it is necessary to have the following installed: -* A version of Visual Studio (2015, 2017 and 2019 are supported) -* CMake -* Qt +* A version of `Visual Studio `_ (2015, 2017 and 2019 are supported) +* `CMake `_ +* `Qt 5 `_ +* `Meson `_ +* `Ninja `_ -Recommended Way +Building Steps ~~~~~~~~~~~~~~~ To build Cutter on Windows machines using CMake, you will have to make sure that the executables are available in your ``%PATH%`` environment variable. +You can check if the binaries are available by opening PowerShell and +executing the following commands. + +.. code:: powershell + + ninja --version + meson --version + cmake --version + +If they are not available, you can use PowerShell to add them to your PATH one by one: + +.. code:: powershell + + $Env:Path += ";C:\enter\path\here" + + Note that the paths below may vary depending on your version of Qt and Visual Studio. -.. code:: batch +.. code:: powershell + + # First, set CMAKE_PREFIX_PATH to Qt5 intallation prefix + $Env:CMAKE_PREFIX_PATH = "C:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5" - set CMAKE_PREFIX_PATH=c:\Qt\qt-5.6.2-msvc2013-x86\5.6\msvc2013\lib\cmake - mkdir build - cd build - cmake-gui .. + # Then, add the following directory to your PATH + $Env:Path += ";C:\Qt\5.15.2\msvc2019_64\bin" + + # Build Cutter + cmake -B build -DCUTTER_USE_BUNDLED_RIZIN=ON + cmake --build build + + +After the compilation completes, the ``cutter.exe`` binary will be available in ``.\build\Debug\cutter.exe``. -Click ``Configure`` and select your version of Visual Studio from the list, -for example ``Visual Studio 14 2015``. -After the configuration is done, click ``Generate`` and you can open -``Cutter.sln`` to compile the code as usual. Building on macOS