OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2012 Google Inc. All rights reserved. | 3 # Copyright (c) 2012 Google Inc. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """Utility functions for Windows builds. | 7 """Utility functions for Windows builds. |
8 | 8 |
9 These functions are executed via gyp-win-tool when using the ninja generator. | 9 These functions are executed via gyp-win-tool when using the ninja generator. |
10 """ | 10 """ |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 return popen.returncode | 91 return popen.returncode |
92 | 92 |
93 def ExecRcWrapper(self, *args): | 93 def ExecRcWrapper(self, *args): |
94 """Filter logo banner from invocations of rc.exe. Older versions of RC | 94 """Filter logo banner from invocations of rc.exe. Older versions of RC |
95 don't support the /nologo flag.""" | 95 don't support the /nologo flag.""" |
96 popen = subprocess.Popen( | 96 popen = subprocess.Popen( |
97 args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | 97 args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
98 out, _ = popen.communicate() | 98 out, _ = popen.communicate() |
99 for line in out.splitlines(): | 99 for line in out.splitlines(): |
100 if (not line.startswith('Microsoft (R) Windows (R) Resource Compiler') and | 100 if (not line.startswith('Microsoft (R) Windows (R) Resource Compiler') and |
101 not line.startswith('Copyright (C) Microsoft Corporation')): | 101 not line.startswith('Copyright (C) Microsoft Corporation') and |
| 102 line): |
102 print line | 103 print line |
103 return popen.returncode | 104 return popen.returncode |
104 | 105 |
105 if __name__ == '__main__': | 106 if __name__ == '__main__': |
106 sys.exit(main(sys.argv[1:])) | 107 sys.exit(main(sys.argv[1:])) |
OLD | NEW |