Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .github/workflows/rebuildDependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ jobs:
windowsPerl=$(which -a perl | fgrep Strawberry)
echo "WINDOWS_PERL_DIR=$(dirname "$windowsPerl")" >> "$GITHUB_ENV"

- name: Detect Visual Studio version (Windows)
if: ${{ startsWith(matrix.platform, 'windows') }}
shell: pwsh
run: |
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vsInstallationVersion = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationVersion
$vsMajor = ($vsInstallationVersion -split '\.')[0]
echo "MSBUILD_VS_VERSION=$vsMajor" >> $env:GITHUB_ENV

- name: Install MSVC v142 toolset (Windows non-ARM)
if: ${{ startsWith(matrix.platform, 'windows') && matrix.platform != 'windows-arm64' }}
shell: pwsh
Expand All @@ -112,14 +103,17 @@ jobs:
run: |
BUILD_ACTION=prepare ./build.sh >> "$GITHUB_ENV"

- name: Configure VS version for Conan (Windows)
- name: Configure VS version for Conan
if: ${{ startsWith(matrix.platform, 'windows') }}
shell: pwsh
run: |
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vsInstallationVersion = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationVersion
$vsMajor = ($vsInstallationVersion -split '\.')[0]

$platformToolsPath = Join-Path -Path $env:RUNNER_TEMP -ChildPath platformTools
# appends to [conf]
Add-Content -Path $platformToolsPath -Value "tools.microsoft.msbuild:vs_version=$env:MSBUILD_VS_VERSION"
Write-Host "Configured tools.microsoft.msbuild:vs_version=$env:MSBUILD_VS_VERSION"
Add-Content -Path $platformToolsPath -Value "tools.microsoft.msbuild:vs_version=$vsMajor"

- name: Configure MSYS2
if: ${{ startsWith(matrix.platform, 'windows') && matrix.platform != 'windows-arm64' }}
Expand Down
7 changes: 4 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ tempDir="${tempDir//\\//}" # for Windows
scriptDir=$(cd "$(dirname "$0")" && pwd)
cciRecipePathQt='recipes/qt'
cciRepoName='conan-center-index'
conanOptionOrdinaryLuaLib='&:lua_lib=lua'
conanOptionTargetPreWindows10='&:target_pre_windows10=True'
if command -v python3 >/dev/null ; then
python=python3
Expand Down Expand Up @@ -187,7 +186,9 @@ build_recipes_from_cci_pull_requests() {
# - https://github.com/conan-io/conan-center-index/pull/28251
# - https://github.com/conan-io/conan-center-index/pull/29299

[[ "${CONAN_OPTIONS:-}" == *"$conanOptionOrdinaryLuaLib"* ]] || buildLuaJit=1
if [[ -z "${CONAN_OPTIONS:-}" || "$CONAN_OPTIONS" == *"lua_lib=luajit"* ]]; then
buildLuaJit=1
fi

clone_repo "https://github.com/kambala-decapitator/$cciRepoName" cci-fork vcmi \
${buildLuaJit:+ recipes/luajit} \
Expand Down Expand Up @@ -268,7 +269,7 @@ case "$platform" in
;;
windows-arm64)
CONAN_PROFILES_JSON_ARRAY='["msvc-arm64"]'
CONAN_OPTIONS="--options '$conanOptionOrdinaryLuaLib'"
CONAN_OPTIONS="--options '&:lua_lib=lua'"
;;
windows-x64)
CONAN_PROFILES_JSON_ARRAY='["msvc-x64"]'
Expand Down
1 change: 0 additions & 1 deletion conan_profiles/base/msvc-intel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ include(msvc)
# https://learn.microsoft.com/en-us/cpp/overview/compiler-versions
# v142 / 14.29 / 19.29
compiler.version=192
compiler.update=9

[conf]
{% set _WIN32_WINNT_WIN7 = '0x0601' %}
Expand Down
3 changes: 3 additions & 0 deletions conan_profiles/base/msvc-user
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[settings]
{% set compiler, version, _ = detect_api.detect_default_compiler() %}
&:compiler.version={{ detect_api.default_compiler_version(compiler, version) }}
1 change: 1 addition & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def requirements(self):

# client
if self.options.with_ffmpeg:
self.requires("opus/[<1.6]") # 1.6 doesn't build for Windows ARM: https://github.com/xiph/opus/pull/478
self.requires("ffmpeg/[>=4.4]")

if self.options.get_safe("with_discord_presence", False):
Expand Down
Loading