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

Side by Side Diff: webrtc/build/find_directx_sdk.py

Issue 2509703002: Remove all references to GYP (Closed)
Patch Set: Rebased Created 4 years, 1 month 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
« no previous file with comments | « webrtc/build/filename_rules.gypi ('k') | webrtc/build/gyp_webrtc » ('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 #
3 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
4 #
5 # Use of this source code is governed by a BSD-style license
6 # that can be found in the LICENSE file in the root of the source
7 # tree. An additional intellectual property rights grant can be found
8 # in the file PATENTS. All contributing project authors may
9 # be found in the AUTHORS file in the root of the source tree.
10
11 """Searches for DirectX SDK installation and prints full path to it."""
12
13 import os
14 import subprocess
15 import sys
16
17
18 def main():
19 sys.stdout.write(FindDirectXInstallation())
20 return 0
21
22
23 def FindDirectXInstallation():
24 """Try to find an installation location for the DirectX SDK. Check for the
25 standard environment variable, and if that doesn't exist, try to find
26 via the registry. Returns empty string if not found in either location."""
27
28 dxsdk_dir = os.environ.get('DXSDK_DIR')
29 if dxsdk_dir:
30 return dxsdk_dir
31
32 # Setup params to pass to and attempt to launch reg.exe.
33 cmd = ['reg.exe', 'query', r'HKLM\Software\Microsoft\DirectX', '/s']
34 p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
35 for line in p.communicate()[0].splitlines():
36 if 'InstallPath' in line:
37 return line.split(' ')[3] + "\\"
38
39 return ''
40
41
42 if __name__ == '__main__':
43 sys.exit(main())
OLDNEW
« no previous file with comments | « webrtc/build/filename_rules.gypi ('k') | webrtc/build/gyp_webrtc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698