OLD | NEW |
1 #! /usr/bin/env python | 1 #! /usr/bin/env python |
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 print ("ERROR: solution (%s) version does not match " | 143 print ("ERROR: solution (%s) version does not match " |
144 "Visual Studio version (%s)" % | 144 "Visual Studio version (%s)" % |
145 (sln_map[solution_version], vs_version)) | 145 (sln_map[solution_version], vs_version)) |
146 print "You should 'set GYP_MSVS_VERSION=auto'" | 146 print "You should 'set GYP_MSVS_VERSION=auto'" |
147 print "and run 'gclient runhooks --force'" | 147 print "and run 'gclient runhooks --force'" |
148 sys.exit(1) | 148 sys.exit(1) |
149 | 149 |
150 def CleanTargets(self, targets, options): | 150 def CleanTargets(self, targets, options): |
151 """Cleans the targets.""" | 151 """Cleans the targets.""" |
152 solution = self.GetSolutionPath() | 152 solution = self.GetSolutionPath() |
153 self.Execute(['devenv.exe', | 153 self.Execute(['devenv.com', |
154 solution, | 154 solution, |
155 '/clean', | 155 '/clean', |
156 options.version]) | 156 options.version]) |
157 | 157 |
158 def Dobuild(self, targets, options): | 158 def Dobuild(self, targets, options): |
159 """Builds the specifed targets.""" | 159 """Builds the specifed targets.""" |
160 solution = self.GetSolutionPath() | 160 solution = self.GetSolutionPath() |
161 if not is_admin.IsAdmin(): | 161 if not is_admin.IsAdmin(): |
162 print ("WARNING: selenium_ie will not run unless you run as admin " | 162 print ("WARNING: selenium_ie will not run unless you run as admin " |
163 "or turn off UAC.\nAfter switching to admin run " | 163 "or turn off UAC.\nAfter switching to admin run " |
164 "'gclient runhooks --force'") | 164 "'gclient runhooks --force'") |
165 self.CheckVisualStudioVersionVsSolution(solution) | 165 self.CheckVisualStudioVersionVsSolution(solution) |
166 self.Execute(['msbuild', | 166 self.Execute(['devenv.com', |
167 solution, | 167 solution, |
168 '/p:Configuration=%s' % options.version]) | 168 '/build', |
| 169 options.version]) |
| 170 # TODO(gman): Should I check for devenv and if it does not exist |
| 171 # use msbuild? Msbuild is significantly slower than devenv. |
| 172 #self.Execute(['msbuild', |
| 173 # solution, |
| 174 # '/p:Configuration=%s' % options.version]) |
169 | 175 |
170 class LinuxBuilder(Builder): | 176 class LinuxBuilder(Builder): |
171 """Class for building on Linux.""" | 177 """Class for building on Linux.""" |
172 | 178 |
173 def __init__(self, builder): | 179 def __init__(self, builder): |
174 GypBuilder.Builder.__init__(self, builder) | 180 GypBuilder.Builder.__init__(self, builder) |
175 | 181 |
176 def GetSolutionPath(self): | 182 def GetSolutionPath(self): |
177 """Gets the solution path.""" | 183 """Gets the solution path.""" |
178 return '%s_main.scons' % GypBuilder.base_name | 184 return '%s_main.scons' % GypBuilder.base_name |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 else: | 287 else: |
282 print " ".join(args) | 288 print " ".join(args) |
283 | 289 |
284 | 290 |
285 def main(args): | 291 def main(args): |
286 GypBuilder(args[1:]) | 292 GypBuilder(args[1:]) |
287 | 293 |
288 if __name__ == "__main__": | 294 if __name__ == "__main__": |
289 main(sys.argv) | 295 main(sys.argv) |
290 | 296 |
OLD | NEW |