Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Side by Side Diff: win8/util/check_sdk_patch.py

Issue 233843003: Remove a few dead MSVS_VERSION checks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « win8/metro_driver/metro_driver.gyp ('k') | win8/win8.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 """Script to check that the Windows 8 SDK has been appropriately patched so that
7 it can be used with VS 2010.
8
9 In practice, this checks for the presence of 'enum class' in asyncinfo.h.
10 Changing that to 'enum' is the only thing needed to build with the WinRT
11 headers in VS 2010.
12 """
13
14 import os
15 import sys
16
17
18 def main(argv):
19 if len(argv) < 2:
20 print "Usage: check_sdk_patch.py path_to_windows_8_sdk [dummy_output_file]"
21 return 1
22
23 # Look for asyncinfo.h
24 async_info_path = os.path.join(argv[1], 'Include/winrt/asyncinfo.h')
25 if not os.path.exists(async_info_path):
26 print ("Could not find %s in provided SDK path. Please check input." %
27 async_info_path)
28 print "CWD: %s" % os.getcwd()
29 return 2
30 else:
31 if 'enum class' in open(async_info_path).read():
32 print ("\nERROR: You are using an unpatched Windows 8 SDK located at %s."
33 "\nPlease see instructions at"
34 "\nhttp://www.chromium.org/developers/how-tos/"
35 "build-instructions-windows\nfor how to apply the patch to build "
36 "with VS2010.\n" % argv[1])
37 return 3
38 else:
39 if len(argv) > 2:
40 with open(argv[2], 'w') as dummy_file:
41 dummy_file.write('Windows 8 SDK has been patched!')
42
43 # Patched Windows 8 SDK found.
44 return 0
45
46
47 if '__main__' == __name__:
48 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « win8/metro_driver/metro_driver.gyp ('k') | win8/win8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698