OSDN Git Service

Fix compilation error when using v141_xp platform toolset
[winmerge-jp/winmerge-jp.git] / Plugins / BuildBin.vs2022.cmd
1 cd /d "%~dp0"
2
3 setlocal
4 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 (
5   set InstallDir=%%i
6 )
7 if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
8   call "%InstallDir%\Common7\Tools\vsdevcmd.bat
9 )
10
11 if "%1" == "" (
12   call :BuildBin x86 || goto :eof
13   call :BuildBin x64 || goto :eof
14   call :BuildBin ARM || goto :eof
15   call :BuildBin ARM64 || goto :eof
16 ) else (
17   call :BuildBin %1 || goto :eof
18 )
19
20 pushd WinMerge32BitPluginProxy
21 MSBuild WinMerge32BitPluginProxy.vs2022.sln /t:Rebuild /p:Configuration="Release" /p:Platform="x86" || goto :eof
22 popd
23
24 endlocal
25
26 goto :eof
27
28 :BuildBin
29
30 pushd src_VCPP
31 MSBuild VCPPPlugins.vs2022.sln /t:Rebuild /p:Configuration="Release" /p:Platform="%1" || goto :eof
32 popd
33
34 mkdir dlls\%1 2> NUL
35 copy src_VCPP\Build\%1\Release\MergePlugins\*.dll dlls\%1\
36
37 if exist "%SIGNBAT_PATH%" (
38   call "%SIGNBAT_PATH%" %~dp0dlls\%1\*.dll
39 )
40
41 goto :eof