| OLD | NEW |
| 1 #!/usr/bin/python2.4 | 1 #!/usr/bin/python2.4 |
| 2 # Copyright 2009 Google Inc. | 2 # Copyright 2009 Google Inc. |
| 3 # | 3 # |
| 4 # Licensed under the Apache License, Version 2.0 (the "License"); | 4 # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 # you may not use this file except in compliance with the License. | 5 # you may not use this file except in compliance with the License. |
| 6 # You may obtain a copy of the License at | 6 # You may obtain a copy of the License at |
| 7 # | 7 # |
| 8 # http://www.apache.org/licenses/LICENSE-2.0 | 8 # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 # | 9 # |
| 10 # Unless required by applicable law or agreed to in writing, software | 10 # Unless required by applicable law or agreed to in writing, software |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 try: | 85 try: |
| 86 winsdk_key = _winreg.OpenKey( | 86 winsdk_key = _winreg.OpenKey( |
| 87 _winreg.HKEY_LOCAL_MACHINE, | 87 _winreg.HKEY_LOCAL_MACHINE, |
| 88 'SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.1\\WinSDKBuild') | 88 'SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.1\\WinSDKBuild') |
| 89 except WindowsError: | 89 except WindowsError: |
| 90 try: | 90 try: |
| 91 winsdk_key = _winreg.OpenKey( | 91 winsdk_key = _winreg.OpenKey( |
| 92 _winreg.HKEY_LOCAL_MACHINE, | 92 _winreg.HKEY_LOCAL_MACHINE, |
| 93 'SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.0A\\WinSDKBuild') | 93 'SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.0A\\WinSDKBuild') |
| 94 except WindowsError: | 94 except WindowsError: |
| 95 print 'The Windows SDK version 6.0 or later needs to be installed' | 95 try: |
| 96 sys.exit(1) | 96 winsdk_key = _winreg.OpenKey( |
| 97 _winreg.HKEY_LOCAL_MACHINE, |
| 98 'SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.0A\\VistaClientHea
dersLibs') |
| 99 except WindowsError: |
| 100 print 'The Windows SDK version 6.0 or later needs to be installed' |
| 101 sys.exit(1) |
| 97 try: | 102 try: |
| 98 winsdk_dir, value_type = _winreg.QueryValueEx(winsdk_key, | 103 winsdk_dir, value_type = _winreg.QueryValueEx(winsdk_key, |
| 99 'InstallationFolder') | 104 'InstallationFolder') |
| 100 except WindowsError: | 105 except WindowsError: |
| 101 print 'The Windows SDK version 6.0 or later needs to be installed' | 106 print 'The Windows SDK version 6.0 or later needs to be installed' |
| 102 sys.exit(1) | 107 sys.exit(1) |
| 103 _winreg.CloseKey(winsdk_key) | 108 _winreg.CloseKey(winsdk_key) |
| 104 | 109 |
| 105 # Strip off trailing slashes | 110 # Strip off trailing slashes |
| 106 winsdk_dir = winsdk_dir.rstrip('\\/') | 111 winsdk_dir = winsdk_dir.rstrip('\\/') |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 file_path = file_path + '.a' | 165 file_path = file_path + '.a' |
| 161 outputs.append(file_path) | 166 outputs.append(file_path) |
| 162 | 167 |
| 163 if status == 0 and not CopyIfNewer(outputs, FLAGS.output): | 168 if status == 0 and not CopyIfNewer(outputs, FLAGS.output): |
| 164 sys.exit(-1) | 169 sys.exit(-1) |
| 165 else: | 170 else: |
| 166 sys.exit(status) | 171 sys.exit(status) |
| 167 | 172 |
| 168 if __name__ == '__main__': | 173 if __name__ == '__main__': |
| 169 main(sys.argv) | 174 main(sys.argv) |
| OLD | NEW |