[Bf-blender-cvs] [2e56182] master: Detect version suffix based on release cycle and version char
Sergey Sharybin
noreply at git.blender.org
Fri Jun 13 16:31:05 CEST 2014
Commit: 2e561823115e3f232231124530d4dc44a36d40d7
Author: Sergey Sharybin
Date: Fri Jun 13 20:19:02 2014 +0600
https://developer.blender.org/rB2e561823115e3f232231124530d4dc44a36d40d7
Detect version suffix based on release cycle and version char
Should make it less error-prone for release tagging/ahoy.
===================================================================
M source/blender/windowmanager/intern/wm_operators.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 6261f1d..a405e6d 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);
More information about the Bf-blender-cvs
mailing list