* chore: settle line endings in .gitattributes Nothing declared line endings, so each file kept whatever the contributor's core.autocrlf produced when it was added: 382 text files ended up LF and 50 CRLF. The CRLF ones are the hazard. Editing one on macOS or Linux writes LF lines into it, and clang-format rejects a file that mixes both -- which is how `quality / Workflow validation` went red on KeyStateCategory.h, where three lines out of a CRLF file had arrived as LF. #309 converted those three lines back and left the other 49 files loaded. The repository now declares LF and the working trees are renormalized to match, so the failure mode is gone rather than deferred to whichever of those files is edited next. The four binary types are declared rather than left to git's heuristic, which decides from the first 8000 bytes alone. user_dict.dat is caught by that sample today only because the 40-byte seed is almost entirely NUL. Verified: the 56 renormalized files are byte-identical to their old contents once CR is stripped, no text file in the index still carries CRLF, and scripts/format.sh --check passes. * chore: skip the line-ending renormalization in blame The commit before this one rewrote every line of 56 files without changing a character of them, which is what this file exists to hide.
66 lines
1.4 KiB
PowerShell
66 lines
1.4 KiB
PowerShell
# Generate and compile dll files
|
|
# Default is to compile 64-bit dll, if 32-bit is specified, 32-bit dll would be compiled
|
|
$currentDirectory = Get-Location
|
|
$cmakeListsPath = Join-Path -Path $currentDirectory -ChildPath "CMakeLists.txt"
|
|
|
|
if (-not (Test-Path $cmakeListsPath))
|
|
{
|
|
Write-Host("No CMakeLists.txt in current directory, please check.")
|
|
return
|
|
}
|
|
|
|
Write-Host "Start generating and compiling..."
|
|
|
|
|
|
$arch = $args[0]
|
|
|
|
if ($arch -eq "32")
|
|
{
|
|
$buildFolderPath = ".\build32"
|
|
|
|
if (-not (Test-Path $buildFolderPath))
|
|
{
|
|
New-Item -ItemType Directory -Path $buildFolderPath | Out-Null
|
|
Write-Host "build32 folder created."
|
|
}
|
|
|
|
cmake --preset=for32
|
|
|
|
if ($LASTEXITCODE -eq 0)
|
|
{
|
|
cmake --build ./build32/
|
|
}
|
|
} elseif ($arch -eq "64")
|
|
{
|
|
$buildFolderPath = ".\build64"
|
|
|
|
if (-not (Test-Path $buildFolderPath))
|
|
{
|
|
New-Item -ItemType Directory -Path $buildFolderPath | Out-Null
|
|
Write-Host "build64 folder created."
|
|
}
|
|
|
|
cmake --preset=for64
|
|
|
|
if ($LASTEXITCODE -eq 0)
|
|
{
|
|
cmake --build ./build64/
|
|
}
|
|
} else
|
|
{ # Default is 64-bit
|
|
$buildFolderPath = ".\build64"
|
|
|
|
if (-not (Test-Path $buildFolderPath))
|
|
{
|
|
New-Item -ItemType Directory -Path $buildFolderPath | Out-Null
|
|
Write-Host "build64 folder created."
|
|
}
|
|
|
|
cmake --preset=for64
|
|
|
|
if ($LASTEXITCODE -eq 0)
|
|
{
|
|
cmake --build ./build64/
|
|
}
|
|
}
|