[Windows] Implement installation helpers refactoring (#8865)

* [Windows] Refactor base Installer helper functions

* Fix helper name

* Fix name gen logic and improve error handling

* Fix hash checking logic

* Fix Install-VsixExtension invocation

* Fix variable name in Install-OpenSSL.ps1

* Fix type for git downloadUrl
This commit is contained in:
Vasilii Polikarpov
2023-11-22 15:14:08 +01:00
committed by GitHub
parent 46f21c4413
commit d3e630f774
46 changed files with 361 additions and 462 deletions

View File

@@ -114,13 +114,13 @@ foreach ($jdkVersionToInstall in $jdkVersionsToInstall) {
# Install Java tools
# Force chocolatey to ignore dependencies on Ant and Maven or else they will download the Oracle JDK
Choco-Install -PackageName ant -ArgumentList "-i"
Install-ChocoPackage ant -ArgumentList "--ignore-dependencies"
# Maven 3.9.x has multiple compatibilities problems
$toolsetMavenVersion = (Get-ToolsetContent).maven.version
$versionToInstall = Get-LatestChocoPackageVersion -TargetVersion $toolsetMavenVersion -PackageName "maven"
$versionToInstall = Resolve-ChocoPackageVersion -PackageName "maven" -TargetVersion $toolsetMavenVersion
Choco-Install -PackageName maven -ArgumentList "--version=$versionToInstall"
Choco-Install -PackageName gradle
Install-ChocoPackage maven -ArgumentList "--version=$versionToInstall"
Install-ChocoPackage gradle
# Add maven env variables to Machine
[string]$m2 = (Get-MachinePath).Split(";") -match "maven"