diff options
author | L. E. Segovia <amy@centricular.com> | 2024-12-06 14:24:23 -0300 |
---|---|---|
committer | L. E. Segovia <amy@centricular.com> | 2024-12-09 13:57:22 -0300 |
commit | 0d30d14e196bde5240fbe505654e673d40d86d5a (patch) | |
tree | bbb413a7d99f6e10f8e0b266d88ec1f6646312ad /tools | |
parent | 6095bacc9de053ebdf68f2e9640f2bf83f265259 (diff) |
bootstrap-windows.ps1: Add WiX v5 and its dependency
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1663>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bootstrap-windows.ps1 | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/tools/bootstrap-windows.ps1 b/tools/bootstrap-windows.ps1 index 21cc5974..524d7003 100644 --- a/tools/bootstrap-windows.ps1 +++ b/tools/bootstrap-windows.ps1 @@ -11,9 +11,10 @@ $ProgressPreference = 'SilentlyContinue' $cmake_req = '3.10.2' $git_req = '2.0' # placeholder $python_req = '3.7' -$wix_req = '3.0' # placeholder +$wix_req = '5.0.1' $vs2019_url = 'https://aka.ms/vs/16/release/vs_buildtools.exe' $vs2022_url = 'https://aka.ms/vs/17/release/vs_buildtools.exe' +$wix_url = 'https://github.com/wixtoolset/wix/releases/download/v5.0.1/wix-cli-x64.msi' $choco_url = 'https://chocolatey.org/install.ps1' $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" @@ -131,15 +132,24 @@ if (!(Is-Newer 'py' $python_req)) { } python -m pip install setuptools -# https://github.com/chocolatey/choco/issues/3524 -if ((Get-Command "wmic.exe" -ErrorAction SilentlyContinue) -eq $null) { - Write-Host "Windows Management Instrumentation Command-line not found, installing..." - DISM /Online /Add-Capability /CapabilityName:WMIC~~~~ -} - -if (!(Is-Newer "$env:WIX\bin\light" $wix_req)) { +if (!(Is-Newer 'wix' $wix_req)) { Write-Host "WiX >= $wix_req not found, installing..." - choco install -y wixtoolset + Invoke-WebRequest -Uri $wix_url -OutFile "$env:TEMP\wix-tools-x64.msi" + + Get-Date + Write-Host "Installing .NET Core 8" + choco install -y dotnet-8.0-runtime + if (!$?) { + Write-Host "Failed to install .NET Core 8" + return $false + } + Write-Host "Installing WiX" + Start-Process -NoNewWindow -Wait "msiexec" -ArgumentList "/I $env:TEMP\wix-tools-x64.msi /Qn /norestart" + if (!$?) { + Write-Host "Failed to install WiX" + return $false + } + Remove-Item "$env:TEMP\wix-tools-x64.msi" -Force } $MSYS2_Dir = (Get-MSYS2) |