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

Unified 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: Remove conflicting OWNERS file. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/mini_installer.gyp ('k') | win8/delegate_execute/chrome_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/build/win/check_sdk_patch.py
diff --git a/chrome/tools/build/win/check_sdk_patch.py b/chrome/tools/build/win/check_sdk_patch.py
new file mode 100644
index 0000000000000000000000000000000000000000..91645256ad2e755b6e02da1e63857e533679a676
--- /dev/null
+++ b/chrome/tools/build/win/check_sdk_patch.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Script to check that the Windows 8 SDK has been appropriately patched so that
+ it can be used with VS 2010.
+
+ In practice, this checks for the presence of 'enum class' in asyncinfo.h.
+ Changing that to 'enum' is the only thing needed to build with the WinRT
+ headers in VS 2010.
+"""
+
+import os
+import sys
+
+
+def main(argv):
+ if len(argv) < 2:
+ print "Usage: check_sdk_patch.py path_to_windows_8_sdk"
+ return 1
+
+ # Look for asyncinfo.h
+ async_info_path = os.path.join(argv[1], 'Include/winrt/asyncinfo.h')
+ if not os.path.exists(async_info_path):
+ print ("Could not find %s in provided SDK path. Please check input." %
+ async_info_path)
+ print "CWD: %s" % os.getcwd()
+ return 2
+ else:
+ if 'enum class' in open(async_info_path).read():
+ print ("\nERROR: You are using an unpatched Windows 8 SDK. Please see "
+ "instructions at\nhttp://www.chromium.org/developers/how-tos/"
+ "build-instructions-windows\nfor how to apply the patch to build "
+ "with VS2010.\n")
+ return 3
+ else:
+ # Patched Windows 8 SDK found.
+ return 0
+
+
+if '__main__' == __name__:
+ sys.exit(main(sys.argv))
« no previous file with comments | « chrome/installer/mini_installer.gyp ('k') | win8/delegate_execute/chrome_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698