feat: Added system to handle version migrations

This commit is contained in:
WerWolv
2024-12-26 14:00:50 +01:00
parent 9ce64ec6e1
commit 43c88a2fab
18 changed files with 178 additions and 31 deletions

View File

@@ -331,9 +331,9 @@ namespace hex::init {
// Draw version information
// In debug builds, also display the current commit hash and branch
#if defined(DEBUG)
const static auto VersionInfo = hex::format("{0} : {1}@{2}", ImHexApi::System::getImHexVersion(), ImHexApi::System::getCommitBranch(), ImHexApi::System::getCommitHash());
const static auto VersionInfo = hex::format("{0} : {1}@{2}", ImHexApi::System::getImHexVersion().get(), ImHexApi::System::getCommitBranch(), ImHexApi::System::getCommitHash());
#else
const static auto VersionInfo = hex::format("{0}", ImHexApi::System::getImHexVersion());
const static auto VersionInfo = hex::format("{0}", ImHexApi::System::getImHexVersion().get());
#endif
drawList->AddText(ImVec2((this->m_splashBackgroundTexture.getSize().x - ImGui::CalcTextSize(VersionInfo.c_str()).x) / 2, 105), ImColor(0xFF, 0xFF, 0xFF, 0xFF), VersionInfo.c_str());

View File

@@ -40,7 +40,7 @@ int main(int argc, char **argv) {
}
// Log some system information to aid debugging when users share their logs
log::info("Welcome to ImHex {}!", ImHexApi::System::getImHexVersion());
log::info("Welcome to ImHex {}!", ImHexApi::System::getImHexVersion().get());
log::info("Compiled using commit {}@{}", ImHexApi::System::getCommitBranch(), ImHexApi::System::getCommitHash());
log::info("Running on {} {} ({})", ImHexApi::System::getOSName(), ImHexApi::System::getOSVersion(), ImHexApi::System::getArchitecture());
#if defined(OS_LINUX)