Add --msvs parameter to bootstrap.py

This commit is contained in:
Cheng Zhao 2016-07-26 17:38:31 +09:00
parent a4d983c236
commit 9bf3150237
2 changed files with 18 additions and 5 deletions

View file

@ -28,6 +28,8 @@ def parse_args():
parser = argparse.ArgumentParser(description='Update build configurations')
parser.add_argument('--defines', default='',
help='The definetions passed to gyp')
parser.add_argument('--msvs', action='store_true',
help='Generate Visual Studio project')
return parser.parse_args()
@ -86,7 +88,11 @@ def run_gyp(target_arch, component):
if define:
defines += ['-D' + define]
return subprocess.call([python, gyp, '-f', 'ninja', '--depth', '.',
generator = 'ninja'
if args.msvs:
generator = 'msvs-ninja'
return subprocess.call([python, gyp, '-f', generator, '--depth', '.',
'electron.gyp', '-Icommon.gypi'] + defines, env=env)