OSDN Git Service

Merge7z: Add BuidBin.*.cmd
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 17 Mar 2019 23:16:44 +0000 (08:16 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 17 Mar 2019 23:16:44 +0000 (08:16 +0900)
ArchiveSupport/Merge7z/BuildBin.vs2017.cmd [new file with mode: 0644]
ArchiveSupport/Merge7z/BuildBin.vs2019.cmd [new file with mode: 0644]

diff --git a/ArchiveSupport/Merge7z/BuildBin.vs2017.cmd b/ArchiveSupport/Merge7z/BuildBin.vs2017.cmd
new file mode 100644 (file)
index 0000000..fcc0cf0
--- /dev/null
@@ -0,0 +1,36 @@
+cd /d "%~dp0"
+
+setlocal
+for /f "usebackq tokens=*" %%i in (`"%programfiles(x86)%\microsoft visual studio\installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
+  set InstallDir=%%i
+)
+if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
+  call "%InstallDir%\Common7\Tools\vsdevcmd.bat
+)
+
+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 Merge7z.vs2017.sln /t:Rebuild /p:Configuration="Release" /p:Platform="%PLATFORM_VS%" || pause
+endlocal
+
+if exist "%SIGNBAT_PATH%" (
+  call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\Merge7z\Merge7z.dll
+)
+
+mkdir Build\%PLATFORM%\MergeUnicodeRelease\%APPVER% 2> NUL
+copy Build\%PlATFORM%\MergeUnicodeRelease\Merge7z\*.pdb "Build\%PLATFORM%\MergeUnicodeRelease\%APPVER%\"
+goto :eof
diff --git a/ArchiveSupport/Merge7z/BuildBin.vs2019.cmd b/ArchiveSupport/Merge7z/BuildBin.vs2019.cmd
new file mode 100644 (file)
index 0000000..e175cd8
--- /dev/null
@@ -0,0 +1,36 @@
+cd /d "%~dp0"
+
+setlocal
+for /f "usebackq tokens=*" %%i in (`"%programfiles(x86)%\microsoft visual studio\installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
+  set InstallDir=%%i
+)
+if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
+  call "%InstallDir%\Common7\Tools\vsdevcmd.bat
+)
+
+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 Merge7z.vs2019.sln /t:Rebuild /p:Configuration="Release" /p:Platform="%PLATFORM_VS%" || pause
+endlocal
+
+if exist "%SIGNBAT_PATH%" (
+  call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\Merge7z\Merge7z.dll
+)
+
+mkdir Build\%PLATFORM%\MergeUnicodeRelease\%APPVER% 2> NUL
+copy Build\%PlATFORM%\MergeUnicodeRelease\Merge7z\*.pdb "Build\%PLATFORM%\MergeUnicodeRelease\%APPVER%\"
+goto :eof