Grease Pencil: Basic Support for Image Editor Again
[blender.git] / SConstruct
index 72acbf845d7e818b506daf549852f74f54a22b83..f2eb7146930b79e7804871389a1cfea05e4f7195 100644 (file)
@@ -31,6 +31,7 @@
 
 import platform as pltfrm
 
+# Need a better way to do this. Automagical maybe is not the best thing, maybe it is.
 if pltfrm.architecture()[0] == '64bit':
        bitness = 64
 else:
@@ -59,7 +60,6 @@ B = tools.Blender
 platform = sys.platform
 quickie = None
 quickdebug = None
-nsis_build = None
 
 ##### BEGIN SETUP #####
 
@@ -270,28 +270,31 @@ if 'blendernogame' in B.targets:
        env['WITH_BF_GAMEENGINE'] = False
 
 if 'blenderlite' in B.targets:
-       env['WITH_BF_GAMEENGINE'] = False
-       env['WITH_BF_OPENAL'] = False
-       env['WITH_BF_OPENEXR'] = False
-       env['WITH_BF_ICONV'] = False
-       env['WITH_BF_INTERNATIONAL'] = False
-       env['WITH_BF_OPENJPEG'] = False
-       env['WITH_BF_FFMPEG'] = False
-       env['WITH_BF_QUICKTIME'] = False
-       env['WITH_BF_YAFRAY'] = False
-       env['WITH_BF_REDCODE'] = False
-       env['WITH_BF_FTGL'] = False
-       env['WITH_BF_DDS'] = False
-       env['WITH_BF_ZLIB'] = False
-       env['WITH_BF_SDL'] = False
-       env['WITH_BF_JPEG'] = False
-       env['WITH_BF_PNG'] = False
-       env['WITH_BF_ODE'] = False
-       env['WITH_BF_BULLET'] = False
-       env['WITH_BF_BINRELOC'] = False
-       env['BF_BUILDINFO'] = False
-       env['BF_NO_ELBEEM'] = True
-       env['WITH_BF_PYTHON'] = False
+       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_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_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'):
        env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup')
@@ -399,6 +402,9 @@ dobj = B.buildinfo(env, "dynamic") + B.resources
 thestatlibs, thelibincs = B.setup_staticlibs(env)
 thesyslibs = B.setup_syslibs(env)
 
+if env['WITH_BF_PLAYER']:
+       print("Warning: Game player may not build on 2.5")
+
 if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
        #env.BlenderProg(B.root_build_dir, "blender", dobj , [], mainlist + thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
        env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
@@ -418,8 +424,6 @@ if  env['OURPLATFORM']=='darwin':
                bundle = '%s.app' % prg[0]
                bundledir = os.path.dirname(bundle)
                for dp, dn, df in os.walk(bundle):
-                       if 'CVS' in dn:
-                               dn.remove('CVS')
                        if '.svn' in dn:
                                dn.remove('.svn')
                        dir=env['BF_INSTALLDIR']+dp[len(bundledir):]
@@ -436,8 +440,6 @@ scriptinstall = []
 
 if  env['OURPLATFORM']!='darwin':
                for dp, dn, df in os.walk('bin/.blender'):
-                       if 'CVS' in dn:
-                               dn.remove('CVS')
                        if '.svn' in dn:
                                dn.remove('.svn')
                        
@@ -460,16 +462,15 @@ if  env['OURPLATFORM']!='darwin':
                        dotblenderinstall.append(env.Install(dir=td, source=srcfile))
                
                if env['WITH_BF_PYTHON']:
-                       #-- .blender/scripts    
-                       scriptpath='release/scripts'
-                       for dp, dn, df in os.walk(scriptpath):
-                               if 'CVS' in dn:
-                                       dn.remove('CVS')
-                               if '.svn' in dn:
-                                       dn.remove('.svn')
-                               dir=env['BF_INSTALLDIR']+'/.blender/scripts'+dp[len(scriptpath):]
-                               source=[dp+os.sep+f for f in df]
-                               scriptinstall.append(env.Install(dir=dir,source=source))
+                       #-- .blender/scripts, .blender/ui, .blender/io
+                       scriptpaths=['release/scripts', 'release/ui', 'release/io']
+                       for scriptpath in scriptpaths:
+                               for dp, dn, df in os.walk(scriptpath):
+                                       if '.svn' in dn:
+                                               dn.remove('.svn')
+                                       dir=env['BF_INSTALLDIR']+'/.blender/'+os.path.basename(scriptpath)+dp[len(scriptpath):]
+                                       source=[dp+os.sep+f for f in df]
+                                       scriptinstall.append(env.Install(dir=dir,source=source))
 
 #-- icons
 if env['OURPLATFORM']=='linux2':
@@ -477,8 +478,6 @@ if env['OURPLATFORM']=='linux2':
        icontargetlist = []
 
        for tp, tn, tf in os.walk('release/freedesktop/icons'):
-               if 'CVS' in tn:
-                       tn.remove('CVS')
                if '.svn' in tn:
                        tn.remove('.svn')
                for f in tf:
@@ -501,8 +500,6 @@ if env['OURPLATFORM']=='linuxcross':
 pluglist = []
 plugtargetlist = []
 for tp, tn, tf in os.walk('release/plugins'):
-       if 'CVS' in tn:
-               tn.remove('CVS')
        if '.svn' in tn:
                tn.remove('.svn')
        for f in tf:
@@ -533,8 +530,6 @@ for targetdir,srcfile in zip(plugtargetlist, pluglist):
 textlist = []
 texttargetlist = []
 for tp, tn, tf in os.walk('release/text'):
-       if 'CVS' in tn:
-               tn.remove('CVS')
        if '.svn' in tn:
                tn.remove('.svn')
        for f in tf:
@@ -564,8 +559,10 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'):
                else:
                        dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
        if env['WITH_BF_PYTHON']:
-               dllsources.append('#release/windows/extra/python25.zip')
-               dllsources.append('#release/windows/extra/zlib.pyd')
+               ver = env["BF_PYTHON_VERSION"].replace(".", "")
+               
+               dllsources.append('${LCGDIR}/release/python' + ver + '.zip')
+               dllsources.append('${LCGDIR}/release/zlib.pyd')
                if env['BF_DEBUG']:
                        dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_LIB}_d.dll')
                else:
@@ -575,17 +572,22 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'):
                        pass # we link statically to iconv on win64
                else:
                        dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll']
+       if env['WITH_BF_OPENAL']:
+               dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
+               dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
        if env['WITH_BF_FFMPEG']:
-               dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-51.dll',
+               dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-52.dll',
                                                '${LCGDIR}/ffmpeg/lib/avformat-52.dll',
                                                '${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
-                                               '${LCGDIR}/ffmpeg/lib/avutil-49.dll',
-                                               '${LCGDIR}/ffmpeg/lib/libfaad-0.dll',
-                                               '${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
-                                               '${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
-                                               '${LCGDIR}/ffmpeg/lib/libx264-59.dll',
-                                               '${LCGDIR}/ffmpeg/lib/xvidcore.dll',
+                                               '${LCGDIR}/ffmpeg/lib/avutil-50.dll',
+#                                              '${LCGDIR}/ffmpeg/lib/libfaad-2.dll',
+#                                              '${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
+#                                              '${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
+#                                              '${LCGDIR}/ffmpeg/lib/libx264-67.dll',
+#                                              '${LCGDIR}/ffmpeg/lib/xvidcore.dll',
                                                '${LCGDIR}/ffmpeg/lib/swscale-0.dll']
+       if env['WITH_BF_JACK']:
+               dllsources += ['${LCGDIR}/jack/lib/libjack.dll']
        windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
        allinstall += windlls
 
@@ -621,6 +623,13 @@ if not env['WITHOUT_BF_INSTALL']:
 
 #------------ EPYDOC
 if env['WITH_BF_DOCS']:
-       SConscript('source/blender/python/api2_2x/doc/SConscript')
-       SConscript('source/gameengine/PyDoc/SConscript')
+       try:            import epydoc
+       except: epydoc = None
+       
+       if epydoc:
+               SConscript('source/blender/python/api2_2x/doc/SConscript')
+               SConscript('source/gameengine/PyDoc/SConscript')
+       else:
+               print "No epydoc install detected, Python API and Gameengine API Docs will not be generated "
+