I am trying to get Inno Setup define value in Code
section but not with {#VersionTool1}
. I need to pass defined name dynamically, because there are a lot of them (I want to avoid large switch case). I tried SetupSetting
but it's not in Setup section (it's before it). Is there any way to do this?
#define VersionTool1 2019.01.1111
#define VersionTool2 2020.02.2111
...
[Code]
procedure SetSelectedTool(ToolName: String);
var
CurrentTool: string;
begin
...
CurrentTool := 'Version' + ToolName;
CurrentToolVersion := {#CurrentTool};
...
end;
Value of local variable CurrentTool
wil for example be 'VersionTool1'
and I want to get value of VersionTool1
preprocessor variable which is 2020.02.2111
.