Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
html build log file
mandrav:
--- Quote from: tiwag on October 27, 2006, 08:26:39 am ---
--- Quote from: mandrav on October 24, 2006, 01:04:41 pm ---Both issues are fixed.
--- End quote ---
why do i get a "unnamed_build_log.html" file when i batch-build a project ??
the project's name should be known i guess :P
--- End quote ---
When building a project, the log has the name of the project.
When building a workspace, the log has the name of the workspace. If the workspace is unnamed (e.g. "Workspace" shows in C::B), then the log is "unnamed" :P.
tiwag:
--- Quote from: mandrav on October 27, 2006, 09:12:44 am ---
--- Quote from: tiwag on October 27, 2006, 08:26:39 am ---why do i get a "unnamed_build_log.html" file when i batch-build a project ??
the project's name should be known i guess :P
--- End quote ---
When building a project, the log has the name of the project.
When building a workspace, the log has the name of the workspace. If the workspace is unnamed (e.g. "Workspace" shows in C::B), then the log is "unnamed" :P.
--- End quote ---
this is what i would expect,
my project has definitely a name, but i still get an unnamed_build_log.html file,when i do a batch-build from the right-click explorer menu :?
when i build the same project from the ide, the name of the logfile is correctly set to projectname_build_log.html
edit:
please note, i'm using a project file (*.cbp) and NOT a workspace file
other test:
batch-building of the workspace DOES produce a workspacename_build_log.html file
conclusion:
only when batch-building a project file i get the unnamed_build_log.html file
brgds
tiwag:
bump
killerbot:
coincidence, I was just testing this, yes sir : building a cbp from the explorer == > "unnamed_build_log.html" :-(
killerbot:
look at this code :
--- Code: ---void CompilerGCC::InitBuildLog(bool workspaceBuild)
{
wxString title;
wxString basepath;
wxString basename;
if (!workspaceBuild && m_Project)
{
title = m_Project->GetTitle();
basepath = m_Project->GetBasePath();
basename = wxFileName(m_Project->GetFilename()).GetName();
basename = _T("baa");
}
else if (workspaceBuild)
{
cbWorkspace* wksp = Manager::Get()->GetProjectManager()->GetWorkspace();
title = wksp->GetTitle();
basepath = wxFileName(wksp->GetFilename()).GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);
basename = wxFileName(wksp->GetFilename()).GetName();
basename = _T("boo");
}
if (basename.IsEmpty())
basename = _T("unnamed");
// init HTML build log
m_BuildStartTime = wxDateTime::Now();
m_BuildLogTitle = title + _(" build log");
m_BuildLogFilename = basepath;
m_BuildLogFilename << basename << _T("_build_log.html");
m_BuildLogContents.Clear();
}
--- End code ---
I added that "baa" and "boo", and we end up at the "boo", meaning that the bool that enters is on true and says it's a workspace build, which it was not.
This can only happen when called from :
--- Code: ---int CompilerGCC::BuildWorkspace(const wxString& target)
--- End code ---
because of :
--- Code: ---int CodeBlocksApp::BatchJob()
{
...
if (m_ReBuild)
compiler->RebuildWorkspace(m_BatchTarget);
else if (m_Build)
compiler->BuildWorkspace(m_BatchTarget);
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version