Pass Platform solution parameter to UpdateVersion.cmd and package_zip.cmd

This adds the ability to package x64 builds if requested.
This commit is contained in:
oddMLan 2019-09-29 19:17:28 -07:00
parent b323e9cf2f
commit ac0a9258bd
7 changed files with 21 additions and 17 deletions

View File

@ -47,7 +47,7 @@
<AdditionalDependencies>dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\Project64-audio\Version.h.in" "$(SolutionDir)Source\Project64-audio\Version.h"</Command>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\Project64-audio\Version.h.in" "$(SolutionDir)Source\Project64-audio\Version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -33,7 +33,7 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ItemDefinitionGroup>
<PreBuildEvent>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\Project64-core\Version.h.in" "$(SolutionDir)Source\Project64-core\Version.h"</Command>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\Project64-core\Version.h.in" "$(SolutionDir)Source\Project64-core\Version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -46,7 +46,7 @@
<PrecompiledHeader />
</ClCompile>
<PreBuildEvent>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\Project64-video\Version.h.in" "$(SolutionDir)Source\Project64-video\Version.h"</Command>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\Project64-video\Version.h.in" "$(SolutionDir)Source\Project64-video\Version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -46,7 +46,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<PreBuildEvent>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\RSP\Version.h.in" "$(SolutionDir)Source\RSP\Version.h"</Command>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\RSP\Version.h.in" "$(SolutionDir)Source\RSP\Version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -6,17 +6,19 @@ cd /d %~dp0..\..
set base_dir=%cd%
cd /d %origdir%
if "%~3"=="" (
echo Usage: UpdateVersion.cmd [BuildMode] [InFile] [OutFile]
if "%~4"=="" (
echo Usage: UpdateVersion.cmd [BuildMode] [Platform] [InFile] [OutFile]
goto :eof
)
if not "%1" == "" set BuildMode=%~1
if not "%~2" == "" set InFile="%~2"
if not "%~3" == "" set OutFile="%~3"
if not "%~2" == "" set Platform=%~2
if not "%~2" == "" set InFile="%~3"
if not "%~3" == "" set OutFile="%~4"
FOR /F "tokens=1 delims=" %%A in ('git describe --tags --long --dirty') do SET current_tag=%%A
if %Platform%==x64 set BuildMode=%BuildMode%64
echo "%base_dir%\Bin\%BuildMode%\UpdateVersion.exe" %InFile% %OutFile% "%current_tag%"
"%base_dir%\Bin\%BuildMode%\UpdateVersion.exe" %InFile% %OutFile% "%current_tag%"

View File

@ -14,6 +14,8 @@ if "%zip%" == "" (
set ZipFileName=project64
if not "%1" == "" set ZipFileName=%1
if "%~2" == "x64" set VSPlatform=64
SET current_dir=%cd%
cd /d %~dp0..\..\
@ -36,7 +38,7 @@ md "%base_dir%\Bin\Package\Plugin\GFX"
md "%base_dir%\Bin\Package\Plugin\Input"
md "%base_dir%\Bin\Package\Plugin\RSP"
copy "%base_dir%\Bin\Release\Project64.exe" "%base_dir%\Bin\Package"
copy "%base_dir%\Bin\Release%VSPlatform%\Project64.exe" "%base_dir%\Bin\Package"
copy "%base_dir%\Config\Video.rdb" "%base_dir%\Bin\Package\Config"
copy "%base_dir%\Config\Audio.rdb" "%base_dir%\Bin\Package\Config"
copy "%base_dir%\Config\Project64.cht" "%base_dir%\Bin\Package\Config"
@ -44,12 +46,12 @@ copy "%base_dir%\Config\Project64.enh" "%base_dir%\Bin\Package\Config"
copy "%base_dir%\Config\Project64.rdb" "%base_dir%\Bin\Package\Config"
copy "%base_dir%\Config\Project64.rdx" "%base_dir%\Bin\Package\Config"
copy "%base_dir%\Lang\*.pj.Lang" "%base_dir%\Bin\Package\Lang"
copy "%base_dir%\Plugin\Audio\Jabo_Dsound.dll" "%base_dir%\Bin\Package\Plugin\Audio"
copy "%base_dir%\Plugin\Audio\Project64-Audio.dll" "%base_dir%\Bin\Package\Plugin\Audio"
copy "%base_dir%\Plugin\GFX\Jabo_Direct3D8.dll" "%base_dir%\Bin\Package\Plugin\GFX"
copy "%base_dir%\Plugin\GFX\Project64-Video.dll" "%base_dir%\Bin\Package\Plugin\GFX"
copy "%base_dir%\Plugin\Input\PJ64_NRage.dll" "%base_dir%\Bin\Package\Plugin\Input"
copy "%base_dir%\Plugin\RSP\RSP 1.7.dll" "%base_dir%\Bin\Package\Plugin\RSP"
copy "%base_dir%\Plugin%VSPlatform%\Audio\Jabo_Dsound.dll" "%base_dir%\Bin\Package\Plugin\Audio"
copy "%base_dir%\Plugin%VSPlatform%\Audio\Project64-Audio.dll" "%base_dir%\Bin\Package\Plugin\Audio"
copy "%base_dir%\Plugin%VSPlatform%\GFX\Jabo_Direct3D8.dll" "%base_dir%\Bin\Package\Plugin\GFX"
copy "%base_dir%\Plugin%VSPlatform%\GFX\Project64-Video.dll" "%base_dir%\Bin\Package\Plugin\GFX"
copy "%base_dir%\Plugin%VSPlatform%\Input\PJ64_NRage.dll" "%base_dir%\Bin\Package\Plugin\Input"
copy "%base_dir%\Plugin%VSPlatform%\RSP\RSP 1.7.dll" "%base_dir%\Bin\Package\Plugin\RSP"
cd %base_dir%\Bin\Package
"%zip%" a -tzip -r "%base_dir%\Package\%ZipFileName%" *

View File

@ -51,7 +51,7 @@
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<PreBuildEvent>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\nragev20\Version.h.in" "$(SolutionDir)Source\nragev20\Version.h"</Command>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\nragev20\Version.h.in" "$(SolutionDir)Source\nragev20\Version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>