From 4e665b1e21ae63f33d0214f677da39373eafcaf4 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 27 Mar 2008 17:26:20 +0100 Subject: [PATCH] winetest: Use the HEAD commit sha1 as default build id. --- programs/winetest/Makefile.in | 2 ++ programs/winetest/main.c | 4 +++- programs/winetest/resource.h | 2 ++ programs/winetest/winetest.rc | 7 +++++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in index 4552284dd1e..86a176e6db0 100644 --- a/programs/winetest/Makefile.in +++ b/programs/winetest/Makefile.in @@ -6,6 +6,8 @@ MODULE = winetest.exe APPMODE = -mconsole IMPORTS = comctl32 version user32 gdi32 advapi32 wsock32 kernel32 +EXTRARCFLAGS = -DBUILD_SHA1=\"$$(GIT_DIR=$(TOPSRCDIR)/.git git rev-parse HEAD 2>/dev/null)\" + C_SRCS = \ gui.c \ main.c \ diff --git a/programs/winetest/main.c b/programs/winetest/main.c index c134f93501c..72b74422838 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -501,6 +501,7 @@ run_tests (char *logname) int logfile; char *strres, *eol, *nextline; DWORD strsize; + char build[64]; SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); @@ -539,7 +540,8 @@ run_tests (char *logname) xprintf ("Version 4\n"); strres = extract_rcdata (MAKEINTRESOURCE(WINE_BUILD), STRINGRES, &strsize); xprintf ("Tests from build "); - if (strres) xprintf ("%.*s", strsize, strres); + if (LoadStringA( 0, IDS_BUILD_ID, build, sizeof(build) )) xprintf( "%s\n", build ); + else if (strres) xprintf ("%.*s", strsize, strres); else xprintf ("-\n"); strres = extract_rcdata (MAKEINTRESOURCE(TESTS_URL), STRINGRES, &strsize); xprintf ("Archive: "); diff --git a/programs/winetest/resource.h b/programs/winetest/resource.h index 61fe35cb3cb..a40c089416f 100644 --- a/programs/winetest/resource.h +++ b/programs/winetest/resource.h @@ -42,6 +42,8 @@ #define IDC_EDIT 4000 #define IDC_ABOUT 4001 +#define IDS_BUILD_ID 1 + /* Resource types */ #define TESTRES 1000 diff --git a/programs/winetest/winetest.rc b/programs/winetest/winetest.rc index 2a709319028..951b923c468 100644 --- a/programs/winetest/winetest.rc +++ b/programs/winetest/winetest.rc @@ -24,6 +24,13 @@ #include "resource.h" +#ifdef BUILD_SHA1 +STRINGTABLE +BEGIN + IDS_BUILD_ID BUILD_SHA1 +END +#endif + IDD_TAG DIALOG 0, 0, 150, 65 STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "No tag supplied" -- 2.11.4.GIT