Report git version with library_version

This commit is contained in:
Gregor Richards 2016-12-09 18:18:22 -05:00
parent 76fd67fb4c
commit 1a252dcb3c
3 changed files with 13 additions and 1 deletions

View File

@ -40,6 +40,10 @@ CORE_DEFINE := -DWANT_LYNX_EMU
NEED_CRC32 = 1
TARGET_NAME := mednafen_lynx
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown")
CXXFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
endif
ifeq ($(platform), unix)
TARGET := $(TARGET_NAME)_libretro.so

View File

@ -5,6 +5,11 @@ FAST = 1
include $(CLEAR_VARS)
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown")
LOCAL_CXXFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
endif
ifeq ($(TARGET_ARCH),arm)
ANDROID_FLAGS := -DANDROID_ARM
LOCAL_ARM_MODE := arm

View File

@ -807,7 +807,10 @@ void retro_get_system_info(struct retro_system_info *info)
{
memset(info, 0, sizeof(*info));
info->library_name = MEDNAFEN_CORE_NAME;
info->library_version = MEDNAFEN_CORE_VERSION;
#ifndef GIT_VERSION
#define GIT_VERSION ""
#endif
info->library_version = MEDNAFEN_CORE_VERSION GIT_VERSION;
info->need_fullpath = true;
info->valid_extensions = MEDNAFEN_CORE_EXTENSIONS;
info->block_extract = false;