[Lazarus] lazbuild doesn't increment build number | issue plus patch
Sandro Cumerlato
sandro.cumerlato at gmail.com
Thu Apr 9 20:01:13 CEST 2015
Hello,
lazbuild doesn't increment build number even if auto increment is enabled
in Project Options.
Please review attached patch and apply if OK.
Notice that saved LPI file differs from original one (input file), some
sections are not kept:
...
<UnitName Value="project1"/>
...
<UnitName Value="Unit1"/>
...
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
Compare attached lpi files for more details (lpi.0 vs lpi.1)... is it a
ReadProject/WriteProject bug?
Sandro Cumerlato
p.s.: lpi.0 is the original lpi file generated by the Lazarus IDE.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150409/b957b358/attachment-0002.html>
-------------- next part --------------
Index: ide/lazbuild.lpr
===================================================================
--- ide/lazbuild.lpr (revisione 48687)
+++ ide/lazbuild.lpr (copia locale)
@@ -950,6 +950,19 @@
end
else
Result := StartBuilding;
+
+ // Auto increment build number
+ if Result then
+ begin
+ with Project1.ProjResources.VersionInfo do
+ begin
+ if UseVersionInfo and AutoIncrementBuild then
+ begin
+ BuildNr := BuildNr + 1;
+ Project1.WriteProject(Project1.PublishOptions.WriteFlags,AFileName,EnvironmentOptions.BuildMatrixOptions);
+ end;
+ end;
+ end;
end;
function TLazBuildApplication.LoadProject(const AFilename: string): TProject;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: project1.lpi.0
Type: application/octet-stream
Size: 2162 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150409/b957b358/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: project1.lpi.1
Type: application/octet-stream
Size: 1837 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150409/b957b358/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: project1.lpi.2
Type: application/octet-stream
Size: 1837 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150409/b957b358/attachment-0008.obj>
More information about the Lazarus
mailing list