Commit Graph

16 Commits

Author SHA1 Message Date
Jeff Norman
59e1b2817b Updated copyright year to 2022 for OSCAR files 2021-11-02 16:34:12 -04:00
sawinglogz
62b5ba3a60 Fix annoying precompiler limitation/bug in version sandbox logic. 2020-01-17 16:27:52 -05:00
sawinglogz
796f4659ab Update preference sandbox logic.
Release/RC version: no sandbox
Testing releases (tagged prerelease version): -test
Development builds: -branchname (if at the head of a branch)
                    -(commitid) (if in a headless state)

And in the unlikely event someone tries to build a non-release version
from a tarball instead of git, its sandbox will be "-unreleased".
2020-01-17 15:59:29 -05:00
sawinglogz
083fa3debd Move version and git constants into #defines and update bash script.
The bash script now adds a #define if the current checkout is
exactly on a tag, and it leaves all #defines empty if building
from a tarball.

The batch file still needs to be updated.
2020-01-16 17:37:43 -05:00
sawinglogz
768f32821a Clean up version.cpp, no functional changes. 2020-01-16 16:06:11 -05:00
sawinglogz
1f4bb2d435 Clean up build information and version interface.
This removes git dependencies from everything except for version.cpp,
and removes the associated interfaces in version.h.

Since the full version string contains the branch and revision
number where applicable, the build information no longer needs
to report branch and revision separately. It also now queries
version.cpp for a more consistent and reliable build time.

Debug output of build information is also now more consistent with
less redundant code.
2020-01-16 13:58:18 -05:00
sawinglogz
2e92107cce Update version display throughout to use the new information and be consistent.
The full version now includes the build/git information embedded within
it as build metadata according to the Semantic Versioning 2.0.0 spec,
for example: "1.1.0-beta-1+branch-name-a1b2c3d".

Now the full version string, with all detail is always displayed
EXCEPT for release versions, in which case just the simple version
number ("1.1.0") is displayed in the primary UI.

- Main window title: simple version for release versions, full version
    string otherwise
- Notifications: same as main window title
- System tray: same as main window title
- About window title: same as main window title
- About window release notes: always include full version string
- Reports: always include full version string
- Under the logo (about dialog, profile selector, new profile
    window): removed, as it is largely redundant and can
    interfere with the window geometry.
- Database upgrade alert: same as main window title
- Database newer alert: same as main window title

The full version string is also included within the preference and
profile .xml files, but because build metadata is ignored in version
comparisons, differences in builds will not cause any spurious
alerts. However, changes in prerelease versions will continue to
be significant, as they should be.
2020-01-16 13:05:55 -05:00
sawinglogz
80489a4b29 Add error handling in case a developer accidentally defines an invalid version. 2020-01-16 11:54:41 -05:00
sawinglogz
c71a953afd Add build metadata to version string.
Also update git scripts to make build metadata compliant with
semantic versioning.
2020-01-16 11:33:39 -05:00
sawinglogz
88957aeb7f Replace VersionString with getVersion() everywhere. 2020-01-15 19:45:46 -05:00
sawinglogz
f7f1ddfcbd Update version logic to drive entirely from defined string rather than individual components. 2020-01-15 19:27:03 -05:00
sawinglogz
93b9007f67 Remove old version comparison code. 2020-01-15 17:15:24 -05:00
sawinglogz
d7fade5f4c Add Version class for Semantic Versioning 2.0.0 parsing and comparison.
Also add unit tests for the new class.
2020-01-15 17:00:21 -05:00
sawinglogz
fb32e16c96 Clean up version.h interface and reduce duplcate code.
Only minor cosmetic changes in how the version is displayed in
certain places.
2020-01-15 13:18:00 -05:00
sawinglogz
6f194507a8 Move version-related code into version.cpp. 2020-01-13 18:41:24 -05:00
sawinglogz
097362dfa1 Move version constants out of header file into new cpp file. 2020-01-13 18:41:24 -05:00