From 2e561823115e3f232231124530d4dc44a36d40d7 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 13 Jun 2014 20:19:02 +0600 Subject: Detect version suffix based on release cycle and version char Should make it less error-prone for release tagging/ahoy. --- source/blender/windowmanager/intern/wm_operators.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 6261f1d271f..a405e6d5d63 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1774,6 +1774,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar int i; MenuType *mt = WM_menutype_find("USERPREF_MT_splash", true); char url[96]; + const char *version_suffix = NULL; #ifndef WITH_HEADLESS extern char datatoc_splash_png[]; @@ -1828,15 +1829,19 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar /* label for 'a' bugfix releases, or 'Release Candidate 1'... * avoids recreating splash for version updates */ - if (1) { + if (STREQ(STRINGIFY(BLENDER_VERSION_CYCLE), "rc")) { + version_suffix = "Release Candidate"; + } + else if (STREQ(STRINGIFY(BLENDER_VERSION_CYCLE), "release")) { + version_suffix = STRINGIFY(BLENDER_VERSION_CHAR); + } + if (version_suffix != NULL && version_suffix[0]) { /* placed after the version number in the image, * placing y is tricky to match baseline */ int x = 260 - (2 * UI_DPI_WINDOW_FAC); int y = 242 + (4 * UI_DPI_WINDOW_FAC); int w = 240; - const char *version_suffix = "Release Candidate"; - /* hack to have text draw 'text_sel' */ uiBlockSetEmboss(block, UI_EMBOSSN); but = uiDefBut(block, LABEL, 0, version_suffix, x * U.pixelsize, y * U.pixelsize, w * U.pixelsize, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL); -- cgit v1.2.3