const bool wine = false;
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" );
vector<string> imports;
//$output->progress("$dsp_file (file $progress_current of $progress_max)");
// 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<const IfableData*> ifs_list;
ifs_list.push_back ( &module.non_if_data );
for ( i = 0; i < files.size(); i++ )
{
// 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 );
if ( !stricmp ( Right(file,2).c_str(), ".c" ) )
c_srcs.push_back ( file );
}
}
+ fprintf ( OUT, " /I \".\"" );
for ( i = 0; i < defines.size(); i++ )
{
fprintf ( OUT, " /D \"%s\"", defines[i].c_str() );
}
}
+ fprintf ( OUT, " /I \".\"" );
for ( i = 0; i < defines2.size(); i++ )
{
const string& define = defines2[i];
fprintf ( OUT, "!ENDIF \r\n" );
fprintf ( OUT, "\r\n" );
}
-
+#if 0
if ( module.name == "winebuild" )
{
fprintf ( OUT, "# Begin Special Build Tool\r\n" );
output_dir.c_str() );
fprintf ( OUT, "# End Special Build Tool\r\n" );
}
+#endif
fprintf ( OUT, "# Begin Target\r\n" );
fprintf ( OUT, "\r\n" );
for ( i = 0; i < cfgs.size(); i++ )
{
source_file = string(".\\") + source_file;
}
-
+#if 0
if ( !strcmp ( &source_file[source_file.size()-5], ".spec" ) )
{
string basename = string ( source_file.c_str(), source_file.size() - 5 );
fprintf ( OUT, "SOURCE=%s\r\n", dbg_c_file.c_str() );
fprintf ( OUT, "# End Source File\r\n" );
}
-
+#endif
fprintf ( OUT, "# Begin Source File\r\n" );
fprintf ( OUT, "\r\n" );
if ( !strcmp ( &source_file[source_file.size()-5], ".spec" ) )
{
+#if 0
string basename = string ( source_file.c_str(), source_file.size() - 5 );
string spec_file = source_file;
fprintf ( OUT, "\"%s\" : $(SOURCE) \"$(INTDIR)\" \"$(OUTDIR)\"\r\n", dbg_c_file.c_str() );
fprintf ( OUT, " $(BuildCmds)\r\n" );
fprintf ( OUT, "# End Custom Build\r\n" );
+#endif
}
/*else if ( source_file =~ /([^\\]*?\.h)$/ )
{
fprintf ( OUT, "# End Source File\r\n" );
}
fprintf ( OUT, "# End Group\r\n" );
-
fprintf ( OUT, "# Begin Group \"Header Files\"\r\n" );
fprintf ( OUT, "\r\n" );
fprintf ( OUT, "# PROP Default_Filter \"h;hpp;hxx;hm;inl\"\r\n" );