SCons
authorCampbell Barton <ideasman42@gmail.com>
Mon, 2 Aug 2010 16:27:41 +0000 (16:27 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 2 Aug 2010 16:27:41 +0000 (16:27 +0000)
- remove scons option WITH_BF_FHS, its not needed anymore.
- comment WITH_BF_DOCS, was using epydocs which we dont use now.
- blenderlite target was broken, always using openmp.
- building without python wasnt working.

- fixed some warnings.

14 files changed:
SConstruct
build_files/scons/config/win64-vc-config.py
build_files/scons/tools/Blender.py
build_files/scons/tools/btools.py
source/blender/blenkernel/intern/BME_conversions.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/texture.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/makesrna/SConscript
source/blender/makesrna/intern/SConscript
source/blender/makesrna/intern/rna_wm.c
source/creator/SConscript
source/gameengine/PyDoc/SConscript [deleted file]

index acdf6182504406a1ef6f19b4abfd7244d92a791b..eefef3cf5028df78b30f728e2c3a05b4bc1b167e 100644 (file)
@@ -210,14 +210,34 @@ SetOption('num_jobs', int(env['BF_NUMJOBS']))
 print B.bc.OKGREEN + "Build with parallel jobs%s: %s" % (B.bc.ENDC, GetOption('num_jobs'))
 print B.bc.OKGREEN + "Build with debug symbols%s: %s" % (B.bc.ENDC, env['BF_DEBUG'])
 
-# BLENDERPATH is a unix only option to enable typical style paths this is
-# spesifically a data-dir, which is used a lot but cant replace BF_INSTALLDIR
-# because the blender binary is installed in $BF_INSTALLDIR/bin/blender
+if 'blenderlite' in B.targets:
+       target_env_defs = {}
+       target_env_defs['WITH_BF_GAMEENGINE'] = False
+       target_env_defs['WITH_BF_OPENAL'] = False
+       target_env_defs['WITH_BF_OPENEXR'] = False
+       target_env_defs['WITH_BF_OPENMP'] = False
+       target_env_defs['WITH_BF_ICONV'] = False
+       target_env_defs['WITH_BF_INTERNATIONAL'] = False
+       target_env_defs['WITH_BF_OPENJPEG'] = False
+       target_env_defs['WITH_BF_FFMPEG'] = False
+       target_env_defs['WITH_BF_QUICKTIME'] = False
+       target_env_defs['WITH_BF_REDCODE'] = False
+       target_env_defs['WITH_BF_DDS'] = False
+       target_env_defs['WITH_BF_ZLIB'] = False
+       target_env_defs['WITH_BF_SDL'] = False
+       target_env_defs['WITH_BF_JPEG'] = False
+       target_env_defs['WITH_BF_PNG'] = False
+       target_env_defs['WITH_BF_BULLET'] = False
+       target_env_defs['WITH_BF_BINRELOC'] = False
+       target_env_defs['BF_BUILDINFO'] = False
+       target_env_defs['BF_NO_ELBEEM'] = True
+       target_env_defs['WITH_BF_PYTHON'] = False
+       
+       # Merge blenderlite, let command line to override
+       for k,v in target_env_defs.iteritems():
+               if k not in B.arguments:
+                       env[k] = v
 
-if env['WITH_BF_FHS']:
-       BLENDERPATH = os.path.join(env['BF_INSTALLDIR'], 'share', 'blender', env['BF_VERSION'])
-else:
-       BLENDERPATH = env['BF_INSTALLDIR']
 
 if env['WITH_BF_OPENMP'] == 1:
                if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
@@ -271,34 +291,6 @@ if 'blenderplayer' in B.targets:
 if 'blendernogame' in B.targets:
        env['WITH_BF_GAMEENGINE'] = False
 
-if 'blenderlite' in B.targets:
-       target_env_defs = {}
-       target_env_defs['WITH_BF_GAMEENGINE'] = False
-       target_env_defs['WITH_BF_OPENAL'] = False
-       target_env_defs['WITH_BF_OPENEXR'] = False
-       target_env_defs['WITH_BF_OPENMP'] = False
-       target_env_defs['WITH_BF_ICONV'] = False
-       target_env_defs['WITH_BF_INTERNATIONAL'] = False
-       target_env_defs['WITH_BF_OPENJPEG'] = False
-       target_env_defs['WITH_BF_FFMPEG'] = False
-       target_env_defs['WITH_BF_QUICKTIME'] = False
-       target_env_defs['WITH_BF_REDCODE'] = False
-       target_env_defs['WITH_BF_DDS'] = False
-       target_env_defs['WITH_BF_ZLIB'] = False
-       target_env_defs['WITH_BF_SDL'] = False
-       target_env_defs['WITH_BF_JPEG'] = False
-       target_env_defs['WITH_BF_PNG'] = False
-       target_env_defs['WITH_BF_BULLET'] = False
-       target_env_defs['WITH_BF_BINRELOC'] = False
-       target_env_defs['BF_BUILDINFO'] = False
-       target_env_defs['BF_NO_ELBEEM'] = True
-       target_env_defs['WITH_BF_PYTHON'] = False
-       
-       # Merge blenderlite, let command line to override
-       for k,v in target_env_defs.iteritems():
-               if k not in B.arguments:
-                       env[k] = v
-
 # disable elbeem (fluidsim) compilation?
 if env['BF_NO_ELBEEM'] == 1:
        env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
@@ -311,7 +303,7 @@ if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-min
 
 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
 B.root_build_dir = env['BF_BUILDDIR']
-B.doc_build_dir = os.path.join(BLENDERPATH, 'doc')
+B.doc_build_dir = os.path.join(env['BF_INSTALLDIR'], 'doc')
 if not B.root_build_dir[-1]==os.sep:
        B.root_build_dir += os.sep
 if not B.doc_build_dir[-1]==os.sep:
@@ -366,8 +358,9 @@ if not os.path.isdir ( B.root_build_dir):
        os.makedirs ( B.root_build_dir + 'extern' )
        os.makedirs ( B.root_build_dir + 'lib' )
        os.makedirs ( B.root_build_dir + 'bin' )
-if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
-       os.makedirs ( B.doc_build_dir )
+# # Docs not working with epy anymore
+# if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
+#      os.makedirs ( B.doc_build_dir )
 
 Help(opts.GenerateHelpText(env))
 
@@ -436,10 +429,7 @@ if  env['OURPLATFORM']=='darwin':
                        source=[dp+os.sep+f for f in df]
                        blenderinstall.append(env.Install(dir=dir,source=source))
 else:
-       if env['WITH_BF_FHS']:  dir= os.path.join(env['BF_INSTALLDIR'], 'bin')
-       else:                                   dir= env['BF_INSTALLDIR']
-       
-       blenderinstall = env.Install(dir=dir, source=B.program_list)
+       blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list)
 
 #-- local path = config files in install dir: installdir\VERSION
 #- dont do config and scripts for darwin, it is already in the bundle
@@ -466,15 +456,12 @@ if  env['OURPLATFORM']!='darwin':
                                
                                if 'locale' in dp:
                                        datafileslist.append(os.path.join(dp,f))
-                                       if env['WITH_BF_FHS']:  dir= os.path.join(*([BLENDERPATH] + ['datafiles'] + dp.split(os.sep)[2:]))      # skip bin/.blender
-                                       else:                                   dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:]))  # skip bin
+                                       dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:])) # skip bin
                                        datafilestargetlist.append(dir + os.sep + f)
 
                                else:
                                        dotblendlist.append(os.path.join(dp, f))
-                                       if env['WITH_BF_FHS']:  dir= os.path.join(*([BLENDERPATH] + ['config'] + dp.split(os.sep)[2:])) # skip bin/.blender
-                                       else:                                   dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['config'] + dp.split(os.sep)[1:]))     # skip bin
-                                       
+                                       dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['config'] + dp.split(os.sep)[1:]))    # skip bin
                                        dottargetlist.append(dir + os.sep + f)
                                        
                dotblenderinstall = []
@@ -493,8 +480,7 @@ if  env['OURPLATFORM']!='darwin':
                                        if '.svn' in dn:
                                                dn.remove('.svn')
                                        
-                                       if env['WITH_BF_FHS']:          dir = BLENDERPATH
-                                       else:                                           dir = os.path.join(env['BF_INSTALLDIR'], VERSION)                               
+                                       dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
                                        dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
                                        
                                        source=[os.path.join(dp, f) for f in df if f[-3:]!='pyc']
@@ -510,7 +496,7 @@ if env['OURPLATFORM']=='linux2':
                        tn.remove('.svn')
                for f in tf:
                        iconlist.append(os.path.join(tp, f))
-                       icontargetlist.append( os.path.join(*([BLENDERPATH] + tp.split(os.sep)[2:] + [f])) )
+                       icontargetlist.append( os.path.join(*([env['BF_INSTALLDIR']] + tp.split(os.sep)[2:] + [f])) )
 
        iconinstall = []
        for targetdir,srcfile in zip(icontargetlist, iconlist):
@@ -537,24 +523,24 @@ for tp, tn, tf in os.walk('release/plugins'):
        df = tp[8:] # remove 'release/'
        for f in tf:
                pluglist.append(os.path.join(tp, f))
-               plugtargetlist.append( os.path.join(BLENDERPATH, df, f) )
+               plugtargetlist.append( os.path.join(env['BF_INSTALLDIR'], df, f) )
 
 
 # header files for plugins
 pluglist.append('source/blender/blenpluginapi/documentation.h')
-plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'documentation.h'))
+plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'documentation.h'))
 pluglist.append('source/blender/blenpluginapi/externdef.h')
-plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'externdef.h'))
+plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'externdef.h'))
 pluglist.append('source/blender/blenpluginapi/floatpatch.h')
-plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'floatpatch.h'))
+plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'floatpatch.h'))
 pluglist.append('source/blender/blenpluginapi/iff.h')
-plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'iff.h'))
+plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'iff.h'))
 pluglist.append('source/blender/blenpluginapi/plugin.h')
-plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'plugin.h'))
+plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'plugin.h'))
 pluglist.append('source/blender/blenpluginapi/util.h')
-plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'util.h'))
+plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'util.h'))
 pluglist.append('source/blender/blenpluginapi/plugin.DEF')
-plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'plugin.def'))
+plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'plugin.def'))
 
 plugininstall = []
 for targetdir,srcfile in zip(plugtargetlist, pluglist):
@@ -569,7 +555,7 @@ for tp, tn, tf in os.walk('release/text'):
        for f in tf:
                textlist.append(tp+os.sep+f)
 
-textinstall = env.Install(dir=BLENDERPATH, source=textlist)
+textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
 
 if  env['OURPLATFORM']=='darwin':
                allinstall = [blenderinstall, plugininstall, textinstall]
@@ -662,17 +648,3 @@ Default(B.program_list)
 
 if not env['WITHOUT_BF_INSTALL']:
                Default(installtarget)
-
-#------------ EPYDOC
-if env['WITH_BF_DOCS']:
-    try:
-        import epydoc
-    except ImportError:
-        epydoc = None
-
-    if epydoc:
-        SConscript('source/gameengine/PyDoc/SConscript')
-    else:
-        print "No epydoc install detected, Python API and Gameengine API Docs will not be generated "
-
-
index 46b9034823cca58d22bc74ada117d080d75bd7be..0a4b05a28bf2b5c7d4e945d9a880061db813d6a0 100644 (file)
@@ -194,8 +194,6 @@ CXX_WARN = []
 
 LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid']
 
-WITH_BF_DOCS=False
-
 BF_DEBUG=False
 BF_BSC=False
 
index 1c2fccec322ff1d9d301e26ecc48d416c04089b1..546f1e540cf4ddfca860639c64a1f29ca60930ef 100644 (file)
@@ -570,10 +570,9 @@ def UnixPyBundle(target=None, source=None, env=None):
        def run(cmd):
                print 'Install command:', cmd
                commands.getoutput(cmd)
-       
-       if env['WITH_BF_FHS']:  dir = os.path.join(env['BF_INSTALLDIR'], 'share', 'blender', env['BF_VERSION']) # BLENDERPATH
-       else:                                   dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
-       
+
+       dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
+
        py_src =        env.subst( env['BF_PYTHON_LIBPATH'] + '/python'+env['BF_PYTHON_VERSION'] )
        py_target =     env.subst( dir + '/python/lib/python'+env['BF_PYTHON_VERSION'] )
        
index 5647ef0ebaaf03117d9431f1206d7eab5133548a..93f3795b916972c6af990873829bd05f809d28d9 100644 (file)
@@ -78,7 +78,6 @@ def validate_arguments(args, bc):
             'WITH_BF_DOCS',
             'BF_NUMJOBS',
             'BF_MSVS',
-            'WITH_BF_FHS',
             'BF_VERSION',
             'BF_GHOST_DEBUG',
             'WITH_BF_RAYOPTIMIZATION',
@@ -428,13 +427,12 @@ def read_opts(env, cfg, args):
         
         ('BF_X264_CONFIG', 'configuration flags for x264', ''),
         ('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''),
-        (BoolVariable('WITH_BF_DOCS', 'Generate API documentation', False)),
+#        (BoolVariable('WITH_BF_DOCS', 'Generate API documentation', False)),
         
         ('BF_CONFIG', 'SCons python config file used to set default options', 'user_config.py'),
         ('BF_NUMJOBS', 'Number of build processes to spawn', '1'),
         ('BF_MSVS', 'Generate MSVS project files and solution', False),
-        
-        (BoolVariable('WITH_BF_FHS', 'Use the Unix "Filesystem Hierarchy Standard" rather then a redistributable directory layout', False)),
+
         ('BF_VERSION', 'The root path for Unix (non-apple)', '2.5'),
 
         (BoolVariable('BF_UNIT_TEST', 'Build with unit test support.', False)),
index d6a00450e4ad3ca3e84b67a93e1d2595a7fe1994..64a6e14bc5d187d43f0af230e7edb3062a5e3100 100644 (file)
@@ -391,9 +391,9 @@ void BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td, EditMesh *em) {
                        if(e->flag & SELECT) eed->f |= SELECT;
                        //XXX if(e->flag & ME_FGON) eed->h= EM_FGON; // 2 different defines!
                        if(e->flag & ME_HIDE) eed->h |= 1;
-                       if(em->selectmode==SCE_SELECT_EDGE) 
+                       if(em->selectmode==SCE_SELECT_EDGE) 
                                ; //XXX EM_select_edge(eed, eed->f & SELECT);
-               
+                       }
                        CustomData_em_copy_data(&bm->edata, &em->edata, e->data, &eed->data);
                }
        }
index 46f67adeb4bb4c004698759342ea05cb7222a2d7..f991dee19fe37d945f6d0961a67458b66e49a9fc 100644 (file)
@@ -122,8 +122,8 @@ wcsleninu8(wchar_t *src)
        return len;
 }
 
-int
-static utf8slen(char *src)
+static int
+utf8slen(char *src)
 {
        int size = 0, index = 0;
        unsigned char c;
index d05d8ccbc0880efd106acc5261f6e5534910db87..fe5abbd0868fc57ff24363075ec82e4448d65e52 100644 (file)
@@ -169,8 +169,8 @@ PluginTex *add_plugin_tex(char *str)
        open_plugin_tex(pit);
        
        if(pit->doit==0) {
-               if(pit->handle==0); //XXX error("no plugin: %s", str);
-               else ; //XXX error("in plugin: %s", str);
+               if(pit->handle==0) {;} //XXX error("no plugin: %s", str);
+               else {;} //XXX error("in plugin: %s", str);
                MEM_freeN(pit);
                return NULL;
        }
index 814b30a66735c7746d86430b5d6a6ffdc777d022..d5d5a7ad002344868541726a5dae56bc3034cccc 100644 (file)
@@ -1005,8 +1005,9 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
                                        paint_brush_stroke_add_step(C, op, event, mouse);
                                }
                        }
-                       else
+                       else {
                                ;//ED_region_tag_redraw(ar);
+                       }
                }
        }
 
index 3d74496ab674a54d2544f30bc9545698e68b4be6..5e360aad9eccf048139ce57032d12e6c2b84d4d5 100644 (file)
@@ -388,7 +388,7 @@ static int sculpt_brush_test_fast(SculptBrushTest *test, float co[3])
 
 static int sculpt_brush_test_cube(SculptBrushTest *test, float co[3], float local[4][4])
 {
-       const static float side = 0.70710678118654752440084436210485; // sqrt(.5);
+       static const float side = 0.70710678118654752440084436210485; // sqrt(.5);
 
        float local_co[3];
 
index 07e1437907276e0660c445143831ad089d08a667..9d65522993d9d9c1098aa6e44a9d84be10ea02e9 100644 (file)
@@ -45,6 +45,9 @@ if env['WITH_BF_GAMEENGINE']:
 if env['BF_UNIT_TEST']:
        defs.append('UNIT_TEST')
 
+if not env['WITH_BF_PYTHON']:
+       defs.append('DISABLE_PYTHON')
+
 if env['OURPLATFORM'] == 'linux2':
        cflags='-pthread'
        incs += ' ../../../extern/binreloc/include'
index 6b50daa5486374478cad6505c7da0577f05affea..8abab7ba2944c93af3ffd2f0985dd543ec7939e4 100644 (file)
@@ -84,7 +84,7 @@ if not env['WITH_BF_PYTHON']:
 
 if env['OURPLATFORM'] == 'linux2':
        cflags='-pthread'
-       incs += ' ../../../extern/binreloc/include'
+       incs += ' ../../../extern/binreloc/include'
 
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
        incs += ' ' + env['BF_PTHREADS_INC']
index 84053c0a1815371f38fcbae04ca4a1dbd5c2be34..7ccc990ffd3a9ca2839520450375fa1223f4cf52 100644 (file)
@@ -887,7 +887,7 @@ static StructRNA *rna_MacroOperator_register(const bContext *C, ReportList *repo
 
        return dummyot.ext.srna;
 }
-#endif
+#endif /* DISABLE_PYTHON */
 
 static StructRNA* rna_Operator_refine(PointerRNA *opr)
 {
@@ -961,7 +961,7 @@ static wmKeyMapItem *rna_KeyMap_add_modal_item(wmKeyMap *km, bContext *C, Report
        return WM_modalkeymap_add_item(km, type, value, modifier, keymodifier, propvalue);
 }
 
-#else
+#else /* RNA_RUNTIME */
 
 static void rna_def_operator(BlenderRNA *brna)
 {
@@ -1518,5 +1518,5 @@ void RNA_def_wm(BlenderRNA *brna)
        rna_def_keyconfig(brna);
 }
 
-#endif
+#endif /* RNA_RUNTIME */
 
index 815bd351f690a69899c45c49f5dfe8c1ec17db92..01e62d33269d795fb65beb4d702c96c21159cc1c 100644 (file)
@@ -35,9 +35,6 @@ if env['WITH_BF_PYTHON']:
                defs.append('_DEBUG')
 else:
        defs.append('DISABLE_PYTHON')
-
-if env['WITH_BF_FHS']: # /usr -> /usr/share/blender/2.5
-       defs.append('BLENDERPATH=\\"' + os.path.join(env['BF_INSTALLDIR'], 'share', 'blender', env['BF_VERSION']) + '\\"')
        
 if env['BF_BUILDINFO']:
        defs.append('BUILD_DATE')
diff --git a/source/gameengine/PyDoc/SConscript b/source/gameengine/PyDoc/SConscript
deleted file mode 100644 (file)
index dabe004..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/python
-Import ('env')
-import os
-
-if env['WITH_BF_FHS']:
-       BLENDERPATH = os.path.join(env['BF_INSTALLDIR'], 'share', 'blender', env['BF_VERSION'])
-else:
-       BLENDERPATH = env['BF_INSTALLDIR']
-
-from optparse import OptionParser
-import epydoc
-from epydoc.docbuilder import build_doc_index
-from epydoc import cli
-names = env.Glob("source/gameengine/PyDoc/*.py")
-docindex = build_doc_index(names)
-optvalues = cli.OPTION_DEFAULTS
-optvalues["verbose"] = 1
-optvalues["quiet"] = 0
-optvalues["include_source_code"] = 0
-optvalues["inheritance"] = "included"
-optvalues["show_private"] = 0
-optvalues["target"] = os.path.join(BLENDERPATH, 'doc')
-optvalues["url"] = "http://www.blender.org"
-optvalues["top"] = "Game Engine API"
-optvalues["name"] = "Blender"
-optvalues["noprivate"] = 1
-optvalues["noframes"] = 1
-optvalues["names"] = names
-optparser = OptionParser()
-optparser.set_defaults(**optvalues)
-(options, args) = optparser.parse_args([])
-print "Writing Game Engine epydocs to \"%s\"" % optvalues["target"]
-cli.write_html(docindex, options)
-