5 set "MSVC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
8 set "SOLUTION_FILE=tee.sln"
10 if exist "%MSVC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" (
11 call "%MSVC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" x86
13 echo vcvarsall.bat
not found. Please check your MSVC_PATH variable
!
17 REM ------------------------------------------------------------
19 REM ------------------------------------------------------------
21 if exist "%CD%\bin\" rmdir /S /Q "%CD%\bin
"
22 if exist "%CD%\bin
\" (
23 echo Failed to clean up intermediate
files!
27 if exist "%CD%\obj\" rmdir /S /Q "%CD%\obj
"
28 if exist "%CD%\obj
\" (
29 echo Failed to clean up intermediate
files!
33 REM ------------------------------------------------------------
35 REM ------------------------------------------------------------
37 MSBuild.exe
/property
:Platform=x86
/property
:Configuration=Release
/target
:rebuild "%CD%\%SOLUTION_FILE%"
38 if not "%ERRORLEVEL%"=="0" goto BuildError
40 MSBuild.exe
/property
:Platform=x64
/property
:Configuration=Release
/target
:rebuild "%CD%\%SOLUTION_FILE%"
41 if not "%ERRORLEVEL%"=="0" goto BuildError
43 REM ------------------------------------------------------------
45 REM ------------------------------------------------------------
47 if not exist "%CD%\out\" mkdir "%CD%\out
"
49 if exist "%CD%\out
\tee
-x86.exe
" del /F "%CD%\out
\tee
-x86.exe
"
50 if exist "%CD%\out
\tee
-x64.exe
" del /F "%CD%\out
\tee
-x64.exe
"
52 copy /Y /B "%CD%\bin\Win32\Release
\tee.exe
" "%CD%\out
\tee
-x86.exe
"
53 copy /Y /B "%CD%\bin
\x64\.\Release
\tee.exe
" "%CD%\out
\tee
-x64.exe
"
55 attrib +R "%CD%\out
\tee
-x86.exe
"
56 attrib +R "%CD%\out
\tee
-x64.exe
"
58 REM ------------------------------------------------------------
60 REM ------------------------------------------------------------
68 REM ------------------------------------------------------------
70 REM ------------------------------------------------------------
74 echo Build has failed !!!