From 927dea436ee47e4dcabcde8eb4b167f0c32a08f2 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 15 Nov 2013 17:11:59 +0600 Subject: 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 --- source/blender/collada/DocumentExporter.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'source/blender/collada/DocumentExporter.cpp') diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp index 9aa0f6e2831..9d590968481 100644 --- a/source/blender/collada/DocumentExporter.cpp +++ b/source/blender/collada/DocumentExporter.cpp @@ -101,7 +101,8 @@ extern "C" #include "ED_keyframing.h" #ifdef WITH_BUILDINFO -extern char build_change[]; +extern char build_commit_date[]; +extern char build_commit_time[]; extern char build_hash[]; #endif @@ -227,16 +228,12 @@ void DocumentExporter::exportCurrentScene(Scene *sce) } char version_buf[128]; #ifdef WITH_BUILDINFO - /* TODO(sergey): As soon as we fully switched to GIT, no need to check build_hash. */ - if (build_hash[0] != '\0') { - sprintf(version_buf, "Blender %d.%02d.%d change:%s, hash:", BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION, - build_change, build_hash); - } - else { - sprintf(version_buf, "Blender %d.%02d.%d r%s", BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION, build_change); - } + BLI_snprintf(version_buf, sizeof(version_buf), "Blender %d.%02d.%d commit date:%s, hash:", + BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION, + build_commit_date, blender_commit_time, build_hash); #else - sprintf(version_buf, "Blender %d.%02d.%d", BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION); + BLI_snprintf(version_buf, sizeof(version_buf), "Blender %d.%02d.%d", + BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION); #endif asset.getContributor().mAuthoringTool = version_buf; asset.add(); -- cgit v1.2.3