diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-02-08 20:50:37 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-02-09 09:20:17 +0100 |
commit | 90162851a79f46a0e8887e9a403b9ee4db333eb9 (patch) | |
tree | 8bc70136e480e953a1b064c8b728165058934a54 /platform/osx | |
parent | 3cb9dc78d6001af550f125bb6f8b7da27a291add (diff) |
Core: Move generated `VERSION_HASH` to a `.cpp` file
This lets us have its definition in `core/version.h` and avoid
rebuilding a handful of files every time the commit hash changes.
Diffstat (limited to 'platform/osx')
-rw-r--r-- | platform/osx/crash_handler_osx.mm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/platform/osx/crash_handler_osx.mm b/platform/osx/crash_handler_osx.mm index 16be941308..3e640b3bf3 100644 --- a/platform/osx/crash_handler_osx.mm +++ b/platform/osx/crash_handler_osx.mm @@ -33,7 +33,6 @@ #include "core/config/project_settings.h" #include "core/os/os.h" #include "core/version.h" -#include "core/version_hash.gen.h" #include "main/main.h" #include <string.h> @@ -94,10 +93,10 @@ static void handle_crash(int sig) { OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_CRASH); // Print the engine version just before, so that people are reminded to include the version in backtrace reports. - if (String(VERSION_HASH).length() != 0) { - fprintf(stderr, "Engine version: " VERSION_FULL_NAME " (" VERSION_HASH ")\n"); + if (String(VERSION_HASH).is_empty()) { + fprintf(stderr, "Engine version: %s\n", VERSION_FULL_NAME); } else { - fprintf(stderr, "Engine version: " VERSION_FULL_NAME "\n"); + fprintf(stderr, "Engine version: %s (%s)\n", VERSION_FULL_NAME, VERSION_HASH); } fprintf(stderr, "Dumping the backtrace. %s\n", msg.utf8().get_data()); char **strings = backtrace_symbols(bt_buffer, size); |