diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-02 20:27:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-02 20:27:41 +0400 |
commit | ec2c52c9c87550d2e551956e0b558e14e8264213 (patch) | |
tree | b10955edb1feeb9a6eed7e83a843fafba0e7def6 | |
parent | 7bd687ea588aca6826d75206faefdab6365be94f (diff) |
SCons
- 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.
-rw-r--r-- | SConstruct | 118 | ||||
-rw-r--r-- | build_files/scons/config/win64-vc-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/tools/Blender.py | 7 | ||||
-rw-r--r-- | build_files/scons/tools/btools.py | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/BME_conversions.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_stroke.c | 3 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/SConscript | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/SConscript | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 6 | ||||
-rw-r--r-- | source/creator/SConscript | 3 | ||||
-rw-r--r-- | source/gameengine/PyDoc/SConscript | 34 |
14 files changed, 66 insertions, 132 deletions
diff --git a/SConstruct b/SConstruct index acdf6182504..eefef3cf502 100644 --- a/SConstruct +++ b/SConstruct @@ -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 " - - diff --git a/build_files/scons/config/win64-vc-config.py b/build_files/scons/config/win64-vc-config.py index 46b9034823c..0a4b05a28bf 100644 --- a/build_files/scons/config/win64-vc-config.py +++ b/build_files/scons/config/win64-vc-config.py @@ -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 diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index 1c2fccec322..546f1e540cf 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -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'] ) diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index 5647ef0ebaa..93f3795b916 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -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)), diff --git a/source/blender/blenkernel/intern/BME_conversions.c b/source/blender/blenkernel/intern/BME_conversions.c index d6a00450e4a..64a6e14bc5d 100644 --- a/source/blender/blenkernel/intern/BME_conversions.c +++ b/source/blender/blenkernel/intern/BME_conversions.c @@ -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); } } diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 46f67adeb4b..f991dee19fe 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -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; diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index d05d8ccbc08..fe5abbd0868 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -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; } diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 814b30a6673..d5d5a7ad002 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -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); + } } } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 3d74496ab67..5e360aad9ec 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -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]; diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript index 07e14379072..9d65522993d 100644 --- a/source/blender/makesrna/SConscript +++ b/source/blender/makesrna/SConscript @@ -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' diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index 6b50daa5486..8abab7ba294 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -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'] diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 84053c0a181..7ccc990ffd3 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -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 */ diff --git a/source/creator/SConscript b/source/creator/SConscript index 815bd351f69..01e62d33269 100644 --- a/source/creator/SConscript +++ b/source/creator/SConscript @@ -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 index dabe004ae6a..00000000000 --- a/source/gameengine/PyDoc/SConscript +++ /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) - |