2016-05-07 20:38:52 +02:00
|
|
|
#include "stdafx.h"
|
|
|
|
|
#include "rpcs3_version.h"
|
|
|
|
|
#include "git-version.h"
|
2019-09-11 09:55:43 +02:00
|
|
|
#include "Utilities/StrUtil.h"
|
2016-05-07 20:38:52 +02:00
|
|
|
|
|
|
|
|
namespace rpcs3
|
|
|
|
|
{
|
2017-09-16 13:54:25 +02:00
|
|
|
std::string get_branch()
|
|
|
|
|
{
|
|
|
|
|
return RPCS3_GIT_BRANCH;
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-11 09:55:43 +02:00
|
|
|
std::pair<std::string, std::string> get_commit_and_hash()
|
|
|
|
|
{
|
2019-10-22 05:12:44 +02:00
|
|
|
const auto commit_and_hash = fmt::split(RPCS3_GIT_VERSION, {"-"});
|
2019-09-11 09:55:43 +02:00
|
|
|
if (commit_and_hash.size() != 2)
|
|
|
|
|
return std::make_pair("0", "00000000");
|
|
|
|
|
|
|
|
|
|
return std::make_pair(commit_and_hash[0], commit_and_hash[1]);
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-17 22:17:20 +02:00
|
|
|
// TODO: Make this accessible from cmake and keep in sync with MACOSX_BUNDLE_BUNDLE_VERSION.
|
|
|
|
|
// Currently accessible by Windows and Linux build scripts, see implementations when doing MACOSX
|
2019-12-31 23:51:35 +01:00
|
|
|
const extern utils::version version{ 0, 0, 8, utils::version_type::alpha, 1, RPCS3_GIT_VERSION };
|
2016-05-07 20:38:52 +02:00
|
|
|
}
|