2015-07-18 01:01:06 +00:00
|
|
|
#ifndef VERSION_HPP
|
|
|
|
#define VERSION_HPP
|
|
|
|
|
2022-06-19 11:28:33 +00:00
|
|
|
#include <filesystem>
|
2022-09-22 18:26:05 +00:00
|
|
|
#include <string>
|
2015-07-18 01:01:06 +00:00
|
|
|
|
|
|
|
namespace Version
|
|
|
|
{
|
|
|
|
|
|
|
|
struct Version
|
|
|
|
{
|
|
|
|
std::string mVersion;
|
|
|
|
std::string mCommitHash;
|
|
|
|
std::string mTagHash;
|
|
|
|
|
2022-07-02 22:02:29 +00:00
|
|
|
std::string describe() const;
|
2015-07-18 01:01:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/// Read OpenMW version from the version file located in resourcePath.
|
2022-09-22 18:26:05 +00:00
|
|
|
Version getOpenmwVersion(const std::filesystem::path& resourcePath);
|
2015-07-18 01:01:06 +00:00
|
|
|
|
|
|
|
/// Helper function to getOpenmwVersion and describe() it
|
2022-09-22 18:26:05 +00:00
|
|
|
std::string getOpenmwVersionDescription(const std::filesystem::path& resourcePath);
|
2015-07-18 01:01:06 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // VERSION_HPP
|