From e585b6db1b95ab09b40a16c524aa56740bfef12c Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 14 Jun 2024 11:22:52 +0200 Subject: [PATCH 1/3] Remove the debug defines when building with RelWithDebInfo --- CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d3cb270ed..2d769e5313 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,9 +191,6 @@ target_compile_definitions(_CuraEngine $<$:ASSERT_INSANE_OUTPUT> $<$:USE_CPU_TIME> $<$:DEBUG> - $<$:ASSERT_INSANE_OUTPUT> - $<$:USE_CPU_TIME> - $<$:DEBUG> ) enable_sanitizers(_CuraEngine) From d908ee8146862be38d3f89f552f15056276372e5 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 18 Jun 2024 15:16:44 +0200 Subject: [PATCH 2/3] Add message to indicate that the engine has been built in debug mode CURA-11821 --- include/Application.h | 10 +++++++++- src/Application.cpp | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/include/Application.h b/include/Application.h index a301f3565b..1aa38adcdd 100644 --- a/include/Application.h +++ b/include/Application.h @@ -105,10 +105,18 @@ class Application : NoCopy #endif // ARCUS /*! - * \brief Print the header and license to the stderr channel. + * \brief Print the header to the stderr channel. + */ + void printHeader() const; + + /*! + * \brief Print the license to the stderr channel. */ void printLicense() const; + /*! Print a big warning when the code has been build in debug mode, otherwise just issue a small nice message. */ + void printDebugWarning() const; + /*! * \brief Start slicing. * \param argc The number of arguments provided to the application. diff --git a/src/Application.cpp b/src/Application.cpp index cb0f17b297..a2a271f617 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -148,10 +148,49 @@ void Application::printHelp() const fmt::print("\n"); } -void Application::printLicense() const +void Application::printHeader() const { fmt::print("\n"); fmt::print("Cura_SteamEngine version {}\n", CURA_ENGINE_VERSION); + +#ifdef DEBUG + fmt::print("\n"); + fmt::print(" _______ ________ _______ __ __ ______\n"); + fmt::print("/ \\ / |/ \\ / | / | / \\\n"); + fmt::print("███████ |████████/ ███████ |██ | ██ |/██████ |\n"); + fmt::print("██ | ██ |██ |__ ██ |__██ |██ | ██ |██ | _██/\n"); + fmt::print("██ | ██ |██ | ██ ██< ██ | ██ |██ |/ |\n"); + fmt::print("██ | ██ |█████/ ███████ |██ | ██ |██ |████ |\n"); + fmt::print("██ |__██ |██ |_____ ██ |__██ |██ \\__██ |██ \\__██ |\n"); + fmt::print("██ ██/ ██ |██ ██/ ██ ██/ ██ ██/\n"); + fmt::print("███████/ ████████/ ███████/ ██████/ ██████/\n"); + fmt::print("\n"); + fmt::print(" __ __ ______ _______ ________\n"); + fmt::print("/ \\ / | / \\ / \\ / |\n"); + fmt::print("██ \\ /██ |/██████ |███████ |████████/\n"); + fmt::print("███ \\ /███ |██ | ██ |██ | ██ |██ |__\n"); + fmt::print("████ /████ |██ | ██ |██ | ██ |██ |\n"); + fmt::print("██ ██ ██/██ |██ | ██ |██ | ██ |█████/\n"); + fmt::print("██ |███/ ██ |██ \\__██ |██ |__██ |██ |_____\n"); + fmt::print("██ | █/ ██ |██ ██/ ██ ██/ ██ |\n"); + fmt::print("██/ ██/ ██████/ ███████/ ████████/\n"); + fmt::print("\n"); + + fmt::print("#########################################################\n"); + fmt::print("#########################################################\n"); + fmt::print("## WARNING: This version of CuraEngine has been built ##\n"); + fmt::print("## in developper mode. This may impact performances, ##\n"); + fmt::print("## provoke unexpected results or crashes. ##\n"); + fmt::print("## If you downloaded an official version of CuraEngine ##\n"); + fmt::print("## and see this message, please report the issue. ##\n"); + fmt::print("#########################################################\n"); + fmt::print("#########################################################\n"); +#endif +} + +void Application::printLicense() const +{ + fmt::print("\n"); fmt::print("Copyright (C) 2024 Ultimaker\n"); fmt::print("\n"); fmt::print("This program is free software: you can redistribute it and/or modify\n"); @@ -184,6 +223,7 @@ void Application::run(const size_t argc, char** argv) argc_ = argc; argv_ = argv; + printHeader(); printLicense(); Progress::init(); From 72bcdb05577839262b7f0f448b23f6c6ab70862e Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 19 Jun 2024 08:47:37 +0200 Subject: [PATCH 3/3] Remove useless function --- include/Application.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/Application.h b/include/Application.h index 1aa38adcdd..205766f62f 100644 --- a/include/Application.h +++ b/include/Application.h @@ -114,9 +114,6 @@ class Application : NoCopy */ void printLicense() const; - /*! Print a big warning when the code has been build in debug mode, otherwise just issue a small nice message. */ - void printDebugWarning() const; - /*! * \brief Start slicing. * \param argc The number of arguments provided to the application.