Fix nodejs installation on windows

Was unpacked into a subdirectory with the same name as the archive

Pick-to: 5.15 6.0
Fixes: QTQAINFRA-4055
Change-Id: Ic11d2d926a1d2250b963010729d70bd00b992f89
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
This commit is contained in:
Allan Sandfeld Jensen
2020-12-10 17:43:03 +01:00
parent d5eeee1cd2
commit e38fc45740

View File

@@ -37,25 +37,25 @@
# Needed by QtWebengine
$version = "12.18.0"
$package = "C:\Windows\temp\nodejs-$version.zip"
$targetFolder = "C:\Utils\nodejs"
$arch = "$((Get-WmiObject Win32_Processor).AddressWidth)"
$externalUrl = "https://nodejs.org/dist/v$version/node-v$version-win-x$arch.zip"
$internalUrl = "http://ci-files01-hki.intra.qt.io/input/windows/node-v$version-win-x$arch.zip"
if ( $arch -eq 64 ) {
if (Is64BitWinHost) {
$arch = "x64"
$sha1 = "457b1527d249ee471a9445953a906cb10c75378d"
} else {
$arch = "x86"
$sha1 = "58801900f5bddca9c00feed6b84fed729426fc92"
}
$package = "C:\Windows\temp\nodejs-$version.zip"
$targetFolder = "C:\Utils"
$installFolder = "C:\Utils\node-v$version-win-$arch"
$externalUrl = "https://nodejs.org/dist/v$version/node-v$version-win-$arch.zip"
$internalUrl = "http://ci-files01-hki.intra.qt.io/input/windows/node-v$version-win-$arch.zip"
Write-Host "Installing Node.js"
Download $externalUrl $internalUrl $package
Verify-Checksum $package $sha1
mkdir $targetFolder
Extract-7Zip $package $targetFolder
Add-Path $targetFolder
Add-Path $installFolder
Remove $package
Write-Output "Node.js = $version" >> ~/versions.txt