Skip to content
This repository was archived by the owner on Jul 12, 2024. It is now read-only.

Commit d45ca46

Browse files
committed
fix: build.bat
1 parent 5a877f6 commit d45ca46

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

.github/workflows/build.bat

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
11
@echo off
2+
setlocal enabledelayedexpansion
3+
24
pushd "%~dp0"
35

6+
set msbuild="%PROGRAMFILES(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe"
7+
8+
for /f "usebackq tokens=*" %%i in (`vswhere -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe`) do (
9+
set msbuild="%%i"
10+
)
11+
412
if exist bin rd /s /q bin
513
if exist lib rd /s /q lib
614
if exist ucxxrt rd /s /q ucxxrt
715

8-
"%PROGRAMFILES(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" /p:Configuration=Release /p:Platform=x86 ..\..\ucxxrt.sln -t:ucxxrt
9-
"%PROGRAMFILES(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" /p:Configuration=Debug /p:Platform=x86 ..\..\ucxxrt.sln -t:ucxxrt
16+
%msbuild% -p:Configuration=Debug -p:Platform=x86 ..\..\ucxxrt.sln -t:ucxxrt
17+
%msbuild% -p:Configuration=Release -p:Platform=x86 ..\..\ucxxrt.sln -t:ucxxrt
1018

11-
"%PROGRAMFILES(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" /p:Configuration=Release /p:Platform=x64 ..\..\ucxxrt.sln -t:ucxxrt
12-
"%PROGRAMFILES(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" /p:Configuration=Debug /p:Platform=x64 ..\..\ucxxrt.sln -t:ucxxrt
19+
%msbuild% -p:Configuration=Debug -p:Platform=x64 ..\..\ucxxrt.sln -t:ucxxrt
20+
%msbuild% -p:Configuration=Release -p:Platform=x64 ..\..\ucxxrt.sln -t:ucxxrt
1321

14-
"%PROGRAMFILES(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" /p:Configuration=Release /p:Platform=ARM ..\..\ucxxrt.sln -t:ucxxrt
15-
"%PROGRAMFILES(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" /p:Configuration=Debug /p:Platform=ARM ..\..\ucxxrt.sln -t:ucxxrt
22+
%msbuild% -p:Configuration=Debug -p:Platform=ARM ..\..\ucxxrt.sln -t:ucxxrt
23+
%msbuild% -p:Configuration=Release -p:Platform=ARM ..\..\ucxxrt.sln -t:ucxxrt
1624

17-
"%PROGRAMFILES(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" /p:Configuration=Release /p:Platform=ARM64 ..\..\ucxxrt.sln -t:ucxxrt
18-
"%PROGRAMFILES(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" /p:Configuration=Debug /p:Platform=ARM64 ..\..\ucxxrt.sln -t:ucxxrt
25+
%msbuild% -p:Configuration=Debug -p:Platform=ARM64 ..\..\ucxxrt.sln -t:ucxxrt
26+
%msbuild% -p:Configuration=Release -p:Platform=ARM64 ..\..\ucxxrt.sln -t:ucxxrt
1927

2028
:exit
2129
popd

0 commit comments

Comments
 (0)