I do not really understand why the version info settings of a project are "global", i.e. independent of build modes. Imho, they (or at least some of them) should be specific to the build modes.
Hello, at first glance it seems obvious. If it were so, the release version could be "
1.2.0", and when changing to debug it could become "
0.8". Even if you constantly update the version, it is just inconvenient and more prone to errors.
For example, the "debug" attribute is clearly related to the debug settings under "compiler options". All of them support build modes, but not the version info. This which means that I have to manually enable or disable the "debug" attribute, which is kind of error-prone.
Perhaps it would be worthwhile to include only the version "attributes" in the build mode? Although it would not be very obvious (why only part of the "version" belongs to the build modes), it would be possible.
But I am not sure how portable all these "flags" are between platforms. I tried to set "
Debug" attribute on
Windows now, and I can't find where to see it at all...
In practice, I am not sure that anyone uses it at all. For example, in theory, debug versions should not be distributed at all. Only developers should have them, or users should build them in order to get more information about the error (as Lazarus developers often ask for).
Is there any other way to set the version info and enable particular version attributes? Maybe a compiler directive or a compiler switch, so that I can combine those with using build modes?
As far as I know,
Lazarus itself does not provide this option. But I have seen on the forum third party ways to do this (in a platform dependent way) that can be launched automatically by the IDE on every build.