From 23efba22f124a8e5cec2495879dca4b0f509e70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 26 Jun 2020 13:26:42 +0200 Subject: [PATCH] include: move version defines out to version.h --- src/disk/hdc_ide.c | 1 + src/include/86box/86box.h | 20 -------------------- src/include/86box/version.h | 29 +++++++++++++++++++++++++++++ src/mem/spd.c | 1 + src/pc.c | 1 + src/scsi/scsi_cdrom.c | 1 + src/scsi/scsi_disk.c | 1 + src/win/86Box.rc | 1 + src/win/win.c | 1 + src/win/win_about.c | 1 + src/win/win_sdl.c | 1 + 11 files changed, 38 insertions(+), 20 deletions(-) create mode 100644 src/include/86box/version.h diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index 5c40d1b69..941faf29f 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -46,6 +46,7 @@ #include <86box/hdc_ide.h> #include <86box/hdd.h> #include <86box/zip.h> +#include <86box/version.h> /* Bits of 'atastat' */ diff --git a/src/include/86box/86box.h b/src/include/86box/86box.h index bbb37895e..e97967cec 100644 --- a/src/include/86box/86box.h +++ b/src/include/86box/86box.h @@ -26,26 +26,6 @@ #define SCREEN_RES_X 640 #define SCREEN_RES_Y 480 -/* Version info. */ -#define EMU_NAME "86Box" -#define EMU_NAME_W L"86Box" -#ifdef RELEASE_BUILD -#define EMU_VERSION "2.07" -#define EMU_VERSION_W L"2.07" -#define EMU_VERSION_MAJ 2 -#define EMU_VERSION_MIN 7 -#else -#define EMU_VERSION "2.10" -#define EMU_VERSION_W L"2.10" -#define EMU_VERSION_MAJ 2 -#define EMU_VERSION_MIN 10 -#endif -#define COPYRIGHT_YEAR "2020" - -/* Web URL info. */ -#define EMU_SITE L"86box.github.io" -#define EMU_ROMS_URL L"https://github.com/86Box/roms/releases/latest" - /* Filename and pathname info. */ #define CONFIG_FILE L"86box.cfg" #define NVR_PATH L"nvr" diff --git a/src/include/86box/version.h b/src/include/86box/version.h new file mode 100644 index 000000000..ee5dbba80 --- /dev/null +++ b/src/include/86box/version.h @@ -0,0 +1,29 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Definitions for project version, branding, and external links. + * + * Authors: Miran Grca, + * + * Copyright 2020 Miran Grca. + */ + +/* Version info. */ +#define EMU_NAME "86Box" +#define EMU_NAME_W L"86Box" + +#define EMU_VERSION "2.10" +#define EMU_VERSION_W L"2.10" +#define EMU_VERSION_MAJ 2 +#define EMU_VERSION_MIN 10 + +#define COPYRIGHT_YEAR "2020" + +/* Web URL info. */ +#define EMU_SITE L"86box.github.io" +#define EMU_ROMS_URL L"https://github.com/86Box/roms/releases/latest" \ No newline at end of file diff --git a/src/mem/spd.c b/src/mem/spd.c index 84ba3eb84..c0f288793 100644 --- a/src/mem/spd.c +++ b/src/mem/spd.c @@ -25,6 +25,7 @@ #include <86box/device.h> #include <86box/smbus.h> #include <86box/spd.h> +#include <86box/version.h> #define MIN(a, b) ((a) < (b) ? (a) : (b)) diff --git a/src/pc.c b/src/pc.c index 574b81d58..0a7ea9b14 100644 --- a/src/pc.c +++ b/src/pc.c @@ -77,6 +77,7 @@ #include <86box/ui.h> #include <86box/plat.h> #include <86box/plat_midi.h> +#include <86box/version.h> /* Stuff that used to be globally declared in plat.h but is now extern there diff --git a/src/scsi/scsi_cdrom.c b/src/scsi/scsi_cdrom.c index 8e1b5a55d..f8a7e96fa 100644 --- a/src/scsi/scsi_cdrom.c +++ b/src/scsi/scsi_cdrom.c @@ -36,6 +36,7 @@ #include <86box/ui.h> #include <86box/cdrom.h> #include <86box/scsi_cdrom.h> +#include <86box/version.h> #pragma pack(push,1) diff --git a/src/scsi/scsi_disk.c b/src/scsi/scsi_disk.c index 19d87bfa6..2f3850292 100644 --- a/src/scsi/scsi_disk.c +++ b/src/scsi/scsi_disk.c @@ -30,6 +30,7 @@ #include <86box/plat.h> #include <86box/ui.h> #include <86box/scsi_disk.h> +#include <86box/version.h> #define scsi_disk_sense_error dev->sense[0] diff --git a/src/win/86Box.rc b/src/win/86Box.rc index 6ceab5ab7..9b0d829eb 100644 --- a/src/win/86Box.rc +++ b/src/win/86Box.rc @@ -22,6 +22,7 @@ #include <86box/resource.h> #include <86box/86box.h> #include <86box/plat.h> +#include <86box/version.h> #undef IN_RESOURCE_H #define APSTUDIO_READONLY_SYMBOLS diff --git a/src/win/win.c b/src/win/win.c index c109c9b8b..6a2d685ea 100644 --- a/src/win/win.c +++ b/src/win/win.c @@ -47,6 +47,7 @@ #endif #include <86box/win_sdl.h> #include <86box/win.h> +#include <86box/version.h> typedef struct { diff --git a/src/win/win_about.c b/src/win/win_about.c index b09efa478..7ca81cd2c 100644 --- a/src/win/win_about.c +++ b/src/win/win_about.c @@ -30,6 +30,7 @@ #include <86box/86box.h> #include <86box/plat.h> #include <86box/win.h> +#include <86box/version.h> void diff --git a/src/win/win_sdl.c b/src/win/win_sdl.c index d80cbe222..b71595c58 100644 --- a/src/win/win_sdl.c +++ b/src/win/win_sdl.c @@ -70,6 +70,7 @@ #include <86box/ui.h> #include <86box/win.h> #include <86box/win_sdl.h> +#include <86box/version.h> #define RENDERER_FULL_SCREEN 1