-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.cmd
More file actions
46 lines (36 loc) · 1.04 KB
/
deploy.cmd
File metadata and controls
46 lines (36 loc) · 1.04 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@echo off
setlocal EnableDelayedExpansion
cd /d "%~d0"
for /f "usebackq delims=" %%i in (`etc\tools\win32\vswhere\vswhere.exe -version 17 -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -latest -property installationPath`) do (
if exist "%%~i\VC\Auxiliary\Build\vcvars64.bat" (
set "VS2022INSTALLDIR=%%~i"
goto:vs_found
)
)
echo Microsoft Visual C++ 2022 not found ^^!^^!^^!
pause && goto:eof
:vs_found
call "%VS2022INSTALLDIR%\VC\Auxiliary\Build\vcvars64.bat"
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
set PreferredToolArchitecture=x64
)
for %%d in (bin obj) do (
if exist "%CD%/%%d/" rmdir /S /Q "%CD%/%%d"
if exist "%CD%/%%d/" (
echo Failed to clean up intermediate files ^^!^^!^^!
pause && goto:eof
)
)
for %%p in (x86 x64 ARM64) do (
msbuild /property:Platform=%%p /property:Configuration=Release /target:Rebuild "%CD%\xxh_rand.sln"
if !ERRORLEVEL! neq 0 (
echo.
echo Build process has failed ^^!^^!^^!
pause && goto:eof
)
)
echo.
echo Build completed.
if not "%NON_INTERACTIVE%" == "1" (
pause
)