From d5cc43355cb56b6838253e5b6aa69090004c3b08 Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Fri, 4 Nov 2022 19:38:28 +0100 Subject: [PATCH] Bump deps versions used for Windows release builds (#4092) --- appveyor.yml | 6 ++--- dist/msi/CMakeLists.txt | 14 +++++++---- release/windows/build-curl.ps1 | 4 +-- release/windows/build-dbus.ps1 | 9 ++++--- release/windows/build-expat.ps1 | 2 +- release/windows/build-openssl.ps1 | 2 +- release/windows/build-qt.ps1 | 35 ++++++++++++-------------- release/windows/build-transmission.ps1 | 17 ++++++++++--- release/windows/build-zlib.ps1 | 2 +- release/windows/toolchain.ps1 | 8 +++++- 10 files changed, 59 insertions(+), 40 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index fe27c69b4..310e9cf0d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,16 +9,16 @@ environment: secure: Bf3x1Iruxg+l3tp+an+g9oE36EHxvyWrE8GTJzZh4Ss= matrix: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 TR_ARCH: x86 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 TR_ARCH: x64 for: - matrix: only: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 clone_folder: '%SystemDrive%\%TR_ARCH%-project' diff --git a/dist/msi/CMakeLists.txt b/dist/msi/CMakeLists.txt index 90062e6b6..722e9eb91 100644 --- a/dist/msi/CMakeLists.txt +++ b/dist/msi/CMakeLists.txt @@ -27,11 +27,15 @@ endif() find_msvc_crt_msm(TR_MSVC_CRT_MSM_FILE) -if(OPENSSL_VERSION MATCHES "^1[.]1[.]") - set(TR_OPENSSL_ARCH) - if(ARCH STREQUAL "x64") - set(TR_OPENSSL_ARCH "-x64") - endif() +set(TR_OPENSSL_ARCH) +if(ARCH STREQUAL "x64") + set(TR_OPENSSL_ARCH "-x64") +endif() + +if(OPENSSL_VERSION MATCHES "^3[.]") + set(TR_OPENSSL_CRYPTO_NAME "libcrypto-3${TR_OPENSSL_ARCH}.dll") + set(TR_OPENSSL_SSL_NAME "libssl-3${TR_OPENSSL_ARCH}.dll") +elseif(OPENSSL_VERSION MATCHES "^1[.]1[.]") set(TR_OPENSSL_CRYPTO_NAME "libcrypto-1_1${TR_OPENSSL_ARCH}.dll") set(TR_OPENSSL_SSL_NAME "libssl-1_1${TR_OPENSSL_ARCH}.dll") else() diff --git a/release/windows/build-curl.ps1 b/release/windows/build-curl.ps1 index e976739b3..11a0c1dd4 100644 --- a/release/windows/build-curl.ps1 +++ b/release/windows/build-curl.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -$global:CurlVersion = '7.70.0' +$global:CurlVersion = '7.86.0' $global:CurlDeps = @( 'OpenSsl' @@ -18,7 +18,7 @@ function global:Build-Curl([string] $PrefixDir, [string] $Arch, [string] $DepsPr '-DCMAKE_BUILD_TYPE=RelWithDebInfo' "-DCMAKE_INSTALL_PREFIX=${PrefixDir}" "-DCMAKE_PREFIX_PATH=${DepsPrefixDir}" - '-DCMAKE_USE_OPENSSL=ON' + '-DCURL_USE_OPENSSL=ON' '-DCURL_WINDOWS_SSPI=OFF' '-DBUILD_CURL_EXE=OFF' '-DBUILD_TESTING=OFF' diff --git a/release/windows/build-dbus.ps1 b/release/windows/build-dbus.ps1 index a6babfa7b..999872283 100644 --- a/release/windows/build-dbus.ps1 +++ b/release/windows/build-dbus.ps1 @@ -1,13 +1,13 @@ #!/usr/bin/env pwsh -$global:DBusVersion = '1.12.16' +$global:DBusVersion = '1.14.4' $global:DBusDeps = @( 'Expat' ) function global:Build-DBus([string] $PrefixDir, [string] $Arch, [string] $DepsPrefixDir) { - $Filename = "dbus-${DBusVersion}.tar.gz" + $Filename = "dbus-${DBusVersion}.tar.xz" $Url = "https://dbus.freedesktop.org/releases/dbus/${Filename}" $SourceDir = Invoke-DownloadAndUnpack $Url $Filename @@ -18,11 +18,14 @@ function global:Build-DBus([string] $PrefixDir, [string] $Arch, [string] $DepsPr "-DCMAKE_INSTALL_PREFIX=${PrefixDir}" "-DCMAKE_PREFIX_PATH=${DepsPrefixDir}" '-DDBUS_BUILD_TESTS=OFF' + '-DDBUS_ENABLE_PKGCONFIG=OFF' + '-DDBUS_ENABLE_DOXYGEN_DOCS=OFF' + '-DDBUS_ENABLE_XML_DOCS=OFF' ) # 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.*' '' - Invoke-CMakeBuildAndInstall (Join-Path $SourceDir cmake) $BuildDir $ConfigOptions + 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 1c928ddf2..87919a5d8 100644 --- a/release/windows/build-expat.ps1 +++ b/release/windows/build-expat.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -$global:ExpatVersion = '2.2.9' +$global:ExpatVersion = '2.5.0' $global:ExpatDeps = @() diff --git a/release/windows/build-openssl.ps1 b/release/windows/build-openssl.ps1 index ff81d8e00..02adc05fe 100644 --- a/release/windows/build-openssl.ps1 +++ b/release/windows/build-openssl.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -$global:OpenSslVersion = '1.1.1g' +$global:OpenSslVersion = '3.0.7' $global:OpenSslDeps = @() diff --git a/release/windows/build-qt.ps1 b/release/windows/build-qt.ps1 index f6d0ab9cd..5db5de443 100644 --- a/release/windows/build-qt.ps1 +++ b/release/windows/build-qt.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -$global:QtVersion = '5.14.2' +$global:QtVersion = '6.4.0' $global:QtDeps = @( 'DBus' @@ -21,6 +21,8 @@ function global:Build-Qt([string] $PrefixDir, [string] $Arch, [string] $DepsPref (Join-Path $ArchiveBase qttranslations '*') (Join-Path $ArchiveBase qtwinextras '*') (Join-Path $ArchiveBase .gitmodules) + (Join-Path $ArchiveBase cmake) + (Join-Path $ArchiveBase CMakeLists.txt) (Join-Path $ArchiveBase configure.bat) (Join-Path $ArchiveBase configure.json) (Join-Path $ArchiveBase qt.pro) @@ -46,23 +48,20 @@ function global:Build-Qt([string] $PrefixDir, [string] $Arch, [string] $DepsPref '-qt-libpng' '-qt-libjpeg' '-no-opengl' - '-no-direct2d' '-no-freetype' '-no-harfbuzz' - '-no-sql-db2' - '-no-sql-ibase' - '-no-sql-mysql' - '-no-sql-oci' - '-no-sql-odbc' - '-no-sql-psql' - '-no-sql-sqlite' - '-no-sql-sqlite2' - '-no-sql-tds' + '-no-feature-androiddeployqt' + '-no-feature-assistant' # No need in GUI tools + '-no-feature-clang' + '-no-feature-clangcpp' + '-no-feature-designer' # No need in GUI tools + '-no-feature-schannel' + '-no-feature-sql' + '-no-feature-testlib' '-nomake'; 'examples' '-nomake'; 'tests' - '-nomake'; 'tools' - '-I'; (Join-Path $DepsPrefixDir include) - '-L'; (Join-Path $DepsPrefixDir lib) + '-I'; (Join-Path $DepsPrefixDir include).Replace('\', '/') + '-L'; (Join-Path $DepsPrefixDir lib).Replace('\', '/') ) if ($env:LDFLAGS) { @@ -71,9 +70,7 @@ function global:Build-Qt([string] $PrefixDir, [string] $Arch, [string] $DepsPref } # No need in GUI tools - Edit-TextFile (Join-Path $SourceDir qttools src src.pro) 'qtHaveModule[(]gui[)]' 'qtHaveModule(hughey)' - Edit-TextFile (Join-Path $SourceDir qttools src src.pro) 'qtHaveModule[(]widgets[)]' 'qtHaveModule(digits)' - Edit-TextFile (Join-Path $SourceDir qttools src linguist linguist.pro) 'qtHaveModule[(]widgets[)]' 'qtHaveModule(digits)' + Edit-TextFile (Join-Path $SourceDir qttools src linguist CMakeLists.txt) 'add_subdirectory[(]linguist[)]' '' Invoke-NativeCommand cmake -E remove_directory $BuildDir $env:PATH = @( @@ -86,8 +83,8 @@ function global:Build-Qt([string] $PrefixDir, [string] $Arch, [string] $DepsPref New-Item -Path $BuildDir -ItemType Directory -ErrorAction Ignore | Out-Null Push-Location -Path $BuildDir Invoke-VcEnvCommand (Join-Path $SourceDir configure) @ConfigOptions - Invoke-VcEnvCommand jom - Invoke-VcEnvCommand jom install + Invoke-VcEnvCommand cmake --build . --parallel + Invoke-VcEnvCommand cmake --install . Pop-Location # install target doesn't copy PDBs for release DLLs diff --git a/release/windows/build-transmission.ps1 b/release/windows/build-transmission.ps1 index 0da5ccaf5..c94874aaf 100644 --- a/release/windows/build-transmission.ps1 +++ b/release/windows/build-transmission.ps1 @@ -14,6 +14,7 @@ function global:Build-Transmission([string] $PrefixDir, [string] $Arch, [string] "-DCMAKE_PREFIX_PATH=${DepsPrefixDir}" "-DTR_THIRD_PARTY_DIR:PATH=${PrefixDir}" "-DTR_QT_DIR:PATH=${PrefixDir}" + '-DRUN_CLANG_TIDY=OFF' ) Invoke-CMakeBuildAndInstall $SourceDir $BuildDir $ConfigOptions @@ -29,18 +30,18 @@ function global:Build-Transmission([string] $PrefixDir, [string] $Arch, [string] } $OpenSslLibSuffix = if ($Arch -eq 'x86') { '' } else { '-x64' } - foreach ($x in @('libcurl', "libcrypto-1_1${OpenSslLibSuffix}", "libssl-1_1${OpenSslLibSuffix}", 'zlib', 'dbus-1')) { + foreach ($x in @('libcurl', "libcrypto-3${OpenSslLibSuffix}", "libssl-3${OpenSslLibSuffix}", 'zlib', 'dbus-1')) { if ($DepsPrefixDir -ne $PrefixDir) { Copy-Item -Path (Join-Path $DepsPrefixDir bin "${x}.dll") -Destination (Join-Path $PrefixDir bin) } Copy-Item -Path (Join-Path $DepsPrefixDir bin "${x}.pdb") -Destination $DebugSymbolsDir } - foreach ($x in @('Core', 'DBus', 'Gui', 'Network', 'Svg', 'Widgets', 'WinExtras')) { + foreach ($x in @('Core', 'DBus', 'Gui', 'Network', 'Svg', 'Widgets')) { if ($DepsPrefixDir -ne $PrefixDir) { - Copy-Item -Path (Join-Path $DepsPrefixDir bin "Qt5${x}.dll") -Destination (Join-Path $PrefixDir bin) + Copy-Item -Path (Join-Path $DepsPrefixDir bin "Qt6${x}.dll") -Destination (Join-Path $PrefixDir bin) } - Copy-Item -Path (Join-Path $DepsPrefixDir bin "Qt5${x}.pdb") -Destination $DebugSymbolsDir + Copy-Item -Path (Join-Path $DepsPrefixDir bin "Qt6${x}.pdb") -Destination $DebugSymbolsDir } foreach ($x in @('gif', 'ico', 'jpeg', 'svg')) { @@ -51,6 +52,14 @@ function global:Build-Transmission([string] $PrefixDir, [string] $Arch, [string] Copy-Item -Path (Join-Path $DepsPrefixDir plugins imageformats "q${x}.pdb") -Destination $DebugSymbolsDir } + foreach ($x in @('openssl')) { + if ($DepsPrefixDir -ne $PrefixDir) { + New-Item -Path (Join-Path $PrefixDir plugins tls) -ItemType Directory -ErrorAction Ignore | Out-Null + Copy-Item -Path (Join-Path $DepsPrefixDir plugins tls "q${x}backend.dll") -Destination (Join-Path $PrefixDir plugins tls) + } + Copy-Item -Path (Join-Path $DepsPrefixDir plugins tls "q${x}backend.pdb") -Destination $DebugSymbolsDir + } + if ($DepsPrefixDir -ne $PrefixDir) { New-Item -Path (Join-Path $PrefixDir plugins platforms) -ItemType Directory -ErrorAction Ignore | Out-Null Copy-Item -Path (Join-Path $DepsPrefixDir plugins platforms qwindows.dll) -Destination (Join-Path $PrefixDir plugins platforms) diff --git a/release/windows/build-zlib.ps1 b/release/windows/build-zlib.ps1 index 4f53d1527..0511c22c5 100644 --- a/release/windows/build-zlib.ps1 +++ b/release/windows/build-zlib.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -$global:ZlibVersion = '1.2.11' +$global:ZlibVersion = '1.2.13' $global:ZlibDeps = @() diff --git a/release/windows/toolchain.ps1 b/release/windows/toolchain.ps1 index 1dd03bbeb..c49c68818 100644 --- a/release/windows/toolchain.ps1 +++ b/release/windows/toolchain.ps1 @@ -12,6 +12,12 @@ $global:LinkerFlags = @( '/PDBALTPATH:%_PDB%' ) -$global:VsInstallPrefix = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio' 2019 Community +$global:VsInstallPrefix = "$env:VSINSTALLDIR" +if (-not (Test-Path $global:VsInstallPrefix)) { + $global:VsInstallPrefix = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio' 2022 Community +} +if (-not (Test-Path $global:VsInstallPrefix)) { + $global:VsInstallPrefix = Join-Path ${env:ProgramFiles} 'Microsoft Visual Studio' 2022 Community +} $global:VsVersion = ((& (Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio' Installer vswhere) -Property catalog_productSemanticVersion -Path $VsInstallPrefix) -Split '[+]')[0] $global:VcVarsScript = Join-Path $VsInstallPrefix VC Auxiliary Build vcvarsall.bat