-
Notifications
You must be signed in to change notification settings - Fork 13
/
BuildBin.vs2019.cmd
46 lines (37 loc) · 1.09 KB
/
BuildBin.vs2019.cmd
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
cd /d "%~dp0"
for /f "usebackq tokens=*" %%i in (`"%programfiles(x86)%\microsoft visual studio\installer\vswhere.exe" -version [16.0^,17.0^) -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
set InstallDir=%%i
)
if "%1" == "" (
call :BuildBin x86 || goto :eof
call :BuildBin x64 || goto :eof
call :BuildBin ARM || goto :eof
call :BuildBin ARM64 || goto :eof
) else (
call :BuildBin %1 || goto :eof
)
goto :eof
:BuildBin
setlocal
if "%1" == "Win32" set ARCH=x86
if "%1" == "x86" set ARCH=x86
if "%1" == "X86" set ARCH=x86
if "%1" == "x64" set ARCH=amd64
if "%1" == "X64" set ARCH=amd64
if "%1" == "arm" set ARCH=amd64_arm
if "%1" == "ARM" set ARCH=amd64_arm
if "%1" == "arm64" set ARCH=amd64_arm64
if "%1" == "ARM64" set ARCH=amd64_arm64
call "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" %ARCH%
pushd CPP\7zip
nmake
popd
if exist "%SIGNBAT_PATH%" (
if "%ARCH%" == "x86" (
call "%SIGNBAT_PATH%" CPP\7zip\Bundles\Format7zF\x86\7z.dll
) else (
call "%SIGNBAT_PATH%" CPP\7zip\Bundles\Format7zF\%1\7z.dll
)
)
endlocal
goto :eof