According to Delphi's help file, when I open the dialog box to add build events to my project's options, the dialog box should show a list of macros (placeholders) that I can use on the command line for the build event. When I try this in Delphi XE, the list of macros is empty. The help file doesn't say which macros are available either (that I could find).
So, which macros are available? Right now I need a macro for the full path to the compiled .exe
file (post-build), and the full path to the .dproj
file. But I'd like to have a complete list of the available macros for future reference.
I have Update 1 installed, but still can't see them, however...
For the Output File use "$(OUTPUTDIR)$(OUTPUTFILENAME)" and the Project File use "$(ProjectDir)$(ProjectFileName)"
You can find a list of the available macros (if they aren't showing up in the IDE) in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Borland.Delphi.Targets (sourced from What are the MSBuild project level properties for Delphi?)
Inside that file is the following area on my machine...
<!-- Build event properties settable in the IDE -->
<ProjectName>$(MSBuildProjectName)</ProjectName>
<ProjectFilename>$(MSBuildProjectFile)</ProjectFilename>
<ProjectExt>$(MSBuildProjectExtension)</ProjectExt>
<ProjectDir>$(MSBuildProjectDirectory)</ProjectDir>
<ProjectPath>$(MSBuildProjectFullPath)</ProjectPath>
<InputPath>@(DelphiCompile->'%(FullPath)')</InputPath>
<InputDir>@(DelphiCompile->'%(RootDir)%(Directory)')</InputDir>
<InputName>@(DelphiCompile->'%(Filename)')</InputName>
<InputExt>@(DelphiCompile->'%(Extension)')</InputExt>
<InputFilename>@(DelphiCompile->'%(Filename)%(Extension)')</InputFilename>
<OutputPath>@(_DependencyCheckOutputName->'%(FullPath)')</OutputPath>
<OutputDir>@(_DependencyCheckOutputName->'%(RootDir)%(Directory)')</OutputDir>
<OutputName>@(_DependencyCheckOutputName->'%(Filename)')</OutputName>
<OutputExt>@(_DependencyCheckOutputName->'%(Extension)')</OutputExt>
<OutputFilename>@(_DependencyCheckOutputName->'%(Filename)%(Extension)')</OutputFilename>
HTH
I had to go back to D2010 to come up with this list:
BDS The environment variable $(BDS)
DEFINES The project's conditional defines
DIR The environment variable $(DIR)
INCLUDEPATH The project's include path
INPUTDIR The input file's directory
INPUTEXT The input file's extension
INPUTFILENAME The input file's name, with extension
INPUTPATH The input file's full path
LOCALCOMMAND Local command entered by user in project manager
OUTPUTDIR The output file's directory
OUTPUTEXT The output file's extension
OUTPUTFILENAME The output file's name, with extension
OUTPUTNAME The output file's name, without extension
OUTPUTPATH The output file's full path
Path The environment variable $(PATH)
PROJECTDIR The project's directory
PROJECTEXT The project's extension
PROJECTFILENAME The project file's name, with extension
PROJECTNAME The project's name
PROJECTPATH The project file's full path
SAVE Save the input file to disk before it's compiled
SystemRoot The environment variable $(SYSTEMROOT)
WINDIR The environment variable $(WINDIR)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With