If you open *.lpi file with a Texteditor, you would see:
<CONFIG>
- <ProjectOptions>
[...]
- - <Units Count="25">
- - - <
Unit0>
- - - - <Filename Value="unit0.pas"/>
- - - - <IsPartOfProject Value="True"/>
- - - - <UnitName Value="unit0"/>
- - - </
Unit0>
- - - <
Unit1>
- - - - <Filename Value="unit1.pas"/>
- - - - <IsPartOfProject Value="True"/>
- - - - <UnitName Value="unit1"/>
- - - </
Unit1>
[...]
- - - <
Unit25>
- - - - <Filename Value="unit25.pas"/>
- - - - <IsPartOfProject Value="True"/>
- - - - <UnitName Value="unit25"/>
- - - </
Unit25>
[...]
Why not just this way?
<CONFIG>
- <ProjectOptions>
[...]
- - <
Units>
- - - <
Unit>
- - - - <Filename Value="unit0.pas"/>
- - - - <IsPartOfProject Value="True"/>
- - - - <UnitName Value="unit0"/>
- - - </
Unit>
- - - <
Unit>
- - - - <Filename Value="unit1.pas"/>
- - - - <IsPartOfProject Value="True"/>
- - - - <UnitName Value="unit1"/>
- - - </
Unit>
[...]
- - - <
Unit>
- - - - <Filename Value="unit25.pas"/>
- - - - <IsPartOfProject Value="True"/>
- - - - <UnitName Value="unit25"/>
- - - </
Unit>
[...]
So it would be much easier to insert new units directly with a Texteditor and easier/smarter to parse XML in Lazarus.
And on the other hand:
[...]
<CompilerOptions>
- <SearchPaths>
- - <OtherUnitFiles Value="L:\packages\fcl-web\src\base\;L:\packages\fcl-base\src\;- </SearchPaths>
</CompilerOptions>
Would be smarter this way:
<CompilerOptions>
- <SearchPaths>
- - <OtherUnitFiles>
- - - <Path VALUE="L:\packages\fcl-web\src\base\">
- - - <Path VALUE="L:\packages\fcl-base\src\">
- - </OtherUnitFiles>
- </SearchPaths>
</CompilerOptions>
It's not a theoretical question. I need it in a real world, while copying projects and setups
