Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-11-15 15:11:59 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-11-15 16:05:27 +0400
commit927dea436ee47e4dcabcde8eb4b167f0c32a08f2 (patch)
tree9e35618a41b1eb372ec9bb59d7d316909df9bb5c /source/blender/python/intern
parent825b0e8bc422174965ed8c0376d3d25b4f923394 (diff)
Further tweaks to buildinfo
Summary: Old idea with changes since previous release tag didn't work good enough. In most of the cases tag was done in a branch hence not actually reachable from the master branch. Now change since release is gone, and date of the latest commit is used instead. The date is displayed in format YYYY-MM-DD HH:mm in the splash. New bpy.app fields: - build_commit_timestamp is an unix timestamp of the commit blender was build from. - build_commit_date is a date of that commit. - build_commit_time is a time of that commit. Reviewers: campbellbarton Differential Revision: http://developer.blender.org/D5
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r--source/blender/python/intern/bpy_app.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c
index 3a529496f02..21767196e11 100644
--- a/source/blender/python/intern/bpy_app.c
+++ b/source/blender/python/intern/bpy_app.c
@@ -53,7 +53,9 @@
#ifdef BUILD_DATE
extern char build_date[];
extern char build_time[];
-extern char build_change[];
+extern unsigned long build_commit_timestamp;
+extern char build_commit_date[];
+extern char build_commit_time[];
extern char build_hash[];
extern char build_branch[];
extern char build_platform[];
@@ -77,7 +79,9 @@ static PyStructSequence_Field app_info_fields[] = {
/* buildinfo */
{(char *)"build_date", (char *)"The date this blender instance was built"},
{(char *)"build_time", (char *)"The time this blender instance was built"},
- {(char *)"build_change", (char *)"The change number this blender instance was built with"},
+ {(char *)"build_commit_timestamp", (char *)"The unix timestamp of commit this blender instance was built"},
+ {(char *)"build_commit_date", (char *)"The date of commit this blender instance was built"},
+ {(char *)"build_commit_time", (char *)"The time of commit this blender instance was built"},
{(char *)"build_hash", (char *)"The commit hash this blender instance was built with"},
{(char *)"build_branch", (char *)"The branch this blender instance was built from"},
{(char *)"build_platform", (char *)"The platform this blender instance was built for"},
@@ -111,10 +115,8 @@ static PyObject *make_app_info(void)
if (app_info == NULL) {
return NULL;
}
-#if 0
#define SetIntItem(flag) \
PyStructSequence_SET_ITEM(app_info, pos++, PyLong_FromLong(flag))
-#endif
#define SetStrItem(str) \
PyStructSequence_SET_ITEM(app_info, pos++, PyUnicode_FromString(str))
#define SetBytesItem(str) \
@@ -137,7 +139,9 @@ static PyObject *make_app_info(void)
#ifdef BUILD_DATE
SetBytesItem(build_date);
SetBytesItem(build_time);
- SetBytesItem(build_change);
+ SetIntItem(build_commit_timestamp);
+ SetBytesItem(build_commit_date);
+ SetBytesItem(build_commit_time);
SetBytesItem(build_hash);
SetBytesItem(build_branch);
SetBytesItem(build_platform);
@@ -149,6 +153,8 @@ static PyObject *make_app_info(void)
#else
SetBytesItem("Unknown");
SetBytesItem("Unknown");
+ SetIntItem(0);
+ SetBytesItem("Unknown");
SetBytesItem("Unknown");
SetBytesItem("Unknown");
SetBytesItem("Unknown");