about summary refs log tree commit diff stats
path: root/src/build_info.c
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2025-04-28 15:39:22 +0800
committerGitHub <noreply@github.com>2025-04-28 09:39:22 +0200
commita221d50c1712849f4435cb9937c58f51fa71066f (patch)
treec050f7fbca83c424d60f8656ca47f3e64548222e /src/build_info.c
parent4441be7a020e1fe3a0a7ebf6701402c135aa4edd (diff)
downloadbox64-a221d50c1712849f4435cb9937c58f51fa71066f.tar.gz
box64-a221d50c1712849f4435cb9937c58f51fa71066f.zip
Show Dynarec architecture in version string (#2580)
Diffstat (limited to 'src/build_info.c')
-rw-r--r--src/build_info.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/build_info.c b/src/build_info.c
index 69cebbee..612a8871 100644
--- a/src/build_info.c
+++ b/src/build_info.c
@@ -1,27 +1,25 @@
 #include <stdio.h>
 #include "debug.h"
 #include "box64version.h"
-#ifdef NOGIT
-#define GITREV "nogit"
+#include "build_info.h"
+
+#if defined(DYNAREC)
+#define WITH_DYNAREC_STR " with Dynarec"
+#else
+#define WITH_DYNAREC_STR ""
+#endif
+
+#ifdef HAVE_TRACE
+#define WITH_TRACE_STR " with trace"
 #else
-#include "git_head.h"
+#define WITH_TRACE_STR ""
 #endif
 
-void PrintBox64Version()
+void PrintBox64Version(int prefix)
 {
-    printf_ftrace(1, "Box64%s%s v%d.%d.%d %s built on %s %s\n",
-    #ifdef HAVE_TRACE
-        " with trace",
-    #else
-        "",
-    #endif
-    #ifdef DYNAREC
-        " with Dynarec",
-    #else
-        "",
-    #endif
-        BOX64_MAJOR, BOX64_MINOR, BOX64_REVISION,
-        GITREV,
+    printf_ftrace(prefix, BOX64_BUILD_INFO_STRING WITH_DYNAREC_STR WITH_TRACE_STR " built on %s %s\n",
         __DATE__, __TIME__);
 }
 
+#undef WITH_TRACE
+#undef WITH_DYNAREC