From ac0a9258bd7be9d0a69a662f0908599073ab3ea5 Mon Sep 17 00:00:00 2001 From: oddMLan Date: Sun, 29 Sep 2019 19:17:28 -0700 Subject: [PATCH] Pass Platform solution parameter to UpdateVersion.cmd and package_zip.cmd This adds the ability to package x64 builds if requested. --- Source/Project64-audio/Project64-audio.vcxproj | 2 +- Source/Project64-core/Project64-core.vcxproj | 2 +- Source/Project64-video/Project64-video.vcxproj | 2 +- Source/RSP/RSP.vcxproj | 2 +- Source/Script/UpdateVersion.cmd | 12 +++++++----- Source/Script/package_zip.cmd | 16 +++++++++------- Source/nragev20/NRage_Input_V2.vcxproj | 2 +- 7 files changed, 21 insertions(+), 17 deletions(-) diff --git a/Source/Project64-audio/Project64-audio.vcxproj b/Source/Project64-audio/Project64-audio.vcxproj index 3c760ee78..a8d072adf 100644 --- a/Source/Project64-audio/Project64-audio.vcxproj +++ b/Source/Project64-audio/Project64-audio.vcxproj @@ -47,7 +47,7 @@ dsound.lib;%(AdditionalDependencies) - "$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\Project64-audio\Version.h.in" "$(SolutionDir)Source\Project64-audio\Version.h" + "$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\Project64-audio\Version.h.in" "$(SolutionDir)Source\Project64-audio\Version.h" diff --git a/Source/Project64-core/Project64-core.vcxproj b/Source/Project64-core/Project64-core.vcxproj index 8d9824365..3be828828 100644 --- a/Source/Project64-core/Project64-core.vcxproj +++ b/Source/Project64-core/Project64-core.vcxproj @@ -33,7 +33,7 @@ - "$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\Project64-core\Version.h.in" "$(SolutionDir)Source\Project64-core\Version.h" + "$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\Project64-core\Version.h.in" "$(SolutionDir)Source\Project64-core\Version.h" diff --git a/Source/Project64-video/Project64-video.vcxproj b/Source/Project64-video/Project64-video.vcxproj index afb638ccf..c8db003de 100644 --- a/Source/Project64-video/Project64-video.vcxproj +++ b/Source/Project64-video/Project64-video.vcxproj @@ -46,7 +46,7 @@ - "$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\Project64-video\Version.h.in" "$(SolutionDir)Source\Project64-video\Version.h" + "$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\Project64-video\Version.h.in" "$(SolutionDir)Source\Project64-video\Version.h" diff --git a/Source/RSP/RSP.vcxproj b/Source/RSP/RSP.vcxproj index 2ec2aa706..7ec39d7c6 100644 --- a/Source/RSP/RSP.vcxproj +++ b/Source/RSP/RSP.vcxproj @@ -46,7 +46,7 @@ true - "$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\RSP\Version.h.in" "$(SolutionDir)Source\RSP\Version.h" + "$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\RSP\Version.h.in" "$(SolutionDir)Source\RSP\Version.h" diff --git a/Source/Script/UpdateVersion.cmd b/Source/Script/UpdateVersion.cmd index 3e356eeb1..0425589a9 100644 --- a/Source/Script/UpdateVersion.cmd +++ b/Source/Script/UpdateVersion.cmd @@ -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%" - diff --git a/Source/Script/package_zip.cmd b/Source/Script/package_zip.cmd index 780342059..a39fab4e4 100644 --- a/Source/Script/package_zip.cmd +++ b/Source/Script/package_zip.cmd @@ -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%" * diff --git a/Source/nragev20/NRage_Input_V2.vcxproj b/Source/nragev20/NRage_Input_V2.vcxproj index d859d5e31..d6cd9a03c 100644 --- a/Source/nragev20/NRage_Input_V2.vcxproj +++ b/Source/nragev20/NRage_Input_V2.vcxproj @@ -51,7 +51,7 @@ false - "$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\nragev20\Version.h.in" "$(SolutionDir)Source\nragev20\Version.h" + "$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\nragev20\Version.h.in" "$(SolutionDir)Source\nragev20\Version.h"