Reputation: 1164
I use run time (plugin) BPL's and a host application. For whatever reason I sometimes need to debug my bpl without switching to the host app, so I can set the 'Host application' in the debugging options.
I have multiple versions of my project (eg maintenance and trunk) and I want to use relative paths, or preferably even de output path.
SO I set my host application (for running/debugging a bpl) to $PATH($EXENAME)\HostApp.exe
. But it appears RS10.3 does NOT resolve these macros when trying to start the host application. (AFAIK older versions don't do this either).
It appears the same applies to the command line parameters, though something like $(SomeEnvVar)
is expanded to %SomeEnvVar%
on the command line.
How can I start my (host) application without using an absolute path to my binaries, within the RS10.3 IDE?
I have created an issue on the embarcadero site. Please upvote there to shake things up :)
I created a test app, but only tests for cmdline params. Here are settings and results:
Sourcecode is little relevant and very elementary, but added for completeness.
procedure TfrmMain.DoShow;
VAR i:integer;
begin
inherited;
Memo1.Clear;
for i:=0 to ParamCount-1 do
Memo1.Lines.Add(ParamStr(i));
end;
Upvotes: 3
Views: 1095
Reputation: 28826
The Parameters line doesn't recognize any macros. You can use environment variables (as you can find in the Environment Block in the same dialog).
So if you enter $(BDS) or $(APPDATA) you will get the resolved environment variables, e.g. in my case:
c:\embarcadero\studio\20.0
C:\Users\Rudy\AppData\Roaming
That is also why $(EXENAME) resolves to %EXENAME%: it can't be resolved to the value of an environment variable.
But unfortunately, you can't use any macros like $PATH($EXENAME) here. They only seem to work in the Tools | Configure Tools dialog.
It would be nice if they could be used in the Parameters of the Debugger too. You could suggest it in Quality Portal.
Upvotes: 2