Skip to content

Commit

Permalink
Define xrPlatform msbuild macro, update build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Nov 23, 2015
1 parent 67d7044 commit 52d50f3
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 52 deletions.
20 changes: 16 additions & 4 deletions src/Common.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" Condition="'$(Platform)'=='Win32'">
<xrPlatform>Win32</xrPlatform>
</PropertyGroup>
<PropertyGroup Label="UserMacros" Condition="'$(Platform)'=='x86'">
<xrPlatform>Win32</xrPlatform>
</PropertyGroup>
<PropertyGroup Label="UserMacros" Condition="'$(Platform)'=='x64'">
<xrPlatform>Win64</xrPlatform>
</PropertyGroup>
<PropertyGroup Label="UserMacros" Condition="'$(xrPlatform)'==''">
<xrPlatform>$(Platform)</xrPlatform>
</PropertyGroup>
<PropertyGroup Label="UserMacros">
<xrBinRootDir>$(SolutionDir)..\bin\</xrBinRootDir>
<xrLibRootDir>$(SolutionDir)..\lib\</xrLibRootDir>
<xrBinDir>$(SolutionDir)..\bin\$(Configuration)\</xrBinDir>
<xrPlugBinDir>$(SolutionDir)..\bin\$(Configuration)\plugins\</xrPlugBinDir>
<xrLibDir>$(SolutionDir)..\lib\$(Configuration)\</xrLibDir>
<xrIntDir>$(SolutionDir)..\intermediate\$(Configuration)\</xrIntDir>
<xrBinDir>$(SolutionDir)..\bin\$(xrPlatform)\$(Configuration)\</xrBinDir>
<xrPlugBinDir>$(SolutionDir)..\bin\$(xrPlatform)\$(Configuration)\plugins\</xrPlugBinDir>
<xrLibDir>$(SolutionDir)..\lib\$(xrPlatform)\$(Configuration)\</xrLibDir>
<xrIntDir>$(SolutionDir)..\intermediate\$(xrPlatform)\$(Configuration)\</xrIntDir>
<xrSdkDir>$(SolutionDir)..\sdk\</xrSdkDir>
</PropertyGroup>
<PropertyGroup>
Expand Down
96 changes: 48 additions & 48 deletions xrbinup.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ set null_args=0
if [%1]==[] set null_args=1
if [%2]==[] set null_args=1
if [%3]==[] set null_args=1
if [%4]==[] set null_args=1
if !null_args!==1 (
echo usage: %0 ^<game_installation_dir^> ^<repository_root_dir^> {dbg^|mix^|rel}
echo usage: %0 ^<game_installation_dir^> ^<repository_root_dir^> {Win32^|Win64} {Debug^|Mixed^|Release}
goto ret
)
if not exist %1 (
Expand All @@ -19,63 +20,62 @@ if not exist %2 (
echo path not found: %2
goto ret
)
set cfg=%3
set cfg_valid=0
if %cfg%==dbg set cfg_valid=1
if %cfg%==mix set cfg_valid=1
if %cfg%==rel set cfg_valid=1
if !cfg_valid!==1 goto args_validated
echo invalid configuration: %cfg%
goto ret
set platform=%3
if %platform%==Win32 (
) else if %platform%==Win64 (
) else (
echo invalid platform: %platform%
goto ret
)

:args_validated
set src=%2\bin
if %cfg%==dbg (
set cfg_long=Debug
set cfg=%4
if %cfg%==Debug (
set dst=%1\_bin_dbg
set dbg=1
) else if %cfg%==mix (
set cfg_long=Mixed
) else if %cfg%==Mixed (
set dst=%1\_bin_mix
) else if %cfg%==rel (
set cfg_long=Release
) else if %cfg%==Release (
set dst=%1\_bin_rel
) else (
echo invalid configuration: %cfg%
goto ret
)
set dst=%dst%\%platform%
set src=%2\bin\%platform%\%cfg%

set cp_tool=cp

%cp_tool% %src%\%cfg_long%\xrEngine.exe %dst%\xrEngine.exe
%cp_tool% %src%\%cfg_long%\xrAPI.dll %dst%\xrAPI.dll
%cp_tool% %src%\%cfg_long%\xrCore.dll %dst%\xrCore.dll
%cp_tool% %src%\%cfg_long%\xrCDB.dll %dst%\xrCDB.dll
%cp_tool% %src%\%cfg_long%\xrSound.dll %dst%\xrSound.dll
%cp_tool% %src%\%cfg_long%\xrParticles.dll %dst%\xrParticles.dll
%cp_tool% %src%\%cfg_long%\xrPhysics.dll %dst%\xrPhysics.dll
%cp_tool% %src%\%cfg_long%\xrD3D9-Null.dll %dst%\xrD3D9-Null.dll
%cp_tool% %src%\%cfg_long%\xrAICore.dll %dst%\xrAICore.dll
%cp_tool% %src%\%cfg_long%\xrScriptEngine.dll %dst%\xrScriptEngine.dll
%cp_tool% %src%\%cfg_long%\xrGame.dll %dst%\xrGame.dll
%cp_tool% %src%\%cfg_long%\xrGameSpy.dll %dst%\xrGameSpy.dll
%cp_tool% %src%\%cfg_long%\xrNetServer.dll %dst%\xrNetServer.dll
%cp_tool% %src%\%cfg_long%\xrRender_R1.dll %dst%\xrRender_R1.dll
%cp_tool% %src%\%cfg_long%\xrRender_R2.dll %dst%\xrRender_R2.dll
%cp_tool% %src%\%cfg_long%\xrRender_R3.dll %dst%\xrRender_R3.dll
%cp_tool% %src%\%cfg_long%\xrRender_R4.dll %dst%\xrRender_R4.dll
%cp_tool% %src%\%cfg_long%\xrXMLParser.dll %dst%\xrXMLParser.dll
%cp_tool% %src%\xrEngine.exe %dst%\xrEngine.exe
%cp_tool% %src%\xrAPI.dll %dst%\xrAPI.dll
%cp_tool% %src%\xrCore.dll %dst%\xrCore.dll
%cp_tool% %src%\xrCDB.dll %dst%\xrCDB.dll
%cp_tool% %src%\xrSound.dll %dst%\xrSound.dll
%cp_tool% %src%\xrParticles.dll %dst%\xrParticles.dll
%cp_tool% %src%\xrPhysics.dll %dst%\xrPhysics.dll
%cp_tool% %src%\xrD3D9-Null.dll %dst%\xrD3D9-Null.dll
%cp_tool% %src%\xrAICore.dll %dst%\xrAICore.dll
%cp_tool% %src%\xrScriptEngine.dll %dst%\xrScriptEngine.dll
%cp_tool% %src%\xrGame.dll %dst%\xrGame.dll
%cp_tool% %src%\xrGameSpy.dll %dst%\xrGameSpy.dll
%cp_tool% %src%\xrNetServer.dll %dst%\xrNetServer.dll
%cp_tool% %src%\xrRender_R1.dll %dst%\xrRender_R1.dll
%cp_tool% %src%\xrRender_R2.dll %dst%\xrRender_R2.dll
%cp_tool% %src%\xrRender_R3.dll %dst%\xrRender_R3.dll
%cp_tool% %src%\xrRender_R4.dll %dst%\xrRender_R4.dll
%cp_tool% %src%\xrXMLParser.dll %dst%\xrXMLParser.dll
rem CxImage is compiled as DLLs only in debug configuration
if defined dbg (
%cp_tool% %src%\%cfg_long%\CxImage.dll %dst%\CxImage.dll
if %cfg%==Debug (
%cp_tool% %src%\CxImage.dll %dst%\CxImage.dll
)
%cp_tool% %src%\%cfg_long%\Lua.JIT.1.1.4.dll %dst%\Lua.JIT.1.1.4.dll
%cp_tool% %src%\%cfg_long%\LuaBind.beta7-Devel.RC4.dll %dst%\LuaBind.beta7-Devel.RC4.dll
%cp_tool% %src%\%cfg_long%\ODE.dll %dst%\ODE.dll
%cp_tool% %src%\%cfg_long%\OpenAL32.dll %dst%\OpenAL32.dll
%cp_tool% %src%\%cfg_long%\OpenAL32.dll %dst%\dedicated\OpenAL32.dll
%cp_tool% %src%\%cfg_long%_Dedicated\dedicated\xrEngine.exe %dst%\dedicated\xrEngine.exe
%cp_tool% %src%\%cfg_long%\xrWeatherEditor.dll %dst%\xrWeatherEditor.dll
%cp_tool% %src%\%cfg_long%\xrManagedApi.dll %dst%\xrManagedApi.dll
%cp_tool% %src%\%cfg_long%\xrSdkControls.dll %dst%\xrSdkControls.dll
%cp_tool% %src%\%cfg_long%\xrPostprocessEditor.exe %dst%\xrPostprocessEditor.exe
%cp_tool% %src%\LuaJIT.dll %dst%\LuaJIT.dll
%cp_tool% %src%\LuaBind.dll %dst%\LuaBind.dll
%cp_tool% %src%\ODE.dll %dst%\ODE.dll
%cp_tool% %src%\OpenAL32.dll %dst%\OpenAL32.dll
%cp_tool% %src%\OpenAL32.dll %dst%\dedicated\OpenAL32.dll
%cp_tool% %src%_Dedicated\dedicated\xrEngine.exe %dst%\dedicated\xrEngine.exe
%cp_tool% %src%\xrWeatherEditor.dll %dst%\xrWeatherEditor.dll
%cp_tool% %src%\xrManagedApi.dll %dst%\xrManagedApi.dll
%cp_tool% %src%\xrSdkControls.dll %dst%\xrSdkControls.dll
%cp_tool% %src%\xrPostprocessEditor.exe %dst%\xrPostprocessEditor.exe

:ret
endlocal

0 comments on commit 52d50f3

Please sign in to comment.