mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
improve layout of some dev docs
This commit is contained in:
@@ -2,22 +2,24 @@
|
||||
|
||||
## Requirements
|
||||
|
||||
1. **macOS**
|
||||
2. Xcode: <https://developer.apple.com/xcode/>
|
||||
3. CMake 3.21+: `brew install --cask cmake` or get from <https://cmake.org/download/>
|
||||
1. **macOS**
|
||||
2. Xcode: <https://developer.apple.com/xcode/>
|
||||
3. CMake 3.21+: `brew install --cask cmake` or get from <https://cmake.org/download/>
|
||||
|
||||
## Obtaining source code
|
||||
|
||||
Clone <https://github.com/vcmi/vcmi> with submodules. Example for command line:
|
||||
|
||||
`git clone --recurse-submodules https://github.com/vcmi/vcmi.git`
|
||||
```
|
||||
git clone --recurse-submodules https://github.com/vcmi/vcmi.git
|
||||
```
|
||||
|
||||
## Obtaining dependencies
|
||||
|
||||
There are 2 ways to get prebuilt dependencies:
|
||||
|
||||
- [Conan package manager](https://github.com/vcmi/vcmi/tree/develop/docs/conan.md) - recommended. Note that the link points to the cutting-edge state in `develop` branch, for the latest release check the same document in the [master branch (https://github.com/vcmi/vcmi/tree/master/docs/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
|
||||
- [Conan package manager](https://github.com/vcmi/vcmi/tree/develop/docs/conan.md) - recommended. Note that the link points to the cutting-edge state in `develop` branch, for the latest release check the same document in the [master branch (https://github.com/vcmi/vcmi/tree/master/docs/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
|
||||
|
||||
## Configuring project
|
||||
|
||||
@@ -25,15 +27,17 @@ 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`
|
||||
- `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).
|
||||
|
||||
Open terminal and `cd` to the directory with source code. Configuration example for device with Conan:
|
||||
|
||||
`cmake --preset ios-device-conan \`
|
||||
` -D BUNDLE_IDENTIFIER_PREFIX=com.MY-NAME`
|
||||
```
|
||||
cmake --preset ios-device-conan \
|
||||
-D BUNDLE_IDENTIFIER_PREFIX=com.MY-NAME
|
||||
```
|
||||
|
||||
By default build directory containing Xcode project will appear at `../build-ios-device-conan`, but you can change it with `-B` option.
|
||||
|
||||
@@ -53,7 +57,9 @@ You must also install game files, see [Installation on iOS](../players/Installat
|
||||
|
||||
### From command line
|
||||
|
||||
`cmake --build `<path to build directory>` --target vcmiclient -- -quiet`
|
||||
```
|
||||
cmake --build <path to build directory> --target vcmiclient -- -quiet
|
||||
```
|
||||
|
||||
You can pass additional xcodebuild options after the `--`. Here `-quiet` is passed to reduce amount of output.
|
||||
|
||||
@@ -67,4 +73,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).
|
||||
|
||||
Reference in New Issue
Block a user