tools sync

- used TINY_QT_ROOT
 - upgraded to Clang v18
 - upgraded to Qt v6.7.0
 - updated RegEx-es, added missing example
This commit is contained in:
silverqx
2024-03-21 18:06:03 +01:00
parent b9ac07bfae
commit fc274da461
8 changed files with 26 additions and 19 deletions
+2 -2
View File
@@ -12,9 +12,9 @@ Param(
[string] $TodoKeywordsPattern = ' (TODO|NOTE|FIXME|BUG|WARNING|CUR|FEATURE|TEST|FUTURE|CUR1|TMP|SEC) ',
[Parameter(HelpMessage = 'Specifies subfolders to search. The pattern value is used ' +
'in regular expression, eg. (include|src|tests|tom).')]
'in regular expression, eg. (examples|include|src|tests|tom).')]
[AllowEmptyString()]
[string] $InSubFoldersPattern = '(include|src|tests|tom)'
[string] $InSubFoldersPattern = '(examples|include|src|tests|tom)'
)
Set-StrictMode -Version 3.0
+1 -1
View File
@@ -19,7 +19,7 @@ Param(
[string[]] $Include = @('*.cpp', '*.hpp'),
[Parameter(HelpMessage = 'Specifies subfolders to search. The pattern value is used ' +
'in regular expression, eg. (include|src|tests|tom).')]
'in regular expression, eg. (examples|include|src|tests|tom).')]
[AllowEmptyString()]
[string] $InSubFoldersPattern,
+1 -1
View File
@@ -94,7 +94,7 @@ try {
vcpkg hash $tempFile
}
catch {
Write-Error "Failed to download an archive for hashing from the URL:`n$url"
Write-Error "Failed to download an archive for hashing from the URL:`n${url}"
# Re-throw
throw
}
+3 -2
View File
@@ -88,7 +88,7 @@ if (-not $PSBoundParameters.ContainsKey('Parallel') -or $Parallel -lt 1) {
$FilesPaths = $null -eq $FilesPaths ? '.+?' : "(?:$($FilesPaths -join '|'))"
$Files = $null -eq $Files ? '[\w\d_\-\+]+' : "(?:$($Files -join '|'))"
$Script:RegEx = "[\\\/]+(?:examples|src|tests)[\\\/]+$FilesPaths[\\\/]+(?!mocs_)$($Files)\.cpp$"
$Script:RegEx = "[\\\/]+(?:examples|src|tests|tom)[\\\/]+$FilesPaths[\\\/]+(?!mocs_)$($Files)\.cpp$"
# Append the build type to the build path
$BuildPath = $BuildPath.TrimEnd((Get-Slashes))
@@ -123,7 +123,7 @@ $clazyCurrentVersion = $Matches.version
Write-Info 'Recommended versions'
Newline
Write-Output " Clang-Tidy `e[32mv17`e[0m (current `e[33mv$clangTidyCurrentVersion`e[0m)"
Write-Output " Clang-Tidy `e[32mv18`e[0m (current `e[33mv$clangTidyCurrentVersion`e[0m)"
Write-Output " Clazy standalone `e[32mv1.11`e[0m (current `e[33mv$clazyCurrentVersion`e[0m)"
# Initialize build environment if it's not already initialized
@@ -162,6 +162,7 @@ if (-not (Test-Path $BuildPath\compile_commands.json)) {
-D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON `
-D CMAKE_EXPORT_PACKAGE_REGISTRY:BOOL=OFF `
-D CMAKE_BUILD_TYPE:STRING=$BuildType `
-D CMAKE_CXX_SCAN_FOR_MODULES:BOOL=OFF `
-D VCPKG_APPLOCAL_DEPS:BOOL=OFF `
-D VERBOSE_CONFIGURE:BOOL=ON `
-D MATCH_EQUAL_EXPORTED_BUILDTREE:BOOL=OFF `
+2 -2
View File
@@ -12,9 +12,9 @@ Param(
[string] $TodoKeywordsPattern = ' (TODO|NOTE|FIXME|BUG|WARNING|CUR|FEATURE|TEST|FUTURE|CUR1|TMP|SEC) ',
[Parameter(HelpMessage = 'Specifies subfolders to search. The pattern value is used ' +
'in regular expression, eg. (include|src|tests|tom).')]
'in regular expression, eg. (examples|include|src|tests|tom).')]
[AllowEmptyString()]
[string] $InSubFoldersPattern = '(include|src|tests|tom)'
[string] $InSubFoldersPattern = '(examples|include|src|tests|tom)'
)
Set-StrictMode -Version 3.0
+10 -8
View File
@@ -29,6 +29,8 @@ Set-StrictMode -Version 3.0
# ---
Set-Variable STACK_NAME -Option Constant -Value $MyInvocation.MyCommand.Name
$Script:QtRoot = $env:TINY_QT_ROOT ?? 'C:\Qt'
$Script:QtRootAlt = $Script:QtRoot.Replace('\', '/')
$Script:QtMajorVersion = $null
$Script:QtEnvVersion = $null
$Script:VisualStudioVersion = '17.0'
@@ -69,25 +71,25 @@ function Test-QtVersionInstalled
{
Write-Progress "Testing whether Qt $QtVersion is installed"
if (Test-Path "C:\Qt\$QtVersion") {
if (Test-Path "$Script:QtRoot\$QtVersion") {
return
}
Write-ExitError ("The passed Qt version '$QtVersion' is not installed " +
"in the 'C:\Qt\$QtVersion\' folder.")
"in the '$Script:QtRoot\$QtVersion\' folder.")
}
# Check whether the source files to build the Qt MySQL plugin are installed
function Test-QtSourcesInstalled {
Write-Progress "Testing whether Qt $QtVersion source files are installed"
if (Test-Path "C:\Qt\$QtVersion\Src\qtbase\src\plugins\sqldrivers") {
if (Test-Path "$Script:QtRoot\$QtVersion\Src\qtbase\src\plugins\sqldrivers") {
return
}
Write-ExitError ("Source files to build the Qt MySQL plugin for the passed " +
"Qt version '$QtVersion' are not installed " +
"in the 'C:\Qt\$QtVersion\Src\qtbase\src\plugins\sqldrivers' folder.")
"in the '$Script:QtRoot\$QtVersion\Src\qtbase\src\plugins\sqldrivers' folder.")
}
# Check whether the MySQL Server is installed
@@ -226,11 +228,11 @@ Set-Location "$QtVersion/msvc2019_64/Debug"
Write-Progress 'Configuring...'
qt-cmake `
-S "C:/Qt/$QtVersion/Src/qtbase/src/plugins/sqldrivers" `
-S "$Script:QtRootAlt/$QtVersion/Src/qtbase/src/plugins/sqldrivers" `
-B . `
-G Ninja `
-D CMAKE_BUILD_TYPE:STRING=Debug `
-D CMAKE_INSTALL_PREFIX:PATH="C:/Qt/$QtVersion/msvc2019_64" `
-D CMAKE_INSTALL_PREFIX:PATH="$Script:QtRootAlt/$QtVersion/msvc2019_64" `
-D MySQL_INCLUDE_DIR:PATH="${Script:MySqlServerPath}/include" `
-D MySQL_LIBRARY:FILEPATH="${Script:MySqlServerPath}/lib/libmysql.lib" `
-D FEATURE_sql_psql:BOOL=OFF `
@@ -253,11 +255,11 @@ Set-Location '../RelWithDebInfo'
Write-Progress 'Configuring...'
qt-cmake `
-S "C:/Qt/$QtVersion/Src/qtbase/src/plugins/sqldrivers" `
-S "$Script:QtRootAlt/$QtVersion/Src/qtbase/src/plugins/sqldrivers" `
-B . `
-G Ninja `
-D CMAKE_BUILD_TYPE:STRING=RelWithDebInfo `
-D CMAKE_INSTALL_PREFIX:PATH="C:/Qt/$QtVersion/msvc2019_64" `
-D CMAKE_INSTALL_PREFIX:PATH="$Script:QtRootAlt/$QtVersion/msvc2019_64" `
-D MySQL_INCLUDE_DIR:PATH="${Script:MySqlServerPath}/include" `
-D MySQL_LIBRARY:FILEPATH="${Script:MySqlServerPath}/lib/libmysql.lib" `
-D FEATURE_sql_psql:BOOL=OFF `
+3 -1
View File
@@ -5,6 +5,8 @@ Set-StrictMode -Version 3.0
Write-Host 'Setting up environment for Qt 5.15.2 usage...' -ForegroundColor Magenta
Write-Host
$env:Path = '<your_path_here>\Qt\5.15.2\msvc2019_64\bin;' + $env:Path
$Script:QtRoot = $env:TINY_QT_ROOT ?? 'C:\Qt'
$env:Path = "$Script:QtRoot\5.15.2\msvc2019_64\bin;" + $env:Path
. vcvars64.ps1
+4 -2
View File
@@ -2,9 +2,11 @@
Set-StrictMode -Version 3.0
Write-Host 'Setting up environment for Qt 6.5.3 usage...' -ForegroundColor Magenta
Write-Host 'Setting up environment for Qt 6.7.0 usage...' -ForegroundColor Magenta
Write-Host
$env:Path = '<your_path_here>\Qt\6.5.3\msvc2019_64\bin;' + $env:Path
$Script:QtRoot = $env:TINY_QT_ROOT ?? 'C:\Qt'
$env:Path = "$Script:QtRoot\6.7.0\msvc2019_64\bin;" + $env:Path
. vcvars64.ps1