Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the minimal agent install footprint for Delphi build automation?

When creating a build server that does clean version control check-outs and full system builds of everything in a given source repository or project, what is the minimum required Delphi install footprint for XE3 Win32/Win64 projects? (Core system - not 3rd party components)

I'd prefer to have a small subset of files that can be included in a repository rather than a full Delphi install.

like image 225
Darian Miller Avatar asked Dec 17 '12 14:12

Darian Miller


2 Answers

Found a source for D2006+D2007:

https://delphi.fandom.com/wiki/Setting_up_a_Delphi_Build_Machine

like image 142
Darian Miller Avatar answered Oct 13 '22 08:10

Darian Miller


Using the command line compilers, you do not need to install the IDE on the remote agent computer. From a running installation, copy the \Bin and \Lib sub-folder content into your remote agent.

Then run DCC32.exe command line compiler, changing the DCC32.CFG file content to point to all needed source code paths. Do not forget to set a temporary folder for all your .dcu generated files, and specify a .exe destination folder.

See

  • How do I compile my delphi project on the command line?
  • and the official documentation of the command-line compiler.

Update: Yes, I know, MSBuild is the "official way". But for a build agent, I found out how easier it is to work with the command line compiler. And the question here is about the "minimal footprint" to build Delphi apps.

With DCC32, nothing to install, no need to reproduce the same layout than the one in the IDE. Build environment should not be tied to the IDE configuration, and should be "clean" from any developer specificity, from my experiment. It should build from scracth and from source all your application, run the unit tests, and prepare the release. I've seen some .dcu or .bpl polluting the build process, taking hours to find out why a code modification did not be taken in account!

If you need some complex build process, I always prefer to code some lines of Delphi (or python), reading the configuration from text files, regardless of the computer the build agent runs on. It is a PITA to install Delphi on a computer just for a build (especially latest versions), and even if the license allows you to do so, whereas the command-line compiler is safe and fast to install/setup. Just copy the files, and run them. If your build agent is a virtual server (as it should be today), your IT will be pleased not to pollute the registry. If just your company IT would prefer Delphi because of its cleanness in regard to other frameworks, it is always worth it.

like image 25
Arnaud Bouchez Avatar answered Oct 13 '22 10:10

Arnaud Bouchez