mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Improve docs
This commit is contained in:
@@ -14,7 +14,9 @@ The following instructions apply to **v1.2 and later**. For earlier versions the
|
||||
- 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
|
||||
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
|
||||
|
||||
## Obtaining source code
|
||||
|
||||
@@ -60,7 +62,7 @@ Building for Android is a 2-step process. First, native C++ code is compiled to
|
||||
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. Example:
|
||||
|
||||
```
|
||||
cmake -S . -B ../build -G Ninja -D CMAKE_BUILD_TYPE=Debug --toolchain ...
|
||||
cmake -S . -B ../build -G Ninja -D CMAKE_BUILD_TYPE=Debug -D CMAKE_COMPILER_LAUNCHER=ccache --toolchain ...
|
||||
cmake --build ../build
|
||||
```
|
||||
|
||||
|
@@ -10,10 +10,9 @@ Windows builds can be made in more than one way and with more than one tool. Thi
|
||||
- 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)
|
||||
- To speed up recompilation: [CCache](https://github.com/ccache/ccache/releases)
|
||||
- Optional:
|
||||
- To create installer: [NSIS](http://nsis.sourceforge.net/Main_Page)
|
||||
|
||||
- To speed up recompilation: [CCache](https://github.com/ccache/ccache/releases)
|
||||
|
||||
## Choose an installation directory
|
||||
|
||||
@@ -78,7 +77,7 @@ From command line use:
|
||||
|
||||
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.
|
||||
|
||||
### CCache
|
||||
# Install CCache
|
||||
|
||||
Extract `ccache` to a folder of your choosing, add the folder to the `PATH` environment variable and log out and back in.
|
||||
|
||||
@@ -104,7 +103,11 @@ Extract `ccache` to a folder of your choosing, add the folder to the `PATH` envi
|
||||
|
||||
## Compile VCMI with Visual Studio
|
||||
- Open `%VCMI_DIR%/build/VCMI.sln` in Visual Studio
|
||||
- Select `Release` build type in combobox
|
||||
- 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!
|
||||
|
||||
|
@@ -5,6 +5,8 @@
|
||||
1. **macOS**
|
||||
2. Xcode: <https://developer.apple.com/xcode/>
|
||||
3. CMake 3.21+: `brew install --cask cmake` or get from <https://cmake.org/download/>
|
||||
4. Optional:
|
||||
- CCache to speed up recompilation: `brew install ccache`
|
||||
|
||||
## Obtaining source code
|
||||
|
||||
@@ -41,6 +43,8 @@ cmake --preset ios-device-conan \
|
||||
|
||||
By default build directory containing Xcode project will appear at `../build-ios-device-conan`, but you can change it with `-B` option.
|
||||
|
||||
If you want to speed up the recompilation, add `-D ENABLE_CCACHE=ON`
|
||||
|
||||
### Building for device
|
||||
|
||||
To be able to build for iOS device, you must also specify codesigning settings. If you don't know your development team ID, open the generated Xcode project, open project settings (click **VCMI** with blue icon on the very top in the left panel with files), select **vcmiclient** target, open **Signing & Capabilities** tab and select yout team. Now you can copy the value from **Build Settings** tab - `DEVELOPMENT_TEAM` variable (paste it in the Filter field on the right) - click the greenish value - Other... - copy. Now you can pass it in `CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM` variable when configuring the project to avoid selecting the team manually every time CMake re-generates the project.
|
||||
|
@@ -7,9 +7,9 @@
|
||||
- Xcode IDE: <https://developer.apple.com/xcode/>
|
||||
- (not tested) other C++ compilers, e.g. gcc/clang from [Homebrew](https://brew.sh/)
|
||||
2. CMake: `brew install --cask cmake` or get from <https://cmake.org/download/>
|
||||
3. CCache to speed up recompilation: `brew install ccache`
|
||||
4. Optional:
|
||||
* Ninja: `brew install ninja` or get it from <https://github.com/ninja-build/ninja/releases>
|
||||
* CCache to speed up recompilation: `brew install ccache`
|
||||
|
||||
# Obtaining source code
|
||||
|
||||
@@ -71,7 +71,8 @@ Note that if you wish to use Qt Creator IDE, you should skip this step and confi
|
||||
- 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. now press Return
|
||||
8. If you want to speed up the recompilation, add `-D ENABLE_CCACHE=ON`
|
||||
9. Now press Return
|
||||
|
||||
# Building project
|
||||
|
||||
|
Reference in New Issue
Block a user