OLD | NEW |
1 # Copyright (c) 2009 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Visual Studio user preferences file writer.""" | 5 """Visual Studio user preferences file writer.""" |
6 | 6 |
7 import common | |
8 import os | 7 import os |
9 import re | 8 import re |
10 import socket # for gethostname | 9 import socket # for gethostname |
| 10 |
| 11 import gyp.common |
11 import gyp.easy_xml as easy_xml | 12 import gyp.easy_xml as easy_xml |
12 | 13 |
13 | 14 |
14 #------------------------------------------------------------------------------ | 15 #------------------------------------------------------------------------------ |
15 | 16 |
16 def _FindCommandInPath(command): | 17 def _FindCommandInPath(command): |
17 """If there are no slashes in the command given, this function | 18 """If there are no slashes in the command given, this function |
18 searches the PATH env to find the given command, and converts it | 19 searches the PATH env to find the given command, and converts it |
19 to an absolute path. We have to do this because MSVS is looking | 20 to an absolute path. We have to do this because MSVS is looking |
20 for an actual file to launch a debugger on, not just a command | 21 for an actual file to launch a debugger on, not just a command |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 for config, spec in sorted(self.configurations.iteritems()): | 138 for config, spec in sorted(self.configurations.iteritems()): |
138 configs.append(spec) | 139 configs.append(spec) |
139 | 140 |
140 content = ['VisualStudioUserFile', | 141 content = ['VisualStudioUserFile', |
141 {'Version': self.version.ProjectVersion(), | 142 {'Version': self.version.ProjectVersion(), |
142 'Name': self.name | 143 'Name': self.name |
143 }, | 144 }, |
144 configs] | 145 configs] |
145 easy_xml.WriteXmlIfChanged(content, self.user_file_path, | 146 easy_xml.WriteXmlIfChanged(content, self.user_file_path, |
146 encoding="Windows-1252") | 147 encoding="Windows-1252") |
OLD | NEW |