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

Side by Side Diff: chrome/tools/build/win/check_sdk_patch.py

Issue 10875008: Integrate the Windows 8 code into the Chromium tree. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding gyp target that fails in case of missing SDK patch. Created 8 years, 3 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
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"
21 return -1
grt (UTC plus 2) 2012/08/29 02:59:18 are you following a convention for using negative
robertshield 2012/08/30 13:34:05 Done.
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 -1
30 else:
31 if 'enum class' in open(async_info_path).read():
32 print ("\nERROR: You are using an unpatched Windows 8 SDK. Please see "
33 "instructions at\nhttp://www.chromium.org/developers/how-tos/"
34 "build-instructions-windows\nfor how to apply the patch to build "
35 "with VS2010.\n")
36 return -2
37 else:
38 # Patched Windows 8 SDK found.
39 return 0
40
41
42 if '__main__' == __name__:
43 sys.exit(main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698