Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 6e07b8d

Browse files
authored
Add cloud_gaming switch for build-win.py. (#683)
1 parent 650afd1 commit 6e07b8d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/build-win.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
]
3838

3939

40-
def gngen(arch, ssl_root, msdk_root, quic_root, scheme, tests, runtime):
40+
def gngen(arch, ssl_root, msdk_root, quic_root, scheme, tests, runtime, cloud_gaming):
4141
gn_args = list(GN_ARGS)
4242
gn_args.append('target_cpu="%s"' % arch)
4343
using_llvm = False
@@ -84,6 +84,8 @@ def gngen(arch, ssl_root, msdk_root, quic_root, scheme, tests, runtime):
8484
else:
8585
gn_args.append('rtc_include_tests=false')
8686
gn_args.append('owt_include_tests=false')
87+
if cloud_gaming:
88+
gn_args.append('owt_cloud_gaming=true')
8789
flattened_args = ' '.join(gn_args)
8890
ret = subprocess.call(['gn.bat', 'gen', getoutputpath(arch, scheme), '--args=%s' % flattened_args],
8991
cwd=HOME_PATH, shell=False)
@@ -178,6 +180,8 @@ def main():
178180
parser.add_argument('--docs', default=False, action='store_true',
179181
help='To generate the API document.')
180182
parser.add_argument('--output_path', help='Path to copy sdk.')
183+
parser.add_argument('--cloud_gaming', default=False,
184+
help='Build for cloud gaming. Default to false.', action='store_true')
181185
opts = parser.parse_args()
182186
if opts.ssl_root and not os.path.exists(os.path.expanduser(opts.ssl_root)):
183187
print('Invalid ssl_root.')
@@ -192,7 +196,7 @@ def main():
192196
return 1
193197
if opts.gn_gen:
194198
if not gngen(opts.arch, opts.ssl_root, opts.msdk_root, opts.quic_root,
195-
opts.scheme, opts.tests, opts.runtime):
199+
opts.scheme, opts.tests, opts.runtime, opts.cloud_gaming):
196200
return 1
197201
if opts.sdk:
198202
if not ninjabuild(opts.arch, opts.scheme):

0 commit comments

Comments
 (0)