Преглед на файлове

[docs] update developer documentation for Conan v2

Andrey Filipenkov преди 1 месец
родител
ревизия
3ab8b449c7
променени са 4 файла, в които са добавени 170 реда и са изтрити 155 реда
  1. 33 19
      docs/developers/Building_Android.md
  2. 110 82
      docs/developers/Building_Windows.md
  3. 4 6
      docs/developers/Building_iOS.md
  4. 23 48
      docs/developers/Building_macOS.md

+ 33 - 19
docs/developers/Building_Android.md

@@ -1,19 +1,19 @@
 # Building Android
 
-The following instructions apply to **v1.2 and later**. For earlier versions the best documentation is <https://github.com/vcmi/vcmi-android/blob/master/building.txt> (and reading scripts in that repo), however very limited to no support will be provided from our side if you wish to go down that rabbit hole.
+The following instructions apply to **v1.7 and later**. For earlier versions see older Git revision, e.g. from [1.6.8 release](https://github.com/vcmi/vcmi/blob/1.6.8/docs/developers/Building_Android.md).
 
 *Note*: building has been tested only on Linux and macOS. It may or may not work on Windows out of the box.
 
 ## Requirements
 
-1. CMake 3.20+: download from your package manager or from <https://cmake.org/download/>
-2. JDK 11, not necessarily from Oracle
+1. CMake 3.26+: download from your package manager or from <https://cmake.org/download/>
+2. JDK 17, not necessarily from Oracle
 3. Android command line tools or Android Studio for your OS: <https://developer.android.com/studio/>
-4. Android NDK version **r25c (25.2.9519653)**, there're multiple ways to obtain it:
+4. Android NDK version **r25c (25.2.9519653)** (later version would also probably work), there're multiple ways to obtain it:
+    - recommended: download with Conan, especially if you're going to build VCMI dependencies from source, see [#NDK and Conan](#ndk-and-conan)
     - install with Android Studio
     - install with `sdkmanager` command line tool
     - download from <https://developer.android.com/ndk/downloads>
-    - download with Conan, see [#NDK and Conan](#ndk-and-conan)
 5. Optional:
     - Ninja: download from your package manager or from <https://github.com/ninja-build/ninja/releases>
     - Ccache: download from your package manager or from <https://github.com/ccache/ccache/releases>
@@ -32,15 +32,18 @@ We use Conan package manager to build/consume dependencies, find detailed usage
 
 On the step where you need to replace **PROFILE**, choose:
 
-- `android-32` to build for 32-bit architecture (armeabi-v7a)
-- `android-64` to build for 64-bit architecture (aarch64-v8a)
+- `android-32-ndk` to build for ARM 32-bit (armeabi-v7a)
+- `android-64-ndk` to build for ARM 64-bit (aarch64-v8a)
+- `android-x64-ndk` to build for Intel 64-bit (x86_64)
+
+Advanced users may choose profile without `-ndk` suffix to use NDK that's already installed in their system.
 
 ### NDK and Conan
 
-Conan must be aware of the NDK location when you execute `conan install`. There're multiple ways to achieve that as written in the [Conan docs](https://docs.conan.io/1/integrations/cross_platform/android.html):
+Conan must be aware of the NDK location when you execute `conan install`. There're multiple ways to achieve that as written in the [Conan docs](https://docs.conan.io/2/examples/cross_build/android/ndk.html#examples-cross-build-android-ndk):
 
-- the easiest is to download NDK from Conan (option 1 in the docs), then all the magic happens automatically. On the step where you need to replace **PROFILE**, choose *android-**X**-ndk* where ***X*** is either `32` or `64`.
-- to use an already installed NDK, you can simply pass it on the command line to `conan install`: (note that this will work only when consuming the pre-built binaries)
+- the easiest is to download NDK from Conan (option 1 in the docs), then all the magic happens automatically
+- to use an already installed NDK, you can simply pass it on the command line to `conan install`: (note that this will likely work only when consuming the prebuilt binaries)
 
 ```sh
 conan install -c tools.android:ndk_path=/path/to/ndk ...
@@ -48,37 +51,48 @@ conan install -c tools.android:ndk_path=/path/to/ndk ...
 
 ## Build process
 
+Before starting the build, local Gradle configuration must be created (it's a requirement for Qt 5):
+
+```sh
+mkdir ~/.gradle
+echo "android.bundle.enableUncompressedNativeLibs=true" > ~/.gradle/gradle.properties
+```
+
 Building for Android is a 2-step process. First, native C++ code is compiled to a shared library (unlike an executable on other platforms), then Java code is compiled to an actual executable which will be loading the native shared library at runtime.
 
-This is a traditional CMake project, you can build it from command line or some IDE. You're not required to pass any custom options (except Conan toolchain file), defaults are already good. If you wish to use your own CMake presets, inherit them from our `build-with-conan` preset.
+This is a traditional CMake project, you can build it from command line or some IDE. You're not required to pass any custom options (except Conan toolchain file), defaults are already good.
 
 The Java code (located in the `android` directory of the repo) will be built automatically after the native code using the `androiddeployqt` tool. But you must set `JAVA_HOME` and `ANDROID_HOME` environment variables.
 
-APK will appear in `<build dir>/android-build/vcmi-app/build/outputs/apk/debug` directory which you can then install to your device with `adb install -r /path/to/apk` (`adb` command is from Android command line tools).
+APK will appear in `<build dir>/android-build/vcmi-app/build/outputs/apk/<build configuration>` directory which you can then install to your device with `adb install -r /path/to/apk` (`adb` command is from Android command line tools).
 
 ### Example
 
 ```sh
 # the following environment variables must be set
-export JAVA_HOME=/path/to/jdk11
+export JAVA_HOME=/path/to/jdk17
 export ANDROID_HOME=/path/to/android/sdk
 
 cmake -S . -B ../build -G Ninja -D CMAKE_BUILD_TYPE=Debug -D ENABLE_CCACHE:BOOL=ON --toolchain ...
 cmake --build ../build
 ```
 
-You can also see a more detailed walkthrough on CMake configuration at [How to build VCMI (macOS)](./Building_macOS.md).
-
 ## Docker
 
 For developing it's also possible to use Docker to build android APK. The only requirement is to have Docker installed. The container image contains all the other prerequisites.
 
-To build using docker just open a terminal with `vcmi` as working directory.
+To build using docker just open a terminal with `vcmi` repo root as working directory.
 
 Build the image with (only needed once):
-`docker build -f docker/BuildAndroid-aarch64.dockerfile -t vcmi-android-build .`
+
+```sh
+docker build -f docker/BuildAndroid-aarch64.dockerfile -t vcmi-android-build .
+```
 
 After building the image you can compile vcmi with:
-`docker run -it --rm -v $PWD/:/vcmi vcmi-android-build`
 
-The current dockerfile is aarch64 only but can adjusted manually for armv7.
+```sh
+docker run -it --rm -v $PWD/:/vcmi vcmi-android-build
+```
+
+The current dockerfile is aarch64 only but can be easily adjusted for other architectures.

+ 110 - 82
docs/developers/Building_Windows.md

@@ -2,18 +2,17 @@
 
 ## Preparations
 
-Windows builds can be made in more than one way and with more than one tool. This guide focuses on the simplest building process using Microsoft Visual Studio 2022
+Windows builds can be made in more than one way and with more than one tool. This guide will show how to do it using Microsoft Visual Studio 2022 (MSVC compiler) and MSYS2 (MinGW compiler).
 
 ## Prerequisites
 
-- Windows Vista or newer.
-- [Microsoft Visual Studio](https://visualstudio.microsoft.com/downloads/)
-- Git or git GUI, for example, SourceTree [download link](http://www.sourcetreeapp.com/download)
-- CMake [download link](https://cmake.org/download/). During install after accepting license agreement make sure to check "Add CMake to the system PATH for all users".
-- To unpack pre-build Vcpkg: [7-zip](http://www.7-zip.org/download.html)
-- Optional:
-  - To create installer: [NSIS](http://nsis.sourceforge.net/Main_Page)
-  - To speed up recompilation: [CCache](https://github.com/ccache/ccache/releases)
+1. Windows 7 or newer
+2. [Microsoft Visual Studio](https://visualstudio.microsoft.com/downloads/)
+3. Git or git GUI, for example, SourceTree [download link](http://www.sourcetreeapp.com/download)
+4. CMake [download link](https://cmake.org/download/). During install after accepting license agreement make sure to check "Add CMake to the system PATH for all users". You can also install CMake from the Visual Studio Installer or from a package manager like [WinGet](https://github.com/microsoft/winget-cli).
+5. Optional:
+    - To create installer: [Inno Setup](https://jrsoftware.org/isinfo.php)
+    - To speed up recompilation: [CCache](https://github.com/ccache/ccache/releases)
 
 ### Choose an installation directory
 
@@ -34,92 +33,72 @@ Bad locations:
 
 ## Install VCMI dependencies
 
-You have two options: to use pre-built libraries or build your own. We strongly recommend start with using pre-built ones.
+This step is needed only for MSVC compiler. You can also find legacy Vcpkg instructions in the bottom of the document.
 
-### Option A. Use pre-built Vcpkg
+We use Conan package manager to build/consume dependencies, find detailed usage instructions [here](./Conan.md). Note that the link points to the state of the current branch, for the latest release check the same document in the [master branch](https://github.com/vcmi/vcmi/blob/master/docs/developers/Conan.md).
 
-#### Download and unpack archive
+On the step where you need to replace **PROFILE**, choose:
 
-Vcpkg Archives are available at our GitHub: <https://github.com/vcmi/vcmi-deps-windows/releases>
+- `msvc-x64` to build for Intel 64-bit (x64 / x86_64)
+- `msvc-arm64` to build for ARM 64-bit (arm64)
+- `msvc-x86` to build for Intel 32-bit (x86)
 
-- Download latest version available.
-EG: v1.6 assets - [vcpkg-export-x64-windows-v143.7z](https://github.com/vcmi/vcmi-deps-windows/releases/download/v1.6/vcpkg-export-x64-windows-v143.7z)  
-- Extract archive by right clicking on it and choosing "7-zip -> Extract Here".
+*Note*: we recommend using CMD (`cmd.exe`) for the next steps. If you absolutely want to use Powershell, then run `conan install` twice appending `-c tools.env.virtualenv:powershell=powershell.exe` on the second run.
 
-#### Move dependencies to target directory
-
-Once extracted, a `vcpkg` directory will appear with `installed` and `scripts` subfolders inside.
-Move extracted `vcpkg` directory into your `%VCMI_DIR%`
+## Install CCache
 
-### Option B. Build Vcpkg on your own
+Extract `ccache` to a folder of your choosing, add the folder to the `PATH` environment variable and log out and back in.
 
-Please be aware that if you're running 32-bit Windows version, then this is impossible due to <https://github.com/microsoft/vcpkg/issues/26036>
-Be aware that building Vcpkg might take a lot of time depend on your CPU model and 10-20GB of disk space.
+## Build VCMI
 
-#### Create initial directory
+### Clone VCMI repository
 
-#### Clone vcpkg
+#### From Git GUI
 
-1. open SourceTree
-2. File -\> Clone
-3. select **<https://github.com/microsoft/vcpkg/>** as source
-4. select **%VCMI_DIR%/vcpkg** as destination
-5. click **Clone**
+1. Open SourceTree
+2. File -> Clone
+3. Select `https://github.com/vcmi/vcmi/` as source
+4. Select `%VCMI_DIR%/source` as destination
+5. Expand Advanced Options and change Checkout Branch to `develop`
+6. Tick `Recursive submodules`
+7. Click Clone
 
-From command line use:
+#### From command line
 
 ```sh
-git clone https://github.com/microsoft/vcpkg.git %VCMI_DIR%/vcpkg
+git clone --recursive https://github.com/vcmi/vcmi.git %VCMI_DIR%/source
 ```
 
-#### Build vcpkg and dependencies
-
-- Run
-`%VCMI_DIR%/vcpkg/bootstrap-vcpkg.bat`
-- For 32-bit build run:
-`%VCMI_DIR%/vcpkg/vcpkg.exe install tbb:x64-windows fuzzylite:x64-windows sdl2:x64-windows sdl2-image:x64-windows sdl2-ttf:x64-windows sdl2-mixer[mpg123]:x64-windows boost:x64-windows qt5-base:x64-windows ffmpeg:x64-windows luajit:x64-windows`
-- For 64-bit build run:
-`%VCMI_DIR%/vcpkg/vcpkg.exe install install tbb:x86-windows fuzzylite:x86-windows sdl2:x86-windows sdl2-image:x86-windows sdl2-ttf:x86-windows sdl2-mixer[mpg123]:x86-windows boost:x86-windows qt5-base:x86-windows ffmpeg:x86-windows luajit:x86-windows`
-
-For the list of the packages used you can also consult [vcmi-deps-windows readme](https://github.com/vcmi/vcmi-deps-windows) in case this article gets outdated a bit.
-
-## Install CCache
-
-Extract `ccache` to a folder of your choosing, add the folder to the `PATH` environment variable and log out and back in.
-
-## Build VCMI
-
-#### From GIT GUI
+### Compile VCMI with Visual Studio
 
-- Open SourceTree
-- File -> Clone
-- select `https://github.com/vcmi/vcmi/` as source
-- select `%VCMI_DIR%/source` as destination
-- expand Advanced Options and change Checkout Branch to `develop`
-- tick `Recursive submodules`
-- click Clone
+#### Generate solution
 
-#### From command line  
+1. Open command line prompt (`cmd.exe`)
+2. Execute `cd %VCMI_DIR%`
+3. Now you need to run a script* from the Conan directory that you passed to `conan install` (the one that you passed in `--output-folder` parameter). For example, if you passed `conan-msvc`, then the script will be in `source\conan-msvc`.
+    - for CMD: `source\conan-msvc\conanrun.bat`
+    - for Powershell: `source\conan-msvc\conanrun.ps1`. If it gives an error, also run `Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted`
+4. Create VS solution: `cmake -S source -B build --toolchain source\conan-msvc\conan_toolchain.cmake`
 
-- `git clone --recursive https://github.com/vcmi/vcmi.git %VCMI_DIR%/source`  
+\* This script sets up `PATH` required for Qt tools (`moc`, `uic` etc.) that run during CMake configure and build steps. Those tools depend on `zlib.dll` that was built with Conan, therefore its directory must be in `PATH`.
 
-### Generate solution for VCMI  
+#### Build solution
 
-- Create `%VCMI_DIR%/build` folder  
-- Open a command line prompt at `%VCMI_DIR%/build`  
-- Execute `cd %VCMI_DIR%/build`
-- Create solution (Visual Studio 2022 64-bit) `cmake %VCMI_DIR%/source -DCMAKE_TOOLCHAIN_FILE=%VCMI_DIR%/vcpkg/scripts/buildsystems/vcpkg.cmake -G "Visual Studio 17 2022" -A x64`
+You must launch Visual Studio in a modified `PATH` environment, see `*` in the previous subsection. You can launch it right from the current shell by pasting path to `devenv.exe` (Visual Studio executable, e.g. `"C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe"`). To launch it later with correct environment, you can create batch script (a file with `bat` extension) which you can double-click, here's an example (use your own path on the first line):
 
-### Compile VCMI with Visual Studio
+```batchfile
+call "c:\Users\kamba\source\repos\vcmi\conan-msvc\conanrun.bat"
+call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe"
+```
 
-- Open `%VCMI_DIR%/build/VCMI.sln` in Visual Studio
-- Select `Release` build type in the combobox
-- If you want to use ccache:
-  - Select `Manage Configurations...` in the combobox
-  - Specify the following CMake variable: `ENABLE_CCACHE=ON`
-  - See the [Visual Studio documentation](https://learn.microsoft.com/en-us/cpp/build/customize-cmake-settings?view=msvc-170#cmake-variables-and-cache) for details
-- Right click on `BUILD_ALL` project. This `BUILD_ALL` project should be in `CMakePredefinedTargets` tree in Solution Explorer.
-- VCMI will be built in `%VCMI_DIR%/build/bin` folder!
+1. Open `%VCMI_DIR%/build/VCMI.sln` in Visual Studio
+2. Select `RelWithDebInfo` build type in the combobox
+3. If you want to use ccache:
+    - Select `Manage Configurations...` in the combobox
+    - Specify the following CMake variable: `ENABLE_CCACHE=ON`
+    - See the [Visual Studio documentation](https://learn.microsoft.com/en-us/cpp/build/customize-cmake-settings?view=msvc-170#cmake-variables-and-cache) for details
+4. Right click on `BUILD_ALL` project. This `BUILD_ALL` project should be in `CMakePredefinedTargets` tree in Solution Explorer. You can also build individual targets if you want.
+5. VCMI will be built in `%VCMI_DIR%/build/bin` folder
 
 ### Compile VCMI with MinGW via MSYS2
 
@@ -130,14 +109,6 @@ Extract `ccache` to a folder of your choosing, add the folder to the `PATH` envi
 
 **NOTE:** This will link Qt5 statically to `VCMI_launcher.exe` and `VCMI_Mapeditor.exe`. See [PR #3421](https://github.com/vcmi/vcmi/pull/3421) for some background.
 
-## Create VCMI installer (This step is not required for just building & development)
-
-Make sure NSIS is installed to default directory or have registry entry so CMake can find it.
-After you build VCMI execute following commands from `%VCMI_DIR%/build`.
-
-- for release build: `cpack`
-- for debug build: `cpack -C Debug`
-
 ## Troubleshooting and workarounds
 
 Vcpkg might be very unstable due to limited popularity and fact of using bleeding edge packages (such as most recent Boost). Using latest version of dependencies could also expose both problems in VCMI code or library interface changes that developers not checked yet. So if you're built Vcpkg yourself and can't get it working please try to use binary package.
@@ -157,8 +128,65 @@ Make sure you have:
 
 ### Debug build is very slow
 
-Debug builds with MSVC are generally extremely slow since it's not just VCMI binaries are built as debug, but every single dependency too and this usually means no optimizations at all. Debug information that available for release builds is often sufficient so just avoid full debug builds unless absolutely necessary. Instead use RelWithDebInfo configuration, optionally with Optimization Disabled (/Od) to avoid variables being optimized away Also Debug configuration might have some compilation issues because it is not checked via CI for now.
+Debug builds with MSVC are generally extremely slow since it's not just VCMI binaries are built as debug, but every single dependency too and this usually means no optimizations at all. Debug information that available for release builds is often sufficient so just avoid full debug builds unless absolutely necessary. Instead use RelWithDebInfo configuration, optionally with Optimization Disabled (/Od) to avoid variables being optimized away. Also Debug configuration might have some compilation issues because it is not checked via CI for now.
 
 ### I got crash within library XYZ.dll
 
 VCPKG generated projects quite often have both debug and regular libs available to linker so it can select wrong lib. For stable RelWithDebInfo build you may try to remove debug folder from VCPKG/installed/x64-windows. Same is done on CI. Also it reduces package size at least twice.
+
+## Legacy instructions for Vcpkg package manager
+
+We have switched to the Conan package manager in v1.7. Legacy Vcpkg integration is no longer supported and may or may not work out of the box.
+
+You have two options: to use pre-built libraries or build your own. We strongly recommend start with using pre-built ones.
+
+### Option A. Use pre-built Vcpkg
+
+#### Download and unpack archive
+
+Vcpkg Archives are available at our GitHub: <https://github.com/vcmi/vcmi-deps-windows/releases>
+
+- Download latest version available.
+EG: v1.6 assets - [vcpkg-export-x64-windows-v143.7z](https://github.com/vcmi/vcmi-deps-windows/releases/download/v1.6/vcpkg-export-x64-windows-v143.7z)
+- Extract archive by right clicking on it and choosing "7-zip -> Extract Here".
+
+#### Move dependencies to target directory
+
+Once extracted, a `vcpkg` directory will appear with `installed` and `scripts` subfolders inside.
+Move extracted `vcpkg` directory into your `%VCMI_DIR%`
+
+### Option B. Build Vcpkg on your own
+
+Please be aware that if you're running 32-bit Windows version, then this is impossible due to <https://github.com/microsoft/vcpkg/issues/26036>
+Be aware that building Vcpkg might take a lot of time depend on your CPU model and 10-20GB of disk space.
+
+#### Create initial directory
+
+#### Clone vcpkg
+
+1. open SourceTree
+2. File -\> Clone
+3. select **<https://github.com/microsoft/vcpkg/>** as source
+4. select **%VCMI_DIR%/vcpkg** as destination
+5. click **Clone**
+
+From command line use:
+
+```sh
+git clone https://github.com/microsoft/vcpkg.git %VCMI_DIR%/vcpkg
+```
+
+#### Build vcpkg and dependencies
+
+- Run
+`%VCMI_DIR%/vcpkg/bootstrap-vcpkg.bat`
+- For 32-bit build run:
+`%VCMI_DIR%/vcpkg/vcpkg.exe install tbb:x64-windows fuzzylite:x64-windows sdl2:x64-windows sdl2-image:x64-windows sdl2-ttf:x64-windows sdl2-mixer[mpg123]:x64-windows boost:x64-windows qt5-base:x64-windows ffmpeg:x64-windows luajit:x64-windows`
+- For 64-bit build run:
+`%VCMI_DIR%/vcpkg/vcpkg.exe install install tbb:x86-windows fuzzylite:x86-windows sdl2:x86-windows sdl2-image:x86-windows sdl2-ttf:x86-windows sdl2-mixer[mpg123]:x86-windows boost:x86-windows qt5-base:x86-windows ffmpeg:x86-windows luajit:x86-windows`
+
+For the list of the packages used you can also consult [vcmi-deps-windows readme](https://github.com/vcmi/vcmi-deps-windows) in case this article gets outdated a bit.
+
+### CMake integration
+
+When executing `cmake` configure step, pass `--toolchain %VCMI_DIR%/vcpkg/scripts/buildsystems/vcpkg.cmake`

+ 4 - 6
docs/developers/Building_iOS.md

@@ -18,10 +18,9 @@ git clone --recurse-submodules https://github.com/vcmi/vcmi.git
 
 ## Obtaining dependencies
 
-There are 2 ways to get prebuilt dependencies:
+The primary and officially supported way is [Conan package manager](./Conan.md). Note that the link points to the state of the current branch, for the latest release check the same document in the [master branch](https://github.com/vcmi/vcmi/blob/master/docs/developers/Conan.md).
 
-- [Conan package manager](./Conan.md) - recommended. Note that the link points to the state of the current branch, for the latest release check the same document in the [master branch](https://github.com/vcmi/vcmi/blob/master/docs/developers/Conan.md).
-- [legacy manually built libraries](https://github.com/vcmi/vcmi-ios-deps) - can be used if you have Xcode 11/12 or to build for simulator / armv7 device
+There are also [legacy manually built libraries](https://github.com/vcmi/vcmi-ios-deps) which can be used if you have Xcode 11/12 or to build for simulator / armv7 device, but this way is no longer supported. Using Conan will also let you build with any Xcode version and for any architecture / SDK.
 
 ## Configuring project
 
@@ -30,9 +29,8 @@ Only Xcode generator (`-G Xcode`) is supported!
 As a minimum, you must pass the following variables to CMake:
 
 - `BUNDLE_IDENTIFIER_PREFIX`: unique bundle identifier prefix, something like `com.MY-NAME`
-- (if using legacy dependencies) `CMAKE_PREFIX_PATH`: path to the downloaded dependencies, e.g. `~/Downloads/vcmi-ios-depends/build/iphoneos`
 
-There're a few [CMake presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html): for device (Conan and legacy dependencies) and for simulator, named `ios-device-conan`, `ios-device` and `ios-simulator` respectively. You can also create your local "user preset" to avoid typing variables each time, see example [here](https://gist.github.com/kambala-decapitator/59438030c34b53aed7d3895aaa48b718).
+There's a [CMake preset](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for device named `ios-device-conan`. You can also create your local "user preset" to avoid typing variables each time, see example [here](https://gist.github.com/kambala-decapitator/59438030c34b53aed7d3895aaa48b718).
 
 Open terminal and `cd` to the directory with source code. Configuration example for device with Conan:
 
@@ -76,4 +74,4 @@ Invoke `cpack` after building:
 
 `cpack -C Release`
 
-This will generate file with extension **ipa** if you use CMake 3.25+and **zip** otherwise (simply change extension to ipa).
+This will generate file with extension **ipa** if you use CMake 3.25+ and **zip** otherwise (simply change extension to ipa).

+ 23 - 48
docs/developers/Building_macOS.md

@@ -23,7 +23,9 @@ git clone --recurse-submodules https://github.com/vcmi/vcmi.git
 
 There're 2 ways to get dependencies automatically.
 
-### Conan package manager
+### Conan package manager (recommended)
+
+We use this to produce builds on CI.
 
 Please find detailed instructions [here](./Conan.md). Note that the link points to the state of the current branch, for the latest release check the same document in the [master branch](https://github.com/vcmi/vcmi/blob/master/docs/developers/Conan.md).
 
@@ -32,47 +34,42 @@ On the step where you need to replace **PROFILE**, choose:
 - if you're on an Intel Mac: `macos-intel`
 - if you're on an Apple Silicon Mac: `macos-arm`
 
-Note: if you wish to build 1.0 release in non-`Release` configuration, you should define `USE_CONAN_WITH_ALL_CONFIGS=1` environment variable when executing `conan install`.
-
 ### Homebrew
 
 1. [Install Homebrew](https://brew.sh/)
 2. Install dependencies: `brew install boost minizip sdl2 sdl2_image sdl2_mixer sdl2_ttf tbb`
-3. If you want to watch in-game videos, also install FFmpeg: `brew install ffmpeg@4`
-4. Install Qt dependency in either of the ways (note that you can skip this if you're not going to build Launcher):
+3. If you want to watch in-game videos, also install FFmpeg: `brew install ffmpeg` (you can also use an earlier FFmpeg version)
+4. Install Qt dependency in either of the ways (note that you can skip this if you're not going to build Launcher and Map editor):
     - `brew install qt@5` for Qt 5 or `brew install qt` for Qt 6
-    - using [Qt Online Installer](https://www.qt.io/download) - choose **Go open source**
+    - using [Qt Online Installer](https://www.qt.io/download-qt-installer-oss)
 
 ## Preparing build environment
 
 This applies only to Xcode-based toolchain. If `xcrun -f clang` prints errors, then use either of the following ways:
 
 - select an Xcode instance from Xcode application - Preferences - Locations - Command Line Tools
-- use `xcode-select` utility to set Xcode or Xcode Command Line Tools path: for example, `sudo xcode-select -s /Library/Developer/CommandLineTools`
-- set `DEVELOPER_DIR` environment variable pointing to Xcode or Xcode Command Line Tools path: for example, `export DEVELOPER_DIR=/Applications/Xcode.app`
+- use `xcode-select` utility to set Xcode or Xcode Command Line Tools path, example: `sudo xcode-select -s /Library/Developer/CommandLineTools`
+- set `DEVELOPER_DIR` environment variable pointing to Xcode or Xcode Command Line Tools path, example: `export DEVELOPER_DIR=/Applications/Xcode.app`
 
 ## Configuring project for building
 
-Note that if you wish to use Qt Creator IDE, you should skip this step and configure respective variables inside the IDE.
+Note that if you wish to use Qt Creator or CLion IDE, you should skip this step and configure respective variables inside the IDE. Or you could create a [CMake preset](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) to avoid manual configuration.
+
+The following walkthrough lists only the bare minimum of required CMake options.
 
 1. In Terminal `cd` to the source code directory
 2. Start assembling CMake invocation: type `cmake -S . -B BUILD_DIR` where *BUILD_DIR* can be any path, **don't press Return**
 3. Decide which CMake generator you want to use:
-    - Makefiles: no extra option needed or pass `-G 'Unix Makefiles'`
-    - Ninja (if you have installed it): pass `-G Ninja`
     - Xcode IDE (if you have installed it): pass `-G Xcode`
-4. If you picked Makefiles or Ninja, pick desired *build type* - either of Debug / RelWithDebInfo / Release / MinSizeRel - and pass it in `CMAKE_BUILD_TYPE` option, for example: `-D CMAKE_BUILD_TYPE=Release`. If you don't pass this option,     `RelWithDebInfo` will be used.
-5. If you don't want to build Launcher, pass `-D ENABLE_LAUNCHER=OFF`
-6. You can also pass `-Wno-dev` if you're not interested in CMake developer warnings
-7. Next step depends on the dependency manager you have picked:
-    - Conan: pass `-D CMAKE_TOOLCHAIN_FILE=conan-generated/conan_toolchain.cmake` where **conan-generated** must be replaced with your directory choice
-    - Homebrew: if you installed FFmpeg or Qt 5, you need to pass `-D "CMAKE_PREFIX_PATH="` variable. See below what you can insert after `=` (but **before the closing quote**), multiple values must be separated with `;` (semicolon):
-        - if you installed FFmpeg, insert `$(brew --prefix ffmpeg@4)`
-        - if you installed Qt 5 from Homebrew, insert:`$(brew --prefix qt@5)`
-        - if you installed Qt from Online Installer, insert your path to Qt directory, for example: `/Users/kambala/dev/Qt-libs/5.15.2/Clang64`
-        - example for FFmpeg + Qt 5: `-D "CMAKE_PREFIX_PATH=$(brew --prefix ffmpeg@4);$(brew --prefix qt@5)"`
-8. If you want to speed up the recompilation, add `-D ENABLE_CCACHE=ON`
-9. Now press Return
+    - Ninja (if you have installed it): pass `-G Ninja`
+    - Makefiles: no extra option needed or pass `-G 'Unix Makefiles'`
+4. If you picked Makefiles or Ninja, pick desired *build type* - either of `Debug` / `RelWithDebInfo` / `Release` / `MinSizeRel` - and pass it in `CMAKE_BUILD_TYPE` option, example: `-D CMAKE_BUILD_TYPE=Debug`. If you use don't pass this option, `RelWithDebInfo` will be used.
+5. Next step depends on the dependency manager you have picked:
+    - Conan: pass `--toolchain conan-generated/conan_toolchain.cmake` (or via `CMAKE_TOOLCHAIN_FILE` variable) where **conan-generated** must be replaced with your directory choice
+    - Homebrew: if you installed Qt 5 or from the Online Installer, you need to pass `-D "CMAKE_PREFIX_PATH="` variable. See below what you can insert after `=` (but **before the closing quote**), multiple values must be separated with `;` (semicolon):
+        - if you installed Qt 5 from Homebrew, insert `$(brew --prefix qt@5)`
+        - if you installed Qt from Online Installer, insert your path to Qt directory, example: `/Users/kambala/dev/Qt-libs/5.15.2/Clang64`
+6. Now press Return
 
 ## Building project
 
@@ -87,35 +84,13 @@ Open `VCMI.xcodeproj` from the build directory, select `vcmiclient` scheme and h
 `cmake --build <path to build directory>`
 
 - If using Makefiles generator, you'd want to utilize all your CPU cores by appending `-- -j$(sysctl -n hw.ncpu)` to the above
-- If using Xcode generator, you can also choose which configuration to build by appending `--config <configuration name>` to the above, for example: `--config Debug`
-
-## Packaging project into DMG file
-
-After building, run `cpack` from the build directory. If using Xcode generator, also pass `-C <configuration name>` with the same configuration that you used to build the project.
-
-If you use Conan, it's expected that you use **conan-generated** directory at step 4 of [Conan package manager](Conan.md).
+- If using Xcode generator, you can also choose which configuration to build by appending `--config <configuration name>` to the above, example: `--config Debug`
 
 ## Running VCMI
 
-You can run VCMI from DMG, but it's will also work from your IDE be it Xcode or Qt Creator.
-
-Alternatively you can run binaries directly from the **bin** directory:
+You can run binaries from your IDE or directly from the **bin** directory:
 
 - BUILD_DIR/bin/vcmilauncher
 - BUILD_DIR/bin/vcmiclient
 - BUILD_DIR/bin/vcmiserver
-
-CMake include commands to copy all needed assets from source directory into the **bin** directory on each build. They'll work when you build from Xcode too.
-
-## Some useful debugging tips
-
-Anyone who might want to debug builds, but new to macOS could find following commands useful:
-
-- To attach DMG file from command line use `hdiutil attach vcmi-1.0.dmg`
-- Detach volume: `hdiutil detach /Volumes/vcmi-1.0`
-- To view dependency paths: `otool -L /Volumes/vcmi-1.0/VCMI.app/Contents/MacOS/vcmiclient`
-- To display load commands such as `LC_RPATH`: `otool -l /Volumes/vcmi-1.0/VCMI.app/Contents/MacOS/vcmiclient`
-
-## Troubleshooting
-
-In case of troubles you can always consult our CI build scripts or contact the dev team via discord.
+- BUILD_DIR/bin/vcmimapeditor