How to set default compiler options for XE2?

后端 未结 2 466
-上瘾入骨i
-上瘾入骨i 2021-01-12 02:59

I am unable to figure out how to change default build/compile settings. The little default checkbox in the lower left of the project options dialog is gone. The doc

相关标签:
2条回答
  • 2021-01-12 03:33

    Project->Options->Target. You can set up a base configuration, and then provide different options that differ from the base for Debug and Release. You can also create custom option sets, which means that they're different from the standard Debug and Release. You can also have different configurations based on different targets (VCL app's Debug build has different options than a FMX app's Debug build, etc.)

    To change the default options first starts with defining "default". You can start as low as the "base configuration" through Project->Options->Delphi Compiler, and then choosing the All Configuration target. You can refine it somewhat by altering the base configuration for the Debug and Release configurations. You can also define your own option sets, using the Save button next to the Target list.

    Your specific question about "specifying options as the default for multiple projects" means is the base configuration. From there, you refine those base options to give you debug settings and release settings (which can also be saved as your initial defaults, and refined on a per-project basis).

    So, for a specific answer, you can change the default by modifying the base configuration, or by getting more specific by modifying the debug or release configurations that inherit from that base, depending on what your end result needs to be and what you're trying to accomplish.

    0 讨论(0)
  • 2021-01-12 03:46

    That feature really has gone and there is nothing like it any more in the product, to the very best of my knowledge. I think the best you can do is as follows:

    1. Create a new project.
    2. Change the project settings to whatever you want them to be.
    3. Change anything else in the default project that you don't like, for example { Private declarations }.
    4. Add this project to the repository.
    5. use File | New | Customize to move this project template onto the File | New menu for easy access.
    0 讨论(0)
提交回复
热议问题