fix creation of shlwapi vcproject file

svn path=/trunk/; revision=18623
This commit is contained in:
Christoph von Wittich 2005-10-20 09:43:49 +00:00
parent ee2234a457
commit 68bfd8c14e
2 changed files with 23 additions and 1 deletions

View file

@ -80,8 +80,13 @@ class MSVCBackend : public Backend
// functions in vcprojmaker.cpp:
std::string _gen_guid();
void _generate_vcproj ( const Module& module );
std::string _replace_str(
std::string string1,
const std::string &find_str,
const std::string &replace_str);
void _generate_vcproj ( const Module& module );
void _generate_sln_header ( FILE* OUT );
void _generate_sln_footer ( FILE* OUT );
void _generate_sln ( FILE* OUT );

View file

@ -255,6 +255,8 @@ MSVCBackend::_generate_vcproj ( const Module& module )
{
if ( i > 0 )
fprintf ( OUT, ";" );
defines[i] = _replace_str(defines[i], "\"",""");
fprintf ( OUT, "%s", defines[i].c_str() );
}
fprintf ( OUT, "\"\r\n" );
@ -387,6 +389,21 @@ MSVCBackend::_generate_vcproj ( const Module& module )
fclose(OUT);
}
std::string
MSVCBackend::_replace_str(std::string string1, const std::string &find_str, const std::string &replace_str)
{
std::string::size_type pos = string1.find(find_str, 0);
int intLen = find_str.length();
while(std::string::npos != pos)
{
string1.replace(pos, intLen, replace_str);
pos = string1.find(find_str, intLen + pos);
}
return string1;
}
void
MSVCBackend::_generate_sln_header ( FILE* OUT )
{