5 set "MSVC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
8 if "%PANDOC_EXE%"=="" (
9 set "PANDOC_EXE=C:\Program Files\Pandoc\pandoc.exe"
12 set "SOLUTION_FILE=tee.sln"
14 if exist "%MSVC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" (
15 call "%MSVC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" x86
17 echo vcvarsall.bat
not found. Please check your MSVC_PATH variable
!
21 REM ------------------------------------------------------------
23 REM ------------------------------------------------------------
25 if exist "%CD%\bin\" rmdir /S /Q "%CD%\bin
"
26 if exist "%CD%\bin
\" (
27 echo Failed to clean up intermediate
files!
31 if exist "%CD%\obj\" rmdir /S /Q "%CD%\obj
"
32 if exist "%CD%\obj
\" (
33 echo Failed to clean up intermediate
files!
37 REM ------------------------------------------------------------
39 REM ------------------------------------------------------------
41 MSBuild.exe
/property
:Platform=x86
/property
:Configuration=Release
/target
:rebuild "%CD%\%SOLUTION_FILE%"
42 if not "%ERRORLEVEL%"=="0" goto BuildError
44 MSBuild.exe
/property
:Platform=x64
/property
:Configuration=Release
/target
:rebuild "%CD%\%SOLUTION_FILE%"
45 if not "%ERRORLEVEL%"=="0" goto BuildError
47 MSBuild.exe
/property
:Platform=a64
/property
:Configuration=Release
/target
:rebuild "%CD%\%SOLUTION_FILE%"
48 if not "%ERRORLEVEL%"=="0" goto BuildError
50 REM ------------------------------------------------------------
52 REM ------------------------------------------------------------
54 if not exist "%CD%\out\" mkdir "%CD%\out
"
56 if exist "%CD%\out
\tee
-x86.exe
" del /F "%CD%\out
\tee
-x86.exe
"
57 if exist "%CD%\out
\tee
-x64.exe
" del /F "%CD%\out
\tee
-x64.exe
"
58 if exist "%CD%\out
\tee
-a64.exe
" del /F "%CD%\out
\tee
-a64.exe
"
60 copy /Y /B "%CD%\bin\Win32\Release
\tee.exe
" "%CD%\out
\tee
-x86.exe
"
61 copy /Y /B "%CD%\bin
\x64\.\Release
\tee.exe
" "%CD%\out
\tee
-x64.exe
"
62 copy /Y /B "%CD%\bin\ARM64\Release
\tee.exe
" "%CD%\out
\tee
-a64.exe
"
64 attrib +R "%CD%\out
\tee
-x86.exe
"
65 attrib +R "%CD%\out
\tee
-x64.exe
"
66 attrib +R "%CD%\out
\tee
-a64.exe
"
68 REM ------------------------------------------------------------
70 REM ------------------------------------------------------------
72 if exist "%CD%\out\README.html
" del /F "%CD%\out\README.html
"
74 "%PANDOC_EXE%" -f markdown -t html5 --metadata pagetitle="tee
for Windows
" --embed-resources --standalone --css "%CD%\etc\style\github
-markdown.css
" -o "%CD%\out\README.html
" "%CD%\README.
md"
76 attrib +R "%CD%\out\README.html
"
78 REM ------------------------------------------------------------
80 REM ------------------------------------------------------------
88 REM ------------------------------------------------------------
90 REM ------------------------------------------------------------
94 echo Build has failed !!!