Author: cfinck
Date: Sun May 11 13:30:36 2008
New Revision: 33446
URL:
http://svn.reactos.org/svn/reactos?rev=33446&view=rev
Log:
Robin Geuze (r DOT geuze AT chello DOT nl):
- Add the correct Visual Studio version to the .sln file header, so that the Visual Studio
Version Selector does not get confused.
I slightly modified the patch to replace some following if's by else if's.
Modified:
trunk/reactos/tools/rbuild/backend/msvc/msvc.h
trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp
Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/msvc/msvc.h [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/msvc/msvc.h [iso-8859-1] Sun May 11 13:30:36 2008
@@ -114,6 +114,7 @@
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 @@
};
#endif // __MSVC_H__
-
Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp [iso-8859-1] Sun May 11
13:30:36 2008
@@ -966,26 +966,49 @@
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" );
}