Display Commit ID Used for Build in AboutDialog (#6516)

* Display commit ID used for build in AboutDialog

* Dynamically check for snapshots

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
ElectricalBoy 2025-01-03 01:38:25 +09:00 committed by GitHub
parent 02438e25bc
commit 091ab68811
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 36 additions and 0 deletions

View file

@ -259,8 +259,19 @@ AboutDialog::AboutDialog()
version->SetBackgroundColour(wxColour("#4d4d4d"));
bs_version->SetBackgroundColour(wxColour("#4d4d4d"));
#ifdef SNAPSHOT_BUILD
auto build_string = _L("build") + " " + std::string(GIT_COMMIT_HASH);
wxStaticText* version_build = new wxStaticText(this, wxID_ANY, build_string.c_str(), wxDefaultPosition, wxDefaultSize);
version_build->SetFont(Label::Body_12);
version_build->SetForegroundColour(wxColour("#FFFFFD"));
version_build->SetBackgroundColour(wxColour("#4d4d4d"));
#endif
vesizer->Add(version, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
#ifdef SNAPSHOT_BUILD
vesizer->Add(version_build, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
#endif
vesizer->Add(bs_version, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
// #if BBL_INTERNAL_TESTING
// wxString build_time = wxString::Format("Build Time: %s", std::string(SLIC3R_BUILD_TIME));