pushd "%~dp0"
call BuildManual.cmd
-call BuildBin.vs2015.cmd
+call BuildBin.vs2017.cmd %1
pushd Testing\GoogleTest\UnitTests
UnitTests.exe || exit
popd
-call BuildInstaller.cmd
-call BuildArc.cmd
+call BuildInstaller.cmd %1
+call BuildArc.cmd %1
popd
pushd "%~dp0"
call BuildManual.cmd
-call BuildBin.vs2017.cmd
+call BuildBin.vs2017.cmd %1
pushd Testing\GoogleTest\UnitTests
UnitTests.exe || exit
popd
-call BuildInstaller.cmd
-call BuildArc.cmd
+call BuildInstaller.cmd %1
+call BuildArc.cmd %1
popd
setlocal
set VisualStudioVersion=14.0
call "%VS140COMNTOOLS%vsvars32.bat"
-MSBuild WinMerge.vs2015.sln /t:Rebuild /p:Configuration="Release Unicode" /p:Platform="Win32" || pause
-MSBuild WinMerge.vs2015.sln /t:Rebuild /p:Configuration="Release Unicode" /p:Platform="x64" || pause
+
+if "%1" == "" (
+ call :BuildBin
+ call :BuildBin x64
+) else (
+ call :BuildBin %1
+)
+
+goto :eof
+
+:BuildBin
+set PLATFORM=%1
+if "%1" == "" (
+ set PLATFORM_VS=Win32
+) else (
+ set PLATFORM_VS=%1
+)
+MSBuild WinMerge.vs2015.sln /t:Rebuild /p:Configuration="Release Unicode" /p:Platform="%PLATFOMR_VS" || pause
endlocal
if exist "%SIGNBAT_PATH%" (
- call "%SIGNBAT_PATH%" Build\MergeUnicodeRelease\WinMergeU.exe
- call "%SIGNBAT_PATH%" Build\MergeUnicodeRelease\MergeLang.dll
- call "%SIGNBAT_PATH%" Build\x64\MergeUnicodeRelease\WinMergeU.exe
- call "%SIGNBAT_PATH%" Build\x64\MergeUnicodeRelease\MergeLang.dll
+ call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\WinMergeU.exe
+ call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\MergeLang.dll
)
-mkdir Build\MergeUnicodeRelease\%APPVER% 2> NUL
-mkdir Build\x64\MergeUnicodeRelease\%APPVER% 2> NUL
-copy Build\MergeUnicodeRelease\*.pdb "Build\MergeUnicodeRelease\%APPVER%\"
-copy Build\x64\MergeUnicodeRelease\*.pdb "Build\x64\MergeUnicodeRelease\%APPVER%\"
+mkdir Build\%PLATFORM%\MergeUnicodeRelease\%APPVER% 2> NUL
+copy Build\%PlATFORM%\MergeUnicodeRelease\*.pdb "Build\%PLATFORM%\MergeUnicodeRelease\%APPVER%\"
+goto :eof
set InstallDir=%%i
)
if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
- call "%InstallDir%\Common7\Tools\vsdevcmd.bat %*
+ call "%InstallDir%\Common7\Tools\vsdevcmd.bat
)
-MSBuild WinMerge.vs2017.sln /t:Rebuild /p:Configuration="Release Unicode" /p:Platform="Win32" || pause
-MSBuild WinMerge.vs2017.sln /t:Rebuild /p:Configuration="Release Unicode" /p:Platform="x64" || pause
+
+if "%1" == "" (
+ call :BuildBin
+ call :BuildBin x64
+) else (
+ call :BuildBin %1
+)
+
+goto :eof
+
+:BuildBin
+set PLATFORM=%1
+if "%1" == "" (
+ set PLATFORM_VS=Win32
+) else (
+ set PLATFORM_VS=%1
+)
+MSBuild WinMerge.vs2017.sln /t:Rebuild /p:Configuration="Release Unicode" /p:Platform="%PLATFORM_VS%" || pause
endlocal
if exist "%SIGNBAT_PATH%" (
- call "%SIGNBAT_PATH%" Build\MergeUnicodeRelease\WinMergeU.exe
- call "%SIGNBAT_PATH%" Build\MergeUnicodeRelease\MergeLang.dll
- call "%SIGNBAT_PATH%" Build\x64\MergeUnicodeRelease\WinMergeU.exe
- call "%SIGNBAT_PATH%" Build\x64\MergeUnicodeRelease\MergeLang.dll
+ call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\WinMergeU.exe
+ call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\MergeLang.dll
)
-mkdir Build\MergeUnicodeRelease\%APPVER% 2> NUL
-mkdir Build\x64\MergeUnicodeRelease\%APPVER% 2> NUL
-copy Build\MergeUnicodeRelease\*.pdb "Build\MergeUnicodeRelease\%APPVER%\"
-copy Build\x64\MergeUnicodeRelease\*.pdb "Build\x64\MergeUnicodeRelease\%APPVER%\"
+mkdir Build\%PLATFORM%\MergeUnicodeRelease\%APPVER% 2> NUL
+copy Build\%PlATFORM%\MergeUnicodeRelease\*.pdb "Build\%PLATFORM%\MergeUnicodeRelease\%APPVER%\"
+goto :eof
+if "%1" == "" (
+ call :BuildInstaller
+ call :BuildInstaller x64
+) else (
+ call :BuildInstaller %1
+)
+goto :eof
+
+:BuildInstaller
+set PLATFORM=%1
for %%i in ("%ProgramFiles(x86)%" "%ProgramFiles%") do (
if exist "%%~i\Inno Setup 5\iscc.exe" (
- "%%~i\Inno Setup 5\iscc.exe" "Installer\innosetup\WinMerge.iss" || pause
- "%%~i\Inno Setup 5\iscc.exe" "Installer\innosetup\WinMergeX64.iss" || pause
+ "%%~i\Inno Setup 5\iscc.exe" "Installer\innosetup\WinMerge%PLATFORM%.iss" || pause
)
)
+goto :eof