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 MSBuild.exe
/property
:Platform=a64
/property
:Configuration=Release
/target
:rebuild "%CD%\%SOLUTION_FILE%"
44 if not "%ERRORLEVEL%"=="0" goto BuildError
46 REM ------------------------------------------------------------
48 REM ------------------------------------------------------------
50 if not exist "%CD%\out\" mkdir "%CD%\out
"
52 if exist "%CD%\out
\tee
-x86.exe
" del /F "%CD%\out
\tee
-x86.exe
"
53 if exist "%CD%\out
\tee
-x64.exe
" del /F "%CD%\out
\tee
-x64.exe
"
54 if exist "%CD%\out
\tee
-a64.exe
" del /F "%CD%\out
\tee
-a64.exe
"
56 copy /Y /B "%CD%\bin\Win32\Release
\tee.exe
" "%CD%\out
\tee
-x86.exe
"
57 copy /Y /B "%CD%\bin
\x64\.\Release
\tee.exe
" "%CD%\out
\tee
-x64.exe
"
58 copy /Y /B "%CD%\bin\ARM64\Release
\tee.exe
" "%CD%\out
\tee
-a64.exe
"
60 attrib +R "%CD%\out
\tee
-x86.exe
"
61 attrib +R "%CD%\out
\tee
-x64.exe
"
62 attrib +R "%CD%\out
\tee
-a64.exe
"
64 REM ------------------------------------------------------------
66 REM ------------------------------------------------------------
74 REM ------------------------------------------------------------
76 REM ------------------------------------------------------------
80 echo Build has failed !!!