I have checked the comand line compiler into my SCM so that FB build script can fetch it on the build machine. But now I don't know how to tell the script where the compiler executable is located! How do I do that?
FinalBuilder uses the registry entries that are created by Delphi when it is installed to detect the path, so for Delphi 2007 for example it looks for :
HKEY_LOCAL_MACHINE\SOFTWARE\Borland\BDS\5.0 and reads the RootDir value. It expects that the compiler will live in [RootDir]\bin
This probably means that I can create this registry entry at the beginning of my script, and subsequent compile actions will automatically use it, right?
I'll have to accommodate for the "Bin" part, but that's not a big deal. Still, I propose that you add this path as a property override in the compile action in a future build. Other actions that make similar assumptions about file locations might also benefit from such enhancements.
This is an interesting idea (checking the compiler into source control.) Have you actually gotten DCC32 to work properly when fetched from source control? Do you have any Delphi installation on the build machine at all, or are you pulling it all from source control?
Thanks for the suggestion about paths. Many (most) of the tools allow you to configure a path in the Options, even when one is normally autodetected. In some cases (ie Delphi) we assumed that users would have an installed copy, in which case there is no reason to override the default. We'll look into adding an option to override the default when necessary.
Yes, I put the dcc32.exe and all Delphi's precompiled dcus into the source control (Perforce) along with my project. I'm sure it will work when fetched from source control, because I've already had all the necessary files for doing command line builds in a separate VM, without having to install the whole IDE.
Unfortunately it seems that the registry entry mentioned above isn't enough (and yes, I corrected HKLM->HKCU). FB script still can't find the compiler in my custom location. Can someone from FB team please check what else could be missing?
Actually, I was wrong. It was the correct registry entry. But after I checked with RegMon, I found out that FBCMD.exe reads this entry upfront and so my setting it doesn't have any effect.
For now, I've solved this by leaving the entry in the registry so it's already there on the next run.