diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 510b4ac..3943f01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -215,7 +215,7 @@ jobs: $installPrefix = "$env:VCPKG_ROOT\installed\$env:VCPKG_TRIPLET" # Set up pkg-config environment - $env:PKG_CONFIG = "$installPrefix\tools\pkgconf\pkg-config.ps1" + $env:PKG_CONFIG = "$installPrefix\tools\pkgconf\pkg-config.bat" # Changed to .bat $env:PKG_CONFIG_PATH = "$installPrefix\lib\pkgconfig" $env:PKG_CONFIG_LIBDIR = "$installPrefix\lib\pkgconfig" $env:PKG_CONFIG_ALLOW_CROSS = "1" diff --git a/.github/workflows/install_vcpkg.ps1 b/.github/workflows/install_vcpkg.ps1 index caa5e39..e45b2f3 100644 --- a/.github/workflows/install_vcpkg.ps1 +++ b/.github/workflows/install_vcpkg.ps1 @@ -20,12 +20,21 @@ vcpkg install libadwaita:$env:VCPKG_TRIPLET # Create pkg-config wrapper script to handle Windows paths $wrapperContent = @" #!/usr/bin/env pwsh -`$env:PKG_CONFIG_PATH = `$env:PKG_CONFIG_PATH -replace ";",":" -`$env:PKG_CONFIG_LIBDIR = `$env:PKG_CONFIG_LIBDIR -replace ";",":" -& "$pkgConfigPath" `$args +`$env:PKG_CONFIG_PATH = `$env:PKG_CONFIG_PATH -replace ';',':' +`$env:PKG_CONFIG_LIBDIR = `$env:PKG_CONFIG_LIBDIR -replace ';',':' +& '$pkgConfigPath' @args +"@ + +$batchContent = @" +@echo off +powershell.exe -NoProfile -ExecutionPolicy Bypass -File ""%~dp0pkg-config.ps1"" %* "@ $wrapperPath = "$env:VCPKG_ROOT\installed\$env:VCPKG_TRIPLET\tools\pkgconf\pkg-config.ps1" +$batchPath = "$env:VCPKG_ROOT\installed\$env:VCPKG_TRIPLET\tools\pkgconf\pkg-config.bat" + $wrapperContent | Out-File -FilePath $wrapperPath -Encoding UTF8 +$batchContent | Out-File -FilePath $batchPath -Encoding ASCII Write-Host "Created pkg-config wrapper at: $wrapperPath" +Write-Host "Created pkg-config batch wrapper at: $batchPath"