News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

log filename including compiler, version, linker and debug or release ?

Started by pabristow, October 17, 2019, 03:49:25 PM

Previous topic - Next topic

pabristow

:) Works for me.

8)

Would be nice not to have to provide the CMD /C(easily forgotten), but works.

Screen snips attached.  One just shows the (copy) filename generated, the other a diff from the original log file with 'standard' file name.

Thanks.  Sorry this was such a marathon.

BlueHazzard

Be carefull! The copy is the log from the previous build, not from the current build!!!!

I have a plan to solve this and will provide a patch for review for the other devs in the next days.

Thoth

Hi Everyone,

I am using CodeBlocks 20.03 on Debian 10 and FreeBSD 12.

When I use the Squirrel command in the post-build step, no change is made to the name of the build log file.

[[IO.CopyFile(_("$(PROJECTNAME)_build_log.html"), _("$(PROJECTNAME)_build_log_") + GetProjectManager().GetActiveProject().GetCurrentlyCompilingTarget().GetTitle() + _("_$(TDAY)_") + GetProjectManager().GetActiveProject().GetCurrentlyCompilingTarget().GetCompilerID() + _(".html"), true );]]
CMD /C


I believe it is because my $(PROJECT_NAME) is "LPO LogIt" and the name of the build log is lpo_log_it_build_log.html.
I am guessing that
CopyFile(_("$(PROJECTNAME)_build_log.html")
results in
CopyFile(_("LPO LogIt_build_log.html")

Is this correct?

Also, I am guessing that the log file creation functionality uses the Code::Blocks project file name as a fallback.

How can I access the actual name of the generated log file so that I can rename it to include the date and perhaps process it with html2text?

FYI, No log file is created without the trailing "CMD /C" which generates an error on both systems.


=thoth=


BlueHazzard

Quote
FYI, No log file is created without the trailing "CMD /C" which generates an error on both systems.
obvisouly, because this is windows only

The build log file is named like this:

basename = wxFileName(m_pProject->GetFilename()).GetName();
basepath = m_pProject->GetBasePath();
....
m_BuildLogFilename = basepath;
m_BuildLogFilename << basename << _T("_build_log.html");


if i look at the macromanager code, that handles the replacing of the files i can see that
PROJECTFILE should be the same name

the of you used "PROJECTNAME" is the name of the project, that has not to be the same as the project file name