mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
fix: Update nightly update detection logic to work with release changes
This commit is contained in:
@@ -883,7 +883,7 @@ namespace hex {
|
||||
}
|
||||
|
||||
SemanticVersion getImHexVersion() {
|
||||
#if defined IMHEX_VERSION
|
||||
#if defined(IMHEX_VERSION)
|
||||
static auto version = SemanticVersion(IMHEX_VERSION);
|
||||
return version;
|
||||
#else
|
||||
@@ -892,7 +892,7 @@ namespace hex {
|
||||
}
|
||||
|
||||
std::string getCommitHash(bool longHash) {
|
||||
#if defined GIT_COMMIT_HASH_LONG
|
||||
#if defined(GIT_COMMIT_HASH_LONG)
|
||||
if (longHash) {
|
||||
return GIT_COMMIT_HASH_LONG;
|
||||
} else {
|
||||
@@ -905,13 +905,21 @@ namespace hex {
|
||||
}
|
||||
|
||||
std::string getCommitBranch() {
|
||||
#if defined GIT_BRANCH
|
||||
#if defined(GIT_BRANCH)
|
||||
return GIT_BRANCH;
|
||||
#else
|
||||
return "Unknown";
|
||||
#endif
|
||||
}
|
||||
|
||||
std::optional<std::chrono::system_clock::time_point> getBuildTime() {
|
||||
#if defined(IMHEX_BUILD_DATE)
|
||||
return hex::parseTime("%Y-%m-%dT%H:%M:%SZ", IMHEX_BUILD_DATE);
|
||||
#else
|
||||
return std::nullopt;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool isDebugBuild() {
|
||||
#if defined DEBUG
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user