如何在Delphi目录设置中获取当前项目名称? [英] How to get the current project name in Delphi directories settings?
本文介绍了如何在Delphi目录设置中获取当前项目名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在项目目录设置中,我经常需要使用项目名称,例如'MyProject'
作为输出路径的一部分。
In the project directory settings, I often need to use the project name, say 'MyProject'
, as part of the output paths.
我宁愿避免在设置中对项目名称进行硬编码。
I would prefer to avoid hardcoding the project name in the settings.
是否有变量,例如 $(Config)
和 $(Platform)
,以动态获取当前项目名称(无扩展名)?
Is there a variable, like $(Config)
and $(Platform)
, to dynamically obtain the current project name (without extension)?
推荐答案
您可以使用 $( SanitizedProjectName)。请注意,调试器可能不支持。
You can use $(SanitizedProjectName) for this purpose. Be aware that the debugger might not support that.
这篇关于如何在Delphi目录设置中获取当前项目名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文