Module: wine Branch: master Commit: 4e665b1e21ae63f33d0214f677da39373eafcaf4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4e665b1e21ae63f33d0214f677...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Mar 27 17:26:20 2008 +0100
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 deletions(-)
diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in index 4552284..86a176e 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 c134f93..72b7442 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 61fe35c..a40c089 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 2a70931..951b923 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"