| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/visual_studio_writer.h" | 5 #include "tools/gn/visual_studio_writer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 void VisualStudioWriter::WriteSolutionFileContents( | 599 void VisualStudioWriter::WriteSolutionFileContents( |
| 600 std::ostream& out, | 600 std::ostream& out, |
| 601 const base::FilePath& solution_dir_path) { | 601 const base::FilePath& solution_dir_path) { |
| 602 out << "Microsoft Visual Studio Solution File, Format Version 12.00" | 602 out << "Microsoft Visual Studio Solution File, Format Version 12.00" |
| 603 << std::endl; | 603 << std::endl; |
| 604 out << "# " << version_string_ << std::endl; | 604 out << "# " << version_string_ << std::endl; |
| 605 | 605 |
| 606 SourceDir solution_dir(FilePathToUTF8(solution_dir_path)); | 606 SourceDir solution_dir(FilePathToUTF8(solution_dir_path)); |
| 607 for (const SolutionEntry* folder : folders_) { | 607 for (const SolutionEntry* folder : folders_) { |
| 608 out << "Project(\"" << kGuidTypeFolder << "\") = \"(" << folder->name | 608 out << "Project(\"" << kGuidTypeFolder << "\") = \"(" << folder->name |
| 609 << ")\", \"" << RebasePath(folder->path, solution_dir, "/") << "\", \"" | 609 << ")\", \"" << RebasePath(folder->path, solution_dir) << "\", \"" |
| 610 << folder->guid << "\"" << std::endl; | 610 << folder->guid << "\"" << std::endl; |
| 611 out << "EndProject" << std::endl; | 611 out << "EndProject" << std::endl; |
| 612 } | 612 } |
| 613 | 613 |
| 614 for (const SolutionEntry* project : projects_) { | 614 for (const SolutionEntry* project : projects_) { |
| 615 out << "Project(\"" << kGuidTypeProject << "\") = \"" << project->name | 615 out << "Project(\"" << kGuidTypeProject << "\") = \"" << project->name |
| 616 << "\", \"" << RebasePath(project->path, solution_dir, "/") << "\", \"" | 616 << "\", \"" << RebasePath(project->path, solution_dir) << "\", \"" |
| 617 << project->guid << "\"" << std::endl; | 617 << project->guid << "\"" << std::endl; |
| 618 out << "EndProject" << std::endl; | 618 out << "EndProject" << std::endl; |
| 619 } | 619 } |
| 620 | 620 |
| 621 out << "Global" << std::endl; | 621 out << "Global" << std::endl; |
| 622 | 622 |
| 623 out << "\tGlobalSection(SolutionConfigurationPlatforms) = preSolution" | 623 out << "\tGlobalSection(SolutionConfigurationPlatforms) = preSolution" |
| 624 << std::endl; | 624 << std::endl; |
| 625 const std::string config_mode_prefix = | 625 const std::string config_mode_prefix = |
| 626 std::string(is_debug_config_ ? "Debug" : "Release") + '|'; | 626 std::string(is_debug_config_ ? "Debug" : "Release") + '|'; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 base::CompareCase::SENSITIVE)) { | 744 base::CompareCase::SENSITIVE)) { |
| 745 folder->parent_folder = parents.back(); | 745 folder->parent_folder = parents.back(); |
| 746 break; | 746 break; |
| 747 } else { | 747 } else { |
| 748 parents.pop_back(); | 748 parents.pop_back(); |
| 749 } | 749 } |
| 750 } | 750 } |
| 751 parents.push_back(folder); | 751 parents.push_back(folder); |
| 752 } | 752 } |
| 753 } | 753 } |
| OLD | NEW |