Author: dchapyshev Date: Thu Oct 30 06:14:40 2008 New Revision: 37093
URL: http://svn.reactos.org/svn/reactos?rev=37093&view=rev Log: - Attempt to fix a bug 3255. By means of Christoph_vW. Not tested.
Modified: trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp
Modified: trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/codebl... ============================================================================== --- trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp [iso-8859-1] Thu Oct 30 06:14:40 2008 @@ -211,7 +211,7 @@ CBBackend::CbpFileName ( const Module& module ) const { return DosSeparator( - ReplaceExtension ( module.output->relative_path + "\" + module.output->name, "_auto.cbp" ) + ReplaceExtension ( module.output->relative_path + sSep + module.output->name, "_auto.cbp" ) ); }
@@ -219,7 +219,7 @@ CBBackend::LayoutFileName ( const Module& module ) const { return DosSeparator( - ReplaceExtension ( module.output->relative_path + "\" + module.output->name, "_auto.layout" ) + ReplaceExtension ( module.output->relative_path + sSep + module.output->name, "_auto.layout" ) ); }
@@ -227,7 +227,7 @@ CBBackend::DependFileName ( const Module& module ) const { return DosSeparator( - ReplaceExtension ( module.output->relative_path + "\" + module.output->name, "_auto.depend" ) + ReplaceExtension ( module.output->relative_path + sSep + module.output->name, "_auto.depend" ) ); }
@@ -236,8 +236,8 @@ { string basepath = module.output->relative_path; size_t i; - string intenv = Environment::GetIntermediatePath () + "\" + basepath + "\"; - string outenv = Environment::GetOutputPath () + "\" + basepath + "\"; + string intenv = Environment::GetIntermediatePath () + sSep + basepath + sSep; + string outenv = Environment::GetOutputPath () + sSep + basepath + sSep;
vector<string> cfgs;
@@ -265,7 +265,7 @@ for ( i = 0; i < files.size (); i++ ) { string file = files[i]->file.relative_path + sSep + files[i]->file.name; - string::size_type pos = file.find_last_of ("\"); + string::size_type pos = file.find_last_of (sSep); if ( pos != string::npos ) file.erase ( 0, pos+1 ); if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) @@ -273,7 +273,7 @@ else file = ReplaceExtension ( file, ".obj" ); for ( size_t j = 0; j < cfgs.size () / 2; j++ ) - out.push_back ( cfgs[j] + "\" + file ); + out.push_back ( cfgs[j] + sSep + file ); }
} @@ -334,7 +334,7 @@ ifs_list.pop_back(); const vector<Library*>& libs = data.libraries; for ( size_t j = 0; j < libs.size(); j++ ) - fprintf ( OUT, "\t\t\t<Depends filename="%s\%s_auto.cbp" />\r\n", libs[j]->importedModule->output->relative_path.c_str(), libs[j]->name.c_str() ); + fprintf ( OUT, "\t\t\t<Depends filename="%s%s%s_auto.cbp" />\r\n", libs[j]->importedModule->output->relative_path.c_str(), sSep.c_str(), libs[j]->name.c_str() ); } fprintf ( OUT, "\t\t</Project>\r\n" ); } @@ -447,7 +447,7 @@ const vector<Library*>& libs = data.libraries; for ( i = 0; i < libs.size(); i++ ) { - string libpath = intdir + "\" + libs[i]->importedModule->output->relative_path; + string libpath = intdir + sSep + libs[i]->importedModule->output->relative_path; libraries.push_back ( libs[i]->name ); libpaths.push_back ( libpath ); } @@ -516,18 +516,18 @@ if ( configuration.UseConfigurationInPath ) { if ( IsStaticLibrary ( module ) ||module.type == ObjectLibrary ) - fprintf ( OUT, "\t\t\t\t<Option output="%s\%s%s\%s%s" prefix_auto="0" extension_auto="0" />\r\n", intdir.c_str (), module.output->relative_path.c_str (), cfg.name.c_str(), module.name.c_str(), module_type.c_str()); + fprintf ( OUT, "\t\t\t\t<Option output="%s%s%s%s%s%s%s" prefix_auto="0" extension_auto="0" />\r\n", intdir.c_str (), sSep.c_str(), module.output->relative_path.c_str (), cfg.name.c_str(), sSep.c_str(), module.name.c_str(), module_type.c_str()); else - fprintf ( OUT, "\t\t\t\t<Option output="%s\%s%s\%s%s" prefix_auto="0" extension_auto="0" />\r\n", outdir.c_str (), module.output->relative_path.c_str (), cfg.name.c_str(), module.name.c_str(), module_type.c_str()); - fprintf ( OUT, "\t\t\t\t<Option object_output="%s\%s%s" />\r\n", intdir.c_str(), module.output->relative_path.c_str (), cfg.name.c_str() ); + fprintf ( OUT, "\t\t\t\t<Option output="%s%s%s%s%s%s%s" prefix_auto="0" extension_auto="0" />\r\n", outdir.c_str (), sSep.c_str(), module.output->relative_path.c_str (), cfg.name.c_str(), sSep.c_str(), module.name.c_str(), module_type.c_str()); + fprintf ( OUT, "\t\t\t\t<Option object_output="%s%s%s%s" />\r\n", intdir.c_str(), sSep.c_str(), module.output->relative_path.c_str (), cfg.name.c_str() ); } else { if ( IsStaticLibrary ( module ) || module.type == ObjectLibrary ) - fprintf ( OUT, "\t\t\t\t<Option output="%s\%s\%s%s" prefix_auto="0" extension_auto="0" />\r\n", intdir.c_str (), module.output->relative_path.c_str (), module.name.c_str(), module_type.c_str() ); + fprintf ( OUT, "\t\t\t\t<Option output="%s%s%s%s%s%s" prefix_auto="0" extension_auto="0" />\r\n", intdir.c_str (), sSep.c_str(), module.output->relative_path.c_str (), sSep.c_str(), module.name.c_str(), module_type.c_str() ); else - fprintf ( OUT, "\t\t\t\t<Option output="%s\%s\%s%s" prefix_auto="0" extension_auto="0" />\r\n", outdir.c_str (), module.output->relative_path.c_str (), module.name.c_str(), module_type.c_str() ); - fprintf ( OUT, "\t\t\t\t<Option object_output="%s\%s" />\r\n", intdir.c_str(), module.output->relative_path.c_str () ); + fprintf ( OUT, "\t\t\t\t<Option output="%s%s%s%s%s%s" prefix_auto="0" extension_auto="0" />\r\n", outdir.c_str (), sSep.c_str(), module.output->relative_path.c_str (), sSep.c_str(), module.name.c_str(), module_type.c_str() ); + fprintf ( OUT, "\t\t\t\t<Option object_output="%s%s%s" />\r\n", intdir.c_str(), sSep.c_str(), module.output->relative_path.c_str () ); }
if ( lib ) @@ -674,8 +674,8 @@ { const string& resource_file = resource_files[i]; #ifdef WIN32 - fprintf ( OUT, "\t\t\t\t\t<Add after="cmd /c del $(TARGET_OBJECT_DIR)\%s.rci.tmp 2>NUL" />\r\n", resource_file.c_str() ); - fprintf ( OUT, "\t\t\t\t\t<Add after="cmd /c del $(TARGET_OBJECT_DIR)\%s.res.tmp 2>NUL" />\r\n", resource_file.c_str() ); + fprintf ( OUT, "\t\t\t\t\t<Add after="cmd /c del $(TARGET_OBJECT_DIR)%s%s.rci.tmp 2>NUL" />\r\n", sSep.c_str(), resource_file.c_str() ); + fprintf ( OUT, "\t\t\t\t\t<Add after="cmd /c del $(TARGET_OBJECT_DIR)%s%s.res.tmp 2>NUL" />\r\n", sSep.c_str(), resource_file.c_str() ); #else fprintf ( OUT, "\t\t\t\t\t<Add after="rm $(TARGET_OBJECT_DIR)/%s.rci.tmp 2>/dev/null" />\r\n", resource_file.c_str() ); fprintf ( OUT, "\t\t\t\t\t<Add after="rm $(TARGET_OBJECT_DIR)/%s.res.tmp 2>/dev/null" />\r\n", resource_file.c_str() ); @@ -686,9 +686,9 @@ if ( dll ) { if (IsSpecDefinitionFile( module )) - fprintf ( OUT, "\t\t\t\t\t<Add before="%s\tools\winebuild\winebuild.exe -o %s --def -E %s.spec" />\r\n", outdir.c_str(), module.importLibrary->definition.c_str(), module.name.c_str()); + fprintf ( OUT, "\t\t\t\t\t<Add before="%s%stools%swinebuild%swinebuild.exe -o %s --def -E %s.spec" />\r\n", outdir.c_str(), sSep, sSep, sSep, module.importLibrary->definition.c_str(), module.name.c_str()); fprintf ( OUT, "\t\t\t\t\t<Add before="dlltool --dllname %s --def %s --output-exp %s.temp.exp %s" />\r\n", module.GetTargetName ().c_str(), module.importLibrary->definition.c_str(), module.name.c_str(), module.mangledSymbols ? "" : "--kill-at" ); - fprintf ( OUT, "\t\t\t\t\t<Add after="%s\tools\pefixup $exe_output -exports" />\r\n", outdir.c_str() ); + fprintf ( OUT, "\t\t\t\t\t<Add after="%s%stools%spefixup $exe_output -exports" />\r\n", outdir.c_str(), sSep, sSep ); #ifdef WIN32 fprintf ( OUT, "\t\t\t\t\t<Add after="cmd /c del %s.temp.exp 2>NUL" />\r\n", module.name.c_str() ); #else @@ -764,13 +764,13 @@ else if ( extension == ".idl" || extension == ".IDL" ) { fprintf ( OUT, "\t\t\t<Option compile="1" />\r\n" ); - fprintf ( OUT, "\t\t\t<Option compiler="gcc" use="1" buildCommand="%s\tools\widl\widl.exe %s %s -h -H "$(TARGET_OUTPUT_DIR)$filetitle_c.h" -c -C "$(TARGET_OUTPUT_DIR)$filetitle_c.c" $file\ngcc %s -c "$(TARGET_OUTPUT_DIR)$filetitle_c.c" -o "$(TARGET_OUTPUT_DIR)$file_c.o"" />\r\n", outdir.c_str(), widl_options.c_str(), windres_defines.c_str(), widl_options.c_str() ); + fprintf ( OUT, "\t\t\t<Option compiler="gcc" use="1" buildCommand="%s%stools%swidl%swidl.exe %s %s -h -H "$(TARGET_OUTPUT_DIR)$filetitle_c.h" -c -C "$(TARGET_OUTPUT_DIR)$filetitle_c.c" $file%sngcc %s -c "$(TARGET_OUTPUT_DIR)$filetitle_c.c" -o "$(TARGET_OUTPUT_DIR)$file_c.o"" />\r\n", outdir.c_str(), sSep.c_str(), sSep.c_str(), sSep.c_str(), widl_options.c_str(), windres_defines.c_str(), sSep.c_str(), widl_options.c_str() ); } else if ( extension == ".spec" || extension == ".SPEC" ) { fprintf ( OUT, "\t\t\t<Option compile="1" />\r\n" ); fprintf ( OUT, "\t\t\t<Option link="1" />\r\n" ); - fprintf ( OUT, "\t\t\t<Option compiler="gcc" use="1" buildCommand="%s\tools\winebuild\winebuild.exe -o $file.stubs.c --pedll $file\n$compiler -c $options $includes $file.stubs.c -o $(TARGET_OBJECT_DIR)\$file.o" />\r\n", outdir.c_str() ); + fprintf ( OUT, "\t\t\t<Option compiler="gcc" use="1" buildCommand="%s%stools%swinebuild%swinebuild.exe -o $file.stubs.c --pedll $file\n$compiler -c $options $includes $file.stubs.c -o $(TARGET_OBJECT_DIR)%s$file.o" />\r\n", outdir.c_str(), sSep.c_str(), sSep.c_str(), sSep.c_str(), sSep.c_str() ); }
for ( size_t icfg = 0; icfg < m_configurations.size(); icfg++ ) @@ -788,7 +788,7 @@ fprintf ( OUT, "\t\t<Unit filename="%s">\r\n", resource_file.c_str() ); fprintf ( OUT, "\t\t\t<Option compilerVar="WINDRES" />\r\n" ); string extension = GetExtension ( resource_file ); - fprintf ( OUT, "\t\t\t<Option compiler="gcc" use="1" buildCommand="gcc -xc -E -DRC_INVOKED $includes %s $file -o $(TARGET_OBJECT_DIR)\$file.rci.tmp\n%s\tools\wrc\wrc.exe $includes %s $(TARGET_OBJECT_DIR)\$file.rci.tmp $(TARGET_OBJECT_DIR)\$file.res.tmp\n$rescomp --output-format=coff $(TARGET_OBJECT_DIR)\$file.res.tmp -o $resource_output" />\r\n" , windres_defines.c_str(), outdir.c_str(), windres_defines.c_str() ); + fprintf ( OUT, "\t\t\t<Option compiler="gcc" use="1" buildCommand="gcc -xc -E -DRC_INVOKED $includes %s $file -o $(TARGET_OBJECT_DIR)%s$file.rci.tmp\n%s%stools%swrc%swrc.exe $includes %s $(TARGET_OBJECT_DIR)%s$file.rci.tmp $(TARGET_OBJECT_DIR)%s$file.res.tmp\n$rescomp --output-format=coff $(TARGET_OBJECT_DIR)%s$file.res.tmp -o $resource_output" />\r\n" , windres_defines.c_str(), sSep.c_str(), outdir.c_str(), sSep.c_str(), sSep.c_str(), sSep.c_str(), windres_defines.c_str(), sSep.c_str(), sSep.c_str(), sSep.c_str() ); for ( size_t icfg = 0; icfg < m_configurations.size(); icfg++ ) { const CBConfiguration& cfg = *m_configurations[icfg];