0
votes

I am in the middle of upgrading from Delphi XE3 to XE7 and I have noticed that my FinalBuilder script is no longer working as expected.

I have various Delphi projects configured to output the BPL / DCP files to $(BDSCOMMONDIR)\* which is set as a system environment variable to C:\Users\Public\Documents\Embarcadero\Studio\15.0. Opening up the projects in the IDE & compiling works as expected, however, whenever I compile using FinalBuilder the files are built to C:\Users\Public\Documents\RAD Studio\15.0 and I have no idea why, I have searched everywhere and can't see where this path is set i.e.

  • (IDE) Tools -> Options -> Environment Variables
  • %APPDATA%\Embarcadero\BDS\15.0\environment.proj
  • FinalBuilder environment variables
  • System environment variables

In all those locations the path is as expected. My suspicion is it's an issue with having both XE3 and XE7 installed on the same machine, purely because for the XE3 setup $(BDSCOMMONDIR) points to C:\Users\Public\Documents\RAD Studio\10.0 (only difference is the product version). As I am only evalulating XE7 at the moment I would like to try avoid having to uninstall XE3 unless it's absolutely necessary.

Note - one other difference here is when I installed XE7 I chose the Delphi install rather than RAD Studio one which I used previously when installing XE3 (I don't need the C++ Builder stuff).

Does anyone have any idea why this is happening?

1
How do you specify in FinalBuilder that you want it to build with a specific Delphi version? Surely once it has that information it takes care to setup the appropriate environment. I also wonder why you have defined a BDSCOMMONDIR environment variable in the system environment variables. - David Heffernan
@DavidHeffernan there is an option in FinalBuilder against each individual compile action which allows you to set which version of Delphi you want to use, it works fine for XE3 (I wonder if this is potentially a bug with FinalBuilder?). I had the BDSCOMMONDIR in my own user environment variables but changing it didn't seem to make any difference so I tried it in the system (same problem though). Also, funnily enough changing the value for BDSCOMMONDIR in the environment.proj file made no difference in the Tools -> Environment Options (not sure where those values are pulled from). - James
I don't understand why you are setting BDSCOMMONDIR env vars anywhere. It's just not your job to do that. You should unwind all of that. Modifying environment.proj is another bad move. Why are you doing all of this? - David Heffernan
@DavidHeffernan Sorry think I was confusing myself there...I set BDSCOMMONDIR in the user/system environment variables so it can be picked up by FinalBuilder, the reason for this is because there are some pre-compiled BPL/DCP files that we just need to manually copy. However, in hindsight there's probably a better way in FinalBuilder for doing this (perhaps I can load in environment variables from the Delphi IDE). - James
Ultimately it calls dcc32, because that's the compiler. Or dcc64 for Win64. Or indeed one of the other compilers. But msbuild drives it. And by going via msbuild you are sure that the options passed to dcc32 are identical to those done from interactive builds. - David Heffernan

1 Answers

4
votes

BDSCOMMONDIR is virtualised along with all the other delphi variables like BDS, otherwise it's impossible to compile with multiple versions of delphi.. which is something library/component vendors do all the time.

The issue here is a bug in Finalbuilder's XE7 support, a fix will be released shortly.