put the revision number in the splash screen (scons and make)
authorCampbell Barton <ideasman42@gmail.com>
Thu, 15 Nov 2007 12:16:03 +0000 (12:16 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 15 Nov 2007 12:16:03 +0000 (12:16 +0000)
source/Makefile
source/blender/src/buttons_editing.c
source/blender/src/headerbuttons.c
source/creator/buildinfo.c
source/creator/creator.c
tools/Blender.py

index 5161f6b73c517b7ee8bd34411d391c33f6a01093..f5e9e57fa550b8f1e686e86049d52fc89822c11a 100644 (file)
@@ -56,6 +56,7 @@ ifdef NAN_BUILDINFO
     BUILDINFO_C = $(SRCHOME)/creator/buildinfo.c
     BUILD_DATE := $(shell date "+%Y-%m-%d")
     BUILD_TIME := $(shell date "+%H:%M:%S")
+       BUILD_REV := $(shell svnversion)
 endif
 
 ############# set pyplayerlib ##################
@@ -544,7 +545,7 @@ endif
 $(DIR)/$(DEBUG_DIR)bin/blenderstatic: $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
        @echo "****> Link $@"
 ifdef NAN_BUILDINFO
-       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"static"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
+       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"static"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
 endif
        mkdir -p $(DIR)/$(DEBUG_DIR)bin
        $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderstatic $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(SADD) $(LOPTS)
@@ -558,7 +559,7 @@ endif
 $(DIR)/$(DEBUG_DIR)bin/blender$(EXT): $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
        @echo "****> Link $@"
 ifdef NAN_BUILDINFO
-       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
+       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
 endif
        mkdir -p $(DIR)/$(DEBUG_DIR)bin
        $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blender$(EXT) $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
@@ -572,7 +573,7 @@ endif
 $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT): $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB)
        @echo "****> Link $@"
 ifdef NAN_BUILDINFO
-       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
+       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
 endif
        mkdir -p $(DIR)/$(DEBUG_DIR)bin
        $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYPLAYERLIB) $(LLIBS) $(DADD) $(LOPTS)
@@ -586,7 +587,7 @@ endif
 $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT): $(OBJS) $(COMLIB) $(SPLIB)
        @echo "****> Link $@"
 ifdef NAN_BUILDINFO
-       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
+       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
 endif
        mkdir -p $(DIR)/$(DEBUG_DIR)bin
        $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
@@ -600,7 +601,7 @@ endif
 $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT): $(PLUGAPPLIB_XPLINK)
        @echo "****> Link $@"
 ifdef NAN_BUILDINFO
-       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
+       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
 endif
        mkdir -p $(DIR)/$(DEBUG_DIR)bin
        $(CCC) $(DYNLDFLAGS) -o $@ $(PLUGAPPLIB_XPLINK) $(LOPTS)
@@ -616,7 +617,7 @@ DEFFILE = ./gameengine/GamePlayer/netscape/src/npB3DPlg.def
 $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
        @echo "****> Link $@"
 ifdef NAN_BUILDINFO
-       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
+       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
 endif
 #      $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS) 
        $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS) /def:$(DEFFILE)
@@ -627,7 +628,7 @@ endif
 $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
        @echo "****> Link $@"
 ifdef NAN_BUILDINFO
-       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
+       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
 endif
        mkdir -p $(DIR)/$(DEBUG_DIR)bin
        $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
@@ -638,7 +639,7 @@ endif
 $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT): $(NSPLUGLIB)
        @echo "****> Link $@"
 ifdef NAN_BUILDINFO
-       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
+       $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
 endif
        mkdir -p $(DIR)/$(DEBUG_DIR)bin
        $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGTESTLIB) $(LLIBS) $(DADD) $(LOPTS)
index c393cdade9a8db441f0128be0659517a57ce6f3a..c6c5668fdbd1438cc29725be463c792b1d2ae46e 100644 (file)
@@ -1731,7 +1731,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco
                        uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_CHANGEDEP,
                                       "Ob: ", lx, (cy -= 19), buttonWidth, 19,
                                       &mmd->mirror_ob,
-                                      "Object to use as mirrot");
+                                      "Object to use as mirror");
 
                } else if (md->type==eModifierType_EdgeSplit) {
                        EdgeSplitModifierData *emd = (EdgeSplitModifierData*) md;
index 2ad1702f1f0ca12cf2153b10e095ef8ed01094c8..26a719197eda844276212f0eed91abe238e8fe97 100644 (file)
@@ -457,11 +457,12 @@ static void show_splash(void)
        char buffer[1024];
        extern char * build_date;
        extern char * build_time;
+       extern char * build_rev;
        extern char * build_platform;
        extern char * build_type;
 
        string = &buffer[0];
-       sprintf(string,"Built on %s %s     Version %s %s", build_date, build_time, build_platform, build_type);
+       sprintf(string,"Built on %s %s, Rev-%s    Version %s %s", build_date, build_time, build_rev, build_platform, build_type);
 #endif
 
        splash((void *)datatoc_splash_jpg, datatoc_splash_jpg_size, string);
index feda7484f799f17567bdf06ec3ece325a75680c7..69d3b090086644dd3031d06fa26e0f214b390e56 100644 (file)
@@ -38,6 +38,7 @@
 #ifndef WIN32
 char * build_date=BUILD_DATE;
 char * build_time=BUILD_TIME;
+char * build_rev=BUILD_REV;
 char * build_platform=BUILD_PLATFORM;
 char * build_type=BUILD_TYPE;
 #else
index e42e52cdf33d3ba882280756bae47e5b21a06798..8588dc9db9c240c5d3c25c841fd226ffdbf804a4 100644 (file)
@@ -159,6 +159,7 @@ static void print_version(void)
        printf ("Blender %d.%02d (sub %d) Build\n", G.version/100, G.version%100, BLENDER_SUBVERSION);
        printf ("\tbuild date: %s\n", build_date);
        printf ("\tbuild time: %s\n", build_time);
+       printf ("\tbuild revision: %s\n", build_rev);
        printf ("\tbuild platform: %s\n", build_platform);
        printf ("\tbuild type: %s\n", build_type);
 #else
index a3452f4d593cdd4e09c69d09e1d90be7afed7d53..58f5ea7b661d2bcc75804819bbe40225a4306d3f 100644 (file)
@@ -191,12 +191,15 @@ def buildinfo(lenv, build_type):
     """
     build_date = time.strftime ("%Y-%m-%d")
     build_time = time.strftime ("%H:%M:%S")
+    build_rev = os.popen('svnversion').read()[:-1] # remove \n
+
     obj = []
     if lenv['BF_BUILDINFO']==1: #user_options_dict['USE_BUILDINFO'] == 1:
         if sys.platform=='win32':
             build_info_file = open("source/creator/winbuildinfo.h", 'w')
             build_info_file.write("char *build_date=\"%s\";\n"%build_date)
             build_info_file.write("char *build_time=\"%s\";\n"%build_time)
+            build_info_file.write("char *build_rev=\"%s\";\n"%build_rev)
             build_info_file.write("char *build_platform=\"win32\";\n")
             build_info_file.write("char *build_type=\"dynamic\";\n")
             build_info_file.close()
@@ -205,6 +208,7 @@ def buildinfo(lenv, build_type):
             lenv.Append (CPPDEFINES = ['BUILD_TIME=\'"%s"\''%(build_time),
                                         'BUILD_DATE=\'"%s"\''%(build_date),
                                         'BUILD_TYPE=\'"dynamic"\'',
+                                        'BUILD_REV=\'"%s"\''%(build_rev),
                                         'NAN_BUILDINFO',
                                         'BUILD_PLATFORM=\'"%s"\''%(sys.platform)])
         obj = [lenv.Object (root_build_dir+'source/creator/%s_buildinfo'%build_type,