mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
37 lines
692 B
C++
37 lines
692 B
C++
|
#include "version.hpp"
|
||
|
|
||
|
namespace Version
|
||
|
{
|
||
|
std::string_view getVersion()
|
||
|
{
|
||
|
return "@OPENMW_VERSION@";
|
||
|
}
|
||
|
|
||
|
std::string_view getCommitHash()
|
||
|
{
|
||
|
return "@OPENMW_VERSION_COMMITHASH@";
|
||
|
}
|
||
|
|
||
|
std::string_view getTagHash()
|
||
|
{
|
||
|
return "@OPENMW_VERSION_TAGHASH@";
|
||
|
}
|
||
|
|
||
|
int getLuaApiRevision()
|
||
|
{
|
||
|
return @OPENMW_LUA_API_REVISION@;
|
||
|
}
|
||
|
|
||
|
std::string getOpenmwVersionDescription()
|
||
|
{
|
||
|
std::string str = "OpenMW version ";
|
||
|
str += getVersion();
|
||
|
if (!getCommitHash().empty())
|
||
|
{
|
||
|
str += "\nRevision: ";
|
||
|
str += getCommitHash().substr(0, 10);
|
||
|
}
|
||
|
return str;
|
||
|
}
|
||
|
}
|