From e3a80a59900627b1a351b507caa75dbb635fb196 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Fri, 2 Mar 2007 20:53:41 +0000 Subject: [PATCH] fix the msvc backend on linux hosts svn path=/trunk/; revision=25959 --- reactos/tools/rbuild/backend/msvc/msvc.cpp | 30 +++++++++---------- reactos/tools/rbuild/backend/msvc/msvc.h | 2 +- .../tools/rbuild/backend/msvc/vcprojmaker.cpp | 6 ++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/reactos/tools/rbuild/backend/msvc/msvc.cpp b/reactos/tools/rbuild/backend/msvc/msvc.cpp index 6052886c49b..13ad8ac3278 100644 --- a/reactos/tools/rbuild/backend/msvc/msvc.cpp +++ b/reactos/tools/rbuild/backend/msvc/msvc.cpp @@ -224,7 +224,7 @@ void MSVCBackend::OutputFolders() std::string MSVCBackend::OptFileName ( const Module& module ) const { - return DosSeparator( + return FixSeparatorForSystemCommand( ReplaceExtension ( module.GetPath(), "_" + _get_vc_dir() + "_auto.opt" ) ); } @@ -232,7 +232,7 @@ MSVCBackend::OptFileName ( const Module& module ) const std::string MSVCBackend::SuoFileName ( const Module& module ) const { - return DosSeparator( + return FixSeparatorForSystemCommand( ReplaceExtension ( module.GetPath(), "_" + _get_vc_dir() + "_auto.suo" ) ); } @@ -240,7 +240,7 @@ MSVCBackend::SuoFileName ( const Module& module ) const std::string MSVCBackend::DswFileName ( const Module& module ) const { - return DosSeparator( + return FixSeparatorForSystemCommand( ReplaceExtension ( module.GetPath(), "_auto.dsw" ) ); } @@ -248,7 +248,7 @@ MSVCBackend::DswFileName ( const Module& module ) const std::string MSVCBackend::SlnFileName ( const Module& module ) const { - return DosSeparator( + return FixSeparatorForSystemCommand( ReplaceExtension ( module.GetPath(), "_" + _get_vc_dir() + "_auto.sln" ) ); } @@ -256,7 +256,7 @@ MSVCBackend::SlnFileName ( const Module& module ) const std::string MSVCBackend::NcbFileName ( const Module& module ) const { - return DosSeparator( + return FixSeparatorForSystemCommand( ReplaceExtension ( module.GetPath(), "_" + _get_vc_dir() + "_auto.ncb" ) ); } @@ -264,7 +264,7 @@ MSVCBackend::NcbFileName ( const Module& module ) const std::string MSVCBackend::DspFileName ( const Module& module ) const { - return DosSeparator( + return FixSeparatorForSystemCommand( ReplaceExtension ( module.GetPath(), "_auto.dsp" ) ); } @@ -272,7 +272,7 @@ MSVCBackend::DspFileName ( const Module& module ) const std::string MSVCBackend::VcprojFileName ( const Module& module ) const { - return DosSeparator( + return FixSeparatorForSystemCommand( ReplaceExtension ( module.GetPath(), "_" + _get_vc_dir() + "_auto.vcproj" ) ); } @@ -297,13 +297,13 @@ MSVCBackend::_get_object_files ( const Module& module, vector& out) cons string basepath = module.GetBasePath (); string vcdir = _get_vc_dir (); size_t i; - string intenv = Environment::GetIntermediatePath () + "\\" + basepath + "\\"; - string outenv = Environment::GetOutputPath () + "\\" + basepath + "\\"; + string intenv = Environment::GetIntermediatePath () + DEF_SSEP + basepath + DEF_SSEP; + string outenv = Environment::GetOutputPath () + DEF_SSEP + basepath + DEF_SSEP; if ( configuration.UseVSVersionInPath ) { - intenv += vcdir + "\\"; - outenv += vcdir + "\\"; + intenv += vcdir + DEF_SSEP; + outenv += vcdir + DEF_SSEP; } string dbg = vcdir.substr ( 0, 3 ); @@ -336,7 +336,7 @@ MSVCBackend::_get_object_files ( const Module& module, vector& out) cons for ( i = 0; i < files.size (); i++ ) { string file = files[i]->name; - string::size_type pos = file.find_last_of ("\\"); + string::size_type pos = file.find_last_of (DEF_SSEP); if ( pos != string::npos ) file.erase ( 0, pos+1 ); if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) @@ -379,7 +379,7 @@ MSVCBackend::_get_def_files ( const Module& module, vector& out) const { file.insert (pos, "_msvc"); } - modulename += "\\" + file; + modulename += DEF_SSEP + file; out.push_back (modulename); } } @@ -460,8 +460,8 @@ MSVCBackend::_install_files (const std::string& vcdir, const::string& config) if ( module.installBase == "" || module.installName == "" ) continue; - string inputname = Environment::GetOutputPath () + "\\" + module.GetBasePath () + "\\" + vcdir + "\\" + config + "\\" + module.GetTargetName (); - string installdir = Environment::GetInstallPath () + "\\" + module.installBase + "\\" + module.installName; + string inputname = Environment::GetOutputPath () + DEF_SSEP + module.GetBasePath () + DEF_SSEP + vcdir + DEF_SSEP + config + DEF_SSEP + module.GetTargetName (); + string installdir = Environment::GetInstallPath () + DEF_SSEP + module.installBase + DEF_SSEP + module.installName; if ( _copy_file( inputname, installdir ) ) printf ("Installed File :'%s'\n",installdir.c_str () ); } diff --git a/reactos/tools/rbuild/backend/msvc/msvc.h b/reactos/tools/rbuild/backend/msvc/msvc.h index b487af4d73e..39ab66b264d 100644 --- a/reactos/tools/rbuild/backend/msvc/msvc.h +++ b/reactos/tools/rbuild/backend/msvc/msvc.h @@ -112,7 +112,7 @@ class MSVCBackend : public Backend // functions in vcprojmaker.cpp: - std::string _get_solution_verion ( void ); + std::string _get_solution_version ( void ); std::string _gen_guid(); std::string _replace_str( std::string string1, diff --git a/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp b/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp index f4e13e7b68b..3edd54df6c8 100644 --- a/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp +++ b/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp @@ -116,7 +116,7 @@ MSVCBackend::_generate_vcproj ( const Module& module ) if ( configuration.UseVSVersionInPath ) { - vcdir = "\\" + _get_vc_dir(); + vcdir = DEF_SSEP + _get_vc_dir(); } // TODO FIXME - need more checks here for 'sys' and possibly 'drv'? @@ -758,7 +758,7 @@ MSVCBackend::_replace_str(std::string string1, const std::string &find_str, cons } std::string -MSVCBackend::_get_solution_verion ( void ) +MSVCBackend::_get_solution_version ( void ) { string version; @@ -780,7 +780,7 @@ MSVCBackend::_get_solution_verion ( void ) void MSVCBackend::_generate_sln_header ( FILE* OUT ) { - fprintf ( OUT, "Microsoft Visual Studio Solution File, Format Version %s\r\n", _get_solution_verion().c_str() ); + 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, "\r\n" ); }