From 726eb720261c60f1858f1b58d955afc28f9c4858 Mon Sep 17 00:00:00 2001 From: Atanas Janeshliev Date: Thu, 30 Oct 2025 11:38:16 +0100 Subject: [PATCH] chore: Bump VCPKG on Windows; resolve build issues --- extern/vcpkg-windows | 2 +- .../bridge-gui/bridge-gui/CMakeLists.txt | 5 +++++ .../frontend/bridge-gui/bridge-gui/build.ps1 | 20 +++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/extern/vcpkg-windows b/extern/vcpkg-windows index fba75d09..120deac3 160000 --- a/extern/vcpkg-windows +++ b/extern/vcpkg-windows @@ -1 +1 @@ -Subproject commit fba75d09065fcc76a25dcf386b1d00d33f5175af +Subproject commit 120deac3062162151622ca4860575a33844ba10b diff --git a/internal/frontend/bridge-gui/bridge-gui/CMakeLists.txt b/internal/frontend/bridge-gui/bridge-gui/CMakeLists.txt index 93a9f499..f7031fb9 100644 --- a/internal/frontend/bridge-gui/bridge-gui/CMakeLists.txt +++ b/internal/frontend/bridge-gui/bridge-gui/CMakeLists.txt @@ -57,6 +57,11 @@ if (APPLE) # We need to link the Cocoa framework for the dock icon. find_library(COCOA_LIBRARY Cocoa REQUIRED) endif() +if (WIN32) + add_compile_definitions(NOMINMAX) # Interference with grpc and msvc macros + add_compile_definitions(WIN32_LEAN_AND_MEAN) +endif() + #***************************************************************************************************************************************************** # Qt diff --git a/internal/frontend/bridge-gui/bridge-gui/build.ps1 b/internal/frontend/bridge-gui/bridge-gui/build.ps1 index 749adcdd..c06acdf1 100644 --- a/internal/frontend/bridge-gui/bridge-gui/build.ps1 +++ b/internal/frontend/bridge-gui/bridge-gui/build.ps1 @@ -22,6 +22,26 @@ Write-host "Bridge-gui directory is $scriptDir" Write-host "Bridge repos root dir $bridgeRepoRootDir" Push-Location $scriptDir +# There is bug in CI caused by defining the lower case and upper case +# vars for proxy. For pure bash (case sensitive - creating +# two env items) or pure powershell (case insensitive - by default writes any +# changes into first defined env instance) it is transparent. But during bridge gui +# build we are populating case sensitive env vars from bash to powershell which +# then cause error when trying to list env vars. This is causing an error +# during CMake lookup for CXX and build fails. Therefore we need unset the +# lower case version if present. +Write-Host "Checking for duplicate proxy variables..." +@("HTTP_PROXY", "HTTPS_PROXY", "NO_PROXY") | ForEach-Object { + $upper = $_ + $lower = $_.ToLower() + + if ((Test-Path "Env:$upper") -and (Test-Path "Env:$lower")) { + Write-Host "Removing duplicate lowercase variable: $lower" + Remove-Item "Env:$lower" -ErrorAction SilentlyContinue + } +} + + $ErrorActionPreference = "Stop"