added pdb logging

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401822
This commit is contained in:
David Anderson 2007-12-23 00:08:08 +00:00
parent f8f5a6a888
commit 474f4d86c6
3 changed files with 17 additions and 4 deletions

View File

@ -16,6 +16,7 @@ namespace builder
public string pkg_path;
public string builder_path;
public string build_options;
public string pdb_log_file;
public builder.BasePlatform Platform;
public Config()
@ -85,6 +86,10 @@ namespace builder
{
build_options = val;
}
else if (key.CompareTo("PDBLog") == 0)
{
pdb_log_file = val;
}
}
}
}

View File

@ -31,6 +31,10 @@ namespace builder
else if (cfg.Platform == BasePlatform.Platform_Windows)
{
bld = new Win32Builder(cfg);
if (cfg.pdb_log_file != null && File.Exists(cfg.pdb_log_file))
{
File.Delete(cfg.pdb_log_file);
}
}
try

View File

@ -101,10 +101,14 @@ namespace builder
binName);
File.Copy(binpath, path, true);
/* On Windows we package the .pdb files as well */
binpath = binpath.Replace(".dll", ".pdb");
path = path.Replace(".dll", ".pdb");
File.Copy(binpath, path, true);
/* On Windows we optionally log the PDB path */
if (!lib.is_executable && cfg.pdb_log_file != null)
{
FileStream fs = File.Open(cfg.pdb_log_file, FileMode.Append, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs);
sw.WriteLine(binpath.Replace(".dll", ".pdb"));
sw.Close();
}
return true;
}