Prevent project tree from showing delphi rtl units

139 Views Asked by At

I'm using Delphi XE3, I have many project which contain a rtl unit in DPK file (necessary to set {$SetPEFlags IMAGE_FILE_NET_RUN_FROM_SWAP}), so their DPK looks like this:

requires
  { ... };

contains
  { ... },
  Winapi.Windows;

{$SetPEFlags IMAGE_FILE_NET_RUN_FROM_SWAP}

end.

Recently I added the projects by selecting the DPKs from Windows explorer and using drag-and-drop to add them in a project group, now the project tree of some projects (not all of them) looks like this:

project tree

How can I prevent Winapi.Windows.pas from showing in the project tree?

1

There are 1 best solutions below

1
On

The reason why Delphi shows Winapi.Windows.pas in your project as being so deep within the project tree is the fact that the location of the said file is not within your project folder or any of its sub-folders so it needs to be added with absolute path information.

But units that reside within your project folder or any of its sub-folders can be added with relative path information. In such case there probably won't bee so deep tree structure unless you also have deep folders structure within your project directory.