@@ -44,50 +44,48 @@ jobs:
4444 run : rmdir /S /Q C:\Strawberry
4545
4646 - name : Install Winget Dependencies (ARM64) from Zip
47- if : contains(matrix.arch, 'arm64') # Assuming matrix.arch will be 'arm64' for this job
48- run : |
49- $tempDir = Join-Path $env:TEMP "WingetDependencies"
50- $zipFilePath = Join-Path $env:TEMP "DesktopAppInstaller_Dependencies.zip"
51- $arm64DepsDir = Join-Path $tempDir "arm64" # Path to the arm64 folder inside the unzipped content
52-
53- # Create temporary directory if it doesn't exist
54- New-Item -ItemType Directory -Force -Path $tempDir | Out-Null
55-
56- Write-Host "Downloading DesktopAppInstaller_Dependencies.zip to $zipFilePath..."
57- try {
58- Invoke-WebRequest -Uri https://github.com/microsoft/winget-cli/releases/download/v1.10.390/DesktopAppInstaller_Dependencies.zip -OutFile $zipFilePath -TimeoutSec 300
59- } catch {
60- Write-Error "Failed to download DesktopAppInstaller_Dependencies.zip: $($_.Exception.Message)"
61- exit 1
62- }
63-
64- Write-Host "Extracting dependencies to $tempDir..."
65- try {
66- Expand-Archive -Path $zipFilePath -DestinationPath $tempDir -Force
67- } catch {
68- Write-Error "Failed to extract zip file: $($_.Exception.Message)"
69- exit 1
70- }
71-
72- # Install ARM64 dependencies
73- Write-Host "Installing ARM64 dependencies from $arm64DepsDir..."
74- try {
75- # Get all .appx files in the arm64 directory
76- $arm64AppxFiles = Get-ChildItem -Path $arm64DepsDir -Filter "*.appx" -Recurse | Select-Object -ExpandProperty FullName
77-
78- if ($arm64AppxFiles.Count -eq 0) {
79- Write-Warning "No ARM64 .appx files found in $arm64DepsDir. This might indicate an issue with the downloaded package or path."
80- } else {
81- foreach ($appxFile in $arm64AppxFiles) {
82- Write-Host "Installing $appxFile..."
83- Add-AppxPackage -Path $appxFile
84- }
47+ if : contains(matrix.arch, 'arm64')
48+ run : |
49+ $tempDir = Join-Path $env:TEMP "WingetDependencies"
50+ $zipFilePath = Join-Path $env:TEMP "DesktopAppInstaller_Dependencies.zip"
51+ $arm64DepsDir = Join-Path $tempDir "arm64" # Path to the arm64 folder inside the unzipped content
52+
53+ New-Item -ItemType Directory -Force -Path $tempDir | Out-Null
54+
55+ Write-Host "Downloading DesktopAppInstaller_Dependencies.zip to $zipFilePath..."
56+ try {
57+ Invoke-WebRequest -Uri https://github.com/microsoft/winget-cli/releases/download/v1.10.390/DesktopAppInstaller_Dependencies.zip -OutFile $zipFilePath -TimeoutSec 300
58+ } catch {
59+ Write-Error "Failed to download DesktopAppInstaller_Dependencies.zip: $($_.Exception.Message)"
60+ exit 1
61+ }
62+
63+ Write-Host "Extracting dependencies to $tempDir..."
64+ try {
65+ Expand-Archive -Path $zipFilePath -DestinationPath $tempDir -Force
66+ } catch {
67+ Write-Error "Failed to extract zip file: $($_.Exception.Message)"
68+ exit 1
69+ }
70+
71+ Write-Host "Installing ARM64 dependencies from $arm64DepsDir..."
72+ try {
73+ # Get all .appx files in the arm64 directory
74+ $arm64AppxFiles = Get-ChildItem -Path $arm64DepsDir -Filter "*.appx" -Recurse | Select-Object -ExpandProperty FullName
75+
76+ if ($arm64AppxFiles.Count -eq 0) {
77+ Write-Warning "No ARM64 .appx files found in $arm64DepsDir. This might indicate an issue with the downloaded package or path."
78+ } else {
79+ foreach ($appxFile in $arm64AppxFiles) {
80+ Write-Host "Installing $appxFile..."
81+ Add-AppxPackage -Path $appxFile
8582 }
86- } catch {
87- Write-Error "Failed to install ARM64 AppX packages: $($_.Exception.Message)"
88- exit 1
8983 }
90- shell : pwsh
84+ } catch {
85+ Write-Error "Failed to install ARM64 AppX packages: $($_.Exception.Message)"
86+ exit 1
87+ }
88+ shell : pwsh
9189
9290 - name : Install Winget (ARM64)
9391 if : contains(matrix.arch, 'arm64')
0 commit comments