Compiling a Delphi application using DUnitX

Hi,

i am having a hard time compiling a Delphi 10.2 Tokyo Test-Unit-Project using FinalBuilder running under ContinuaCI. The project compiles fine on the buildserver, if compiled from within the IDE. I can not figure out, why it does not compile under CI.

The library path does include “C:\Program Files (x86)\Embarcadero\Studio\19.0\source\DunitX”.

Still i keep getting the error:
[Error] MyProject.dpr(20): error F2613: Unit ‘DUnitX.Loggers.Console’ nicht gefunden.

Any ideas appreciated.

Thomas

I did more tests. Compiling on the buildserver using Finalbuilder will also fail. Same for MSBuild and a Delphi Action. Only by adding “$(BDS)\Source\DUnitX” to the Delphi Action’s Library path will compile.

Something is messed up with the compiler not finding DUnitX sources.

Without seeing the settings on your FinalBuilder Delphi Action, and your FinalBuilder options for Delphi it’s impossible to know exactly what is going on.

I have XE2 - 10.4.1 installed on my machine and none of them have DUnitX in their library paths, but that is likely because I chose not to install DUnitX with delphi, since (as the author of DUnitX) I have always have the github version on my machines.

Hi Vincent,

in 10.4 there is no library path added to DUnitX. Still it works. However, i had it installed by Delphi’s installer. As with 10.2, DUnitX was installed manually following the author’s guidelines (your blog :wink: ). Copying all the files to 19.0\Source\DUnitX. I did not add the wizard, as the IDE is not used on the build server.

As with Finalbuilder i’ve simply created an action with default settings, adding the project source filename. For the Delphi action the compiler version was added too.

I got it working!

I had to copy the dcu files to the lib\win32\debug and lib\win32\release folders. I also copied the necessary files to the corresponding 64-Bit folders.

Still, i have no clue why it does not compile using the provided source files. But, that’s another story. :wink:

I have no idea why you needed to do this.

Hopefully in the future this will all be a lot simpler. I’m working on a package manager much like Nuget, but for delphi - it makes dealing with dependencies so much easier.

I did a presentation on it late last year, you can find a link to the recording and more info here - https://www.adug.org.au/meetings/melbourne-meeting-november-2020/

It’s still a work in progress, I’m still working on getting design time packages installed (it’s complex) and project group support, progress has slowed somewhat due to time constraints but I hope to have a working releasable version later this year.