File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -213,6 +213,41 @@ jobs:
213213 with :
214214 args : install wixtoolset -y
215215
216+ - name : Export WiX Toolset path
217+ if : ${{ matrix.config.arch == 'amd64_arm64' }}
218+ run : |
219+ $wix = [Environment]::GetEnvironmentVariable("WIX", "Machine")
220+ if (-not $wix) {
221+ $wix = [Environment]::GetEnvironmentVariable("WIX", "Process")
222+ }
223+ if (-not $wix) {
224+ $candidates = @(
225+ "${env:ProgramFiles(x86)}",
226+ "${env:ProgramFiles}"
227+ ) | Where-Object { $_ -and (Test-Path $_) }
228+ foreach ($candidate in $candidates) {
229+ $wix = Get-ChildItem -Path $candidate -Directory -Filter "WiX Toolset v*" |
230+ Sort-Object Name -Descending |
231+ Select-Object -First 1 -ExpandProperty FullName
232+ if ($wix) {
233+ break
234+ }
235+ }
236+ }
237+ if (-not $wix) {
238+ throw "WiX Toolset installation path could not be located"
239+ }
240+
241+ $wixBin = Join-Path $wix "bin"
242+ if (!(Test-Path (Join-Path $wixBin "candle.exe")) -or
243+ !(Test-Path (Join-Path $wixBin "light.exe"))) {
244+ throw "WiX Toolset candle.exe/light.exe could not be located in $wixBin"
245+ }
246+
247+ "WIX=$wix" | Out-File -FilePath $env:GITHUB_ENV -Append
248+ $wixBin | Out-File -FilePath $env:GITHUB_PATH -Append
249+ shell : pwsh
250+
216251 # http://man7.org/linux/man-pages/man1/date.1.html
217252 - name : Get Date
218253 id : get-date
You can’t perform that action at this time.
0 commit comments