mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-10 22:31:40 +02:00
Merge pull request #4545 from vcmi/update_prebuilts
Update conan prebuilt package
This commit is contained in:
94
.github/workflows/github.yml
vendored
94
.github/workflows/github.yml
vendored
@@ -17,20 +17,22 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- platform: linux-qt6
|
- platform: linux-qt6
|
||||||
os: ubuntu-24.04
|
os: ubuntu-24.04
|
||||||
test: 0
|
test: 0
|
||||||
|
before_install: linux_qt6.sh
|
||||||
preset: linux-clang-test
|
preset: linux-clang-test
|
||||||
- platform: linux
|
- platform: linux
|
||||||
os: ubuntu-24.04
|
os: ubuntu-24.04
|
||||||
test: 1
|
test: 1
|
||||||
|
before_install: linux_qt5.sh
|
||||||
preset: linux-gcc-test
|
preset: linux-gcc-test
|
||||||
- platform: linux
|
- platform: linux
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
test: 0
|
test: 0
|
||||||
|
before_install: linux_qt5.sh
|
||||||
preset: linux-gcc-debug
|
preset: linux-gcc-debug
|
||||||
- platform: mac-intel
|
- platform: mac-intel
|
||||||
os: macos-13
|
os: macos-13
|
||||||
@@ -38,8 +40,10 @@ jobs:
|
|||||||
pack: 1
|
pack: 1
|
||||||
pack_type: Release
|
pack_type: Release
|
||||||
extension: dmg
|
extension: dmg
|
||||||
|
before_install: macos.sh
|
||||||
preset: macos-conan-ninja-release
|
preset: macos-conan-ninja-release
|
||||||
conan_profile: macos-intel
|
conan_profile: macos-intel
|
||||||
|
conan_prebuilts: dependencies-mac-intel
|
||||||
conan_options: --options with_apple_system_libs=True
|
conan_options: --options with_apple_system_libs=True
|
||||||
artifact_platform: intel
|
artifact_platform: intel
|
||||||
- platform: mac-arm
|
- platform: mac-arm
|
||||||
@@ -48,8 +52,10 @@ jobs:
|
|||||||
pack: 1
|
pack: 1
|
||||||
pack_type: Release
|
pack_type: Release
|
||||||
extension: dmg
|
extension: dmg
|
||||||
|
before_install: macos.sh
|
||||||
preset: macos-arm-conan-ninja-release
|
preset: macos-arm-conan-ninja-release
|
||||||
conan_profile: macos-arm
|
conan_profile: macos-arm
|
||||||
|
conan_prebuilts: dependencies-mac-arm
|
||||||
conan_options: --options with_apple_system_libs=True
|
conan_options: --options with_apple_system_libs=True
|
||||||
artifact_platform: arm
|
artifact_platform: arm
|
||||||
- platform: ios
|
- platform: ios
|
||||||
@@ -58,8 +64,10 @@ jobs:
|
|||||||
pack: 1
|
pack: 1
|
||||||
pack_type: Release
|
pack_type: Release
|
||||||
extension: ipa
|
extension: ipa
|
||||||
|
before_install: macos.sh
|
||||||
preset: ios-release-conan-ccache
|
preset: ios-release-conan-ccache
|
||||||
conan_profile: ios-arm64
|
conan_profile: ios-arm64
|
||||||
|
conan_prebuilts: dependencies-ios
|
||||||
conan_options: --options with_apple_system_libs=True
|
conan_options: --options with_apple_system_libs=True
|
||||||
- platform: msvc
|
- platform: msvc
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
@@ -67,40 +75,45 @@ jobs:
|
|||||||
pack: 1
|
pack: 1
|
||||||
pack_type: RelWithDebInfo
|
pack_type: RelWithDebInfo
|
||||||
extension: exe
|
extension: exe
|
||||||
|
before_install: msvc.sh
|
||||||
preset: windows-msvc-release
|
preset: windows-msvc-release
|
||||||
- platform: mingw
|
- platform: mingw_x86_64
|
||||||
os: ubuntu-22.04
|
os: ubuntu-24.04
|
||||||
test: 0
|
test: 0
|
||||||
pack: 1
|
pack: 1
|
||||||
pack_type: Release
|
pack_type: Release
|
||||||
extension: exe
|
extension: exe
|
||||||
cpack_args: -D CPACK_NSIS_EXECUTABLE=`which makensis`
|
|
||||||
cmake_args: -G Ninja
|
cmake_args: -G Ninja
|
||||||
|
before_install: mingw.sh
|
||||||
preset: windows-mingw-conan-linux
|
preset: windows-mingw-conan-linux
|
||||||
conan_profile: mingw64-linux.jinja
|
conan_profile: mingw64-linux.jinja
|
||||||
- platform: mingw-32
|
conan_prebuilts: dependencies-mingw-x86-64
|
||||||
os: ubuntu-22.04
|
- platform: mingw_x86
|
||||||
|
os: ubuntu-24.04
|
||||||
test: 0
|
test: 0
|
||||||
pack: 1
|
pack: 1
|
||||||
pack_type: Release
|
pack_type: Release
|
||||||
extension: exe
|
extension: exe
|
||||||
cpack_args: -D CPACK_NSIS_EXECUTABLE=`which makensis`
|
|
||||||
cmake_args: -G Ninja
|
cmake_args: -G Ninja
|
||||||
|
before_install: mingw.sh
|
||||||
preset: windows-mingw-conan-linux
|
preset: windows-mingw-conan-linux
|
||||||
conan_profile: mingw32-linux.jinja
|
conan_profile: mingw32-linux.jinja
|
||||||
|
conan_prebuilts: dependencies-mingw-x86
|
||||||
- platform: android-32
|
- platform: android-32
|
||||||
os: macos-14
|
os: ubuntu-24.04
|
||||||
extension: apk
|
extension: apk
|
||||||
preset: android-conan-ninja-release
|
preset: android-conan-ninja-release
|
||||||
conan_profile: android-32
|
before_install: android.sh
|
||||||
conan_options: --conf tools.android:ndk_path=$ANDROID_NDK_ROOT
|
conan_profile: android-32-ndk
|
||||||
|
conan_prebuilts: dependencies-android-armeabi-v7a
|
||||||
artifact_platform: armeabi-v7a
|
artifact_platform: armeabi-v7a
|
||||||
- platform: android-64
|
- platform: android-64
|
||||||
os: macos-14
|
os: ubuntu-24.04
|
||||||
extension: apk
|
extension: apk
|
||||||
preset: android-conan-ninja-release
|
preset: android-conan-ninja-release
|
||||||
conan_profile: android-64
|
before_install: android.sh
|
||||||
conan_options: --conf tools.android:ndk_path=$ANDROID_NDK_ROOT
|
conan_profile: android-64-ndk
|
||||||
|
conan_prebuilts: dependencies-android-arm64-v8a
|
||||||
artifact_platform: arm64-v8a
|
artifact_platform: arm64-v8a
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
defaults:
|
defaults:
|
||||||
@@ -108,15 +121,21 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Dependencies
|
- name: Prepare CI
|
||||||
run: source '${{github.workspace}}/CI/${{matrix.platform}}/before_install.sh'
|
if: "${{ matrix.before_install != '' }}"
|
||||||
|
run: source '${{github.workspace}}/CI/before_install/${{matrix.before_install}}'
|
||||||
env:
|
env:
|
||||||
VCMI_BUILD_PLATFORM: x64
|
VCMI_BUILD_PLATFORM: x64
|
||||||
|
|
||||||
|
- name: Install Conan Dependencies
|
||||||
|
if: "${{ matrix.conan_prebuilts != '' }}"
|
||||||
|
run: source '${{github.workspace}}/CI/install_conan_dependencies.sh' '${{matrix.conan_prebuilts}}'
|
||||||
|
|
||||||
# ensure the ccache for each PR is separate so they don't interfere with each other
|
# ensure the ccache for each PR is separate so they don't interfere with each other
|
||||||
# fall back to ccache of the vcmi/vcmi repo if no PR-specific ccache is found
|
# fall back to ccache of the vcmi/vcmi repo if no PR-specific ccache is found
|
||||||
- name: ccache for PRs
|
- name: ccache for PRs
|
||||||
@@ -158,15 +177,13 @@ jobs:
|
|||||||
mkdir -p ~/.local/share/vcmi/
|
mkdir -p ~/.local/share/vcmi/
|
||||||
mv h3_assets/* ~/.local/share/vcmi/
|
mv h3_assets/* ~/.local/share/vcmi/
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
- name: Install Conan
|
||||||
if: "${{ matrix.conan_profile != '' }}"
|
if: "${{ matrix.conan_profile != '' }}"
|
||||||
with:
|
run: pipx install 'conan<2.0'
|
||||||
python-version: '3.10'
|
|
||||||
|
|
||||||
- name: Conan setup
|
- name: Install Conan profile
|
||||||
if: "${{ matrix.conan_profile != '' }}"
|
if: "${{ matrix.conan_profile != '' }}"
|
||||||
run: |
|
run: |
|
||||||
pip3 install 'conan<2.0'
|
|
||||||
conan profile new default --detect
|
conan profile new default --detect
|
||||||
conan install . \
|
conan install . \
|
||||||
--install-folder=conan-generated \
|
--install-folder=conan-generated \
|
||||||
@@ -178,7 +195,13 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GENERATE_ONLY_BUILT_CONFIG: 1
|
GENERATE_ONLY_BUILT_CONFIG: 1
|
||||||
|
|
||||||
- uses: actions/setup-java@v4
|
# Workaround for gradle not discovering SDK that was installed via conan
|
||||||
|
- name: Find Android NDK
|
||||||
|
if: ${{ startsWith(matrix.platform, 'android') }}
|
||||||
|
run: sudo ln -s -T /home/runner/.conan/data/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin /usr/local/lib/android/sdk/ndk/25.2.9519653
|
||||||
|
|
||||||
|
- name: Install Java
|
||||||
|
uses: actions/setup-java@v4
|
||||||
if: ${{ startsWith(matrix.platform, 'android') }}
|
if: ${{ startsWith(matrix.platform, 'android') }}
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
@@ -243,11 +266,13 @@ jobs:
|
|||||||
if: ${{ matrix.pack == 1 }}
|
if: ${{ matrix.pack == 1 }}
|
||||||
run: |
|
run: |
|
||||||
cd '${{github.workspace}}/out/build/${{matrix.preset}}'
|
cd '${{github.workspace}}/out/build/${{matrix.preset}}'
|
||||||
CPACK_PATH=`which -a cpack | grep -m1 -v -i chocolatey`
|
|
||||||
counter=0; until "$CPACK_PATH" -C ${{matrix.pack_type}} ${{ matrix.cpack_args }} || ((counter > 20)); do sleep 3; ((counter++)); done
|
# Workaround for CPack bug on macOS 13
|
||||||
test -f '${{github.workspace}}/CI/${{matrix.platform}}/post_pack.sh' \
|
counter=0
|
||||||
&& '${{github.workspace}}/CI/${{matrix.platform}}/post_pack.sh' '${{github.workspace}}' "$(ls '${{ env.VCMI_PACKAGE_FILE_NAME }}'.*)"
|
until cpack -C ${{matrix.pack_type}} || ((counter > 20)); do
|
||||||
rm -rf _CPack_Packages
|
sleep 3
|
||||||
|
((counter++))
|
||||||
|
done
|
||||||
|
|
||||||
- name: Artifacts
|
- name: Artifacts
|
||||||
if: ${{ matrix.pack == 1 }}
|
if: ${{ matrix.pack == 1 }}
|
||||||
@@ -269,7 +294,7 @@ jobs:
|
|||||||
echo "ANDROID_APK_PATH=$ANDROID_APK_PATH" >> $GITHUB_ENV
|
echo "ANDROID_APK_PATH=$ANDROID_APK_PATH" >> $GITHUB_ENV
|
||||||
echo "ANDROID_AAB_PATH=$ANDROID_AAB_PATH" >> $GITHUB_ENV
|
echo "ANDROID_AAB_PATH=$ANDROID_AAB_PATH" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Android apk artifacts
|
- name: Upload android apk artifacts
|
||||||
if: ${{ startsWith(matrix.platform, 'android') }}
|
if: ${{ startsWith(matrix.platform, 'android') }}
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -277,15 +302,15 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
${{ env.ANDROID_APK_PATH }}
|
${{ env.ANDROID_APK_PATH }}
|
||||||
|
|
||||||
- name: Android aab artifacts
|
- name: Upload Android aab artifacts
|
||||||
if: ${{ startsWith(matrix.platform, 'android') }}
|
if: ${{ startsWith(matrix.platform, 'android') && github.ref == 'refs/heads/master' }}
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ env.VCMI_PACKAGE_FILE_NAME }} - ${{ matrix.platform }} - aab
|
name: ${{ env.VCMI_PACKAGE_FILE_NAME }} - ${{ matrix.platform }} - aab
|
||||||
path: |
|
path: |
|
||||||
${{ env.ANDROID_AAB_PATH }}
|
${{ env.ANDROID_AAB_PATH }}
|
||||||
|
|
||||||
- name: Symbols
|
- name: Upload debug symbols
|
||||||
if: ${{ matrix.platform == 'msvc' }}
|
if: ${{ matrix.platform == 'msvc' }}
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -344,11 +369,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
if: "${{ matrix.conan_profile != '' }}"
|
|
||||||
with:
|
|
||||||
python-version: '3.10'
|
|
||||||
|
|
||||||
- name: Ensure LF line endings
|
- name: Ensure LF line endings
|
||||||
run: |
|
run: |
|
||||||
find . -path ./.git -prune -o -path ./AI/FuzzyLite -prune -o -path ./test/googletest \
|
find . -path ./.git -prune -o -path ./AI/FuzzyLite -prune -o -path ./test/googletest \
|
||||||
@@ -359,4 +379,4 @@ jobs:
|
|||||||
- name: Validate JSON
|
- name: Validate JSON
|
||||||
run: |
|
run: |
|
||||||
sudo apt install python3-jstyleson
|
sudo apt install python3-jstyleson
|
||||||
python3 CI/linux-qt6/validate_json.py
|
python3 CI/validate_json.py
|
||||||
|
@@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
DEPS_FILENAME=dependencies-android-32
|
|
||||||
. CI/android/before_install.sh
|
|
@@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
DEPS_FILENAME=dependencies-android-64
|
|
||||||
. CI/android/before_install.sh
|
|
@@ -1,7 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
echo "ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/25.2.9519653" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
brew install ninja
|
|
||||||
|
|
||||||
. CI/install_conan_dependencies.sh "$DEPS_FILENAME"
|
|
4
CI/before_install/android.sh
Normal file
4
CI/before_install/android.sh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install ninja-build
|
@@ -1,6 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
sudo apt remove needrestart
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
@@ -9,6 +8,6 @@ sudo apt-get update
|
|||||||
# - debian build settings at debian/control
|
# - debian build settings at debian/control
|
||||||
sudo apt-get install libboost-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-locale-dev libboost-iostreams-dev \
|
sudo apt-get install libboost-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-locale-dev libboost-iostreams-dev \
|
||||||
libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev \
|
libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev \
|
||||||
qtbase5-dev \
|
qtbase5-dev qttools5-dev \
|
||||||
ninja-build zlib1g-dev libavformat-dev libswscale-dev libtbb-dev libluajit-5.1-dev \
|
ninja-build zlib1g-dev libavformat-dev libswscale-dev libtbb-dev libluajit-5.1-dev \
|
||||||
libminizip-dev libfuzzylite-dev qttools5-dev libsqlite3-dev # Optional dependencies
|
libminizip-dev libfuzzylite-dev libsqlite3-dev # Optional dependencies
|
@@ -1,9 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
sudo apt remove needrestart
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
# In case of change in dependencies list please also update:
|
||||||
|
# - developer docs at docs/developer/Building_Linux.md
|
||||||
|
# - debian build settings at debian/control
|
||||||
sudo apt-get install libboost-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-locale-dev libboost-iostreams-dev \
|
sudo apt-get install libboost-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-locale-dev libboost-iostreams-dev \
|
||||||
libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev \
|
libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev \
|
||||||
qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools \
|
qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools \
|
2
CI/mac/before_install.sh → CI/before_install/macos.sh
Executable file → Normal file
2
CI/mac/before_install.sh → CI/before_install/macos.sh
Executable file → Normal file
@@ -3,5 +3,3 @@
|
|||||||
echo DEVELOPER_DIR=/Applications/Xcode_14.2.app >> $GITHUB_ENV
|
echo DEVELOPER_DIR=/Applications/Xcode_14.2.app >> $GITHUB_ENV
|
||||||
|
|
||||||
brew install ninja
|
brew install ninja
|
||||||
|
|
||||||
. CI/install_conan_dependencies.sh "$DEPS_FILENAME"
|
|
7
CI/before_install/mingw.sh
Normal file
7
CI/before_install/mingw.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install ninja-build mingw-w64 nsis
|
||||||
|
|
||||||
|
sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
|
||||||
|
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
|
@@ -10,7 +10,7 @@ STRIP={{ target_host }}-strip
|
|||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{% macro generate_env_win32(target_host) -%}
|
{% macro generate_env_win32(target_host) -%}
|
||||||
CONAN_SYSTEM_LIBRARY_LOCATION=/usr/lib/gcc/{{ target_host }}/10-posix/
|
CONAN_SYSTEM_LIBRARY_LOCATION=/usr/lib/gcc/{{ target_host }}/13-posix/
|
||||||
RC={{ target_host }}-windres
|
RC={{ target_host }}-windres
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
RELEASE_TAG="1.2"
|
RELEASE_TAG="1.3"
|
||||||
FILENAME="$1"
|
FILENAME="$1"
|
||||||
DOWNLOAD_URL="https://github.com/vcmi/vcmi-dependencies/releases/download/$RELEASE_TAG/$FILENAME.txz"
|
DOWNLOAD_URL="https://github.com/vcmi/vcmi-dependencies/releases/download/$RELEASE_TAG/$FILENAME.txz"
|
||||||
|
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
echo DEVELOPER_DIR=/Applications/Xcode_14.2.app >> $GITHUB_ENV
|
|
||||||
|
|
||||||
. CI/install_conan_dependencies.sh "dependencies-ios"
|
|
@@ -1 +0,0 @@
|
|||||||
#!/bin/sh
|
|
@@ -1 +0,0 @@
|
|||||||
#!/bin/sh
|
|
@@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
DEPS_FILENAME=dependencies-mac-arm
|
|
||||||
. CI/mac/before_install.sh
|
|
@@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
DEPS_FILENAME=dependencies-mac-intel
|
|
||||||
. CI/mac/before_install.sh
|
|
@@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install ninja-build mingw-w64 nsis
|
|
||||||
sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
|
|
||||||
|
|
||||||
# Workaround for getting new MinGW headers on Ubuntu 22.04.
|
|
||||||
# Remove it once MinGW headers version in repository will be 10.0 at least
|
|
||||||
curl -O -L http://mirrors.kernel.org/ubuntu/pool/universe/m/mingw-w64/mingw-w64-common_10.0.0-3_all.deb \
|
|
||||||
&& sudo dpkg -i mingw-w64-common_10.0.0-3_all.deb;
|
|
||||||
curl -O -L http://mirrors.kernel.org/ubuntu/pool/universe/m/mingw-w64/mingw-w64-i686-dev_10.0.0-3_all.deb \
|
|
||||||
&& sudo dpkg -i mingw-w64-i686-dev_10.0.0-3_all.deb;
|
|
||||||
|
|
||||||
. CI/install_conan_dependencies.sh "dependencies-mingw-32"
|
|
@@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install ninja-build mingw-w64 nsis
|
|
||||||
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
|
|
||||||
|
|
||||||
# Workaround for getting new MinGW headers on Ubuntu 22.04.
|
|
||||||
# Remove it once MinGW headers version in repository will be 10.0 at least
|
|
||||||
curl -O -L http://mirrors.kernel.org/ubuntu/pool/universe/m/mingw-w64/mingw-w64-common_10.0.0-3_all.deb \
|
|
||||||
&& sudo dpkg -i mingw-w64-common_10.0.0-3_all.deb;
|
|
||||||
curl -O -L http://mirrors.kernel.org/ubuntu/pool/universe/m/mingw-w64/mingw-w64-x86-64-dev_10.0.0-3_all.deb \
|
|
||||||
&& sudo dpkg -i mingw-w64-x86-64-dev_10.0.0-3_all.deb;
|
|
||||||
|
|
||||||
. CI/install_conan_dependencies.sh "dependencies-mingw"
|
|
@@ -1,6 +0,0 @@
|
|||||||
cd %APPVEYOR_BUILD_FOLDER%
|
|
||||||
cd build_%VCMI_BUILD_PLATFORM%
|
|
||||||
|
|
||||||
cmake --build . --config %VCMI_BUILD_CONFIGURATION% -- /maxcpucount:2
|
|
||||||
|
|
||||||
cpack
|
|
@@ -1,5 +0,0 @@
|
|||||||
cd %APPVEYOR_BUILD_FOLDER%
|
|
||||||
cd build_%VCMI_BUILD_PLATFORM%
|
|
||||||
|
|
||||||
echo Building with coverity...
|
|
||||||
cov-build.exe --dir cov-int cmake --build . --config %VCMI_BUILD_CONFIGURATION% -- /maxcpucount:2
|
|
@@ -1,17 +0,0 @@
|
|||||||
7z a "$Env:APPVEYOR_BUILD_FOLDER\$Env:APPVEYOR_PROJECT_NAME.zip" "$Env:APPVEYOR_BUILD_FOLDER\build_$Env:VCMI_BUILD_PLATFORM\cov-int\"
|
|
||||||
|
|
||||||
# cf. http://stackoverflow.com/a/25045154/335418
|
|
||||||
Remove-item alias:curl
|
|
||||||
|
|
||||||
Write-Host "Uploading Coverity analysis result..." -ForegroundColor "Green"
|
|
||||||
|
|
||||||
curl --silent --show-error `
|
|
||||||
--output curl-out.txt `
|
|
||||||
--form token="$Env:coverity_token" `
|
|
||||||
--form email="$Env:coverity_email" `
|
|
||||||
--form "file=@$Env:APPVEYOR_BUILD_FOLDER\$Env:APPVEYOR_PROJECT_NAME.zip" `
|
|
||||||
--form version="$Env:APPVEYOR_REPO_COMMIT" `
|
|
||||||
--form description="CI server scheduled build." `
|
|
||||||
https://scan.coverity.com/builds?project=vcmi%2Fvcmi
|
|
||||||
|
|
||||||
cat .\curl-out.txt
|
|
@@ -180,11 +180,6 @@ else()
|
|||||||
add_definitions(-DVCMI_NO_EXTRA_VERSION)
|
add_definitions(-DVCMI_NO_EXTRA_VERSION)
|
||||||
endif(ENABLE_GITVERSION)
|
endif(ENABLE_GITVERSION)
|
||||||
|
|
||||||
# Precompiled header configuration
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0 )
|
|
||||||
set(ENABLE_PCH OFF) # broken
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(ENABLE_PCH)
|
if(ENABLE_PCH)
|
||||||
macro(enable_pch name)
|
macro(enable_pch name)
|
||||||
target_precompile_headers(${name} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:<StdInc.h$<ANGLE-R>>)
|
target_precompile_headers(${name} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:<StdInc.h$<ANGLE-R>>)
|
||||||
@@ -328,7 +323,6 @@ if(MINGW OR MSVC)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244") # 4244: conversion from 'xxx' to 'yyy', possible loss of data
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244") # 4244: conversion from 'xxx' to 'yyy', possible loss of data
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267") # 4267: conversion from 'xxx' to 'yyy', possible loss of data
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267") # 4267: conversion from 'xxx' to 'yyy', possible loss of data
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4275") # 4275: non dll-interface class 'xxx' used as base for dll-interface class
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4275") # 4275: non dll-interface class 'xxx' used as base for dll-interface class
|
||||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800") # 4800: implicit conversion from 'xxx' to bool. Possible information loss
|
|
||||||
|
|
||||||
if(ENABLE_STRICT_COMPILATION)
|
if(ENABLE_STRICT_COMPILATION)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") # Treats all compiler warnings as errors
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") # Treats all compiler warnings as errors
|
||||||
@@ -493,14 +487,23 @@ if (ENABLE_CLIENT)
|
|||||||
if(TARGET SDL2_image::SDL2_image)
|
if(TARGET SDL2_image::SDL2_image)
|
||||||
add_library(SDL2::Image ALIAS SDL2_image::SDL2_image)
|
add_library(SDL2::Image ALIAS SDL2_image::SDL2_image)
|
||||||
endif()
|
endif()
|
||||||
|
if(TARGET SDL2_image::SDL2_image-static)
|
||||||
|
add_library(SDL2::Image ALIAS SDL2_image::SDL2_image-static)
|
||||||
|
endif()
|
||||||
find_package(SDL2_mixer REQUIRED)
|
find_package(SDL2_mixer REQUIRED)
|
||||||
if(TARGET SDL2_mixer::SDL2_mixer)
|
if(TARGET SDL2_mixer::SDL2_mixer)
|
||||||
add_library(SDL2::Mixer ALIAS SDL2_mixer::SDL2_mixer)
|
add_library(SDL2::Mixer ALIAS SDL2_mixer::SDL2_mixer)
|
||||||
endif()
|
endif()
|
||||||
|
if(TARGET SDL2_mixer::SDL2_mixer-static)
|
||||||
|
add_library(SDL2::Mixer ALIAS SDL2_mixer::SDL2_mixer-static)
|
||||||
|
endif()
|
||||||
find_package(SDL2_ttf REQUIRED)
|
find_package(SDL2_ttf REQUIRED)
|
||||||
if(TARGET SDL2_ttf::SDL2_ttf)
|
if(TARGET SDL2_ttf::SDL2_ttf)
|
||||||
add_library(SDL2::TTF ALIAS SDL2_ttf::SDL2_ttf)
|
add_library(SDL2::TTF ALIAS SDL2_ttf::SDL2_ttf)
|
||||||
endif()
|
endif()
|
||||||
|
if(TARGET SDL2_ttf::SDL2_ttf-static)
|
||||||
|
add_library(SDL2::TTF ALIAS SDL2_ttf::SDL2_ttf-static)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_LOBBY)
|
if(ENABLE_LOBBY)
|
||||||
@@ -737,7 +740,9 @@ if(WIN32)
|
|||||||
${dep_files}
|
${dep_files}
|
||||||
"${CMAKE_SYSROOT}/bin/*.dll"
|
"${CMAKE_SYSROOT}/bin/*.dll"
|
||||||
"${CMAKE_SYSROOT}/lib/*.dll"
|
"${CMAKE_SYSROOT}/lib/*.dll"
|
||||||
"${CONAN_SYSTEM_LIBRARY_LOCATION}/*.dll")
|
"${CONAN_SYSTEM_LIBRARY_LOCATION}/libgcc_s_dw2-1.dll" # for 32-bit only?
|
||||||
|
"${CONAN_SYSTEM_LIBRARY_LOCATION}/libgcc_s_seh-1.dll" # for 64-bit only?
|
||||||
|
"${CONAN_SYSTEM_LIBRARY_LOCATION}/libstdc++-6.dll")
|
||||||
else()
|
else()
|
||||||
file(GLOB dep_files
|
file(GLOB dep_files
|
||||||
${dep_files}
|
${dep_files}
|
||||||
|
57
conanfile.py
57
conanfile.py
@@ -15,10 +15,11 @@ class VCMI(ConanFile):
|
|||||||
"minizip/[~1.2.12]",
|
"minizip/[~1.2.12]",
|
||||||
]
|
]
|
||||||
_clientRequires = [
|
_clientRequires = [
|
||||||
"sdl/[~2.26.1 || >=2.0.20 <=2.22.0]", # versions in between have broken sound
|
# Versions between 2.5-2.8 have broken loading of palette sdl images which a lot of mods use
|
||||||
"sdl_image/[~2.0.5]",
|
# there is workaround that require disabling cmake flag which is not available in conan recipes.
|
||||||
"sdl_mixer/[~2.0.4]",
|
# Bug is fixed in version 2.8, however it is not available in conan at the moment
|
||||||
"sdl_ttf/[~2.0.18]",
|
"sdl_image/2.0.5",
|
||||||
|
"sdl_ttf/[>=2.0.18]",
|
||||||
"onetbb/[^2021.7 <2021.10]", # 2021.10+ breaks mobile builds due to added hwloc dependency
|
"onetbb/[^2021.7 <2021.10]", # 2021.10+ breaks mobile builds due to added hwloc dependency
|
||||||
"xz_utils/[>=5.2.5]", # Required for innoextract
|
"xz_utils/[>=5.2.5]", # Required for innoextract
|
||||||
]
|
]
|
||||||
@@ -46,21 +47,41 @@ class VCMI(ConanFile):
|
|||||||
self.options["freetype"].shared = self.settings.os == "Android"
|
self.options["freetype"].shared = self.settings.os == "Android"
|
||||||
|
|
||||||
# SDL_image and Qt depend on it, in iOS both are static
|
# SDL_image and Qt depend on it, in iOS both are static
|
||||||
# Enable static libpng due to https://github.com/conan-io/conan-center-index/issues/15440,
|
self.options["libpng"].shared = self.settings.os != "iOS"
|
||||||
# which leads to VCMI crashes of MinGW
|
|
||||||
self.options["libpng"].shared = not (self.settings.os == "Windows" and cross_building(self)) and self.settings.os != "iOS"
|
|
||||||
# static Qt for iOS is the only viable option at the moment
|
# static Qt for iOS is the only viable option at the moment
|
||||||
self.options["qt"].shared = self.settings.os != "iOS"
|
self.options["qt"].shared = self.settings.os != "iOS"
|
||||||
|
|
||||||
if self.settings.os == "Android":
|
|
||||||
self.options["qt"].android_sdk = tools.get_env("ANDROID_HOME", default="")
|
|
||||||
|
|
||||||
# TODO: enable for all platforms
|
# TODO: enable for all platforms
|
||||||
if self.settings.os == "Android":
|
if self.settings.os == "Android":
|
||||||
self.options["bzip2"].shared = True
|
self.options["bzip2"].shared = True
|
||||||
self.options["libiconv"].shared = True
|
self.options["libiconv"].shared = True
|
||||||
self.options["zlib"].shared = True
|
self.options["zlib"].shared = True
|
||||||
|
|
||||||
|
# TODO: enable for all platforms?
|
||||||
|
if self.settings.os == "Windows":
|
||||||
|
self.options["sdl"].shared = True
|
||||||
|
self.options["sdl_image"].shared = True
|
||||||
|
self.options["sdl_mixer"].shared = True
|
||||||
|
self.options["sdl_ttf"].shared = True
|
||||||
|
|
||||||
|
if self.settings.os == "iOS":
|
||||||
|
# TODO: ios - newer sdl fails to link
|
||||||
|
self.requires("sdl/2.26.1")
|
||||||
|
self.requires("sdl_mixer/2.0.4")
|
||||||
|
elif self.settings.os == "Android":
|
||||||
|
# On Android SDL version must be same as version of Java wrapper for SDL in VCMI source code
|
||||||
|
# Wrapper can be found in following directory: android/vcmi-app/src/main/java/org/libsdl/app
|
||||||
|
self.requires("sdl/2.26.5")
|
||||||
|
self.requires("sdl_mixer/2.0.4")
|
||||||
|
else:
|
||||||
|
# upcoming SDL version 3.0+ is not supported at the moment due to API breakage
|
||||||
|
# SDL versions between 2.22-2.26.1 have broken sound
|
||||||
|
self.requires("sdl/[^2.26 || >=2.0.20 <=2.22.0]")
|
||||||
|
self.requires("sdl_mixer/[>=2.0.4]")
|
||||||
|
|
||||||
|
if self.settings.os == "Android":
|
||||||
|
self.options["qt"].android_sdk = tools.get_env("ANDROID_HOME", default="")
|
||||||
|
|
||||||
if self.options.default_options_of_requirements:
|
if self.options.default_options_of_requirements:
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -86,6 +107,7 @@ class VCMI(ConanFile):
|
|||||||
self.options["boost"].without_timer = True
|
self.options["boost"].without_timer = True
|
||||||
self.options["boost"].without_type_erasure = True
|
self.options["boost"].without_type_erasure = True
|
||||||
self.options["boost"].without_wave = True
|
self.options["boost"].without_wave = True
|
||||||
|
self.options["boost"].without_url = True
|
||||||
|
|
||||||
self.options["ffmpeg"].disable_all_bitstream_filters = True
|
self.options["ffmpeg"].disable_all_bitstream_filters = True
|
||||||
self.options["ffmpeg"].disable_all_decoders = True
|
self.options["ffmpeg"].disable_all_decoders = True
|
||||||
@@ -149,8 +171,13 @@ class VCMI(ConanFile):
|
|||||||
self.options["sdl"].sdl2main = self.settings.os != "iOS"
|
self.options["sdl"].sdl2main = self.settings.os != "iOS"
|
||||||
self.options["sdl"].vulkan = False
|
self.options["sdl"].vulkan = False
|
||||||
|
|
||||||
|
# bmp, png are the only ones that needs to be supported
|
||||||
|
# dds support may be useful for HD edition, but not supported by sdl_image at the moment
|
||||||
|
self.options["sdl_image"].gif = False
|
||||||
self.options["sdl_image"].lbm = False
|
self.options["sdl_image"].lbm = False
|
||||||
self.options["sdl_image"].pnm = False
|
self.options["sdl_image"].pnm = False
|
||||||
|
self.options["sdl_image"].pcx = False
|
||||||
|
#self.options["sdl_image"].qoi = False # sdl_image >=2.6
|
||||||
self.options["sdl_image"].svg = False
|
self.options["sdl_image"].svg = False
|
||||||
self.options["sdl_image"].tga = False
|
self.options["sdl_image"].tga = False
|
||||||
self.options["sdl_image"].with_libjpeg = False
|
self.options["sdl_image"].with_libjpeg = False
|
||||||
@@ -162,13 +189,17 @@ class VCMI(ConanFile):
|
|||||||
if is_apple_os(self):
|
if is_apple_os(self):
|
||||||
self.options["sdl_image"].imageio = True
|
self.options["sdl_image"].imageio = True
|
||||||
|
|
||||||
|
# mp3, ogg and wav are the only ones that needs to be supported
|
||||||
|
# opus is nice to have, but fails to build in CI
|
||||||
|
# flac can be considered, but generally unnecessary
|
||||||
self.options["sdl_mixer"].flac = False
|
self.options["sdl_mixer"].flac = False
|
||||||
|
self.options["sdl_mixer"].modplug = False
|
||||||
|
self.options["sdl_mixer"].opus = False
|
||||||
|
if self.settings.os == "iOS" or self.settings.os == "Android":
|
||||||
|
# only available in older sdl_mixer version, removed in newer version
|
||||||
self.options["sdl_mixer"].mad = False
|
self.options["sdl_mixer"].mad = False
|
||||||
self.options["sdl_mixer"].mikmod = False
|
self.options["sdl_mixer"].mikmod = False
|
||||||
self.options["sdl_mixer"].modplug = False
|
|
||||||
self.options["sdl_mixer"].nativemidi = False
|
self.options["sdl_mixer"].nativemidi = False
|
||||||
self.options["sdl_mixer"].opus = False
|
|
||||||
self.options["sdl_mixer"].wav = False
|
|
||||||
|
|
||||||
def _disableQtOptions(disableFlag, options):
|
def _disableQtOptions(disableFlag, options):
|
||||||
return " ".join([f"-{disableFlag}-{tool}" for tool in options])
|
return " ".join([f"-{disableFlag}-{tool}" for tool in options])
|
||||||
|
@@ -25,13 +25,21 @@ For animations VCMI supports .def format from Heroes III as well as alternative
|
|||||||
|
|
||||||
### Sounds
|
### Sounds
|
||||||
|
|
||||||
For sounds VCMI currently requires .wav format. Generally, VCMI will support any .wav parameters, however you might want to use high-bitrate versions, such as 44100 Hz or 48000 Hz, 32 bit, 1 or 2 channels
|
For sounds VCMI currently supports:
|
||||||
|
- .ogg/vorbis format - preferred for mods. Unlike wav, vorbis uses compression which may cause some data loss, however even 128kbit is generally undistinguishable from lossless formats
|
||||||
|
- .wav format. This is format used by H3. It is supported by vcmi, but it may result in large file sizes (and as result - large mods)
|
||||||
|
|
||||||
Support for additional formats, such as ogg/vorbis and ogg/opus is likely to be added in future
|
Generally, VCMI will support any audio parameters, however you might want to use high-bitrate versions, such as 44100 Hz or 48000 Hz, 32 bit, 1 or 2 channels
|
||||||
|
|
||||||
|
Support for additional formats, such as ogg/opus or flac may be added in future
|
||||||
|
|
||||||
### Music
|
### Music
|
||||||
|
|
||||||
For sounds VCMI currently requires .mp3 format. Support for additional formats, such as ogg/vorbis and ogg/opus is likely to be added in future
|
For music VCMI currently supports:
|
||||||
|
- .ogg/vorbis format - preferred for mods. Generally offers better quality and lower sizes compared to mp3
|
||||||
|
- .mp3 format. This is format used by H3
|
||||||
|
|
||||||
|
Support for additional formats, such as ogg/opus may be added in future
|
||||||
|
|
||||||
### Video
|
### Video
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user