Skip to content

Commit

Permalink
CI(OSGeo4W): Create a powershell function to return the path of VC Tools
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix committed Nov 24, 2024
1 parent 1df6248 commit 13d21fd
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/osgeo4w.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,38 @@ jobs:
continue-on-error: true
- run: vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
- run: vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64
- run: |
Function Find-VCTools
{
[CmdletBinding()]
param (
[Parameter()]
$Arch = 'x64',
[Parameter()]
$HostArch = 'x64',
[Parameter(ValueFromRemainingArguments=$true)]
$Arguments
)
$installDir = vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
if ($installDir) {
$path = join-path $installDir 'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt'
if (test-path $path) {
$version = gc -raw $path
if ($version) {
$version = $version.Trim()
$path = join-path $installDir "VC\Tools\MSVC\$version\bin\Host$HostArch\$Arch\"
# & $path $Arguments
return $path
}
}
}
}
Find-VCTools
Find-VCTools -Arch 'x64'
Find-VCTools -HostArch 'x64'
- run: vswhere -latest -find **\dumpbin.exe
- name: Set git to use LF
run: |
Expand Down

0 comments on commit 13d21fd

Please sign in to comment.