Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi XE2 host application from output directory

Is there a way to tell a Delphi project that builds a DLL to use as a host application an executable in the same directory as the output directory of the DLL being built?

something like this:

DLL host app Delphi - this does not work

One thing is, I'm using option sets with Delphi XE2, so in the dproj for the DLL I'm building I don't even have a DCC_ExeOutput directory, not sure if that matters.

Allowing this would seriously decomplicate some issues we've ran into trying to migrate from VSS to SVN.

Also, what do you call the $(thing)'s?

like image 530
Peter Turner Avatar asked Oct 09 '22 04:10

Peter Turner


1 Answers

The $(name) things are environment variables. I tried setting the host application to .\$(Platform)\$(Config)\Test.exe and received this error message:

Could not find program, '.\%Platform%\%Config%\Test.exe'.

Note how the $(...) was turned into environment variable syntax.

I also tried with $(systemdrive)\Test.exe and received this error message:

Could not find program, 'C:\Test.exe'.

So clearly environment variables will be substituted with their values, if they do exist. I think it is reasonable to conclude that the environment used to start a host application clearly does not define the special Delphi specific environment variables.

So I think the answer to your question is that you cannot use indirection like this for the host application setting.

On the other hand, environment variables are substituted so perhaps you could use that to make things easier. In other words you could define some environment variables of your own. I've no idea whether that may be of help to you since I don't know the precise details of your problem.

like image 158
David Heffernan Avatar answered Oct 13 '22 11:10

David Heffernan