I am moving a Lazarus project to Delphi Seattle.
The Lazarus project depends on 40+ units (including controls) and has several applications.
In the uses clause of all the projects they used the following:
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, DBCtrls, {$I OurLibrary.inc};
where they included those 40+ units with $I OurLibrary.inc
.
As some of those units are controls i registered them in Delphi.
However if i save the project or build / compile it, Delphi adds the units in the uses part again.
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, DBCtrls, uOurEdit, {$I OurLibrary.inc};
In this case the unit uOurEdit
got added again even tho it is in $I OurLibrary.inc
.
If i manually delete it and compile the project again it runs. Once i switch back in designer mode and try to run it the same thing keeps happening - it adds uOurEdit again.
Once you remove a unit Lazarus doesn't add it again. Delphi does that.
Is there are way to tell Delphi to stop readding units or stop add units automatically at all?