|
43 | 43 | # so we delete everything that could mess up our builds
|
44 | 44 | run: rmdir /S /Q C:\Strawberry
|
45 | 45 |
|
| 46 | + - 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 | + } |
| 85 | + } |
| 86 | + } catch { |
| 87 | + Write-Error "Failed to install ARM64 AppX packages: $($_.Exception.Message)" |
| 88 | + exit 1 |
| 89 | + } |
| 90 | + shell: pwsh |
| 91 | + |
46 | 92 | - name: Install Winget (ARM64)
|
47 | 93 | if: contains(matrix.arch, 'arm64')
|
48 | 94 | run: |
|
|
0 commit comments