5 set "MSVC_PATH=C:\Program Files\Microsoft Visual Studio\2022\Community"
8 if exist "%MSVC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" (
9 call "%MSVC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" x86
11 echo vcvarsall.bat
not found. Please check your MSVC_PATH variable
!
15 if "%PANDODC_PATH%"=="" (
16 set "PANDODC_PATH=C:\Program Files\Pandoc"
19 if not exist "%PANDODC_PATH%\pandoc.exe" (
20 echo pandoc.exe
not found. Please check your PANDODC_PATH variable
!
24 REM ------------------------------------------------------------
26 REM ------------------------------------------------------------
28 if exist "%CD%\bin\" rmdir /S /Q "%CD%\bin
"
29 if exist "%CD%\bin
\" (
30 echo Failed to clean up intermediate
files!
34 if exist "%CD%\obj\" rmdir /S /Q "%CD%\obj
"
35 if exist "%CD%\obj
\" (
36 echo Failed to clean up intermediate
files!
40 REM ------------------------------------------------------------
42 REM ------------------------------------------------------------
44 MSBuild.exe
/property
:Platform=x86
/property
:Configuration=Release
/target
:rebuild "%CD%\nuhash.sln"
45 if not "%ERRORLEVEL%"=="0" goto BuildError
47 MSBuild.exe
/property
:Platform=x64
/property
:Configuration=Release
/target
:rebuild "%CD%\nuhash.sln"
48 if not "%ERRORLEVEL%"=="0" goto BuildError
50 MSBuild.exe
/property
:Platform=ARM64
/property
:Configuration=Release
/target
:rebuild "%CD%\nuhash.sln"
51 if not "%ERRORLEVEL%"=="0" goto BuildError
53 REM ------------------------------------------------------------
54 REM GENERATE DOCUMENTS
55 REM ------------------------------------------------------------
57 if not exist "%CD%\out\" mkdir "%CD%\out
"
59 "%PANDODC_PATH%\pandoc.exe
" --standalone --embed-resources --css etc\style\gh-pandoc.min.css --metadata title="NuHash README
" -o "%~dp0\out\README.html
" "%~dp0\README.
md"
61 REM ------------------------------------------------------------
63 REM ------------------------------------------------------------
65 if exist "%CD%\out
\nuhash
-x86.exe
" del /F "%CD%\out
\nuhash
-x86.exe
"
66 if exist "%CD%\out
\nuhash
-x64.exe
" del /F "%CD%\out
\nuhash
-x64.exe
"
67 if exist "%CD%\out
\nuhash
-a64.exe
" del /F "%CD%\out
\nuhash
-a64.exe
"
69 copy /Y /B "%CD%\bin\Win32\Release
\nuhash.exe
" "%CD%\out
\nuhash
-x86.exe
"
70 copy /Y /B "%CD%\bin
\x64\Release
\nuhash.exe
" "%CD%\out
\nuhash
-x64.exe
"
71 copy /Y /B "%CD%\bin\ARM64\Release
\nuhash.exe
" "%CD%\out
\nuhash
-a64.exe
"
73 attrib +R "%CD%\out
\nuhash
-x86.exe
"
74 attrib +R "%CD%\out
\nuhash
-x64.exe
"
75 attrib +R "%CD%\out
\nuhash
-a64.exe
"
77 REM ------------------------------------------------------------
79 REM ------------------------------------------------------------
87 REM ------------------------------------------------------------
89 REM ------------------------------------------------------------
93 echo Build has failed !!!