radi-sh版BonDriverをビルドするバッチファイル

スポンサーリンク
TS抜き

ソースをダウンロードしてビルド、アーカイブを作成するバッチファイルです。

スポンサーリンク
スポンサーリンク

必要

VS2019

こちらの記事を参考にインストールしてください。

Git for Windows

公式サイトの「Download」をクリックします。

インストールで特に変更するところはありません。

7-Zip

公式サイトからダウンロードしてインストールします。

バッチファイル

拡張子を.batにして保存します。

@echo off
cd /d %~dp0

git clone --recursive https://github.com/radi-sh/BonDriver_BDA.git
git clone https://github.com/radi-sh/BDASpecial-PlexPX.git
git clone https://github.com/radi-sh/Rijndael4plex.git
git clone https://github.com/radi-sh/BDASpecial-IT35.git
git clone https://github.com/radi-sh/BDASpecial-DD.git
git clone https://github.com/radi-sh/BDASpecial-LWire.git

xcopy /e BDASpecial-PlexPX\BdaSpecials BonDriver_BDA\BdaSpecials
xcopy /i Rijndael4plex\aes BonDriver_BDA\aes
xcopy /e BDASpecial-IT35\BdaSpecials BonDriver_BDA\BdaSpecials
xcopy /i BDASpecial-IT35\CardReader BonDriver_BDA\CardReader
xcopy /e BDASpecial-DD\BdaSpecials BonDriver_BDA\BdaSpecials
xcopy /e BDASpecial-LWire\BdaSpecials BonDriver_BDA\BdaSpecials

call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"

cd BonDriver_BDA
MSBuild BonDriver_BDA.sln /t:Build /p:Configuration=Release;Platform=Win32
if %errorlevel% neq 0 exit /b 1
MSBuild BonDriver_BDA.sln /t:Build /p:Configuration=Release;Platform=x64
if %errorlevel% neq 0 exit /b 1
MSBuild BonDriver_BDA.sln /t:Build /p:Configuration=Release_Static;Platform=Win32
if %errorlevel% neq 0 exit /b 1
MSBuild BonDriver_BDA.sln /t:Build /p:Configuration=Release_Static;Platform=x64
if %errorlevel% neq 0 exit /b 1

cd Win32\Release
echo D | xcopy BonDriver_BDA.dll ..\..\doc\x86\Release
echo D | xcopy DVBWorld.dll ..\..\doc\x86\Release
echo D | xcopy TBS.dll ..\..\doc\x86\Release
echo D | xcopy PlexPX.dll ..\..\..\BDASpecial-PlexPX\doc\x86\Release
echo D | xcopy IT35.dll ..\..\..\BDASpecial-IT35\doc\x86\Release
echo F | xcopy WinSCard-x3U4.dll ..\..\..\BDASpecial-IT35\doc\x86\Release\WinSCard.dll
echo D | xcopy x3U4Remocon.tvtp ..\..\..\BDASpecial-IT35\doc\x86\Release
echo D | xcopy DD.dll ..\..\..\BDASpecial-DD\doc\x86\Release
echo D | xcopy LWire.dll ..\..\..\BDASpecial-LWire\doc\x86\Release

cd ..\Release_Static
echo D | xcopy BonDriver_BDA.dll ..\..\doc\x86\Release_Static
echo D | xcopy DVBWorld.dll ..\..\doc\x86\Release_Static
echo D | xcopy TBS.dll ..\..\doc\x86\Release_Static
echo D | xcopy PlexPX.dll ..\..\..\BDASpecial-PlexPX\doc\x86\Release_Static
echo D | xcopy IT35.dll ..\..\..\BDASpecial-IT35\doc\x86\Release_Static
echo F | xcopy WinSCard-x3U4.dll ..\..\..\BDASpecial-IT35\doc\x86\Release_Static\WinSCard.dll
echo D | xcopy x3U4Remocon.tvtp ..\..\..\BDASpecial-IT35\doc\x86\Release_Static
echo D | xcopy DD.dll ..\..\..\BDASpecial-DD\doc\x86\Release_Static
echo D | xcopy LWire.dll ..\..\..\BDASpecial-LWire\doc\x86\Release_Static

cd ..\..\x64\Release
echo D | xcopy BonDriver_BDA.dll ..\..\doc\x64\Release
echo D | xcopy DVBWorld.dll ..\..\doc\x64\Release
echo D | xcopy TBS.dll ..\..\doc\x64\Release
echo D | xcopy PlexPX.dll ..\..\..\BDASpecial-PlexPX\doc\x64\Release
echo D | xcopy IT35.dll ..\..\..\BDASpecial-IT35\doc\x64\Release
echo F | xcopy WinSCard-x3U4.dll ..\..\..\BDASpecial-IT35\doc\x64\Release\WinSCard.dll
echo D | xcopy x3U4Remocon.tvtp ..\..\..\BDASpecial-IT35\doc\x64\Release
echo D | xcopy DD.dll ..\..\..\BDASpecial-DD\doc\x64\Release
echo D | xcopy LWire.dll ..\..\..\BDASpecial-LWire\doc\x64\Release

cd ..\Release_Static
echo D | xcopy BonDriver_BDA.dll ..\..\doc\x64\Release_Static
echo D | xcopy DVBWorld.dll ..\..\doc\x64\Release_Static
echo D | xcopy TBS.dll ..\..\doc\x64\Release_Static
echo D | xcopy PlexPX.dll ..\..\..\BDASpecial-PlexPX\doc\x64\Release_Static
echo D | xcopy IT35.dll ..\..\..\BDASpecial-IT35\doc\x64\Release_Static
echo F | xcopy WinSCard-x3U4.dll ..\..\..\BDASpecial-IT35\doc\x64\Release_Static\WinSCard.dll
echo D | xcopy x3U4Remocon.tvtp ..\..\..\BDASpecial-IT35\doc\x64\Release_Static
echo D | xcopy DD.dll ..\..\..\BDASpecial-DD\doc\x64\Release_Static
echo D | xcopy LWire.dll ..\..\..\BDASpecial-LWire\doc\x64\Release_Static

cd ..\..
for /f "usebackq tokens=*" %%i in (`git rev-parse --short HEAD`) do set hash_BonDriver_BDA=%%i
"%ProgramFiles%\7-Zip\7z.exe" a "BonDriver_BDA_%hash_BonDriver_BDA%.7z" .\doc\* -mx=9 -ms=on -myx=9

cd ..\BDASpecial-PlexPX
for /f "usebackq tokens=*" %%i in (`git rev-parse --short HEAD`) do set hash_BDASpecial-PlexPX=%%i
"%ProgramFiles%\7-Zip\7z.exe" a "BDASpecial-PlexPX_%hash_BDASpecial-PlexPX%.7z" .\doc\* -mx=9 -ms=on -myx=9

cd ..\BDASpecial-IT35\doc
move WinSCard-x3U4\WinSCard.ini
move x3U4Remocon\x3U4Remocon.ini
rd WinSCard-x3U4 x3U4Remocon

cd ..
for /f "usebackq tokens=*" %%i in (`git rev-parse --short HEAD`) do set hash_BDASpecial-IT35=%%i
"%ProgramFiles%\7-Zip\7z.exe" a "BDASpecial-IT35_%hash_BDASpecial-IT35%.7z" .\doc\* -mx=9 -ms=on -myx=9

cd ..\BDASpecial-DD
for /f "usebackq tokens=*" %%i in (`git rev-parse --short HEAD`) do set hash_BDASpecial-DD=%%i
"%ProgramFiles%\7-Zip\7z.exe" a "BDASpecial-DD_%hash_BDASpecial-DD%.7z" .\doc\* -mx=9 -ms=on -myx=9

cd ..\BDASpecial-LWire
for /f "usebackq tokens=*" %%i in (`git rev-parse --short HEAD`) do set hash_BDASpecial-LWire=%%i
"%ProgramFiles%\7-Zip\7z.exe" a "BDASpecial-LWire_%hash_BDASpecial-LWire%.7z" .\doc\* -mx=9 -ms=on -myx=9

exit /b 0

使い方

バッチファイルをダブルクリックするとコマンドプロンプトが起動して処理が始まります。

終わるとコマンドプロンプトが終了します。

バッチファイルと同じフォルダにある「BonDriver_BDA」フォルダと各「BDASpecial-~」フォルダに7zファイルが出力されています。

workブランチのビルド

git cloneの行を以下のように書き換えてください。

git clone -b work2 --recursive https://github.com/radi-sh/BonDriver_BDA.git
git clone -b work https://github.com/radi-sh/BDASpecial-PlexPX.git
git clone -b work https://github.com/radi-sh/Rijndael4plex.git
git clone -b work https://github.com/radi-sh/BDASpecial-IT35.git
git clone -b work https://github.com/radi-sh/BDASpecial-DD.git
git clone -b work https://github.com/radi-sh/BDASpecial-LWire.git

Release-XP・Release-XP_Staticのビルド

プラットフォームツールセットv141_xpが必要です。

@echo off
cd /d %~dp0

git clone --recursive https://github.com/radi-sh/BonDriver_BDA.git
git clone https://github.com/radi-sh/BDASpecial-PlexPX.git
git clone https://github.com/radi-sh/Rijndael4plex.git
git clone https://github.com/radi-sh/BDASpecial-IT35.git
git clone https://github.com/radi-sh/BDASpecial-DD.git
git clone https://github.com/radi-sh/BDASpecial-LWire.git

xcopy /e BDASpecial-PlexPX\BdaSpecials BonDriver_BDA\BdaSpecials
xcopy /i Rijndael4plex\aes BonDriver_BDA\aes
xcopy /e BDASpecial-IT35\BdaSpecials BonDriver_BDA\BdaSpecials
xcopy /i BDASpecial-IT35\CardReader BonDriver_BDA\CardReader
xcopy /e BDASpecial-DD\BdaSpecials BonDriver_BDA\BdaSpecials
xcopy /e BDASpecial-LWire\BdaSpecials BonDriver_BDA\BdaSpecials

call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"

cd BonDriver_BDA
MSBuild BonDriver_BDA.sln /t:Build /p:Configuration=Release;Platform=Win32
if %errorlevel% neq 0 exit /b 1
MSBuild BonDriver_BDA.sln /t:Build /p:Configuration=Release;Platform=x64
if %errorlevel% neq 0 exit /b 1
MSBuild BonDriver_BDA.sln /t:Build /p:Configuration=Release_Static;Platform=Win32
if %errorlevel% neq 0 exit /b 1
MSBuild BonDriver_BDA.sln /t:Build /p:Configuration=Release_Static;Platform=x64
if %errorlevel% neq 0 exit /b 1
MSBuild BonDriver_BDA.sln /t:Build /p:Configuration=Release-XP;Platform=Win32
if %errorlevel% neq 0 exit /b 1
MSBuild BonDriver_BDA.sln /t:Build /p:Configuration=Release-XP;Platform=x64
if %errorlevel% neq 0 exit /b 1
MSBuild BonDriver_BDA.sln /t:Build /p:Configuration=Release-XP_Static;Platform=Win32
if %errorlevel% neq 0 exit /b 1
MSBuild BonDriver_BDA.sln /t:Build /p:Configuration=Release-XP_Static;Platform=x64
if %errorlevel% neq 0 exit /b 1

cd Win32\Release
echo D | xcopy BonDriver_BDA.dll ..\..\doc\x86\Release
echo D | xcopy DVBWorld.dll ..\..\doc\x86\Release
echo D | xcopy TBS.dll ..\..\doc\x86\Release
echo D | xcopy PlexPX.dll ..\..\..\BDASpecial-PlexPX\doc\x86\Release
echo D | xcopy IT35.dll ..\..\..\BDASpecial-IT35\doc\x86\Release
echo F | xcopy WinSCard-x3U4.dll ..\..\..\BDASpecial-IT35\doc\x86\Release\WinSCard.dll
echo D | xcopy x3U4Remocon.tvtp ..\..\..\BDASpecial-IT35\doc\x86\Release
echo D | xcopy DD.dll ..\..\..\BDASpecial-DD\doc\x86\Release
echo D | xcopy LWire.dll ..\..\..\BDASpecial-LWire\doc\x86\Release

cd ..\Release_Static
echo D | xcopy BonDriver_BDA.dll ..\..\doc\x86\Release_Static
echo D | xcopy DVBWorld.dll ..\..\doc\x86\Release_Static
echo D | xcopy TBS.dll ..\..\doc\x86\Release_Static
echo D | xcopy PlexPX.dll ..\..\..\BDASpecial-PlexPX\doc\x86\Release_Static
echo D | xcopy IT35.dll ..\..\..\BDASpecial-IT35\doc\x86\Release_Static
echo F | xcopy WinSCard-x3U4.dll ..\..\..\BDASpecial-IT35\doc\x86\Release_Static\WinSCard.dll
echo D | xcopy x3U4Remocon.tvtp ..\..\..\BDASpecial-IT35\doc\x86\Release_Static
echo D | xcopy DD.dll ..\..\..\BDASpecial-DD\doc\x86\Release_Static
echo D | xcopy LWire.dll ..\..\..\BDASpecial-LWire\doc\x86\Release_Static

cd ..\Release-XP
echo D | xcopy BonDriver_BDA.dll ..\..\doc\x86\Release-XP
echo D | xcopy DVBWorld.dll ..\..\doc\x86\Release-XP
echo D | xcopy TBS.dll ..\..\doc\x86\Release-XP
echo D | xcopy PlexPX.dll ..\..\..\BDASpecial-PlexPX\doc\x86\Release-XP
echo D | xcopy IT35.dll ..\..\..\BDASpecial-IT35\doc\x86\Release-XP
echo F | xcopy WinSCard-x3U4.dll ..\..\..\BDASpecial-IT35\doc\x86\Release-XP\WinSCard.dll
echo D | xcopy x3U4Remocon.tvtp ..\..\..\BDASpecial-IT35\doc\x86\Release-XP
echo D | xcopy DD.dll ..\..\..\BDASpecial-DD\doc\x86\Release-XP
echo D | xcopy LWire.dll ..\..\..\BDASpecial-LWire\doc\x86\Release-XP

cd ..\Release-XP_Static
echo D | xcopy BonDriver_BDA.dll ..\..\doc\x86\Release-XP_Static
echo D | xcopy DVBWorld.dll ..\..\doc\x86\Release-XP_Static
echo D | xcopy TBS.dll ..\..\doc\x86\Release-XP_Static
echo D | xcopy PlexPX.dll ..\..\..\BDASpecial-PlexPX\doc\x86\Release-XP_Static
echo D | xcopy IT35.dll ..\..\..\BDASpecial-IT35\doc\x86\Release-XP_Static
echo F | xcopy WinSCard-x3U4.dll ..\..\..\BDASpecial-IT35\doc\x86\Release-XP_Static\WinSCard.dll
echo D | xcopy x3U4Remocon.tvtp ..\..\..\BDASpecial-IT35\doc\x86\Release-XP_Static
echo D | xcopy DD.dll ..\..\..\BDASpecial-DD\doc\x86\Release-XP_Static
echo D | xcopy LWire.dll ..\..\..\BDASpecial-LWire\doc\x86\Release-XP_Static

cd ..\..\x64\Release
echo D | xcopy BonDriver_BDA.dll ..\..\doc\x64\Release
echo D | xcopy DVBWorld.dll ..\..\doc\x64\Release
echo D | xcopy TBS.dll ..\..\doc\x64\Release
echo D | xcopy PlexPX.dll ..\..\..\BDASpecial-PlexPX\doc\x64\Release
echo D | xcopy IT35.dll ..\..\..\BDASpecial-IT35\doc\x64\Release
echo F | xcopy WinSCard-x3U4.dll ..\..\..\BDASpecial-IT35\doc\x64\Release\WinSCard.dll
echo D | xcopy x3U4Remocon.tvtp ..\..\..\BDASpecial-IT35\doc\x64\Release
echo D | xcopy DD.dll ..\..\..\BDASpecial-DD\doc\x64\Release
echo D | xcopy LWire.dll ..\..\..\BDASpecial-LWire\doc\x64\Release

cd ..\Release_Static
echo D | xcopy BonDriver_BDA.dll ..\..\doc\x64\Release_Static
echo D | xcopy DVBWorld.dll ..\..\doc\x64\Release_Static
echo D | xcopy TBS.dll ..\..\doc\x64\Release_Static
echo D | xcopy PlexPX.dll ..\..\..\BDASpecial-PlexPX\doc\x64\Release_Static
echo D | xcopy IT35.dll ..\..\..\BDASpecial-IT35\doc\x64\Release_Static
echo F | xcopy WinSCard-x3U4.dll ..\..\..\BDASpecial-IT35\doc\x64\Release_Static\WinSCard.dll
echo D | xcopy x3U4Remocon.tvtp ..\..\..\BDASpecial-IT35\doc\x64\Release_Static
echo D | xcopy DD.dll ..\..\..\BDASpecial-DD\doc\x64\Release_Static
echo D | xcopy LWire.dll ..\..\..\BDASpecial-LWire\doc\x64\Release_Static

cd ..\Release-XP
echo D | xcopy BonDriver_BDA.dll ..\..\doc\x64\Release-XP
echo D | xcopy DVBWorld.dll ..\..\doc\x64\Release-XP
echo D | xcopy TBS.dll ..\..\doc\x64\Release-XP
echo D | xcopy PlexPX.dll ..\..\..\BDASpecial-PlexPX\doc\x64\Release-XP
echo D | xcopy IT35.dll ..\..\..\BDASpecial-IT35\doc\x64\Release-XP
echo F | xcopy WinSCard-x3U4.dll ..\..\..\BDASpecial-IT35\doc\x64\Release-XP\WinSCard.dll
echo D | xcopy x3U4Remocon.tvtp ..\..\..\BDASpecial-IT35\doc\x64\Release-XP
echo D | xcopy DD.dll ..\..\..\BDASpecial-DD\doc\x64\Release-XP
echo D | xcopy LWire.dll ..\..\..\BDASpecial-LWire\doc\x64\Release-XP

cd ..\Release-XP_Static
echo D | xcopy BonDriver_BDA.dll ..\..\doc\x64\Release-XP_Static
echo D | xcopy DVBWorld.dll ..\..\doc\x64\Release-XP_Static
echo D | xcopy TBS.dll ..\..\doc\x64\Release-XP_Static
echo D | xcopy PlexPX.dll ..\..\..\BDASpecial-PlexPX\doc\x64\Release-XP_Static
echo D | xcopy IT35.dll ..\..\..\BDASpecial-IT35\doc\x64\Release-XP_Static
echo F | xcopy WinSCard-x3U4.dll ..\..\..\BDASpecial-IT35\doc\x64\Release-XP_Static\WinSCard.dll
echo D | xcopy x3U4Remocon.tvtp ..\..\..\BDASpecial-IT35\doc\x64\Release-XP_Static
echo D | xcopy DD.dll ..\..\..\BDASpecial-DD\doc\x64\Release-XP_Static
echo D | xcopy LWire.dll ..\..\..\BDASpecial-LWire\doc\x64\Release-XP_Static

cd ..\..
for /f "usebackq tokens=*" %%i in (`git rev-parse --short HEAD`) do set hash_BonDriver_BDA=%%i
"%ProgramFiles%\7-Zip\7z.exe" a "BonDriver_BDA_%hash_BonDriver_BDA%.7z" .\doc\* -mx=9 -ms=on -myx=9

cd ..\BDASpecial-PlexPX
for /f "usebackq tokens=*" %%i in (`git rev-parse --short HEAD`) do set hash_BDASpecial-PlexPX=%%i
"%ProgramFiles%\7-Zip\7z.exe" a "BDASpecial-PlexPX_%hash_BDASpecial-PlexPX%.7z" .\doc\* -mx=9 -ms=on -myx=9

cd ..\BDASpecial-IT35\doc
move WinSCard-x3U4\WinSCard.ini
move x3U4Remocon\x3U4Remocon.ini
rd WinSCard-x3U4 x3U4Remocon

cd ..
for /f "usebackq tokens=*" %%i in (`git rev-parse --short HEAD`) do set hash_BDASpecial-IT35=%%i
"%ProgramFiles%\7-Zip\7z.exe" a "BDASpecial-IT35_%hash_BDASpecial-IT35%.7z" .\doc\* -mx=9 -ms=on -myx=9

cd ..\BDASpecial-DD
for /f "usebackq tokens=*" %%i in (`git rev-parse --short HEAD`) do set hash_BDASpecial-DD=%%i
"%ProgramFiles%\7-Zip\7z.exe" a "BDASpecial-DD_%hash_BDASpecial-DD%.7z" .\doc\* -mx=9 -ms=on -myx=9

cd ..\BDASpecial-LWire
for /f "usebackq tokens=*" %%i in (`git rev-parse --short HEAD`) do set hash_BDASpecial-LWire=%%i
"%ProgramFiles%\7-Zip\7z.exe" a "BDASpecial-LWire_%hash_BDASpecial-LWire%.7z" .\doc\* -mx=9 -ms=on -myx=9

exit /b 0

コメント

タイトルとURLをコピーしました