@@ -33,65 +33,74 @@ goto ret
3333:platform_ok
3434set cfg = %4
3535if %cfg% == Debug (
36- set dst = %1 \_bin_dbg
36+ set dst = %1
37+ set dst = !dst:" =! \_bin_dbg
3738 goto cfg_ok
3839)
3940if %cfg% == Mixed (
40- set dst = %1 \_bin_mix
41+ set dst = %1
42+ set dst = !dst:" =! \_bin_mix
4143 goto cfg_ok
4244)
4345if %cfg% == Release (
44- set dst = %1 \_bin_rel
46+ set dst = %1
47+ set dst = !dst:" =! \_bin_rel
4548 goto cfg_ok
4649)
4750echo invalid configuration: %cfg%
4851goto ret
4952
5053:cfg_ok
51- set dst = %dst% _%platform%
52- set src = %2 \bin\%platform% \%cfg%
54+ set dst = !dst! _%platform%
55+ set src = %2
56+ set src = !src:" =! \bin\%platform% \%cfg%
5357
54- set cp_tool = cp
58+ where cp > nul 2 > nul
59+ if %errorLevel% neq 0 (
60+ set cp_tool = copy /Y
61+ ) else (
62+ set cp_tool = cp
63+ )
5564
56- %cp_tool% % src% \xrEngine.exe % dst% \xrEngine.exe
57- %cp_tool% % src% \xrAPI.dll % dst% \xrAPI.dll
58- %cp_tool% % src% \xrCore.dll % dst% \xrCore.dll
59- %cp_tool% % src% \xrCDB.dll % dst% \xrCDB.dll
60- %cp_tool% % src% \xrSound.dll % dst% \xrSound.dll
61- %cp_tool% % src% \xrParticles.dll % dst% \xrParticles.dll
62- %cp_tool% % src% \xrPhysics.dll % dst% \xrPhysics.dll
63- %cp_tool% % src% \xrD3D9-Null.dll % dst% \xrD3D9-Null.dll
64- %cp_tool% % src% \xrAICore.dll % dst% \xrAICore.dll
65- %cp_tool% % src% \xrScriptEngine.dll % dst% \xrScriptEngine.dll
66- %cp_tool% % src% \xrGame.dll % dst% \xrGame.dll
67- %cp_tool% % src% \xrGameSpy.dll % dst% \xrGameSpy.dll
68- %cp_tool% % src% \xrNetServer.dll % dst% \xrNetServer.dll
69- %cp_tool% % src% \xrRender_R1.dll % dst% \xrRender_R1.dll
70- %cp_tool% % src% \xrRender_R2.dll % dst% \xrRender_R2.dll
71- %cp_tool% % src% \xrRender_R3.dll % dst% \xrRender_R3.dll
72- %cp_tool% % src% \xrRender_R4.dll % dst% \xrRender_R4.dll
73- %cp_tool% % src% \xrRender_GL.dll % dst% \xrRender_GL.dll
65+ %cp_tool% " ! src! \xrEngine.exe" " ! dst! \xrEngine.exe"
66+ %cp_tool% " ! src! \xrAPI.dll" " ! dst! \xrAPI.dll"
67+ %cp_tool% " ! src! \xrCore.dll" " ! dst! \xrCore.dll"
68+ %cp_tool% " ! src! \xrCDB.dll" " ! dst! \xrCDB.dll"
69+ %cp_tool% " ! src! \xrSound.dll" " ! dst! \xrSound.dll"
70+ %cp_tool% " ! src! \xrParticles.dll" " ! dst! \xrParticles.dll"
71+ %cp_tool% " ! src! \xrPhysics.dll" " ! dst! \xrPhysics.dll"
72+ %cp_tool% " ! src! \xrD3D9-Null.dll" " ! dst! \xrD3D9-Null.dll"
73+ %cp_tool% " ! src! \xrAICore.dll" " ! dst! \xrAICore.dll"
74+ %cp_tool% " ! src! \xrScriptEngine.dll" " ! dst! \xrScriptEngine.dll"
75+ %cp_tool% " ! src! \xrGame.dll" " ! dst! \xrGame.dll"
76+ %cp_tool% " ! src! \xrGameSpy.dll" " ! dst! \xrGameSpy.dll"
77+ %cp_tool% " ! src! \xrNetServer.dll" " ! dst! \xrNetServer.dll"
78+ %cp_tool% " ! src! \xrRender_R1.dll" " ! dst! \xrRender_R1.dll"
79+ %cp_tool% " ! src! \xrRender_R2.dll" " ! dst! \xrRender_R2.dll"
80+ %cp_tool% " ! src! \xrRender_R3.dll" " ! dst! \xrRender_R3.dll"
81+ %cp_tool% " ! src! \xrRender_R4.dll" " ! dst! \xrRender_R4.dll"
82+ %cp_tool% " ! src! \xrRender_GL.dll" " ! dst! \xrRender_GL.dll"
7483if %platform% == Win32 (
75- %cp_tool% % src% \amd_ags_x86.dll % dst% \amd_ags_x86.dll
84+ %cp_tool% " ! src! \amd_ags_x86.dll" " ! dst! \amd_ags_x86.dll"
7685)
7786if %platform% == Win64 (
78- %cp_tool% % src% \amd_ags_x64.dll % dst% \amd_ags_x64.dll
87+ %cp_tool% " ! src! \amd_ags_x64.dll" " ! dst! \amd_ags_x64.dll"
7988)
80- %cp_tool% % src% \xrXMLParser.dll % dst% \xrXMLParser.dll
89+ %cp_tool% " ! src! \xrXMLParser.dll" " ! dst! \xrXMLParser.dll"
8190rem CxImage is compiled as DLLs only in debug configuration
8291if %cfg% == Debug (
83- %cp_tool% % src% \CxImage.dll % dst% \CxImage.dll
92+ %cp_tool% " ! src! \CxImage.dll" " ! dst! \CxImage.dll"
8493)
85- %cp_tool% % src% \LuaJIT.dll % dst% \LuaJIT.dll
86- %cp_tool% % src% \luabind.dll % dst% \luabind.dll
87- %cp_tool% % src% \ODE.dll % dst% \ODE.dll
88- %cp_tool% % src% \OpenAL32.dll % dst% \OpenAL32.dll
89- %cp_tool% % src% \OpenAL32.dll % dst% \dedicated\OpenAL32.dll
90- %cp_tool% % src% _Dedicated\dedicated\xrEngine.exe % dst% \dedicated\xrEngine.exe
91- %cp_tool% % src% \xrWeatherEditor.dll % dst% \xrWeatherEditor.dll
92- %cp_tool% % src% \xrManagedApi.dll % dst% \xrManagedApi.dll
93- %cp_tool% % src% \xrSdkControls.dll % dst% \xrSdkControls.dll
94- %cp_tool% % src% \xrPostprocessEditor.exe % dst% \xrPostprocessEditor.exe
94+ %cp_tool% " ! src! \LuaJIT.dll" " ! dst! \LuaJIT.dll"
95+ %cp_tool% " ! src! \luabind.dll" " ! dst! \luabind.dll"
96+ %cp_tool% " ! src! \ODE.dll" " ! dst! \ODE.dll"
97+ %cp_tool% " ! src! \OpenAL32.dll" " ! dst! \OpenAL32.dll"
98+ %cp_tool% " ! src! \OpenAL32.dll" " ! dst! \dedicated\OpenAL32.dll"
99+ %cp_tool% " ! src! _Dedicated\dedicated\xrEngine.exe" " ! dst! \dedicated\xrEngine.exe"
100+ %cp_tool% " ! src! \xrWeatherEditor.dll" " ! dst! \xrWeatherEditor.dll"
101+ %cp_tool% " ! src! \xrManagedApi.dll" " ! dst! \xrManagedApi.dll"
102+ %cp_tool% " ! src! \xrSdkControls.dll" " ! dst! \xrSdkControls.dll"
103+ %cp_tool% " ! src! \xrPostprocessEditor.exe" " ! dst! \xrPostprocessEditor.exe"
95104
96105:ret
97106endlocal
0 commit comments