Recently, I got an email asking how to deploy the Delphi command line compiler for use on a continuous integration (CI) server. Since I’m no longer working at CodeGear nor coding in Delphi I forwarded the message to a few guys at CodeGear mentioning that it would be a good blog post but alas, I never got a response. Geeze, I didn’t think it had been that long guys! Anyway…
I figured the question was worth a post if for no other reason than to start a conversation so other Delphi developers could contribute with their experience. Before we begin be sure to read your Delphi software license as I seem to recall there being some sort of issue related to the license regarding compiler deployment.
Getting the command line compiler to a build machine should be pretty straight forward though I’ve never had a need to do it myself since I was always working with the entire source tree including the compiler.
Basically, what’s needed is the Delphi compiler and the DCU/DCP’s from the products “lib” directory which means.
- The lib directory from your Delphi IDE source path
Aside from that here are some other suggestions for a build machine:
- Using command line options (or a dcc32.cfg file) always specify an output path for the compiler, never place project related output in the same directory as DCU/DCP’s that are shipped with Delphi
- Make sure you do a “clean” before each new build meaning run a process that deletes all of the compiler produced output from the previous build and verify that it actually works!
Be sure to read Language Reference Guide as I recall working with Nathan Tawill years ago on it and it was very good.
Lastly, another option would be to simply install a copy of the product on the build machine. Oh yeah, be sure to ask CodeGear to create an install that will take care of all this for you.
Ok, that’s my quick and dirty write up, your turn, what’s missing?
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.