mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-09 20:01:19 +08:00
Refine Version strings display
This commit is contained in:
parent
6f35373f5f
commit
030ac1c31b
25
include/version_string.h
Normal file
25
include/version_string.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#if WIN32 && !defined(HX_DOS)
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define OS_PLATFORM "Windows"
|
||||||
|
#elif defined(__MINGW32__)
|
||||||
|
#define OS_PLATFORM "MinGW"
|
||||||
|
#else
|
||||||
|
#define OS_PLATFORM "Windows"
|
||||||
|
#endif
|
||||||
|
#elif defined(HX_DOS)
|
||||||
|
#define OS_PLATFORM "DOS"
|
||||||
|
#elif defined(LINUX)
|
||||||
|
#define OS_PLATFORM "Linux"
|
||||||
|
#elif defined(MACOSX)
|
||||||
|
#define OS_PLATFORM "macOS"
|
||||||
|
#else
|
||||||
|
#define OS_PLATFORM ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_M_X64) || defined (_M_AMD64) || defined (_M_ARM64) || defined (_M_IA64) || defined(__ia64__) || defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
|
||||||
|
#define OS_BIT "64"
|
||||||
|
#define OS_BIT_INT 64
|
||||||
|
#else
|
||||||
|
#define OS_BIT "32"
|
||||||
|
#define OS_BIT_INT 32
|
||||||
|
#endif
|
@ -63,6 +63,7 @@
|
|||||||
|
|
||||||
#include "SDL_syswm.h"
|
#include "SDL_syswm.h"
|
||||||
#include "sdlmain.h"
|
#include "sdlmain.h"
|
||||||
|
#include "version_string.h"
|
||||||
|
|
||||||
#if !defined(HX_DOS)
|
#if !defined(HX_DOS)
|
||||||
#include "../libs/tinyfiledialogs/tinyfiledialogs.h"
|
#include "../libs/tinyfiledialogs/tinyfiledialogs.h"
|
||||||
@ -145,13 +146,9 @@ void getlogtext(std::string &str), getcodetext(std::string &text), ApplySetting(
|
|||||||
void ttf_switch_on(bool ss=true), ttf_switch_off(bool ss=true), setAspectRatio(Section_prop * section), GFX_ForceRedrawScreen(void), SetWindowTransparency(int trans);
|
void ttf_switch_on(bool ss=true), ttf_switch_off(bool ss=true), setAspectRatio(Section_prop * section), GFX_ForceRedrawScreen(void), SetWindowTransparency(int trans);
|
||||||
bool CheckQuit(void), OpenGL_using(void);
|
bool CheckQuit(void), OpenGL_using(void);
|
||||||
char tmp1[CROSS_LEN*2], tmp2[CROSS_LEN];
|
char tmp1[CROSS_LEN*2], tmp2[CROSS_LEN];
|
||||||
const char *aboutmsg = "DOSBox-X version " VERSION " ("
|
const char *aboutmsg = "DOSBox-X ver." VERSION " (" OS_PLATFORM " " SDL_STRING " " OS_BIT "-bit)\n" \
|
||||||
#if defined(_M_X64) || defined (_M_AMD64) || defined (_M_ARM64) || defined (_M_IA64) || defined(__ia64__) || defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
|
"Build date/time: " UPDATED_STR "\nCopyright 2011-" COPYRIGHT_END_YEAR \
|
||||||
"64"
|
" The DOSBox-X Team\nProject maintainer: joncampbell123\nDOSBox-X homepage: https://dosbox-x.com";
|
||||||
#else
|
|
||||||
"32"
|
|
||||||
#endif
|
|
||||||
"-bit " SDL_STRING ")\nBuild date/time: " UPDATED_STR "\nCopyright 2011-" COPYRIGHT_END_YEAR " The DOSBox-X Team\nProject maintainer: joncampbell123\nDOSBox-X homepage: https://dosbox-x.com";
|
|
||||||
|
|
||||||
void RebootConfig(std::string filename, bool confirm=false) {
|
void RebootConfig(std::string filename, bool confirm=false) {
|
||||||
std::string exepath=GetDOSBoxXPath(true), para="-conf \""+filename+"\"";
|
std::string exepath=GetDOSBoxXPath(true), para="-conf \""+filename+"\"";
|
||||||
|
@ -246,6 +246,7 @@ extern "C" void sdl1_hax_macosx_highdpi_set_enable(const bool enable);
|
|||||||
|
|
||||||
#include "sdlmain.h"
|
#include "sdlmain.h"
|
||||||
#include "build_timestamp.h"
|
#include "build_timestamp.h"
|
||||||
|
#include "version_string.h"
|
||||||
|
|
||||||
#if C_OPENGL
|
#if C_OPENGL
|
||||||
namespace gl2 {
|
namespace gl2 {
|
||||||
@ -8556,19 +8557,7 @@ int main(int argc, char* argv[]) SDL_MAIN_NOEXCEPT {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* -- Welcome to DOSBox-X! */
|
/* -- Welcome to DOSBox-X! */
|
||||||
LOG_MSG("DOSBox-X version %s ("
|
LOG_MSG("DOSBox-X version %s (%s %s %d-bit)",VERSION, OS_PLATFORM, SDL_STRING, OS_BIT_INT);
|
||||||
#if defined(WIN32)
|
|
||||||
"Windows"
|
|
||||||
#elif defined(HX_DOS)
|
|
||||||
"DOS"
|
|
||||||
#elif defined(LINUX)
|
|
||||||
"Linux"
|
|
||||||
#elif defined(MACOSX)
|
|
||||||
"macOS"
|
|
||||||
#else
|
|
||||||
""
|
|
||||||
#endif
|
|
||||||
" %s)",VERSION,SDL_STRING);
|
|
||||||
LOG(LOG_MISC,LOG_NORMAL)("Copyright 2011-%s The DOSBox-X Team. Project maintainer: joncampbell123 (The Great Codeholio). DOSBox-X published under GNU GPL.",std::string(COPYRIGHT_END_YEAR).c_str());
|
LOG(LOG_MISC,LOG_NORMAL)("Copyright 2011-%s The DOSBox-X Team. Project maintainer: joncampbell123 (The Great Codeholio). DOSBox-X published under GNU GPL.",std::string(COPYRIGHT_END_YEAR).c_str());
|
||||||
|
|
||||||
#if defined(MACOSX)
|
#if defined(MACOSX)
|
||||||
|
@ -52,6 +52,7 @@ extern bool PS1AudioCard;
|
|||||||
#include "sdlmain.h"
|
#include "sdlmain.h"
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include "version_string.h"
|
||||||
|
|
||||||
#if defined(DB_HAVE_CLOCK_GETTIME) && ! defined(WIN32)
|
#if defined(DB_HAVE_CLOCK_GETTIME) && ! defined(WIN32)
|
||||||
//time.h is already included
|
//time.h is already included
|
||||||
@ -509,7 +510,7 @@ void dosbox_integration_trigger_read() {
|
|||||||
dosbox_int_register = 0;
|
dosbox_int_register = 0;
|
||||||
#endif
|
#endif
|
||||||
if (control->opt_securemode || control->SecureMode()) dosbox_int_register = 0;
|
if (control->opt_securemode || control->SecureMode()) dosbox_int_register = 0;
|
||||||
#if defined(_M_X64) || defined (_M_AMD64) || defined (_M_ARM64) || defined (_M_IA64) || defined(__ia64__) || defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
|
#if OS_BIT_INT == 64
|
||||||
dosbox_int_register += 0x20; // 64-bit
|
dosbox_int_register += 0x20; // 64-bit
|
||||||
#else
|
#else
|
||||||
dosbox_int_register += 0x10; // 32-bit
|
dosbox_int_register += 0x10; // 32-bit
|
||||||
@ -9253,12 +9254,7 @@ private:
|
|||||||
strcpy(logostr[3], "| D O S B o x - X ! |");
|
strcpy(logostr[3], "| D O S B o x - X ! |");
|
||||||
strcpy(logostr[4], "| |");
|
strcpy(logostr[4], "| |");
|
||||||
sprintf(logostr[5],"| %d-bit %s |",
|
sprintf(logostr[5],"| %d-bit %s |",
|
||||||
#if defined(_M_X64) || defined (_M_AMD64) || defined (_M_ARM64) || defined (_M_IA64) || defined(__ia64__) || defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)^M
|
OS_BIT_INT, SDL_STRING);
|
||||||
64
|
|
||||||
#else
|
|
||||||
32
|
|
||||||
#endif
|
|
||||||
, SDL_STRING);
|
|
||||||
sprintf(logostr[6], "| Version %10s |", VERSION);
|
sprintf(logostr[6], "| Version %10s |", VERSION);
|
||||||
strcpy(logostr[7], "+---------------------+");
|
strcpy(logostr[7], "+---------------------+");
|
||||||
startfunction:
|
startfunction:
|
||||||
@ -9970,7 +9966,8 @@ public:
|
|||||||
else if (s == "false" || s == "0")
|
else if (s == "false" || s == "0")
|
||||||
isa_memory_hole_15mb = false;
|
isa_memory_hole_15mb = false;
|
||||||
else if (IS_PC98_ARCH)
|
else if (IS_PC98_ARCH)
|
||||||
isa_memory_hole_15mb = true;
// For the sake of some DOS games, enable by default
|
isa_memory_hole_15mb = true;
|
||||||
|
// For the sake of some DOS games, enable by default
|
||||||
else
|
else
|
||||||
isa_memory_hole_15mb = false;
|
isa_memory_hole_15mb = false;
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
#include "sdlmain.h"
|
#include "sdlmain.h"
|
||||||
#include "menudef.h"
|
#include "menudef.h"
|
||||||
#include "build_timestamp.h"
|
#include "build_timestamp.h"
|
||||||
|
#include "version_string.h"
|
||||||
|
|
||||||
#include <output/output_ttf.h>
|
#include <output/output_ttf.h>
|
||||||
|
|
||||||
@ -235,7 +236,7 @@ bool DOS_Shell::CheckConfig(char* cmd_in,char*line) {
|
|||||||
bool enable_config_as_shell_commands = false;
|
bool enable_config_as_shell_commands = false;
|
||||||
|
|
||||||
bool DOS_Shell::execute_shell_cmd(char *name, char *arguments) {
|
bool DOS_Shell::execute_shell_cmd(char *name, char *arguments) {
|
||||||
SHELL_Cmd shell_cmd = {};
|
// SHELL_Cmd shell_cmd = {}; /* unused */
|
||||||
uint32_t cmd_index=0;
|
uint32_t cmd_index=0;
|
||||||
while (cmd_list[cmd_index].name) {
|
while (cmd_list[cmd_index].name) {
|
||||||
if (strcasecmp(cmd_list[cmd_index].name,name)==0) {
|
if (strcasecmp(cmd_list[cmd_index].name,name)==0) {
|
||||||
@ -3401,9 +3402,10 @@ bool get_param(char *&args, char *&rem, char *&temp, char &wait_char, int &wait_
|
|||||||
void DOS_Shell::CMD_CHOICE(char * args){
|
void DOS_Shell::CMD_CHOICE(char * args){
|
||||||
HELP("CHOICE");
|
HELP("CHOICE");
|
||||||
static char defchoice[3] = {MSG_Get("INT21_6523_YESNO_CHARS")[0],MSG_Get("INT21_6523_YESNO_CHARS")[1],0};
|
static char defchoice[3] = {MSG_Get("INT21_6523_YESNO_CHARS")[0],MSG_Get("INT21_6523_YESNO_CHARS")[1],0};
|
||||||
char *rem1 = NULL, *rem2 = NULL, *rem = NULL, *temp = NULL, waitchar = 0, *ptr;
|
//char *rem1 = NULL, *rem2 = NULL; /* unused */
|
||||||
|
char *rem = NULL, *temp = NULL, waitchar = 0, *ptr;
|
||||||
int waitsec = 0;
|
int waitsec = 0;
|
||||||
bool optC = false, optT = false;
|
//bool optC = false, optT = false; /* unused */
|
||||||
bool optN = ScanCMDBool(args,"N");
|
bool optN = ScanCMDBool(args,"N");
|
||||||
bool optS = ScanCMDBool(args,"S"); //Case-sensitive matching
|
bool optS = ScanCMDBool(args,"S"); //Case-sensitive matching
|
||||||
// ignore /b and /m switches for compatibility
|
// ignore /b and /m switches for compatibility
|
||||||
@ -3705,7 +3707,7 @@ void DOS_Shell::CMD_VER(char *args) {
|
|||||||
dos_ver_menu(false);
|
dos_ver_menu(false);
|
||||||
} else {
|
} else {
|
||||||
WriteOut(MSG_Get("SHELL_CMD_VER_VER"),VERSION,SDL_STRING,dos.version.major,dos.version.minor);
|
WriteOut(MSG_Get("SHELL_CMD_VER_VER"),VERSION,SDL_STRING,dos.version.major,dos.version.minor);
|
||||||
if (optR) WriteOut("DOSBox-X Git commit %s, built on %s\n", GIT_COMMIT_HASH, UPDATED_STR);
|
if (optR) WriteOut("DOSBox-X Git commit %s, built on %s\nPlatform: %s %d-bit", GIT_COMMIT_HASH, UPDATED_STR, OS_PLATFORM, OS_BIT_INT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1699,6 +1699,7 @@ for /d %%i in ($(SolutionDir)\..\contrib\translations\*) do copy %%i\*.lng "$(Ou
|
|||||||
<ClInclude Include="..\include\util_math.h" />
|
<ClInclude Include="..\include\util_math.h" />
|
||||||
<ClInclude Include="..\include\util_pointer.h" />
|
<ClInclude Include="..\include\util_pointer.h" />
|
||||||
<ClInclude Include="..\include\util_units.h" />
|
<ClInclude Include="..\include\util_units.h" />
|
||||||
|
<ClInclude Include="..\include\version_string.h" />
|
||||||
<ClInclude Include="..\include\vga.h" />
|
<ClInclude Include="..\include\vga.h" />
|
||||||
<ClInclude Include="..\include\video.h" />
|
<ClInclude Include="..\include\video.h" />
|
||||||
<ClInclude Include="..\include\voodoo.h" />
|
<ClInclude Include="..\include\voodoo.h" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user