From 0deeae0214faaed9b8c3f7d578ac5a3ebd1b0c34 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 11 Apr 2015 14:44:01 +0800 Subject: [PATCH 1/3] Allow specifying the arch of libchromiumcontent to download --- brightray/script/bootstrap | 20 +++++++++++--------- brightray/vendor/libchromiumcontent | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/brightray/script/bootstrap b/brightray/script/bootstrap index b0754f7a1e4..579e0076b06 100755 --- a/brightray/script/bootstrap +++ b/brightray/script/bootstrap @@ -14,14 +14,17 @@ DOWNLOAD_DIR = os.path.join(VENDOR_DIR, 'download') def main(): args = parse_args() - return (update_submodules() or - download_libchromiumcontent(args.dev, args.commit, args.url)) + + update_submodules() + download_libchromiumcontent(args.dev, args.commit, args.target_arch, args.url) def parse_args(): parser = argparse.ArgumentParser(description='Bootstrap this project') - parser.add_argument('-c', '--commit', nargs='?', default='HEAD', + parser.add_argument('-c', '--commit', required=True, help='The commit of libchromiumcontent to download.') + parser.add_argument('-t', '--target_arch', required=True, + help='The arch of libchromiumcontent to download.') parser.add_argument('-d', '--dev', action='store_true', help='Do not download static_library build') parser.add_argument('url', help='The base URL from which to download ' @@ -36,17 +39,16 @@ def update_submodules(): '--recursive'])) -def download_libchromiumcontent(is_dev, commit, url): +def download_libchromiumcontent(is_dev, commit, target_arch, url): mkdir_p(DOWNLOAD_DIR) download = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'script', 'download') - target = os.path.join(DOWNLOAD_DIR, 'libchromiumcontent') + target_dir = os.path.join(DOWNLOAD_DIR, 'libchromiumcontent') + args = ['-f', '-c', commit, '-t', target_arch, url, target_dir] if is_dev: - subprocess.check_call([sys.executable, download, '-f', '-c', commit, url, - target]) + subprocess.check_call([sys.executable, download] + args) else: - subprocess.check_call([sys.executable, download, '-s', '-f', '-c', commit, - url, target]) + subprocess.check_call([sys.executable, download, '-s'] + args) def mkdir_p(path): diff --git a/brightray/vendor/libchromiumcontent b/brightray/vendor/libchromiumcontent index a325ed7b30b..185a9535aa8 160000 --- a/brightray/vendor/libchromiumcontent +++ b/brightray/vendor/libchromiumcontent @@ -1 +1 @@ -Subproject commit a325ed7b30bf0680881783edd92ca235b5468e11 +Subproject commit 185a9535aa88ba19b03d3b76d172a9558ae37354 From a4a1812f173d7a3b65fe36f7252d135876a2984b Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 11 Apr 2015 18:25:47 +0800 Subject: [PATCH 2/3] Require target_arch parameter --- brightray/script/bootstrap | 6 +++--- brightray/vendor/libchromiumcontent | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/brightray/script/bootstrap b/brightray/script/bootstrap index 579e0076b06..7cd1abffc06 100755 --- a/brightray/script/bootstrap +++ b/brightray/script/bootstrap @@ -23,10 +23,10 @@ def parse_args(): parser = argparse.ArgumentParser(description='Bootstrap this project') parser.add_argument('-c', '--commit', required=True, help='The commit of libchromiumcontent to download.') - parser.add_argument('-t', '--target_arch', required=True, - help='The arch of libchromiumcontent to download.') parser.add_argument('-d', '--dev', action='store_true', help='Do not download static_library build') + parser.add_argument('--target_arch', required=True, + help='The arch of libchromiumcontent to download.') parser.add_argument('url', help='The base URL from which to download ' 'libchromiumcontent (i.e., the URL you passed to ' 'libchromiumcontent\'s script/upload script') @@ -44,7 +44,7 @@ def download_libchromiumcontent(is_dev, commit, target_arch, url): download = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'script', 'download') target_dir = os.path.join(DOWNLOAD_DIR, 'libchromiumcontent') - args = ['-f', '-c', commit, '-t', target_arch, url, target_dir] + args = ['-f', '-c', commit, '--target_arch', target_arch, url, target_dir] if is_dev: subprocess.check_call([sys.executable, download] + args) else: diff --git a/brightray/vendor/libchromiumcontent b/brightray/vendor/libchromiumcontent index 185a9535aa8..6d2427e4f11 160000 --- a/brightray/vendor/libchromiumcontent +++ b/brightray/vendor/libchromiumcontent @@ -1 +1 @@ -Subproject commit 185a9535aa88ba19b03d3b76d172a9558ae37354 +Subproject commit 6d2427e4f1170aa56e9dc1c4fd8922dea7e233c0 From 5bb9c180f96084e7b022366d00a035dd52461a4d Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 11 Apr 2015 18:58:46 +0800 Subject: [PATCH 3/3] win: Don't use _x64 targets --- brightray/brightray.gypi | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/brightray/brightray.gypi b/brightray/brightray.gypi index db1ee869d45..03b14d2112a 100644 --- a/brightray/brightray.gypi +++ b/brightray/brightray.gypi @@ -164,6 +164,22 @@ '_ATL_NO_OPENGL', '_SECURE_ATL', ], + 'conditions': [ + ['target_arch=="x64"', { + 'msvs_configuration_platform': 'x64', + 'msvs_settings': { + 'VCLinkerTool': { + 'MinimumRequiredVersion': '5.02', # Server 2003. + 'TargetMachine': '17', # x86 - 64 + # Doesn't exist x64 SDK. Should use oleaut32 in any case. + 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ], + }, + 'VCLibrarianTool': { + 'TargetMachine': '17', # x64 + }, + }, + }], + ], }], # OS=="win" ], }, # Common_Base @@ -242,31 +258,15 @@ }, # R (Release) }], # libchromiumcontent_component ['OS=="win"', { - 'x64_Base': { - 'abstract': 1, - 'msvs_configuration_platform': 'x64', - 'msvs_settings': { - 'VCLinkerTool': { - # Make sure to understand http://crbug.com/361720 if you want to - # increase this. - 'MinimumRequiredVersion': '5.02', # Server 2003. - 'TargetMachine': '17', # x86 - 64 - # Doesn't exist x64 SDK. Should use oleaut32 in any case. - 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ], - }, - 'VCLibrarianTool': { - 'TargetMachine': '17', # x64 - }, - }, - }, # x64_Base 'conditions': [ + # gyp always assumes "_x64" targets on Windows. ['libchromiumcontent_component', { 'D_x64': { - 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], + 'inherit_from': ['Common_Base', 'Debug_Base'], }, # D_x64 }, { 'R_x64': { - 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], + 'inherit_from': ['Common_Base', 'Release_Base'], }, # R_x64 }], # libchromiumcontent_component ],