forked from OpenXRay/xray-16
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xrbinup.cmd
105 lines (98 loc) · 2.88 KB
/
xrbinup.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
@echo off
setlocal
setlocal enabledelayedexpansion
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^> {Win32^|Win64} {Debug^|Mixed^|Release}
goto ret
)
if not exist %1 (
echo path not found: %1
goto ret
)
if not exist %2 (
echo path not found: %2
goto ret
)
set platform=%3
if %platform%==Win32 (
goto platform_ok
)
if %platform%==Win64 (
goto platform_ok
)
echo invalid platform: %platform%
goto ret
:platform_ok
set cfg=%4
if %cfg%==Debug (
set dst=%1
set dst=!dst:"=!\_bin_dbg
goto cfg_ok
)
if %cfg%==Mixed (
set dst=%1
set dst=!dst:"=!\_bin_mix
goto cfg_ok
)
if %cfg%==Release (
set dst=%1
set dst=!dst:"=!\_bin_rel
goto cfg_ok
)
echo invalid configuration: %cfg%
goto ret
:cfg_ok
set dst=!dst!_%platform%
set src=%2
set src=!src:"=!\bin\%platform%\%cfg%
where cp >nul 2>nul
if %errorLevel% neq 0 (
set cp_tool=copy /Y
) else (
set cp_tool=cp
)
%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!\xrRender_GL.dll" "!dst!\xrRender_GL.dll"
if %platform%==Win32 (
%cp_tool% "!src!\amd_ags_x86.dll" "!dst!\amd_ags_x86.dll"
)
if %platform%==Win64 (
%cp_tool% "!src!\amd_ags_x64.dll" "!dst!\amd_ags_x64.dll"
)
rem CxImage is compiled as DLLs only in debug configuration
if %cfg%==Debug (
%cp_tool% "!src!\CxImage.dll" "!dst!\CxImage.dll"
)
%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