mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-23 02:36:41 +00:00
utils: report git branch, git commit and if there's any uncommited changes in the logfile.
This commit is contained in:
parent
a395ed56b8
commit
980d1c7680
2 changed files with 7 additions and 2 deletions
7
Makefile
7
Makefile
|
@ -40,6 +40,11 @@ include $(DEVKITPRO)/libnx/switch_rules
|
||||||
|
|
||||||
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
||||||
GIT_COMMIT := $(shell git rev-parse --short HEAD)
|
GIT_COMMIT := $(shell git rev-parse --short HEAD)
|
||||||
|
GIT_REV := ${GIT_BRANCH}.${GIT_COMMIT}
|
||||||
|
|
||||||
|
ifneq (, $(strip $(shell git status --porcelain 2>/dev/null)))
|
||||||
|
GIT_REV := $(GIT_REV)-dirty
|
||||||
|
endif
|
||||||
|
|
||||||
VERSION_MAJOR := 2
|
VERSION_MAJOR := 2
|
||||||
VERSION_MINOR := 0
|
VERSION_MINOR := 0
|
||||||
|
@ -74,7 +79,7 @@ ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
|
||||||
CFLAGS := -g -Wall -Werror -O2 -ffunction-sections $(ARCH) $(DEFINES) $(INCLUDE) -D__SWITCH__
|
CFLAGS := -g -Wall -Werror -O2 -ffunction-sections $(ARCH) $(DEFINES) $(INCLUDE) -D__SWITCH__
|
||||||
CFLAGS += -DVERSION_MAJOR=${VERSION_MAJOR} -DVERSION_MINOR=${VERSION_MINOR} -DVERSION_MICRO=${VERSION_MICRO}
|
CFLAGS += -DVERSION_MAJOR=${VERSION_MAJOR} -DVERSION_MINOR=${VERSION_MINOR} -DVERSION_MICRO=${VERSION_MICRO}
|
||||||
CFLAGS += -DAPP_TITLE=\"${APP_TITLE}\" -DAPP_AUTHOR=\"${APP_AUTHOR}\" -DAPP_VERSION=\"${APP_VERSION}\"
|
CFLAGS += -DAPP_TITLE=\"${APP_TITLE}\" -DAPP_AUTHOR=\"${APP_AUTHOR}\" -DAPP_VERSION=\"${APP_VERSION}\"
|
||||||
CFLAGS += -DGIT_BRANCH=\"${GIT_BRANCH}\" -DGIT_COMMIT=\"${GIT_COMMIT}\"
|
CFLAGS += -DGIT_BRANCH=\"${GIT_BRANCH}\" -DGIT_COMMIT=\"${GIT_COMMIT}\" -DGIT_REV=\"${GIT_REV}\"
|
||||||
CFLAGS += -DBOREALIS_RESOURCES="\"${BOREALIS_RESOURCES}\""
|
CFLAGS += -DBOREALIS_RESOURCES="\"${BOREALIS_RESOURCES}\""
|
||||||
CFLAGS += `aarch64-none-elf-pkg-config zlib --cflags`
|
CFLAGS += `aarch64-none-elf-pkg-config zlib --cflags`
|
||||||
CFLAGS += `aarch64-none-elf-pkg-config libxml-2.0 --cflags`
|
CFLAGS += `aarch64-none-elf-pkg-config libxml-2.0 --cflags`
|
||||||
|
|
|
@ -106,7 +106,7 @@ bool utilsInitializeResources(const int program_argc, const char **program_argv)
|
||||||
|
|
||||||
/* Create logfile. */
|
/* Create logfile. */
|
||||||
logWriteStringToLogFile("________________________________________________________________\r\n");
|
logWriteStringToLogFile("________________________________________________________________\r\n");
|
||||||
LOG_MSG(APP_TITLE " v%u.%u.%u starting (" GIT_COMMIT "). Built on " __DATE__ " - " __TIME__ ".", VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO);
|
LOG_MSG(APP_TITLE " v%u.%u.%u starting (" GIT_REV "). Built on " __DATE__ " - " __TIME__ ".", VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO);
|
||||||
if (g_appLaunchPath) LOG_MSG("Launch path: \"%s\".", g_appLaunchPath);
|
if (g_appLaunchPath) LOG_MSG("Launch path: \"%s\".", g_appLaunchPath);
|
||||||
|
|
||||||
/* Log Horizon OS version. */
|
/* Log Horizon OS version. */
|
||||||
|
|
Loading…
Reference in a new issue