$(BDS) Needed in output but FB won't let me

I am writing a procedure gets from Source Safe, Adds Missing Paths to Delphi Libary Path, Complies all the Packages, Installs them into the IDE (if needed)
Using FB 5.0

The Problem is that:

FinalBuilder sees $(BDS) as a variable.

So when reading the Delphi Libary Path from the Registry and Writing it back. It tells me that this variable is undefined.

Attempting a work around of:
Defining the variable BDS and settings its value to $(BDS)
does not work…

Any ideas on how to make this work?

Hi Robert

When writing the value back to the the registry, you will need to disable recursive variable expansion (which is what is causing the problem here). This article on our website explains more about this :

https://www.finalbuilder.com/articles.aspx?mid=370&ctl=ArticleView&articleId=10

HTH


The referred article did not explain how to prevent expansion of $() (macros in Visual Studio project files f.ex)

When I attempt to set this string into a XML node:

call "$(ProjectDir)%fbXmlRelativePath%..\..\..\..\Production\Basis\AddProjectOutput" "$(ProjectPath)" "$(TargetFileName)"

 

I get the message:

'Error Expanding Node text : Variable : ProjectDir - does not exits:

 

This is the output I expected:

call "$(ProjectDir)..\..\..\..\..\..\..\Production\Basis\AddProjectOutput" "$(ProjectPath)" "$(TargetFileName)"

 

I have tried $$(, $((, $($(, \$(, $\(, $(!, $!(, !$(,  etc without any success.

Since the $() variable behaviour is not documented (FB5.5.0.240), do you have any suggestions?

 

rm

 

Hi Rune,

$$(Content) should expand at runtime to $(Content). When I tried this method on your example string, it expanded correctly.

There is a footnote about the $() syntax in the help file, but it is not widely documented. It’s a deprecated leftover from earlier versions of FB, and something which we would probably like to remove in a future release.

Regards,

Angus

Thanks for the prompt feedback, and even better it worked as you suggested with $$(). (thought I tried that one though)

However, I am not able to find that footnote about the $() in the help file so is my claim about the lacking documentation still standing?

rm