Skip to content

Commit eb040eb

Browse files
authored
Update build.yml
1 parent bc3b616 commit eb040eb

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@ jobs:
4444
src/wtime.py
4545
4646
- name: Build wtime_cpp.exe with MSVC
47-
shell: pwsh
47+
shell: cmd
4848
run: |
49-
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
50-
$vcvars = & "$vswhere" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
51-
$vcvarsall = Join-Path $vcvars "VC\Auxiliary\Build\vcvars64.bat"
52-
49+
"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" ^
50+
-latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^
51+
-property installationPath > temp_path.txt
52+
53+
set /p VC_PATH=<temp_path.txt
54+
call "%VC_PATH%\VC\Auxiliary\Build\vcvars64.bat" && ^
5355
cl /O2 /std:c++20 /Zc:__cplusplus /D_HAS_CXX20_FORMAT=1 /Fe:wtime_cpp.exe src\wtime.cpp
5456
5557
- name: Create GitHub Release and upload EXEs

0 commit comments

Comments
 (0)