summaryrefslogtreecommitdiff
path: root/devtools/bin/xsync.bat
blob: ae4bdb6af22a82af6d137ad3988d04658cafaabe (plain) (blame)
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
echo off
setlocal

rem look for prevention of building zips
if /i .%4.==.-nobuild. set no_build=yes
if /i .%4.==.-nobuild. shift /4
if /i .%3.==.-nobuild. set no_build=yes
if /i .%3.==.-nobuild. shift /3
if /i .%2.==.-nobuild. set no_build=yes
if /i .%2.==.-nobuild. shift /2
if /i .%1.==.-nobuild. set no_build=yes
if /i .%1.==.-nobuild. shift /1
 
rem look for prevention of copying binaries up to the xbox
if /i .%3.==.-nocopy. set no_copy=yes
if /i .%3.==.-nocopy. shift /3
if /i .%2.==.-nocopy. set no_copy=yes
if /i .%2.==.-nocopy. shift /2
if /i .%1.==.-nocopy. set no_copy=yes
if /i .%1.==.-nocopy. shift /1
 
rem look for stuff that prevents dependencies from being built
if /i .%2.==.-nodep. set no_dependency=yes
if /i .%2.==.-nodep. shift /2
if /i .%1.==.-nodep. set no_dependency=yes
if /i .%1.==.-nodep. shift /1

rem Deal with all of the different configs
if /i .%1.==.-all.		set do_platform=yes
if /i .%1.==.-all.		set do_hl2=yes
if /i .%1.==.-all.		set do_episodic=yes
if /i .%1.==.-all.		set do_ep2=yes
if /i .%1.==.-all.		set do_tf=yes
if /i .%1.==.-all.		set do_portal=yes

if /i .%1.==.-episodic.	set do_episodic=yes
if /i .%1.==.-ep2.		set do_ep2=yes
if /i .%1.==.-tf.		set do_tf=yes
if /i .%1.==.-portal.	set do_portal=yes
if /i .%1.==.-hl2.		set do_hl2=yes
if /i .%1.==.-platform.	set do_platform=yes

rem skip these if no dependencies should be built
if .%no_dependency%.==.yes. goto START
if /i .%1.==.-ep2.		set do_episodic=yes
if /i .%1.==.-ep2.		set do_hl2=yes
if /i .%1.==.-episodic.	set do_hl2=yes
if /i .%1.==.-tf.		set do_hl2=yes
if /i .%1.==.-portal.	set do_hl2=yes
set do_platform=yes

:START
pushd.
cd %VPROJECT%\..
set XBCP="%XEDK%\bin\win32\xbcp.exe"
set ZIPDIR=%TEMP%\xzips
if not exist %ZIPDIR% mkdir %ZIPDIR%

:PLATFORM
if not .%do_platform%.==.yes. goto HL2

REM
REM PLATFORM
REM
echo Builing platform zip...
pushd.
cd platform
if not exist %ZIPDIR%\platform mkdir %ZIPDIR%\platform
if .%no_build%.==.yes. goto PLATFORMCOPY
if exist %ZIPDIR%\platform\zip0.360.zip del %ZIPDIR%\platform\zip0.360.zip
makegamedata -q -z %ZIPDIR%\platform\zip0.360.zip
:PLATFORMCOPY
if not .%no_copy%.==.yes. %XBCP% /Y %ZIPDIR%\platform\zip0.360.zip xe:\valve\platform\zip0.360.zip
popd.

:HL2
if not .%do_hl2%.==.yes. goto EPISODIC

REM
REM HL2
REM
echo Builing hl2 zip...
pushd.
cd hl2
if not exist %ZIPDIR%\hl2 mkdir %ZIPDIR%\hl2
if .%no_build%.==.yes. goto HL2COPY
if exist %ZIPDIR%\hl2\zip0.360.zip del %ZIPDIR%\hl2\zip0.360.zip
makegamedata -q -z %ZIPDIR%\hl2\zip0.360.zip
:HL2COPY
if not .%no_copy%.==.yes. %XBCP% /Y %ZIPDIR%\hl2\zip0.360.zip xe:\valve\hl2\zip0.360.zip
popd.

:EPISODIC
if not .%do_episodic%.==.yes. goto EP2

REM
REM EPISODIC
REM
echo Builing episodic zip...
pushd.
cd episodic
if not exist %ZIPDIR%\episodic mkdir %ZIPDIR%\episodic
if .%no_build%.==.yes. goto EPISODICCOPY
if exist %ZIPDIR%\episodic\zip0.360.zip del %ZIPDIR%\episodic\zip0.360.zip
makegamedata -q -z %ZIPDIR%\episodic\zip0.360.zip
:EPISODICCOPY
if not .%no_copy%.==.yes. %XBCP% /Y %ZIPDIR%\episodic\zip0.360.zip xe:\valve\episodic\zip0.360.zip
popd.

:EP2
if not .%do_ep2%.==.yes. goto TF
  
REM
REM EP2
REM
echo Builing ep2 zip...
pushd.
cd ep2
if not exist %ZIPDIR%\ep2 mkdir %ZIPDIR%\ep2
if .%no_build%.==.yes. goto EP2COPY
if exist %ZIPDIR%\ep2\zip0.360.zip del %ZIPDIR%\ep2\zip0.360.zip
makegamedata -q -z %ZIPDIR%\ep2\zip0.360.zip
:EP2COPY
if not .%no_copy%.==.yes. %XBCP% /Y %ZIPDIR%\ep2\zip0.360.zip xe:\valve\ep2\zip0.360.zip
popd.

:TF
if not .%do_tf%.==.yes. goto PORTAL

REM
REM TF
REM
echo Builing tf2 zip...
pushd.
cd tf
if not exist %ZIPDIR%\tf mkdir %ZIPDIR%\tf
if .%no_build%.==.yes. goto TFCOPY
if exist %ZIPDIR%\tf\zip0.360.zip del %ZIPDIR%\tf\zip0.360.zip
makegamedata -q -z %ZIPDIR%\tf\zip0.360.zip
:TFCOPY
if not .%no_copy%.==.yes. %XBCP% /Y %ZIPDIR%\tf\zip0.360.zip xe:\valve\tf\zip0.360.zip
popd.

:PORTAL
if not .%do_portal%.==.yes. goto END

REM
REM PORTAL
REM
echo Builing portal zip...
pushd.
cd portal
if not exist %ZIPDIR%\portal mkdir %ZIPDIR%\portal
if .%no_build%.==.yes. goto PORTALCOPY
if exist %ZIPDIR%\portal\zip0.360.zip del %ZIPDIR%\portal\zip0.360.zip
makegamedata -q -z %ZIPDIR%\portal\zip0.360.zip
:PORTALCOPY
if not .%no_copy%.==.yes. %XBCP% /Y %ZIPDIR%\portal\zip0.360.zip xe:\valve\portal\zip0.360.zip
popd.

:END
popd.
endlocal