file paths should be relative to the location of the dsp file, not the dsw file

svn path=/trunk/; revision=17540
This commit is contained in:
Royce Mitchell III 2005-08-25 17:24:11 +00:00
parent bebf0b4a61
commit 9010800221

View file

@ -20,7 +20,7 @@ MSVCBackend::_generate_dsp ( const Module& module )
const bool wine = false; const bool wine = false;
string dsp_file = DspFileName(module); string dsp_file = DspFileName(module);
printf ( "Creating MSVC project: '%s'\r\n", dsp_file.c_str() ); printf ( "Creating MSVC project: '%s'\n", dsp_file.c_str() );
FILE* OUT = fopen ( dsp_file.c_str(), "wb" ); FILE* OUT = fopen ( dsp_file.c_str(), "wb" );
vector<string> imports; vector<string> imports;
@ -55,6 +55,7 @@ MSVCBackend::_generate_dsp ( const Module& module )
//$output->progress("$dsp_file (file $progress_current of $progress_max)"); //$output->progress("$dsp_file (file $progress_current of $progress_max)");
// TODO FIXME - what's diff. betw. 'c_srcs' and 'source_files'? // TODO FIXME - what's diff. betw. 'c_srcs' and 'source_files'?
string dsp_path = module.GetBasePath();
vector<string> c_srcs, source_files, resource_files; vector<string> c_srcs, source_files, resource_files;
vector<const IfableData*> ifs_list; vector<const IfableData*> ifs_list;
ifs_list.push_back ( &module.non_if_data ); ifs_list.push_back ( &module.non_if_data );
@ -69,7 +70,8 @@ MSVCBackend::_generate_dsp ( const Module& module )
for ( i = 0; i < files.size(); i++ ) for ( i = 0; i < files.size(); i++ )
{ {
// TODO FIXME - do we want the full path of the file here? // TODO FIXME - do we want the full path of the file here?
const string& file = files[i]->name; string file = string(".") + &files[i]->name[dsp_path.size()];
source_files.push_back ( file ); source_files.push_back ( file );
if ( !stricmp ( Right(file,2).c_str(), ".c" ) ) if ( !stricmp ( Right(file,2).c_str(), ".c" ) )
c_srcs.push_back ( file ); c_srcs.push_back ( file );