Page 2 of 2

Re: Eureka log link issue

Posted: Wed Dec 01, 2021 5:27 pm
by jomitech
No, you'll have to do something different for 64-bit builds. Actually, I recommend this new approach for both 32-bit and 64-bit.

1. In TCTargetsXX.targets, locate the LinkDependsOnTargets at the top of the file and replace it with:

Code: Select all

    <LinkDependsOnTargets Condition="'$(Platform)'=='Win32'">
      _ResolveOutput;
      CreateDirectories;
      PreLinkEvent;
      TCPerformLink;
      TCPostLink
    </LinkDependsOnTargets>
	<LinkDependsOnTargets Condition="'$(Platform)'!='Win32'">
      _ResolveOutput;
      CreateDirectories;
      PreLinkEvent;
      _PerformLink;
      TCPostLink
    </LinkDependsOnTargets>

2. At the bottom of the file, add the following:

Code: Select all

  <Target Name="TCPostLink">
	<Exec
        Condition="'$(TLibLink)'!='true' And ('@(OutputOutOfDate)'!='' Or '$(ForceLink)'=='true')"
        Command="ecc32.exe --el_alter_exe=$(MSBuildProjectFullPath)"
        />
  </Target>
This will invoke the EurekaLog process after every link for all platforms.

Re: Eureka log link issue

Posted: Thu Dec 02, 2021 4:03 am
by zzattack
Thanks, that is helpful. What is the difference between _PerformLink and TCPostLink? Is the former some internal method suitable only for 64-bit builds?

A slightl refinement in the <Exec> block allows the EurekaLog postprocessor only to be invoked when the EUREKALOG preprocessor symbol is defined. Additionally, we're supplying the target executable path on the command line since this isn't always found from the project file if we don't.

Code: Select all

  <Target Name="TCPostLink">
      <Exec
        Condition="'$(TLibLink)'!='true' And ('@(OutputOutOfDate)'!='' Or '$(ForceLink)'=='true') And $([System.Text.RegularExpressions.Regex]::IsMatch( $(BCC_Defines), '^(.*;)*EUREKALOG(;.*)*$')) "
        Command="ecc32speed.exe --el_profile=$(Configuration) --el_nostats --el_UnicodeOutput --el_alter_exe=$(MSBuildProjectFullPath);$(OUTPUTPATH)"
        />
  </Target>

Re: Eureka log link issue

Posted: Sat Dec 11, 2021 10:37 am
by jomitech
_PerformLink is the internal C++Builder link task. TCPerformLink is the TwineCompile-specific one that can be used to run a third-na linker (it's only used for 32-bit projects).

Re: Eureka log link issue

Posted: Thu Dec 16, 2021 8:54 am
by zzattack
Makes sense.

I'm attaching my modified targets file for Alexandria, perhaps it's useful to someone.