Search code examples
delphidelphi-xe6

Where can I configure DCC_ExeOutput?


Is it possible to configure DCC_ExeOutput from Delphi? I could only change this by editing the dproj file.

I couldn't find where to edit this option even using Delphi IDE Insight.

Update 1:

This is my Project Options:

enter image description here

@TOndrej have suggested me change output directory, but I have already done this, and DCC_ExecOutput didn't change. The only way was editing dproj file.

Update 2:

My purpose is organize the folder structure of Delphi projects like suggested by Zarco Gajic in his article How to Layout Delphi Project Files - Best Practice. Delphi creates folders for each platform to store .dcu, .exe and other files. .\$(Platform)\$(Config) is the default for Delphi. So in the same level of .dproj Delphi creates the folders Win32, Win64, Android, etc. As you can see in the picture above, I've configured Delphi to put those files in a better organized form, in my opinion. Below an example:

My_Delphi_Project_folder
    Bin
    |___Debug
    |   |____Win32
    |   |____Win64
    |   |____Android
    |___Release
        |____Win32
        |____Win64
        |____Android

But after compile, the resulted structure was like below:

My_Delphi_Project_folder
    Win32
    Win64
    Android
    Bin
    |___Debug
    |   |____Win32
    |   |____Win64
    |   |____Android
    |___Release
        |____Win32
        |____Win64
        |____Android

After investigating .dproj file I found the guilty. It was DCC_ExeOutput.

As I didn't find a way to configures it in Delphi, I asked for help here. It has a long time that I don't work with Delphi, and I thought that could be a very simple thing that I have passed up. That's the cause of lack of information in my question.


Solution

  • The important information here is the type of project. Your project is a package. As such the DCC_ExeOutput setting is not relevant. It has no impact on the build process. What matters for a package is the DCC_BplOutput setting. The IDE still appears to emit to the .dproj file a value for the DCC_ExeOutput setting, but this value is ignored, and can be removed from the .dproj file.

    Package projects

    • Main source file begins with package.
    • The output location for the package is determined by the DCC_BplOutput node in the .dproj file.
    • In the IDE this setting corresponds to the Package output directory option in the project options dialog.
    • The IDE's new package dialog produces a .dproj file that contains a DCC_ExeOutput node. This node is ignored and can safely be removed from the .dproj file. There is no option in the IDE that corresponds to the DCC_ExeOutput node in a package .dproj file.

    Executable and library projects

    • Main source file begins with program or library.
    • The output location for the project is determined by the DCC_ExeOutput node in the .dproj file.
    • In the IDE this setting corresponds to the Output directory option in the project options dialog.