mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
docs/conan.md: add Windows instructions
Add instructions for building a Windows binaries from Linux in Conan
This commit is contained in:
parent
38ebb62c3e
commit
f31ec77e1c
@ -8,6 +8,7 @@ The following platforms are supported and known to work, others might require ch
|
|||||||
|
|
||||||
- **macOS**: x86_64 (Intel) - target 10.13 (High Sierra), arm64 (Apple Silicon) - target 11.0 (Big Sur)
|
- **macOS**: x86_64 (Intel) - target 10.13 (High Sierra), arm64 (Apple Silicon) - target 11.0 (Big Sur)
|
||||||
- **iOS**: arm64 - target 12.0
|
- **iOS**: arm64 - target 12.0
|
||||||
|
- **Windows**: x86_64 and x86 fully supported with building from Linux
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
@ -22,11 +23,14 @@ The following platforms are supported and known to work, others might require ch
|
|||||||
|
|
||||||
- macOS: libraries are built with Apple clang 14 (Xcode 14.2), should be consumable by Xcode and Xcode CLT 14.x (older library versions are also available for Xcode 13, see Releases in the respective repo)
|
- macOS: libraries are built with Apple clang 14 (Xcode 14.2), should be consumable by Xcode and Xcode CLT 14.x (older library versions are also available for Xcode 13, see Releases in the respective repo)
|
||||||
- iOS: libraries are built with Apple clang 14 (Xcode 14.2), should be consumable by Xcode 14.x (older library versions are also available for Xcode 13, see Releases in the respective repo)
|
- iOS: libraries are built with Apple clang 14 (Xcode 14.2), should be consumable by Xcode 14.x (older library versions are also available for Xcode 13, see Releases in the respective repo)
|
||||||
|
- Windows: libraries are built with x86_64-mingw-w64-gcc version 10 (which is available in repositories of Ubuntu 22.04)
|
||||||
|
|
||||||
2. Download the binaries archive and unpack it to `~/.conan` directory:
|
2. Download the binaries archive and unpack it to `~/.conan` directory:
|
||||||
|
|
||||||
- [macOS](https://github.com/vcmi/vcmi-deps-macos/releases/latest): pick **intel.txz** if you have Intel Mac, otherwise - **intel-cross-arm.txz**
|
- [macOS](https://github.com/vcmi/vcmi-deps-macos/releases/latest): pick **intel.txz** if you have Intel Mac, otherwise - **intel-cross-arm.txz**
|
||||||
- [iOS](https://github.com/vcmi/vcmi-ios-deps/releases/latest)
|
- [iOS](https://github.com/vcmi/vcmi-ios-deps/releases/latest)
|
||||||
|
- [Windows] (https://github.com/vcmi/vcmi-deps-windows-conan/releases/latest): pick **vcmi-deps-windows-conan-w64.tgz**
|
||||||
|
if you want x86, otherwise pick **vcmi-deps-windows-conan.tgz**
|
||||||
|
|
||||||
3. Only if you have Apple Silicon Mac and trying to build for macOS or iOS: follow [instructions how to build Qt host tools for Apple Silicon](https://github.com/vcmi/vcmi-ios-deps#note-for-arm-macs), on step 3 copy them to `~/.conan/data/qt/5.15.x/_/_/package/SOME_HASH/bin` (`5.15.x` and `SOME_HASH` are placeholders).
|
3. Only if you have Apple Silicon Mac and trying to build for macOS or iOS: follow [instructions how to build Qt host tools for Apple Silicon](https://github.com/vcmi/vcmi-ios-deps#note-for-arm-macs), on step 3 copy them to `~/.conan/data/qt/5.15.x/_/_/package/SOME_HASH/bin` (`5.15.x` and `SOME_HASH` are placeholders).
|
||||||
|
|
||||||
@ -50,6 +54,7 @@ The highlighted parts can be adjusted:
|
|||||||
- ***conan-generated***: directory (absolute or relative) where the generated files will appear. This value is used in CMake presets from VCMI, but you can actually use any directory and override it in your local CMake presets.
|
- ***conan-generated***: directory (absolute or relative) where the generated files will appear. This value is used in CMake presets from VCMI, but you can actually use any directory and override it in your local CMake presets.
|
||||||
- ***never***: use this value to avoid building any dependency from source. You can also use `missing` to build recipes, that are not present in your local cache, from source.
|
- ***never***: use this value to avoid building any dependency from source. You can also use `missing` to build recipes, that are not present in your local cache, from source.
|
||||||
- ***CI/conan/PROFILE***: if you want to consume our prebuilt binaries, ***PROFILE*** must be replaced with one of filenames from our [Conan profiles directory](../CI/conan) (determining the right file should be straight-forward). Otherwise, either select one of our profiles or replace ***CI/conan/PROFILE*** with `default` (your default profile).
|
- ***CI/conan/PROFILE***: if you want to consume our prebuilt binaries, ***PROFILE*** must be replaced with one of filenames from our [Conan profiles directory](../CI/conan) (determining the right file should be straight-forward). Otherwise, either select one of our profiles or replace ***CI/conan/PROFILE*** with `default` (your default profile).
|
||||||
|
- ***note for Windows x86***: use profile mingw32-linux.jinja for building instead of mingw64-linux.jinja
|
||||||
|
|
||||||
If you use `--build=never` and this command fails, then it means that you can't use prebuilt binaries out of the box. For example, try using `--build=missing` instead.
|
If you use `--build=never` and this command fails, then it means that you can't use prebuilt binaries out of the box. For example, try using `--build=missing` instead.
|
||||||
|
|
||||||
@ -147,3 +152,29 @@ cmake --preset ios-conan
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Build VCMI with all deps for 32-bit windows in Ubuntu 22.04 WSL
|
||||||
|
```powershell
|
||||||
|
wsl --install
|
||||||
|
wsl --install -d Ubuntu
|
||||||
|
ubuntu
|
||||||
|
```
|
||||||
|
Next steps are identical both in WSL and in real Ubuntu 22.04
|
||||||
|
```bash
|
||||||
|
sudo pip3 install conan
|
||||||
|
sudo apt install cmake build-essential
|
||||||
|
sed -i 's/x86_64-w64-mingw32/i686-w64-mingw32/g' CI/mingw-ubuntu/before-install.sh
|
||||||
|
sed -i 's/x86-64/i686/g' CI/mingw-ubuntu/before-install.sh
|
||||||
|
sudo ./CI/mingw-ubuntu/before-install.sh
|
||||||
|
conan install . \
|
||||||
|
--install-folder=conan-generated \
|
||||||
|
--no-imports \
|
||||||
|
--build=missing \
|
||||||
|
--profile:build=default \
|
||||||
|
--profile:host=CI/conan/mingw32-linux \
|
||||||
|
-c tools.cmake.cmaketoolchain.presets:max_schema_version=2
|
||||||
|
cmake --preset windows-mingw-conan-linux
|
||||||
|
cmake --build --preset windows-mingw-conan-linux --target package
|
||||||
|
```
|
||||||
|
After that, you will have functional VCMI installer for 32-bit windows.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user