simplify MSVCBackend::Process code
[reactos.git] / reactos / tools / rbuild / backend / msvc / msvc.cpp
index 6b5c3f2..3f0d8c0 100644 (file)
@@ -31,8 +31,6 @@
 \r
 using namespace std;\r
 \r
-void gen_guid();\r
-\r
 static class MSVCFactory : public Backend::Factory\r
 {\r
        public:\r
@@ -55,35 +53,21 @@ MSVCBackend::MSVCBackend(Project &project,
 \r
 void MSVCBackend::Process()\r
 {\r
-       string filename_dsw = ProjectNode.name + ".dsw";\r
+\r
        string filename_sln = ProjectNode.name + ".sln";\r
-       \r
-       printf ( "Creating MSVC workspace: %s\n", filename_dsw.c_str() );\r
        printf ( "Creating MSVC workspace: %s\n", filename_sln.c_str() );\r
-\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
+       _generate_sln ( m_slnFile );\r
        fclose ( m_slnFile );\r
-\r
        printf ( "Done.\n" );\r
 }\r
 \r
@@ -93,9 +77,13 @@ void MSVCBackend::ProcessModules()
        {\r
                Module &module = *ProjectNode.modules[i];\r
 \r
-               this->_generate_dsp ( module );\r
-               this->_generate_vcproj ( module );\r
-//             gen_guid();\r
+               module.guid = _gen_guid();\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
                {\r