mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 10:47:50 -06:00
parent
091ab68811
commit
d1dfcbe168
2 changed files with 13 additions and 28 deletions
|
@ -24,16 +24,6 @@ endif()
|
||||||
|
|
||||||
find_package(Git)
|
find_package(Git)
|
||||||
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||||
# Check if Orca is on a tag
|
|
||||||
execute_process(
|
|
||||||
COMMAND ${GIT_EXECUTABLE} describe --exact-match --tags
|
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
||||||
RESULT_VARIABLE GIT_TAG_CHECK
|
|
||||||
)
|
|
||||||
if(NOT GIT_TAG_CHECK EQUAL 0)
|
|
||||||
add_definitions("-DSNAPSHOT_BUILD=1")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Check current Git commit hash
|
# Check current Git commit hash
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${GIT_EXECUTABLE} log -1 --format=%h
|
COMMAND ${GIT_EXECUTABLE} log -1 --format=%h
|
||||||
|
|
|
@ -241,11 +241,18 @@ AboutDialog::AboutDialog()
|
||||||
|
|
||||||
// version
|
// version
|
||||||
{
|
{
|
||||||
|
|
||||||
|
auto _build_string_font = Label::Body_10;
|
||||||
|
// _build_string_font.SetStyle(wxFONTSTYLE_ITALIC);
|
||||||
|
|
||||||
vesizer->Add(0, FromDIP(165), 1, wxEXPAND, FromDIP(5));
|
vesizer->Add(0, FromDIP(165), 1, wxEXPAND, FromDIP(5));
|
||||||
auto version_string = _L("Orca Slicer ") + " " + std::string(SoftFever_VERSION);
|
auto version_string = _L("Orca Slicer") + " " + std::string(SoftFever_VERSION);
|
||||||
wxStaticText* version = new wxStaticText(this, wxID_ANY, version_string.c_str(), wxDefaultPosition, wxDefaultSize);
|
wxStaticText* version = new wxStaticText(this, wxID_ANY, version_string.c_str(), wxDefaultPosition, wxDefaultSize);
|
||||||
wxStaticText* bs_version = new wxStaticText(this, wxID_ANY, wxString::Format("Based on PrusaSlicer and BambuStudio"), wxDefaultPosition, wxDefaultSize);
|
wxStaticText* credits_string = new wxStaticText(this, wxID_ANY,
|
||||||
bs_version->SetFont(Label::Body_12);
|
wxString::Format("Build %s.\nOrcaSlicer is based on PrusaSlicer and BambuStudio",
|
||||||
|
std::string(GIT_COMMIT_HASH)),
|
||||||
|
wxDefaultPosition, wxDefaultSize);
|
||||||
|
credits_string->SetFont(_build_string_font);
|
||||||
wxFont version_font = GetFont();
|
wxFont version_font = GetFont();
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
version_font.SetPointSize(version_font.GetPointSize()-1);
|
version_font.SetPointSize(version_font.GetPointSize()-1);
|
||||||
|
@ -255,24 +262,12 @@ AboutDialog::AboutDialog()
|
||||||
version_font.SetPointSize(FromDIP(16));
|
version_font.SetPointSize(FromDIP(16));
|
||||||
version->SetFont(version_font);
|
version->SetFont(version_font);
|
||||||
version->SetForegroundColour(wxColour("#FFFFFD"));
|
version->SetForegroundColour(wxColour("#FFFFFD"));
|
||||||
bs_version->SetForegroundColour(wxColour("#FFFFFD"));
|
credits_string->SetForegroundColour(wxColour("#FFFFFD"));
|
||||||
version->SetBackgroundColour(wxColour("#4d4d4d"));
|
version->SetBackgroundColour(wxColour("#4d4d4d"));
|
||||||
bs_version->SetBackgroundColour(wxColour("#4d4d4d"));
|
credits_string->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));
|
vesizer->Add(version, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
|
||||||
#ifdef SNAPSHOT_BUILD
|
vesizer->Add(credits_string, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
|
||||||
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
|
// #if BBL_INTERNAL_TESTING
|
||||||
// wxString build_time = wxString::Format("Build Time: %s", std::string(SLIC3R_BUILD_TIME));
|
// wxString build_time = wxString::Format("Build Time: %s", std::string(SLIC3R_BUILD_TIME));
|
||||||
// wxStaticText* build_time_text = new wxStaticText(this, wxID_ANY, build_time, wxDefaultPosition, wxDefaultSize);
|
// wxStaticText* build_time_text = new wxStaticText(this, wxID_ANY, build_time, wxDefaultPosition, wxDefaultSize);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue