mirror of
git://code.qt.io/qt/qt5.git
synced 2026-01-06 15:06:52 +08:00
MinGW is an alternative option for Visual Studio. It's used to create desktop builds and for cross compiling Android and QNX. At this point it is still unclear which version is going to be used for what, but as both are supported, let's think ahead and provide them both. This also allows us to debug with the other, if the other is causing problems. Task-number: QTQAINFRA-1289 Change-Id: I2a922669c07d49370e608c093be80481c8613dc7 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
27 lines
920 B
PowerShell
27 lines
920 B
PowerShell
function InstallMinGW
|
|
{
|
|
Param (
|
|
[string] $version = $(BadParam("the version being printed to versions.txt")),
|
|
[string] $release = $(BadParam("release part of the file name"))
|
|
)
|
|
|
|
$envvar = "MINGW$version"
|
|
$envvar = $envvar -replace '["."]'
|
|
$targetdir = "C:\$envvar"
|
|
$url_cache = "\\ci-files01-hki.intra.qt.io\provisioning\windows\i686-" + $version + "-" + $release + ".7z"
|
|
|
|
$mingwPackage = "C:\Windows\Temp\MinGW-$version.zip"
|
|
Copy-Item $url_cache $mingwPackage
|
|
|
|
Get-ChildItem $mingwPackage | % {& "C:\Utils\sevenzip\7z.exe" "x" $_.fullname "-o$TARGETDIR"}
|
|
|
|
echo "Adding MinGW environment variable."
|
|
[Environment]::SetEnvironmentVariable("$envvar", "$targetdir\mingw32", [EnvironmentVariableTarget]::Machine)
|
|
|
|
echo "Cleaning $mingwPackage.."
|
|
Remove-Item -Recurse -Force "$mingwPackage"
|
|
|
|
echo "MinGW = $version $release" >> ~\versions.txt
|
|
|
|
}
|