fix: Update nightly update detection logic to work with release changes

This commit is contained in:
WerWolv
2025-08-09 12:10:25 +02:00
parent 14ee688629
commit fd2d50508b
4 changed files with 29 additions and 6 deletions

View File

@@ -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;