From fa68ab959db6b42ed9b606da0baab3eb11d830bf Mon Sep 17 00:00:00 2001 From: DRayX7 Date: Sun, 24 May 2009 20:11:59 +0000 Subject: [PATCH] *Added support for compiling the revision number into the binary. This is then shown in the credits window, and may be used for online updates eventually. *Note: Compiling this requires a real (CLI) SVN client. **For the following operating systems, I recommend these clients. *Windows: SilkSVN (http://www.silksvn.com/en/download) *Red Hat based GNU/Linux: SummerSoft (http://the.earth.li/pub/subversion/summersoft.fay.ar.us/pub/subversion/latest/) *Solaris: Sunfreeware (http://www.sunfreeware.com/) **For the following operating systems, you can simply type in these shell commands. *Debian based GNU/Linux: apt-get install subversion *Fedora based GNU/Linux: yum install subversion *OpenBSD: pkg_add subversion *FreeBSD: cd /usr/ports/devel/subversion; make install **Mac OS X usually comes with subversion, but you can download updates here: openCollabNet (http://downloads.open.collab.net/binaries.html) **For any operating system not listed above, you can obtain the source here: Tigris (http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260&expandFolder=74) --- Makefile | 3 ++- source/menu.cpp | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index aafc8e0e..e366e261 100644 --- a/Makefile +++ b/Makefile @@ -19,12 +19,13 @@ TARGET := boot BUILD := build SOURCES := source source/libwiigui source/images source/fonts source/sounds source/libwbfs INCLUDES := source +SVNDEV := -D'SVN_REV="$(shell svnversion -n ..)"' #--------------------------------------------------------------------------------- # options for code generation #--------------------------------------------------------------------------------- -CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) +CFLAGS = -g -O2 -Wall $(SVNDEV) $(MACHDEP) $(INCLUDE) CXXFLAGS = -save-temps -Xassembler -aln=$@.lst $(CFLAGS) LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80a00100 diff --git a/source/menu.cpp b/source/menu.cpp index 2d7217a4..fb55b45e 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -211,8 +211,9 @@ static void WindowCredits(void * ptr) txt[i] = new GuiText(LANGUAGE.Credits, 26, (GXColor){255, 255, 255, 255}); txt[i]->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); txt[i]->SetPosition(0,12); i++; - - txt[i] = new GuiText("V 1 .0", 18, (GXColor){255, 255, 255, 255}); + + char SvnRev[10] = ""; sprintf(SvnRev, "r%s", SVN_REV); + txt[i] = new GuiText(SvnRev, 18, (GXColor){255, 255, 255, 255}); txt[i]->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); txt[i]->SetPosition(0,y); i++; y+=34; txt[i] = new GuiText("USB Loader GX", 24, (GXColor){255, 255, 255, 255});