From 2b4803a0237f092af8ce1e6e1b6b734e9b7d2798 Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Sat, 1 Nov 2025 18:59:13 +0000 Subject: [PATCH] Bump Windows dependencies (#7755) --- appveyor.yml | 16 ++++----- dist/msi/CMakeLists.txt | 1 + dist/msi/components/QtClient.wxs | 10 ++++++ qt/ComInteropHelper.cc | 2 -- release/windows/build-curl.ps1 | 3 +- release/windows/build-dbus.ps1 | 4 +-- release/windows/build-expat.ps1 | 2 +- release/windows/build-openssl.ps1 | 2 +- release/windows/build-qt5.ps1 | 4 +-- release/windows/build-qt6.ps1 | 48 +++++++++++++++++++++----- release/windows/build-transmission.ps1 | 5 +-- release/windows/build-zlib.ps1 | 2 +- 12 files changed, 70 insertions(+), 29 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index cdacf14b7..aa7f1c0f0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,6 +8,8 @@ environment: AWS_S3_BUCKET_NAME: secure: Bf3x1Iruxg+l3tp+an+g9oE36EHxvyWrE8GTJzZh4Ss= + APPVEYOR_SAVE_CACHE_ON_ERROR: true + matrix: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 TR_ARCH: x86 @@ -38,10 +40,6 @@ for: cache: - '%SystemDrive%\%TR_ARCH%-ccache' - init: - - pwsh: | - $Env:APPVEYOR_SAVE_CACHE_ON_ERROR = 'true' - install: - pwsh: | $Version = git describe --tags --abbrev=10 --always @@ -58,14 +56,14 @@ for: git submodule update --init --recursive - choco install python3 --pre + # choco install python3 choco install nasm choco install jom - choco install wixtoolset --version 3.14.0 - choco install ccache --version 4.8.3 + # choco install wixtoolset --version 3.14.0 + choco install ccache - Remove-Item -Path (Join-Path $Env:SystemDrive OpenSSL-Win32) -Recurse - Remove-Item -Path (Join-Path $Env:SystemDrive OpenSSL-Win64) -Recurse + Rename-Item -Path (Join-Path $Env:SystemDrive OpenSSL-Win32) -NewName OpenSSL-Win32_ + Rename-Item -Path (Join-Path $Env:SystemDrive OpenSSL-Win64) -NewName OpenSSL-Win64_ Install-Module -Name SignPath diff --git a/dist/msi/CMakeLists.txt b/dist/msi/CMakeLists.txt index 3530345e4..7dfb6af86 100644 --- a/dist/msi/CMakeLists.txt +++ b/dist/msi/CMakeLists.txt @@ -91,6 +91,7 @@ wix_candle(WIX_OBJS "ThirdPartyDir=${TR_THIRD_PARTY_DIR}" "QtDir=${TR_QT_DIR}" "QtMajorVer=${Qt_VERSION_MAJOR}" + "QtMinorVer=${Qt_VERSION_MINOR}" "LicenseFile=${CMAKE_CURRENT_SOURCE_DIR}/GPLv2.rtf" "WebSrcDir=${WEBSRCDIR}" "TrQmSrcDir=${TRQMSRCDIR}" diff --git a/dist/msi/components/QtClient.wxs b/dist/msi/components/QtClient.wxs index 010610c37..5ea7e3810 100644 --- a/dist/msi/components/QtClient.wxs +++ b/dist/msi/components/QtClient.wxs @@ -134,9 +134,15 @@ + + + + + + @@ -175,7 +181,11 @@ + + + + diff --git a/qt/ComInteropHelper.cc b/qt/ComInteropHelper.cc index c7a5c0193..02f7f5bf8 100644 --- a/qt/ComInteropHelper.cc +++ b/qt/ComInteropHelper.cc @@ -19,7 +19,6 @@ QAXCLASS(InteropObject) QAXFACTORY_END() // NOLINT // These are ActiveQt internals; declaring here as I don't like their WinMain much... -extern HANDLE qAxInstance; // NOLINT extern bool qAxOutProcServer; // NOLINT extern wchar_t qAxModuleFilename[MAX_PATH]; // NOLINT extern QString qAxInit(); // NOLINT @@ -43,7 +42,6 @@ void ComInteropHelper::initialize() { qAxOutProcServer = true; ::GetModuleFileNameW(nullptr, qAxModuleFilename, MAX_PATH); - qAxInstance = ::GetModuleHandleW(nullptr); ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); qAxInit(); diff --git a/release/windows/build-curl.ps1 b/release/windows/build-curl.ps1 index 28c241df5..6ab825f49 100644 --- a/release/windows/build-curl.ps1 +++ b/release/windows/build-curl.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -$global:CurlVersion = '8.4.0' +$global:CurlVersion = '8.16.0' $global:CurlDeps = @( 'OpenSsl' @@ -33,6 +33,7 @@ function global:Build-Curl([string] $PrefixDir, [string] $Arch, [string] $DepsPr '-DCURL_DISABLE_SMTP=ON' '-DCURL_DISABLE_TELNET=ON' '-DCURL_DISABLE_TFTP=ON' + '-DCURL_USE_LIBPSL=OFF' '-DCURL_USE_LIBSSH=OFF' '-DCURL_USE_LIBSSH2=OFF' '-DCURL_USE_OPENSSL=ON' diff --git a/release/windows/build-dbus.ps1 b/release/windows/build-dbus.ps1 index babd93b5a..c7d50eab6 100644 --- a/release/windows/build-dbus.ps1 +++ b/release/windows/build-dbus.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -$global:DBusVersion = '1.14.10' +$global:DBusVersion = '1.16.2' $global:DBusDeps = @( 'Expat' @@ -24,7 +24,7 @@ function global:Build-DBus([string] $PrefixDir, [string] $Arch, [string] $DepsPr ) # Patch to remove "-3" (or whatever) revision suffix part from DLL name since Qt doesn't seem to support that and we don't really need it - Edit-TextFile (Join-Path $SourceDir cmake modules MacrosAutotools.cmake) '^.*_LIBRARY_REVISION.*' '' + Edit-TextFile (Join-Path $SourceDir cmake modules MacrosMeson.cmake) '^.*_LIBRARY_REVISION.*' '' Invoke-CMakeBuildAndInstall $SourceDir $BuildDir $ConfigOptions Copy-Item -Path (Join-Path $BuildDir bin dbus-1.pdb) -Destination (Join-Path $PrefixDir bin) diff --git a/release/windows/build-expat.ps1 b/release/windows/build-expat.ps1 index 87919a5d8..6c4bedd3a 100644 --- a/release/windows/build-expat.ps1 +++ b/release/windows/build-expat.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -$global:ExpatVersion = '2.5.0' +$global:ExpatVersion = '2.7.3' $global:ExpatDeps = @() diff --git a/release/windows/build-openssl.ps1 b/release/windows/build-openssl.ps1 index c220798d4..fe8b2e2ce 100644 --- a/release/windows/build-openssl.ps1 +++ b/release/windows/build-openssl.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -$global:OpenSslVersion = '3.1.5' +$global:OpenSslVersion = '3.5.4' $global:OpenSslDeps = @() diff --git a/release/windows/build-qt5.ps1 b/release/windows/build-qt5.ps1 index 154b35048..5901b3525 100644 --- a/release/windows/build-qt5.ps1 +++ b/release/windows/build-qt5.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -$global:Qt5Version = '5.15.11' +$global:Qt5Version = '5.15.17' $global:Qt5Deps = @( 'DBus' @@ -10,7 +10,7 @@ $global:Qt5Deps = @( function global:Build-Qt5([string] $PrefixDir, [string] $Arch, [string] $DepsPrefixDir) { $Filename = "qt-everywhere-opensource-src-${Qt5Version}.zip" # tar.xz has some names truncated (e.g. .../double-conversion.h -> .../double-conv) - $Url = "http://qt.mirror.constant.com/archive/qt/$($Qt5Version -replace '\.\d+$', '')/${Qt5Version}/single/${Filename}" + $Url = "https://qt.mirror.constant.com/archive/qt/$($Qt5Version -replace '\.\d+$', '')/${Qt5Version}/single/${Filename}" $ArchiveBase = "qt-everywhere-src-${Qt5Version}" $UnpackFlags = @( diff --git a/release/windows/build-qt6.ps1 b/release/windows/build-qt6.ps1 index ff701f544..8adc0e876 100644 --- a/release/windows/build-qt6.ps1 +++ b/release/windows/build-qt6.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -$global:Qt6Version = '6.6.2' +$global:Qt6Version = '6.10.0' $global:Qt6Deps = @( 'DBus' @@ -10,7 +10,7 @@ $global:Qt6Deps = @( function global:Build-Qt6([string] $PrefixDir, [string] $Arch, [string] $DepsPrefixDir) { $Filename = "qt-everywhere-src-${Qt6Version}.zip" # tar.xz has some names truncated (e.g. .../double-conversion.h -> .../double-conv) - $Url = "http://qt.mirror.constant.com/archive/qt/$($Qt6Version -replace '\.\d+$', '')/${Qt6Version}/single/${Filename}" + $Url = "https://qt.mirror.constant.com/archive/qt/$($Qt6Version -replace '\.\d+$', '')/${Qt6Version}/single/${Filename}" $ArchiveBase = "qt-everywhere-src-${Qt6Version}" $UnpackFlags = @( @@ -19,7 +19,6 @@ function global:Build-Qt6([string] $PrefixDir, [string] $Arch, [string] $DepsPre (Join-Path $ArchiveBase qtsvg '*') (Join-Path $ArchiveBase qttools '*') (Join-Path $ArchiveBase qttranslations '*') - (Join-Path $ArchiveBase qtwinextras '*') (Join-Path $ArchiveBase .gitmodules) (Join-Path $ArchiveBase cmake) (Join-Path $ArchiveBase CMakeLists.txt) @@ -36,8 +35,10 @@ function global:Build-Qt6([string] $PrefixDir, [string] $Arch, [string] $DepsPre '-opensource' '-confirm-license' '-prefix'; $PrefixDir + '-disable-deprecated-up-to'; '0x060000' '-release' '-force-debug-info' + '-unity-build' '-dbus' '-ssl' '-openssl' @@ -50,43 +51,63 @@ function global:Build-Qt6([string] $PrefixDir, [string] $Arch, [string] $DepsPre '-no-harfbuzz' '-no-feature-androiddeployqt' '-no-feature-assistant' + '-no-feature-brotli' '-no-feature-clang' - '-no-feature-clangcpp' '-no-feature-commandlinkbutton' '-no-feature-concurrent' + '-no-feature-cpp-winrt' + '-no-feature-datawidgetmapper' '-no-feature-designer' '-no-feature-dial' + '-no-feature-direct2d' + '-no-feature-directwrite3' '-no-feature-distancefieldgenerator' '-no-feature-dockwidget' + '-no-feature-emojisegmenter' '-no-feature-fontcombobox' + '-no-feature-fontdialog' + '-no-feature-freetype' '-no-feature-gestures' - '-no-feature-graphicsview' + '-no-feature-harfbuzz' '-no-feature-keysequenceedit' '-no-feature-lcdnumber' + '-no-feature-listwidget' '-no-feature-mdiarea' + '-no-feature-networkdiskcache' '-no-feature-networklistmanager' '-no-feature-opengl' '-no-feature-pdf' '-no-feature-pixeltool' '-no-feature-printsupport' + '-no-feature-qdbus' '-no-feature-qtattributionsscanner' + '-no-feature-qtdiag' + '-no-feature-qtgui-threadpool' + '-no-feature-qtplugininfo' '-no-feature-raster-64bit' '-no-feature-schannel' '-no-feature-scroller' '-no-feature-sharedmemory' '-no-feature-splashscreen' '-no-feature-sql' + '-no-feature-sqlmodel' '-no-feature-syntaxhighlighter' '-no-feature-systemsemaphore' + '-no-feature-tablewidget' '-no-feature-testlib' '-no-feature-textmarkdownreader' '-no-feature-textmarkdownwriter' '-no-feature-textodfwriter' + '-no-feature-toolbox' + # '-no-feature-treewidget' '-no-feature-tuiotouch' '-no-feature-undocommand' + '-no-feature-vkgen' + '-no-feature-vulkan' '-no-feature-whatsthis' '-no-feature-windeployqt' '-no-feature-wizard' + '-no-feature-zstd' '-nomake'; 'examples' '-nomake'; 'tests' '-I'; (Join-Path $DepsPrefixDir include).Replace('\', '/') @@ -100,9 +121,20 @@ function global:Build-Qt6([string] $PrefixDir, [string] $Arch, [string] $DepsPre Edit-TextFile (Join-Path $SourceDir qtbase mkspecs win32-msvc qmake.conf) '(^QMAKE_CXXFLAGS\b.*)' "`$1`nQMAKE_LFLAGS += ${env:LDFLAGS}" } - # No need in GUI tools + # No need in GUI and some other tools Edit-TextFile (Join-Path $SourceDir qttools src CMakeLists.txt) 'TARGET Qt::Widgets' 'QT_FEATURE_designer' - Edit-TextFile (Join-Path $SourceDir qttools src linguist CMakeLists.txt) 'add_subdirectory[(]linguist[)]' '' + Edit-TextFile (Join-Path $SourceDir qttools src CMakeLists.txt) 'add_subdirectory[(]qdoc[)]' '' + Edit-TextFile (Join-Path $SourceDir qttools src linguist CMakeLists.txt) 'add_subdirectory[(](linguist|lprodump)[)]' '' + + # No need in 'testcon' QtAx tool + Edit-TextFile (Join-Path $SourceDir qtactiveqt CMakeLists.txt) 'OR NOT TARGET Qt::PrintSupport' '' + Edit-TextFile (Join-Path $SourceDir qtactiveqt CMakeLists.txt) 'PrintSupport' '' + Edit-TextFile (Join-Path $SourceDir qtactiveqt tools CMakeLists.txt) 'add_subdirectory[(]testcon[)]' '' + + # Fix build (including because of disabled features) + Edit-TextFile (Join-Path $SourceDir qtbase src gui text windows qwindowsfontdatabasebase_p.h) 'unique_ptr' 'unique_ptr' + Edit-TextFile (Join-Path $SourceDir qtactiveqt src activeqt container qaxwidget.cpp) '.*<(qdockwidget|qwhatsthis)[.]h>|QWhatsThis::[a-zA-Z]+[(][)]' '' + Edit-TextFile (Join-Path $SourceDir qtactiveqt src activeqt control qaxserverbase.cpp) '.*|QWhatsThis::[a-zA-Z]+[(][)]' '' Invoke-NativeCommand cmake -E remove_directory $BuildDir $env:PATH = @( @@ -115,7 +147,7 @@ function global:Build-Qt6([string] $PrefixDir, [string] $Arch, [string] $DepsPre New-Item -Path $BuildDir -ItemType Directory -ErrorAction Ignore | Out-Null Push-Location -Path $BuildDir Invoke-VcEnvCommand (Join-Path $SourceDir configure) @ConfigOptions - Invoke-VcEnvCommand cmake --build . --parallel + Invoke-VcEnvCommand cmake --build . Invoke-VcEnvCommand cmake --install . Pop-Location diff --git a/release/windows/build-transmission.ps1 b/release/windows/build-transmission.ps1 index 74ad49ed2..69777091c 100644 --- a/release/windows/build-transmission.ps1 +++ b/release/windows/build-transmission.ps1 @@ -81,11 +81,12 @@ function global:Build-Transmission( } Copy-Item -Path (Join-Path $DepsPrefixDir plugins platforms qwindows.pdb) -Destination $DebugSymbolsDir + $QtStyle = if ($UseQtVersion -eq '5') { 'windowsvista' } else { 'modernwindows' } if ($DepsPrefixDir -ne $PrefixDir) { New-Item -Path (Join-Path $PrefixDir plugins styles) -ItemType Directory -ErrorAction Ignore | Out-Null - Copy-Item -Path (Join-Path $DepsPrefixDir plugins styles qwindowsvistastyle.dll) -Destination (Join-Path $PrefixDir plugins styles) + Copy-Item -Path (Join-Path $DepsPrefixDir plugins styles "q${QtStyle}style.dll") -Destination (Join-Path $PrefixDir plugins styles) } - Copy-Item -Path (Join-Path $DepsPrefixDir plugins styles qwindowsvistastyle.pdb) -Destination $DebugSymbolsDir + Copy-Item -Path (Join-Path $DepsPrefixDir plugins styles "q${QtStyle}style.pdb") -Destination $DebugSymbolsDir if ($DepsPrefixDir -ne $PrefixDir) { Copy-Item -Path (Join-Path $DepsPrefixDir translations) -Destination $PrefixDir -Recurse diff --git a/release/windows/build-zlib.ps1 b/release/windows/build-zlib.ps1 index 645680b88..e2e223dd5 100644 --- a/release/windows/build-zlib.ps1 +++ b/release/windows/build-zlib.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -$global:ZlibVersion = '1.3' +$global:ZlibVersion = '1.3.1' $global:ZlibDeps = @()