Commit ea60af6c by Cooper Partin Committed by Jamie Madill

Added winrt project generation to gclient sync

BUG=angleproject:1057 Change-Id: Ic52c385cb19f6ddccaf3d46a88a56670da0cf67d Reviewed-on: https://chromium-review.googlesource.com/283987Tested-by: 's avatarCooper Partin <coopp@microsoft.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent b25d14e4
...@@ -16,12 +16,7 @@ angle_dir = os.path.normpath(os.path.join(script_dir, os.pardir)) ...@@ -16,12 +16,7 @@ angle_dir = os.path.normpath(os.path.join(script_dir, os.pardir))
sys.path.append(os.path.join(angle_dir, 'third_party', 'gyp', 'pylib')) sys.path.append(os.path.join(angle_dir, 'third_party', 'gyp', 'pylib'))
import gyp import gyp
if __name__ == '__main__': def appendCommonArgs(args):
args = sys.argv[1:]
print 'Updating projects from gyp files...'
sys.stdout.flush()
# Set the depth to get the top-level Makefile generated into the # Set the depth to get the top-level Makefile generated into the
# correct directory. This only has an effect on Linux. # correct directory. This only has an effect on Linux.
args.append('--depth'); args.append('--depth');
...@@ -36,6 +31,53 @@ if __name__ == '__main__': ...@@ -36,6 +31,53 @@ if __name__ == '__main__':
# Indicate ANGLE is being built standalone (as opposed to within # Indicate ANGLE is being built standalone (as opposed to within
# a Chromium workspace). # a Chromium workspace).
args.append('-Dangle_standalone=1') args.append('-Dangle_standalone=1')
def generateProjects(generate_args):
args = generate_args
appendCommonArgs(args)
# Add all.gyp as the main gyp file to be generated.
args.append(os.path.join(script_dir, 'ANGLE.gyp'))
gyp.main(args)
def generateWinRTProjects(generate_args, generation_dir, build_winphone, msvs_version, app_type_rev):
args = generate_args
appendCommonArgs(args)
args.append('--ignore-environment')
args.append('--generator-output=' + generation_dir)
args.append('--format=msvs')
args.append('-Gmsvs_version=' + msvs_version)
args.append('-Dangle_use_commit_id=1')
args.append('-Dangle_build_winrt=1')
args.append('-Dangle_build_winrt_app_type_revision=' + app_type_rev)
args.append('-Dangle_build_winphone=' + ('1' if build_winphone else '0'))
args.append('-Dangle_enable_d3d9=0')
args.append('-Dangle_enable_gl=0')
# Add all.gyp as the main gyp file to be generated. # Add all.gyp as the main gyp file to be generated.
args.append(os.path.join(script_dir, 'ANGLE.gyp')) args.append(os.path.join(script_dir, 'ANGLE.gyp'))
sys.exit(gyp.main(args))
print 'Generating WinRT projects to ' + generation_dir + ' from gyp files...'
sys.stdout.flush()
gyp.main(args)
if __name__ == '__main__':
print 'Updating projects from gyp files...'
sys.stdout.flush()
# Generate projects
args = sys.argv[1:]
generateProjects(args)
# Generate WinRT projects only if configured
if 'GYP_GENERATE_WINRT' in os.environ:
# Generate Windows 8.1 projects
args = sys.argv[1:]
generateWinRTProjects(args, "winrt/8.1/windows", False, "2013e", "8.1");
args = sys.argv[1:]
generateWinRTProjects(args, "winrt/8.1/windowsphone", True, "2013e", "8.1");
# Generate Windows 10 projects
args = sys.argv[1:]
generateWinRTProjects(args, "winrt/10", False, "2015", "8.2");
# Copyright (c) 2013-2014 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This script generates visual studio projects that can be used on WinRT
import os
import sys
script_dir = os.path.join(os.path.dirname(__file__), 'build')
angle_dir = os.path.normpath(os.path.join(script_dir, os.pardir))
gyp_dir = os.path.join(angle_dir, 'third_party', 'gyp')
gyp_generators = "msvs"
def generateProjects(generation_dir, build_winphone, msvs_version, app_type_rev):
gyp_cmd = os.path.join(gyp_dir, 'gyp')
gyp_cmd += ' --ignore-environment'
gyp_cmd += ' --depth=.'
gyp_cmd += ' --include=' + os.path.join(script_dir, 'common.gypi')
gyp_cmd += ' --generator-output=' + generation_dir
gyp_cmd += ' --format=' + gyp_generators
gyp_cmd += ' -G msvs_version=' + msvs_version
gyp_cmd += ' -D angle_use_commit_id=1'
gyp_cmd += ' -D angle_build_winrt=1'
gyp_cmd += ' -D angle_build_winrt_app_type_revision=' + app_type_rev
gyp_cmd += ' -D angle_build_winphone=' + ('1' if build_winphone else '0')
gyp_cmd += ' -D angle_enable_d3d9=0'
gyp_cmd += ' -D angle_enable_gl=0'
gyp_cmd += ' -D angle_standalone=1'
gyp_cmd += ' ' + os.path.join(script_dir, 'angle.gyp')
print 'Generating projects to ' + generation_dir + ' from gyp files...'
print gyp_cmd
sys.stdout.flush()
os.system(gyp_cmd)
if __name__ == '__main__':
# Generate Windows 8.1 projects
generateProjects("winrt/8.1/windows", False, "2013e", "8.1");
generateProjects("winrt/8.1/windowsphone", True, "2013e", "8.1");
# Generate Windows 10 projects
generateProjects("winrt/10", False, "2015", "8.2");
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment