OSDN Git Service

refactor
[winmerge-jp/winmerge-jp.git] / BuildBin.vs2022.cmd
1 cd /d "%~dp0"
2
3 call SetVersion.cmd
4 cscript /nologo ExpandEnvironmenStrings.vbs Version.in > Version.h
5
6 setlocal
7 for /f "usebackq tokens=*" %%i in (`"%programfiles(x86)%\microsoft visual studio\installer\vswhere.exe" -version [17.0^,18.0^) -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
8   set InstallDir=%%i
9 )
10 if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
11   call "%InstallDir%\Common7\Tools\vsdevcmd.bat
12 )
13
14 if "%1" == "" (
15   call :BuildBin ARM || goto :eof
16   call :BuildBin ARM64 || goto :eof
17   call :BuildBin x86|| goto :eof
18   call :BuildBin x64 || goto :eof
19 ) else (
20   call :BuildBin %1 || goto :eof
21 )
22
23 goto :eof
24
25 :BuildBin
26 MSBuild WinMerge.vs2022.sln /t:Rebuild /p:Configuration="Release" /p:Platform="%1" || goto :eof
27 endlocal
28
29 if exist "%SIGNBAT_PATH%" (
30   call "%SIGNBAT_PATH%" Build\%1\Release\WinMergeU.exe
31 )
32
33 mkdir Build\%1\Release\%APPVER% 2> NUL
34 copy Build\%1\Release\*.pdb "Build\%1\Release\%APPVER%\"
35 goto :eof