Skip to content

Commit

Permalink
fix: Correct vcpkg package installation and error handling in PowerSh…
Browse files Browse the repository at this point in the history
…ell script
  • Loading branch information
silviot committed Dec 8, 2024
1 parent db6f8f7 commit 457dbff
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ jobs:
- name: Install GTK4 and dependencies
run: . .\.github\workflows\install_vcpkg.ps1
shell: pwsh
env:
VCPKG_DISABLE_METRICS: 1
if: ${{ success() }}

- name: Configure pkg-config paths
run: |
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/install_vcpkg.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,21 @@ if (Test-Path $pkgConfigPath) {
exit 1
}

# Install other dependencies
vcpkg install gobject-2.0:$env:VCPKG_TRIPLET
vcpkg install glib:$env:VCPKG_TRIPLET
vcpkg install gtk4:$env:VCPKG_TRIPLET
vcpkg install libadwaita:$env:VCPKG_TRIPLET
# Install dependencies with error checking
$packages = @(
"glib",
"gtk4",
"libadwaita"
)

foreach ($package in $packages) {
Write-Host "Installing $package..."
vcpkg install "$package`:$env:VCPKG_TRIPLET"
if ($LASTEXITCODE -ne 0) {
Write-Host "Error: Failed to install $package"
exit 1
}
}

# Create pkg-config wrapper script to handle Windows paths
$wrapperContent = @"
Expand Down

0 comments on commit 457dbff

Please sign in to comment.