OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. 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 #include "tools/gn/setup.h" | 5 #include "tools/gn/setup.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 return true; | 312 return true; |
313 } | 313 } |
314 | 314 |
315 void Setup::FillPythonPath() { | 315 void Setup::FillPythonPath() { |
316 #if defined(OS_WIN) | 316 #if defined(OS_WIN) |
317 // Find Python on the path so we can use the absolute path in the build. | 317 // Find Python on the path so we can use the absolute path in the build. |
318 const base::char16 kGetPython[] = | 318 const base::char16 kGetPython[] = |
319 L"cmd.exe /c python -c \"import sys; print sys.executable\""; | 319 L"cmd.exe /c python -c \"import sys; print sys.executable\""; |
320 std::string python_path; | 320 std::string python_path; |
321 if (base::GetAppOutput(kGetPython, &python_path)) { | 321 if (base::GetAppOutput(kGetPython, &python_path)) { |
322 TrimWhitespaceASCII(python_path, TRIM_ALL, &python_path); | 322 base::TrimWhitespaceASCII(python_path, base::TRIM_ALL, &python_path); |
323 if (scheduler_.verbose_logging()) | 323 if (scheduler_.verbose_logging()) |
324 scheduler_.Log("Found python", python_path); | 324 scheduler_.Log("Found python", python_path); |
325 } else { | 325 } else { |
326 scheduler_.Log("WARNING", "Could not find python on path, using " | 326 scheduler_.Log("WARNING", "Could not find python on path, using " |
327 "just \"python.exe\""); | 327 "just \"python.exe\""); |
328 python_path = "python.exe"; | 328 python_path = "python.exe"; |
329 } | 329 } |
330 build_settings_.set_python_path( | 330 build_settings_.set_python_path( |
331 base::FilePath(base::UTF8ToUTF16(python_path))); | 331 base::FilePath(base::UTF8ToUTF16(python_path))); |
332 #else | 332 #else |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 } | 433 } |
434 | 434 |
435 void DependentSetup::RunPreMessageLoop() { | 435 void DependentSetup::RunPreMessageLoop() { |
436 CommonSetup::RunPreMessageLoop(); | 436 CommonSetup::RunPreMessageLoop(); |
437 } | 437 } |
438 | 438 |
439 bool DependentSetup::RunPostMessageLoop() { | 439 bool DependentSetup::RunPostMessageLoop() { |
440 return CommonSetup::RunPostMessageLoop(); | 440 return CommonSetup::RunPostMessageLoop(); |
441 } | 441 } |
442 | 442 |
OLD | NEW |