Skip to content

Commit

Permalink
Update build process to use dynamic Windows Kit path with makeappx.exe
Browse files Browse the repository at this point in the history
  • Loading branch information
Thavarshan committed Aug 31, 2024
1 parent d321d5d commit 6a0fcec
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@ jobs:

- name: Verify makeappx.exe
run: |
$makeappxPath = 'C:\Program Files (x86)\Windows Kits\10\bin\x64\makeappx.exe'
if (Test-Path $makeappxPath) {
$makeappxPath = Get-Command -CommandType Application -Name makeappx.exe | Select-Object -First 1 -ExpandProperty Definition
if ($makeappxPath) {
echo "makeappx.exe found at $makeappxPath"
echo "WINDOWS_KIT_PATH=C:\Program Files (x86)\Windows Kits\10\bin\x64" >> $env:GITHUB_ENV
$directory = [System.IO.Path]::GetDirectoryName($makeappxPath)
echo "WINDOWS_KIT_PATH=$directory" >> $env:GITHUB_ENV
} else {
Write-Error "makeappx.exe not found."
exit 1
}
shell: pwsh


- name: Print Windows Kit Path
run: |
echo "Windows Kit Path: $env:WINDOWS_KIT_PATH"
Expand Down

0 comments on commit 6a0fcec

Please sign in to comment.