mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 10:48:18 +08:00
VER /R to show the Git commit SHA1
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
/*auto-generated*/
|
||||
#define UPDATED_STR "Aug 7, 2020 4:26:36am"
|
||||
#define UPDATED_STR "Aug 9, 2020 1:08:24am"
|
||||
#define COPYRIGHT_END_YEAR "2020"
|
||||
|
@@ -2963,7 +2963,7 @@ void DOS_Shell::CMD_VER(char *args) {
|
||||
dos_ver_menu(false);
|
||||
} else {
|
||||
WriteOut(MSG_Get("SHELL_CMD_VER_VER"),VERSION,SDL_STRING,dos.version.major,dos.version.minor);
|
||||
if (optR) WriteOut("DOSBox-X's build date and time: %s\n",UPDATED_STR);
|
||||
if (optR) WriteOut("DOSBox-X Git version %s, built on %s\n", GIT_COMMIT_HASH, UPDATED_STR);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -12,9 +12,13 @@ my @months = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec );
|
||||
|
||||
my $tmp = sprintf("%s %u, %u %u:%02u:%02u%s",$months[$mon-1],$mday,$year,(($hour + 11) % 12) + 1,$min,$sec,$hour >= 12 ? "pm" : "am");
|
||||
|
||||
my $commit = `git rev-parse --short HEAD`;
|
||||
chomp($commit);
|
||||
|
||||
open(X,">","include/build_timestamp.h") || die;
|
||||
print X "/*auto-generated*/\n";
|
||||
print X "#define UPDATED_STR \"$tmp\"\n";
|
||||
print X "#define GIT_COMMIT_HASH \"$commit\"\n";
|
||||
print X "#define COPYRIGHT_END_YEAR \"$year\"\n";
|
||||
close(X);
|
||||
|
||||
|
Reference in New Issue
Block a user