|
| 1 | +@echo off |
| 2 | + |
| 3 | +setlocal |
| 4 | +setlocal enabledelayedexpansion |
| 5 | + |
| 6 | +set null_args=0 |
| 7 | +if [%1]==[] set null_args=1 |
| 8 | +if [%2]==[] set null_args=1 |
| 9 | +if [%3]==[] set null_args=1 |
| 10 | +if !null_args!==1 ( |
| 11 | + echo usage: %0 ^<game_installation_dir^> ^<repository_root_dir^> {dbg^|mix^|rel} |
| 12 | + goto ret |
| 13 | +) |
| 14 | +if not exist [%1] ( |
| 15 | + echo path not found: %1 |
| 16 | + goto ret |
| 17 | +) |
| 18 | +if not exist [%2] ( |
| 19 | + echo path not found: %2 |
| 20 | + goto ret |
| 21 | +) |
| 22 | +set cfg=%3 |
| 23 | +set cfg_valid=0 |
| 24 | +if %cfg%==dbg set cfg_valid=1 |
| 25 | +if %cfg%==mix set cfg_valid=1 |
| 26 | +if %cfg%==rel set cfg_valid=1 |
| 27 | +if !cfg_valid!==1 goto args_validated |
| 28 | +echo invalid configuration: %cfg% |
| 29 | +goto ret |
| 30 | + |
| 31 | +:args_validated |
| 32 | +set src=%2\bin |
| 33 | +if %cfg%==dbg ( |
| 34 | + set cfg_long=Debug |
| 35 | + set dst=%1\_bin_dbg |
| 36 | + set dbg=1 |
| 37 | +) else if %cfg%==mix ( |
| 38 | + set cfg_long=Mixed |
| 39 | + set dst=%1\_bin_mix |
| 40 | +) else if %cfg%==rel ( |
| 41 | + set cfg_long=Release |
| 42 | + set dst=%1\_bin_rel |
| 43 | +) |
| 44 | + |
| 45 | +set cp_tool=cp |
| 46 | + |
| 47 | +%cp_tool% %src%\%cfg_long%\xrEngine.exe %dst%\xrEngine.exe |
| 48 | +%cp_tool% %src%\%cfg_long%\xrAPI.dll %dst%\xrAPI.dll |
| 49 | +%cp_tool% %src%\%cfg_long%\xrCore.dll %dst%\xrCore.dll |
| 50 | +%cp_tool% %src%\%cfg_long%\xrCDB.dll %dst%\xrCDB.dll |
| 51 | +%cp_tool% %src%\%cfg_long%\xrCPU_Pipe.dll %dst%\xrCPU_Pipe.dll |
| 52 | +%cp_tool% %src%\%cfg_long%\xrSound.dll %dst%\xrSound.dll |
| 53 | +%cp_tool% %src%\%cfg_long%\xrParticles.dll %dst%\xrParticles.dll |
| 54 | +%cp_tool% %src%\%cfg_long%\xrPhysics.dll %dst%\xrPhysics.dll |
| 55 | +%cp_tool% %src%\%cfg_long%\xrD3D9-Null.dll %dst%\xrD3D9-Null.dll |
| 56 | +%cp_tool% %src%\%cfg_long%\xrGame.dll %dst%\xrGame.dll |
| 57 | +%cp_tool% %src%\%cfg_long%\xrGameSpy.dll %dst%\xrGameSpy.dll |
| 58 | +%cp_tool% %src%\%cfg_long%\xrNetServer.dll %dst%\xrNetServer.dll |
| 59 | +%cp_tool% %src%\%cfg_long%\xrRender_R1.dll %dst%\xrRender_R1.dll |
| 60 | +%cp_tool% %src%\%cfg_long%\xrRender_R2.dll %dst%\xrRender_R2.dll |
| 61 | +%cp_tool% %src%\%cfg_long%\xrRender_R3.dll %dst%\xrRender_R3.dll |
| 62 | +%cp_tool% %src%\%cfg_long%\xrRender_R4.dll %dst%\xrRender_R4.dll |
| 63 | +%cp_tool% %src%\%cfg_long%\xrXMLParser.dll %dst%\xrXMLParser.dll |
| 64 | +rem crypto and CxImage are compiled as DLLs only in debug configuration |
| 65 | +if defined dbg ( |
| 66 | + %cp_tool% %src%\%cfg_long%\crypto.dll %dst%\crypto.dll |
| 67 | + %cp_tool% %src%\%cfg_long%\CxImage.dll %dst%\CxImage.dll |
| 68 | +) |
| 69 | +%cp_tool% %src%\%cfg_long%\Lua.JIT.1.1.4.dll %dst%\Lua.JIT.1.1.4.dll |
| 70 | +%cp_tool% %src%\%cfg_long%\LuaBind.beta7-Devel.RC4.dll %dst%\LuaBind.beta7-Devel.RC4.dll |
| 71 | +%cp_tool% %src%\%cfg_long%\ODE.dll %dst%\ODE.dll |
| 72 | +%cp_tool% %src%\%cfg_long%\OpenAL32.dll %dst%\OpenAL32.dll |
| 73 | +%cp_tool% %src%\%cfg_long%\OpenAL32.dll %dst%\dedicated\OpenAL32.dll |
| 74 | +%cp_tool% %src%\%cfg_long%_Dedicated\dedicated\xrEngine.exe %dst%\dedicated\xrEngine.exe |
| 75 | + |
| 76 | +:ret |
| 77 | +endlocal |
0 commit comments