OSDN Git Service

Reduce startup time
[winmerge-jp/winmerge-jp.git] / ShellExtension / BuildBin.vs2017.cmd
1 cd /d "%~dp0"
2
3 setlocal
4 for /f "usebackq tokens=*" %%i in (`"%programfiles(x86)%\microsoft visual studio\installer\vswhere.exe" -version [15.0^,16.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
13   call :BuildBin x64
14   call :BuildBin ARM
15   call :BuildBin ARM64
16 ) else (
17   call :BuildBin %1 
18 )
19
20 goto :eof
21
22 :BuildBin
23 set PLATFORM=%1
24 if "%1" == "" (
25   set PLATFORM_VS=Win32
26   set DLLFILENAME=ShellExtensionU.dll
27 ) else (
28   set PLATFORM_VS=%1
29   set DLLFILENAME=ShellExtension%1.dll
30 )
31 MSBuild ShellExtension.vs2017.sln /t:Rebuild /p:Configuration="Release" /p:Platform="%PLATFORM_VS%" || pause
32 endlocal
33
34 if exist "%SIGNBAT_PATH%" (
35   call "%SIGNBAT_PATH%" "..\Build\%PLATFORM%\Release\%DLLFILENAME%"
36   call "%SIGNBAT_PATH%" "..\Build\%PLATFORM%\Release\WinMergeContextMenu.dll
37 )
38
39 goto :eof