don't use VCToolsFile anymore because of different include dirs for subprojects
[reactos.git] / reactos / tools / rbuild / backend / msvc / msvc.cpp
index 39c7839..e7581bf 100644 (file)
@@ -53,35 +53,39 @@ MSVCBackend::MSVCBackend(Project &project,
 \r
 void MSVCBackend::Process()\r
 {\r
-       string filename_dsw = ProjectNode.name + ".dsw";\r
-       string filename_sln = ProjectNode.name + ".sln";\r
+       string filename_sln ( ProjectNode.name );\r
+       //string filename_rules = "gccasm.rules";\r
        \r
-       printf ( "Creating MSVC workspace: %s\n", filename_dsw.c_str() );\r
-       printf ( "Creating MSVC workspace: %s\n", filename_sln.c_str() );\r
+       if ( configuration.VSProjectVersion == "6.00" )\r
+               filename_sln += ".dsw";\r
+       else {\r
+               filename_sln += ".sln";\r
+\r
+               //m_rulesFile = fopen ( filename_rules.c_str(), "wb" );\r
+               //if ( m_rulesFile )\r
+               //{\r
+               //      _generate_rules_file ( m_rulesFile );\r
+               //}\r
+               //fclose ( m_rulesFile );\r
+       }\r
 \r
+       printf ( "Creating MSVC workspace: %s\n", filename_sln.c_str() );\r
+       \r
        ProcessModules();\r
-\r
-       m_dswFile = fopen ( filename_dsw.c_str(), "wb" );\r
        m_slnFile = fopen ( filename_sln.c_str(), "wb" );\r
 \r
-       if ( !m_dswFile )\r
-       {\r
-               printf ( "Could not create file '%s'.\n", filename_dsw.c_str() );\r
-               return;\r
-       }\r
-       _generate_wine_dsw ( m_dswFile );\r
-\r
-\r
        if ( !m_slnFile )\r
        {\r
                printf ( "Could not create file '%s'.\n", filename_sln.c_str() );\r
                return;\r
        }\r
-       _generate_sln ( m_slnFile );\r
 \r
-       fclose ( m_dswFile );\r
-       fclose ( m_slnFile );\r
+       if ( configuration.VSProjectVersion == "6.00" )\r
+               _generate_wine_dsw ( m_slnFile );\r
+       else\r
+               _generate_sln ( m_slnFile );\r
 \r
+       fclose ( m_slnFile );\r
        printf ( "Done.\n" );\r
 }\r
 \r
@@ -92,8 +96,11 @@ void MSVCBackend::ProcessModules()
                Module &module = *ProjectNode.modules[i];\r
 \r
                module.guid = _gen_guid();\r
-               this->_generate_dsp ( module );\r
-               this->_generate_vcproj ( module );\r
+\r
+               if (configuration.VSProjectVersion == "6.00")\r
+                       this->_generate_dsp ( module );\r
+               else\r
+                       this->_generate_vcproj ( module );\r
 \r
 \r
                /*for(size_t k = 0; k < module.non_if_data.files.size(); k++)\r
@@ -202,7 +209,7 @@ std::string
 MSVCBackend::DspFileName ( const Module& module ) const\r
 {\r
        return DosSeparator(\r
-               ReplaceExtension ( module.GetPath(), ".dsp" )\r
+               ReplaceExtension ( module.GetPath(), "_auto.dsp" )\r
                );\r
 }\r
 \r
@@ -210,6 +217,6 @@ std::string
 MSVCBackend::VcprojFileName ( const Module& module ) const\r
 {\r
        return DosSeparator(\r
-               ReplaceExtension ( module.GetPath(), ".vcproj" )\r
+               ReplaceExtension ( module.GetPath(), "_auto.vcproj" )\r
                );\r
 }\r