Skip to content

Commit

Permalink
Install Perl on Windows via WinGet (#4348)
Browse files Browse the repository at this point in the history
* Install Perl on Windows via WinGet

---------

Co-authored-by: Nick Banks <nibanks@microsoft.com>
  • Loading branch information
anrossi and nibanks committed Jun 14, 2024
1 parent 28ae555 commit 466d8c9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/prepare-machine.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ param (
[Parameter(Mandatory = $false)]
[switch]$InstallJom,

[Parameter(Mandatory = $false)]
[switch]$InstallPerl,

[Parameter(Mandatory = $false)]
[switch]$UseXdp,

Expand Down Expand Up @@ -340,6 +343,13 @@ function Install-OpenCppCoverage {
}
}

# Installs StrawberryPerl on Windows via Winget.
function Install-Perl {
if (!$IsWindows) { return } # Windows only
Write-Host "Installing StrawberryPerl via winget..."
winget install StrawberryPerl.StrawberryPerl
}

# Checks the OS version number to see if it's recent enough (> 2019) to support
# the necessary features for creating and installing the test certificates.
function Win-SupportsCerts {
Expand Down Expand Up @@ -499,6 +509,7 @@ if ($InstallXdpDriver) { Install-Xdp-Driver }
if ($UninstallXdp) { Uninstall-Xdp }
if ($InstallNasm) { Install-NASM }
if ($InstallJOM) { Install-JOM }
if ($InstallPerl) { Install-Perl }
if ($InstallCodeCoverage) { Install-OpenCppCoverage }
if ($InstallTestCertificates) { Install-TestCertificates }

Expand Down

0 comments on commit 466d8c9

Please sign in to comment.