在Delphi XE中建立事件宏 [英] Build event macros in Delphi XE

查看:106
本文介绍了在Delphi XE中建立事件宏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据Delphi的帮助文件,当我打开对话框以将构建事件添加到项目的选项中时,该对话框应显示可在命令行中用于构建事件的宏(占位符)列表.当我在Delphi XE中尝试此操作时,宏列表为空.帮助文件也没有说明哪些宏可用(我可以找到).

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).

那么,哪些宏可用?现在,我需要一个宏来获取编译后的 .exe 文件(构建后)的完整路径,以及 .dproj 文件的完整路径.但是,我想提供完整的可用宏列表,以供将来参考.

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.

推荐答案

我不得不回到D2010来列出此列表:

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)

这篇关于在Delphi XE中建立事件宏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆