Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
build.py: support visual studio for open option
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Jun 19, 2014
1 parent 3577418 commit 453ff12
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions bin/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@

args = parser.parse_args()

for x in args.fwd:
if not x.startswith('D'):
sys.exit("Expected that forward argument starts with `D`: {}".format(x))
if args.fwd != None:
for x in args.fwd:
if not x.startswith('D'):
sys.exit("Expected that forward argument starts with `D`: {}".format(x))

toolchain = ''
generator = ''
Expand Down Expand Up @@ -152,8 +153,9 @@ def call(call_args):
if args.install:
generate_command.append(install_dir_option)

for x in args.fwd:
generate_command.append("-{}".format(x))
if args.fwd != None:
for x in args.fwd:
generate_command.append("-{}".format(x))

call(generate_command)

Expand All @@ -174,10 +176,15 @@ def call(call_args):
if not args.nobuild:
call(build_command)

if (toolchain == 'xcode') and args.open:
for file in os.listdir(build_dir):
if file.endswith(".xcodeproj"):
call(['open', os.path.join(build_dir, file)])
if args.open:
if (args.toolchain == 'xcode'):
for file in os.listdir(build_dir):
if file.endswith(".xcodeproj"):
call(['open', os.path.join(build_dir, file)])
if (args.toolchain == 'vs2013x64') or (args.toolchain == 'vs2013'):
for file in os.listdir(build_dir):
if file.endswith(".sln"):
os.startfile(os.path.join(build_dir, file))

if args.test:
os.chdir(build_dir)
Expand Down

0 comments on commit 453ff12

Please sign in to comment.