Add icon type switch to CMake and de-duplicate wide version strings
This commit is contained in:
@@ -88,6 +88,15 @@ CMAKE_DEPENDENT_OPTION(VNC "VNC renderer" ON "DEV_BRANCH" OFF)
|
||||
CMAKE_DEPENDENT_OPTION(XL24 "ATI VGA Wonder XL24 (ATI-28800-6)" ON "DEV_BRANCH" OFF)
|
||||
CMAKE_DEPENDENT_OPTION(VECT486VL "HP Vectra 486VL" ON "DEV_BRANCH" OFF)
|
||||
|
||||
string(TOLOWER "${BUILD_TYPE}" BUILD_TYPE_LOWER)
|
||||
if(BUILD_TYPE_LOWER STREQUAL "release")
|
||||
add_compile_definitions(RELEASE_BUILD)
|
||||
elseif(BUILD_TYPE_LOWER STREQUAL "beta")
|
||||
add_compile_definitions(BETA_BUILD)
|
||||
elseif(BUILD_TYPE_LOWER STREQUAL "alpha")
|
||||
add_compile_definitions(ALPHA_BUILD)
|
||||
endif()
|
||||
|
||||
# HACK: Avoid a MSVC2019 compiler bug on ARM64 Debug builds
|
||||
if(MSVC_TOOLSET_VERSION GREATER_EQUAL 142 AND ARCH STREQUAL "arm64")
|
||||
# Define a cache option in case somebody wants to disable this workaround
|
||||
|
@@ -665,7 +665,7 @@ usage:
|
||||
info = localtime(&now);
|
||||
strftime(temp, sizeof(temp), "%Y/%m/%d %H:%M:%S", info);
|
||||
pclog("#\n# %ls v%ls logfile, created %s\n#\n",
|
||||
EMU_NAME_W, EMU_VERSION_W, temp);
|
||||
EMU_NAME_W, EMU_VERSION_FULL_W, temp);
|
||||
pclog("# VM: %s\n#\n", vm_name);
|
||||
pclog("# Emulator path: %s\n", exe_path);
|
||||
pclog("# Userfiles path: %s\n", usr_path);
|
||||
|
@@ -13,19 +13,37 @@
|
||||
* Copyright 2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#define _LSTR(s) L ## s
|
||||
#define LSTR(s) _LSTR(s)
|
||||
|
||||
/* Version info. */
|
||||
#define EMU_NAME "@CMAKE_PROJECT_NAME@"
|
||||
#define EMU_NAME_W L"@CMAKE_PROJECT_NAME@"
|
||||
#define EMU_NAME_W LSTR(EMU_NAME)
|
||||
|
||||
#define EMU_VERSION "@CMAKE_PROJECT_VERSION@"
|
||||
#define EMU_VERSION_W L"@CMAKE_PROJECT_VERSION@"
|
||||
#define EMU_VERSION_EX "@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@0"
|
||||
#define EMU_VERSION_W LSTR(EMU_VERSION)
|
||||
#define EMU_VERSION_EX "@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@@CMAKE_PROJECT_VERSION_PATCH@"
|
||||
#define EMU_VERSION_MAJ @CMAKE_PROJECT_VERSION_MAJOR@
|
||||
#define EMU_VERSION_MIN @CMAKE_PROJECT_VERSION_MINOR@
|
||||
|
||||
#define COPYRIGHT_YEAR "2020"
|
||||
#cmakedefine EMU_BUILD "@EMU_BUILD@"
|
||||
#cmakedefine EMU_GIT_HASH "@EMU_GIT_HASH@"
|
||||
|
||||
#ifdef EMU_BUILD
|
||||
# define EMU_BUILD_W LSTR(EMU_BUILD)
|
||||
# define EMU_VERSION_FULL EMU_VERSION " [" EMU_BUILD "]"
|
||||
# define EMU_VERSION_FULL_W EMU_VERSION_W L" [" EMU_BUILD_W L"]"
|
||||
#else
|
||||
# define EMU_VERSION_FULL EMU_VERSION
|
||||
# define EMU_VERSION_FULL_W EMU_VERSION_W
|
||||
#endif
|
||||
#ifdef EMU_GIT_HASH
|
||||
# define EMU_GIT_HASH_W LSTR(EMU_GIT_HASH)
|
||||
#endif
|
||||
|
||||
#define COPYRIGHT_YEAR "2021"
|
||||
|
||||
/* Web URL info. */
|
||||
#define EMU_SITE L"@CMAKE_PROJECT_HOMEPAGE_URL@"
|
||||
#define EMU_SITE L"86box.net"
|
||||
#define EMU_ROMS_URL L"https://github.com/86Box/roms/releases/latest"
|
||||
#define EMU_DOCS_URL L"https://86box.readthedocs.io"
|
||||
|
@@ -459,7 +459,7 @@ sdl_init_common(int flags)
|
||||
sdl_h = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
/* Create the desktop-covering window. */
|
||||
_swprintf(temp, L"%s v%s", EMU_NAME_W, EMU_VERSION_W);
|
||||
_swprintf(temp, L"%s v%s", EMU_NAME_W, EMU_VERSION_FULL_W);
|
||||
sdl_parent_hwnd = CreateWindow(SDL_CLASS_NAME, temp, WS_POPUP, 0, 0, sdl_w, sdl_h,
|
||||
HWND_DESKTOP, NULL, hinstance, NULL);
|
||||
ShowWindow(sdl_parent_hwnd, FALSE);
|
||||
|
Reference in New Issue
Block a user