/*
 * 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, <mgrca8@gmail.com>
 *
 *          Copyright 2020 Miran Grca.
 */
#ifndef EMU_VERSION_H
#define EMU_VERSION_H

#define _LSTR(s) L ## s
#define LSTR(s) _LSTR(s)

/* Version info. */
#define EMU_NAME    "@CMAKE_PROJECT_NAME@"
#define EMU_NAME_W  LSTR(EMU_NAME)

#define EMU_VERSION       "@CMAKE_PROJECT_VERSION@"
#define EMU_VERSION_W     LSTR(EMU_VERSION)
#define EMU_VERSION_EX    "3.50" /* frozen due to IDE re-detection behavior on Windows */
#define EMU_VERSION_MAJ   @CMAKE_PROJECT_VERSION_MAJOR@
#define EMU_VERSION_MIN   @CMAKE_PROJECT_VERSION_MINOR@
#define EMU_VERSION_PATCH @CMAKE_PROJECT_VERSION_PATCH@

#cmakedefine EMU_BUILD     "@EMU_BUILD@"
#define EMU_BUILD_NUM      @EMU_BUILD_NUM@
#cmakedefine EMU_GIT_HASH  "@EMU_GIT_HASH@"

#ifdef BETA_BUILD
# define EMU_VERSION_SUFFIX " Beta"
# define EMU_VERSION_ROMS_SUFFIX "-beta"
#else
# define EMU_VERSION_SUFFIX ""
# define EMU_VERSION_ROMS_SUFFIX ""
#endif
#ifdef EMU_BUILD
# define EMU_BUILD_W      LSTR(EMU_BUILD)
# define EMU_VERSION_FULL EMU_VERSION EMU_VERSION_SUFFIX " [" EMU_BUILD "]"
#else
# define EMU_VERSION_FULL EMU_VERSION EMU_VERSION_SUFFIX
#endif
#define EMU_VERSION_FULL_W LSTR(EMU_VERSION_FULL)
#ifdef EMU_GIT_HASH
# define EMU_GIT_HASH_W LSTR(EMU_GIT_HASH)
#endif

#define COPYRIGHT_YEAR "@EMU_COPYRIGHT_YEAR@"

/* Web URL info. */
#define EMU_SITE       "86box.net"
#define EMU_SITE_W     LSTR(EMU_SITE)
#if defined(RELEASE_BUILD) || defined(BETA_BUILD)
# define EMU_ROMS_URL  "https://github.com/@CMAKE_PROJECT_NAME@/roms/releases/v@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@" EMU_VERSION_ROMS_SUFFIX
# define EMU_DOCS_URL  "https://86box.readthedocs.io/en/v@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@/"
#else
# define EMU_ROMS_URL  "https://github.com/@CMAKE_PROJECT_NAME@/roms/releases/latest"
# define EMU_DOCS_URL  "https://86box.readthedocs.io"
#endif
#define EMU_ROMS_URL_W LSTR(EMU_ROMS_URL)
#define EMU_DOCS_URL_W LSTR(EMU_DOCS_URL)

#endif /*EMU_VERSION_H*/
