From 54ce8af6e0dbf41d9463ca38a5fdc33bd6ed913f Mon Sep 17 00:00:00 2001 From: Stephen Hutchinson Date: Fri, 23 Nov 2012 18:16:50 -0500 Subject: build: identify the build time of the binary in the versioning output Based on a patch by qyot27. Add export LC_ALL=C on top of version.sh to make the output locale independent. Note that the build time will not be updated on every "make" invocation, but only when the git revision is updated. This is a good thing, as repeated make invocations should not rebuild the binary. (This would break "sudo make install" too.) --- core/mp_common.h | 1 + core/mplayer.c | 2 +- core/version.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/mp_common.h b/core/mp_common.h index 4abbe70caf..184cea2a32 100644 --- a/core/mp_common.h +++ b/core/mp_common.h @@ -31,6 +31,7 @@ #define ROUND(x) ((int)((x) < 0 ? (x) - 0.5 : (x) + 0.5)) extern const char *mplayer_version; +extern const char *mplayer_builddate; char *mp_format_time(double time, bool fractions); diff --git a/core/mplayer.c b/core/mplayer.c index 7e9ee62516..c636c0012c 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -4186,7 +4186,7 @@ static void play_files(struct MPContext *mpctx) static void print_version(int always) { mp_msg(MSGT_CPLAYER, always ? MSGL_INFO : MSGL_V, - "%s (C) 2000-2012 mpv/MPlayer/mplayer2 projects\n", mplayer_version); + "%s (C) 2000-2012 mpv/MPlayer/mplayer2 projects\n built on %s\n", mplayer_version, mplayer_builddate); } static bool handle_help_options(struct MPContext *mpctx) diff --git a/core/version.c b/core/version.c index f06f0afc30..7e747044a3 100644 --- a/core/version.c +++ b/core/version.c @@ -19,3 +19,4 @@ #include "version.h" const char *mplayer_version = "mpv " VERSION; +const char *mplayer_builddate = BUILDDATE; \ No newline at end of file -- cgit v1.2.3