mirror of
git://code.qt.io/qt/qt5.git
synced 2025-12-21 07:28:21 +08:00
Install NuGet in a separate file
Made an installation of NuGet in a separate script to be able to share the packages by an environment variable between multiple scripts. NuGet is needed for both the Windows App SDK and a virtual camera. Also added a label on top of the scripts about copyright and license. Change-Id: I11f035d8eb107d2d2c9e2a93f17a935129bb707e Reviewed-by: Tero Heikkinen <tero.heikkinen@qt.io> Reviewed-by: Elias Toivola <elias.toivola@qt.io>
This commit is contained in:
20
coin/provisioning/common/windows/install-nuget.ps1
Normal file
20
coin/provisioning/common/windows/install-nuget.ps1
Normal file
@@ -0,0 +1,20 @@
|
||||
# Copyright (C) 2025 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
. "$PSScriptRoot\helpers.ps1"
|
||||
|
||||
$script:nugetVersion = "v6.11.0"
|
||||
$script:nugetPackage = "nuget_$nugetVersion.exe"
|
||||
$script:packageRoot = "C:\Utils\NuGet\"
|
||||
|
||||
$script:cachedUrl = "\\ci-files01-hki.ci.qt.io\provisioning\windows\nuget\$nugetPackage"
|
||||
$script:officialUrl = "https://dist.nuget.org/win-x86-commandline/$nugetVersion/nuget.exe"
|
||||
$script:sdkChecksumSha1 = "5443887cfb5283da5021388d146ebb5febdc82e9"
|
||||
$script:package_path = "$packageRoot\\$nugetPackage"
|
||||
|
||||
New-Item -ItemType Directory -Path "$packageRoot"
|
||||
Download $officialUrl $cachedUrl $package_path
|
||||
Verify-Checksum $package_path $sdkChecksumSha1 sha1
|
||||
Write-Host "Installing Nuget"
|
||||
|
||||
Set-EnvironmentVariable "NUGET_EXE_PATH" "$package_path"
|
||||
@@ -1,20 +1,14 @@
|
||||
# Copyright (C) 2025 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
. "$PSScriptRoot\helpers.ps1"
|
||||
|
||||
# This script installs Windows App SDK
|
||||
|
||||
$script:nugetVersion = "v6.11.0"
|
||||
$script:nugetPackage = "nuget_$nugetVersion.exe"
|
||||
$script:packageRoot = "C:\Utils\WindowsAppSdk\"
|
||||
|
||||
$script:cachedUrl = "\\ci-files01-hki.ci.qt.io\provisioning\windows\nuget\$nugetPackage"
|
||||
$script:officialUrl = "https://dist.nuget.org/win-x86-commandline/$nugetVersion/nuget.exe"
|
||||
$script:sdkChecksumSha1 = "5443887cfb5283da5021388d146ebb5febdc82e9"
|
||||
$script:package_path = "$packageRoot\\$nugetPackage"
|
||||
$script:package_path = [System.Environment]::GetEnvironmentVariable('NUGET_EXE_PATH', [System.EnvironmentVariableTarget]::Machine)
|
||||
|
||||
New-Item -ItemType Directory -Path "$packageRoot"
|
||||
Download $officialUrl $cachedUrl $package_path
|
||||
Verify-Checksum $package_path $sdkChecksumSha1 sha1
|
||||
Write-Host "Installing Nuget"
|
||||
Run-Executable "$package_path" "install Microsoft.WindowsAppSDK -OutputDirectory $packageRoot"
|
||||
|
||||
$script:cpuarch = Get-CpuArchitecture
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
. "$PSScriptRoot\..\common\windows\install-nuget.ps1"
|
||||
@@ -0,0 +1 @@
|
||||
. "$PSScriptRoot\..\common\windows\install-nuget.ps1"
|
||||
@@ -0,0 +1 @@
|
||||
. "$PSScriptRoot\..\common\windows\install-nuget.ps1"
|
||||
@@ -0,0 +1 @@
|
||||
. "$PSScriptRoot\..\common\windows\install-nuget.ps1"
|
||||
@@ -0,0 +1 @@
|
||||
. "$PSScriptRoot\..\common\windows\install-nuget.ps1"
|
||||
Reference in New Issue
Block a user