diff --git a/reactos/tools/rbuild/backend/msvc/msvc.h b/reactos/tools/rbuild/backend/msvc/msvc.h index c8fe5468b6c..a321f4e701c 100644 --- a/reactos/tools/rbuild/backend/msvc/msvc.h +++ b/reactos/tools/rbuild/backend/msvc/msvc.h @@ -114,6 +114,7 @@ class MSVCBackend : public Backend std::string _strip_gcc_deffile(std::string Filename, std::string sourcedir, std::string objdir); std::string _get_solution_version ( void ); + std::string _get_studio_version ( void ); std::string _gen_guid(); std::string _replace_str( std::string string1, @@ -147,4 +148,3 @@ class MSVCBackend : public Backend }; #endif // __MSVC_H__ - diff --git a/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp b/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp index 01c452ab8c1..8fed100ce1b 100644 --- a/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp +++ b/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp @@ -966,26 +966,49 @@ MSVCBackend::_get_solution_version ( void ) if (configuration.VSProjectVersion.empty()) configuration.VSProjectVersion = MS_VS_DEF_VERSION; - if (configuration.VSProjectVersion == "7.00") + else if (configuration.VSProjectVersion == "7.00") version = "7.00"; - if (configuration.VSProjectVersion == "7.10") + else if (configuration.VSProjectVersion == "7.10") version = "8.00"; - if (configuration.VSProjectVersion == "8.00") + else if (configuration.VSProjectVersion == "8.00") version = "9.00"; - if (configuration.VSProjectVersion == "9.00") + else if (configuration.VSProjectVersion == "9.00") version = "10.00"; return version; } +std::string +MSVCBackend::_get_studio_version ( void ) +{ + string version; + + if (configuration.VSProjectVersion.empty()) + configuration.VSProjectVersion = MS_VS_DEF_VERSION; + + else if (configuration.VSProjectVersion == "7.00") + version = "2002"; + + else if (configuration.VSProjectVersion == "7.10") + version = "2003"; + + else if (configuration.VSProjectVersion == "8.00") + version = "2005"; + + else if (configuration.VSProjectVersion == "9.00") + version = "2008"; + + return version; +} + void MSVCBackend::_generate_sln_header ( FILE* OUT ) { fprintf ( OUT, "Microsoft Visual Studio Solution File, Format Version %s\r\n", _get_solution_version().c_str() ); - fprintf ( OUT, "# Visual Studio 2005\r\n" ); + fprintf ( OUT, "# Visual Studio %s\r\n", _get_studio_version().c_str() ); fprintf ( OUT, "\r\n" ); }