forked from BeezBeez/Windows-RoundedScreen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
26 lines (21 loc) · 828 Bytes
/
build.bat
File metadata and controls
26 lines (21 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@echo off
setlocal
set "MSBUILD_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe"
if not exist "%MSBUILD_PATH%" (
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if exist "%VSWHERE%" (
for /f "usebackq delims=" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe`) do set "MSBUILD_PATH=%%i"
)
)
if not exist "%MSBUILD_PATH%" (
echo MSBuild not found. Ensure Visual Studio 2022 Build Tools are installed.
exit /b 1
)
"%MSBUILD_PATH%" "RoundedScreen.sln" /p:Configuration=Release /m
set "ERR=%ERRORLEVEL%"
if not "%ERR%"=="0" (
echo Build failed with exit code %ERR%.
exit /b %ERR%
)
echo Build succeeded. Output: RoundedScreen\bin\Release\RoundedScreen.exe
endlocal