about summary refs log tree commit diff stats
path: root/src/core.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/core.c
parent4441be7a020e1fe3a0a7ebf6701402c135aa4edd (diff)
downloadbox64-a221d50c1712849f4435cb9937c58f51fa71066f.tar.gz
box64-a221d50c1712849f4435cb9937c58f51fa71066f.zip
Show Dynarec architecture in version string (#2580)
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/core.c b/src/core.c
index 7d76d2fe..f94042c9 100644
--- a/src/core.c
+++ b/src/core.c
@@ -186,7 +186,7 @@ void openFTrace(int reopen)
                     printf("BOX64 Trace %s to \"%s\"\n", append?"appended":"redirected", p);
                     box64_stdout_no_w = 1;
                 }
-                PrintBox64Version();
+                PrintBox64Version(0);
             }
         }
     }
@@ -570,11 +570,11 @@ void AddNewLibs(const char* list)
 }
 
 void PrintHelp() {
-    printf_ftrace(1, "This is Box64, the Linux x86_64 emulator with a twist.\n");
-    printf_ftrace(1, "Usage is 'box64 [options] path/to/software [args]' to launch x86_64 software.\n");
-    printf_ftrace(1, " options are:\n");
-    printf_ftrace(1, "    '-v'|'--version' to print box64 version and quit\n");
-    printf_ftrace(1, "    '-h'|'--help' to print this and quit\n");
+    printf_ftrace(0, "This is Box64, the Linux x86_64 emulator with a twist.\n");
+    printf_ftrace(0, "Usage is 'box64 [options] path/to/software [args]' to launch x86_64 software.\n");
+    printf_ftrace(0, " options are:\n");
+    printf_ftrace(0, "    '-v'|'--version' to print box64 version and quit\n");
+    printf_ftrace(0, "    '-h'|'--help' to print this and quit\n");
 }
 
 static void addLibPaths(box64context_t* context)
@@ -895,12 +895,12 @@ int initialize(int argc, const char **argv, char** env, x64emu_t** emulator, elf
     init_auxval(argc, argv, environ?environ:env);
     // analogue to QEMU_VERSION in qemu-user-mode emulation
     if(getenv("BOX64_VERSION")) {
-        PrintBox64Version();
+        PrintBox64Version(0);
         exit(0);
     }
     // trying to open and load 1st arg
     if(argc==1) {
-        /*PrintBox64Version();
+        /*PrintBox64Version(1);
         PrintHelp();
         return 1;*/
         printf("[BOX64] Missing operand after 'box64'\n");
@@ -921,15 +921,12 @@ int initialize(int argc, const char **argv, char** env, x64emu_t** emulator, elf
     LoadEnvVariables();
     InitializeEnvFiles();
 
-    if (!BOX64ENV(nobanner)) PrintBox64Version();
-
-
     const char* prog = argv[1];
     int nextarg = 1;
     // check if some options are passed
     while(prog && prog[0]=='-') {
         if(!strcmp(prog, "-v") || !strcmp(prog, "--version")) {
-            if (BOX64ENV(nobanner)) PrintBox64Version();
+            PrintBox64Version(0);
             exit(0);
         }
         if(!strcmp(prog, "-h") || !strcmp(prog, "--help")) {
@@ -949,6 +946,8 @@ int initialize(int argc, const char **argv, char** env, x64emu_t** emulator, elf
         exit(0);
     }
 
+    if (!BOX64ENV(nobanner)) PrintBox64Version(1);
+
     displayMiscInfo();
 
     hookMangoHud();