
u_format has always had its format table in CSV. This is kind of nice for some things, but is a serious pain to extend, especially with optional fields. In going through our many (many, many) duplicated tables of format mappings, it would've been nice to add some descriptions to our central u_format table, such as mapping to DRM FourCC, to EGLImage mappings, and to GL internalformats for EGLImage imports. Unfortunately, doing so with more additional fields would just make the CSV totally unreadable. Move the CSV table to a YAML-based table and adjust the Python parsers to suit. The resulting generated files are identical before and after the transition. The new parser also has a significant amount of format validation to make it easier to catch common errors. Signed-off-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29649>
78 lines
2.5 KiB
PowerShell
78 lines
2.5 KiB
PowerShell
# Download new TLS certs from Windows Update
|
|
Write-Host "Updating TLS certificate store at:"
|
|
Get-Date
|
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "_tlscerts" | Out-Null
|
|
$certdir = (New-Item -ItemType Directory -Name "_tlscerts")
|
|
certutil -syncwithWU "$certdir"
|
|
Foreach ($file in (Get-ChildItem -Path "$certdir\*" -Include "*.crt")) {
|
|
Import-Certificate -FilePath $file -CertStoreLocation Cert:\LocalMachine\Root | Out-Null
|
|
}
|
|
Remove-Item -Recurse -Path $certdir
|
|
|
|
Write-Host "Installing graphics tools (DirectX debug layer) at:"
|
|
Get-Date
|
|
Set-Service -Name wuauserv -StartupType Manual
|
|
if (!$?) {
|
|
Write-Host "Failed to enable Windows Update"
|
|
Exit 1
|
|
}
|
|
|
|
For ($i = 0; $i -lt 5; $i++) {
|
|
Dism /online /quiet /add-capability /capabilityname:Tools.Graphics.DirectX~~~~0.0.1.0
|
|
$graphics_tools_installed = $?
|
|
if ($graphics_tools_installed) {
|
|
Break
|
|
}
|
|
}
|
|
|
|
if (!$graphics_tools_installed) {
|
|
Write-Host "Failed to install graphics tools"
|
|
Get-Content C:\Windows\Logs\DISM\dism.log
|
|
Exit 1
|
|
}
|
|
|
|
Write-Host "Installing Chocolatey at:"
|
|
Get-Date
|
|
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
|
Import-Module "$env:ProgramData\chocolatey\helpers\chocolateyProfile.psm1"
|
|
# Add Chocolatey's native install path
|
|
Update-SessionEnvironment
|
|
Write-Host "Installing Chocolatey packages at:"
|
|
Get-Date
|
|
|
|
# Chocolatey tries to download winflexbison3 from github, which is not super reliable, and has no retry
|
|
# loop of its own - so we give it a helping hand here
|
|
For ($i = 0; $i -lt 5; $i++) {
|
|
choco install --no-progress -y python3
|
|
$python_install = $?
|
|
choco install --allow-empty-checksums --no-progress -y cmake git git-lfs ninja pkgconfiglite winflexbison3 --installargs "ADD_CMAKE_TO_PATH=System"
|
|
$other_install = $?
|
|
$choco_installed = $other_install -and $python_install
|
|
if ($choco_installed) {
|
|
Break
|
|
}
|
|
}
|
|
|
|
if (!$choco_installed) {
|
|
Write-Host "Couldn't install dependencies from Chocolatey"
|
|
Exit 1
|
|
}
|
|
|
|
# Add Chocolatey's newly installed package path
|
|
Update-SessionEnvironment
|
|
|
|
Start-Process -NoNewWindow -Wait git -ArgumentList 'config --global core.autocrlf false'
|
|
|
|
Write-Host "Upgrading pip at:"
|
|
Get-Date
|
|
python -m pip install --upgrade pip --progress-bar off
|
|
Write-Host "Installing python packages at:"
|
|
Get-Date
|
|
pip3 install packaging meson mako "numpy < 2.0" pyyaml --progress-bar off
|
|
if (!$?) {
|
|
Write-Host "Failed to install dependencies from pip"
|
|
Exit 1
|
|
}
|
|
Write-Host "Installing python packages finished at:"
|
|
Get-Date
|