From a5c1fd574993649453002c64352bf43f0046d04f Mon Sep 17 00:00:00 2001 From: d0k3 Date: Fri, 1 Sep 2017 18:01:33 +0200 Subject: [PATCH] Include build timestamp in splash screen --- Makefile | 8 ++++---- source/godmode.c | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 69d413c..32fc5da 100644 --- a/Makefile +++ b/Makefile @@ -35,10 +35,10 @@ CFLAGS := $(ARCH) -g -Wall -Wextra -Wpedantic -Wcast-align -Wno-main -O2 \ -mtune=arm946e-s -fomit-frame-pointer -ffast-math -std=gnu11 \ $(INCLUDE) -Wno-unused-function -CFLAGS += -DBUILD_NAME="\"$(TARGET) (`date +'%Y/%m/%d'`)\"" - VERSION := $(shell git describe --tags --abbrev=8) -CFLAGS += -DVERSION="\"$(VERSION)\"" +DBUILTS := $(shell date +'%Y%m%d%H%M%S') +DBUILTL := $(shell date +'%Y-%m-%d %H:%M:%S') +CFLAGS += -DDBUILTS="\"$(DBUILTS)\"" -DDBUILTL="\"$(DBUILTL)\"" -DVERSION="\"$(VERSION)\"" ifeq ($(FONT),ORIG) CFLAGS += -DFONT_ORIGINAL @@ -163,7 +163,7 @@ release: @cp $(OUTPUT)_ntr.firm $(RELEASE)/ntrboot @cp $(OUTPUT)_ntr_dev.firm $(RELEASE)/ntrboot @cp -R $(CURDIR)/resources/gm9 $(RELEASE)/gm9 - @-7z a $(RELEASE)/$(TARGET)-$(VERSION)-`date +'%Y%m%d-%H%M%S'`.zip $(RELEASE)/* + @-7z a $(RELEASE)/$(TARGET)-$(VERSION)-$(DBUILTS).zip $(RELEASE)/* #--------------------------------------------------------------------------------- clean: diff --git a/source/godmode.c b/source/godmode.c index 7a48c4f..8abc316 100644 --- a/source/godmode.c +++ b/source/godmode.c @@ -1628,12 +1628,13 @@ u32 SplashInit() { ClearScreenF(true, true, COLOR_STD_BG); QlzDecompress(TOP_SCREEN, QLZ_SPLASH, 0); - DrawStringF(BOT_SCREEN, pos_xb, pos_yb, COLOR_STD_FONT, COLOR_STD_BG, "%s\n%*.*s\n%s\n \n%s\n%s\n \n%s\n%s", + DrawStringF(BOT_SCREEN, pos_xb, pos_yb, COLOR_STD_FONT, COLOR_STD_BG, "%s\n%*.*s\n%s\n \n \n%s\n%s\n \n%s\n%s", namestr, strnlen(namestr, 64), strnlen(namestr, 64), "------------------------------", "https://github.com/d0k3/GodMode9", "Releases:", "https://github.com/d0k3/GodMode9/releases/", // this won't fit with a 8px width font "Hourlies:", "https://d0k3.secretalgorithm.com/"); DrawStringF(BOT_SCREEN, pos_xu, pos_yu, COLOR_STD_FONT, COLOR_STD_BG, loadstr); + DrawStringF(BOT_SCREEN, pos_xb, pos_yu, COLOR_STD_FONT, COLOR_STD_BG, "built: " DBUILTL); return 0; }