mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
use steps
This commit is contained in:
@@ -113,6 +113,10 @@ jobs:
|
||||
& '$(build.sourcesdirectory)\.pipelines\InstallWinAppDriver.ps1'
|
||||
displayName: Download and install WinAppDriver
|
||||
|
||||
- template: steps-install-windows-terminal.yml
|
||||
parameters:
|
||||
platform: ${{ parameters.platform }}
|
||||
|
||||
- ${{ if eq(parameters.useLatestOfficialBuild, true) }}:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
@@ -144,44 +148,6 @@ jobs:
|
||||
& "$(build.sourcesdirectory)\.pipelines\installPowerToys.ps1" -InstallMode "Machine"
|
||||
displayName: Install PowerToys (Machine-Level)
|
||||
|
||||
# Install Windows Terminal
|
||||
- pwsh: |-
|
||||
try {
|
||||
# Check if already installed
|
||||
if (Get-AppxPackage -Name "Microsoft.WindowsTerminal" -ErrorAction SilentlyContinue) {
|
||||
Write-Host "Windows Terminal already installed"
|
||||
return
|
||||
}
|
||||
|
||||
# Download and install MSIX directly from GitHub releases
|
||||
$url = "https://api.github.com/repos/microsoft/terminal/releases/latest"
|
||||
$release = Invoke-RestMethod -Uri $url
|
||||
$msixUrl = ($release.assets | Where-Object { $_.name -like "*msixbundle" }).browser_download_url
|
||||
|
||||
if ($msixUrl) {
|
||||
$msixFile = "$env:TEMP\WindowsTerminal.msixbundle"
|
||||
Invoke-WebRequest -Uri $msixUrl -OutFile $msixFile
|
||||
Add-AppxPackage -Path $msixUrl
|
||||
Remove-Item $msixFile -Force -ErrorAction SilentlyContinue
|
||||
Write-Host "Windows Terminal installed via direct download"
|
||||
} else {
|
||||
Write-Warning "Could not find Terminal MSIX bundle"
|
||||
}
|
||||
} catch {
|
||||
Write-Warning "Terminal installation failed: $_"
|
||||
Write-Host "Continuing without Terminal..."
|
||||
}
|
||||
displayName: Install Windows Terminal
|
||||
|
||||
- pwsh: |-
|
||||
Write-Host "Checking for Windows Terminal..."
|
||||
if (Get-Command "wt.exe" -ErrorAction SilentlyContinue) {
|
||||
Write-Host "Windows Terminal found and available"
|
||||
} else {
|
||||
Write-Host "##[warning]Windows Terminal not found, but continuing..."
|
||||
}
|
||||
displayName: Check Windows Terminal
|
||||
|
||||
- ${{ if ne(parameters.platform, 'arm64') }}:
|
||||
- task: ScreenResolutionUtility@1
|
||||
inputs:
|
||||
|
||||
Reference in New Issue
Block a user