2.4. Command Line Compiler. Licensee may install the command line compiler on a separate computer from the Product itself, provided that the sole purpose of doing so is to allow that computer to perform unattended building of applications. The Command Line Compiler shall not be considered a ‘redistributable’.
The command line compiler (dcc32.exe etc) is pretty useless without the rtl/vcl/libs etc - figuring out exactly what is needed was too onerous (I tried creating an innosetup script at one stage) - so I do the following - adjust 22.0 for your delphi version.
Note that if you install in different locations on your dev machine and the build machine, then you should edit the exported .reg files before importing.
I eventually found I also needed the
%APPDATA%\Roaming\Embarcadero\BDS\22.0\Environment.proj file to get it to build.
At which point I just copied the entire directory from my profile.
Also on this VM, I also I had to run the rsvars batch, and also another batch script to set a correct(ish) environment. Before MS Build would run correctly. (Or even find MS Build)
2a. Get correct environment when attempting to run build from Continua.
This VM has a relatively short Path in the System Environment Variables (Advanced System Settings), and I attempted to add the required directories to the Path in the User Variables.
But it wouldn’t build in Continua.
I eventually added a command action to Continua, which ran a batch file to dump the environment to a text file and found it didn’t have the updated path I was expecting.
I tried creating the variables I wanted in the Configuration Variables section of Continua. This worked ok, they got pushed into the Environment. I decided to put them a bit higher up in the chain, but they never got pushed into the environment at either the Project or Application section, so I left them in the Configuration Section. Later Reading the instructions, it indicates Environment variables don’t get created/updated at all.
Perhaps a tick box to allow chosen variables to update the
environment might be nice.
NB: Much much later I realised I could restart the Continua Agent
or reboot the VM to get it to update from the advanced system
settings. So I removed the Configuration variables.
Source Access
I made a file system origin Git repository and was able to push into it from the CI Demo source.
I set up Continua to use this repository as a file system repository. (This was an error)
It wouldn’t build but would trigger nicely when I pushed updates to the origin repository.
After using the command action to log the files that were in the continua workspace, I realised my error.
I then made Continua use the repository as a Git Repository. This worked better. But it didn’t seem to want to trigger when I pushed updates.
Conveniently, Continua has a trigger only option, which I connected to the filesystem repository type.
So now the builds trigger and build correctly.
Output Files
I wanted msbuild to put the exe file(s) into the $Workspace$/Output directory.
Needed to add a Property to the msbuild configuration.
DCC_ExeOutput=$Workspace$/Output
This gets the exe output into the right place. It then gets pushed back to the server and put into the results location.
Beneath C:\Continua\ws\ADUG_CI_Demo
Unit Tests
Getting the Unit tests built, and to run at this stage was relatively straight forward compared to the many prior issues I had. Yay.