fix for bug of long group long name, bug found and fixed for bmx007
[blender-staging.git] / SConstruct
index 2be80761ab1f27caa44074c5c64c3f173339346b..695fd29795b403230783a55289ef97a2ba8e653f 100644 (file)
@@ -54,8 +54,8 @@ if os.path.isdir (bs_globals.root_build_dir) == 0:
        os.makedirs (bs_globals.root_build_dir+os.sep+'source')
 
 # Blender version.
-version='2.37a'
-shortversion = '237a' # for wininst target -> nsis installer creation
+version='2.40-alpha1'
+shortversion = '240alpha1' # for wininst target -> nsis installer creation
 
 sdl_env = Environment (ENV = os.environ)
 freetype_env = Environment (ENV = os.environ)
@@ -67,13 +67,15 @@ if sys.platform == 'linux2' or sys.platform == 'linux-i386':
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'true'
        use_sumo = 'true'
        use_ode = 'false'
-       use_bullet = 'false'
+       use_bullet = 'true'
        use_buildinfo = 'true'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
-       build_blender_player = 'true'
+       build_blender_player = 'false'
        build_blender_plugin = 'false'
        release_flags = ['-O2']
        debug_flags = ['-O2', '-g']
@@ -94,10 +96,20 @@ if sys.platform == 'linux2' or sys.platform == 'linux-i386':
        png_lib = ['png']
        png_libpath = ['/usr/lib']
        png_include = ['/usr/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = ['/usr/lib']
        jpeg_include = ['/usr/include']
+       #tiff library information
+       tiff_lib = ['tiff']
+       tiff_libpath = ['/usr/lib']
+       tiff_include = ['/usr/include']
        # OpenGL library information
        opengl_lib = ['GL', 'GLU']
        opengl_static = ['/usr/lib/libGL.a', '/usr/lib/libGLU.a']
@@ -150,13 +162,15 @@ elif sys.platform == 'darwin':
        use_gameengine = 'true'
        use_openal = 'true'
        use_fmod = 'false'
-       use_openal = 'false'
+       use_openal = 'true'
        use_quicktime = 'true'
+       use_openexr = 'true'
        use_precomp = 'true'
        use_sumo = 'true'
        use_ode = 'false'
-       use_bullet = 'false'
+       use_bullet = 'true'
        use_buildinfo = 'true'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
        build_blender_player = 'true'
@@ -192,10 +206,20 @@ elif sys.platform == 'darwin':
        png_lib = ['libpng']
        png_libpath = [darwin_precomp + 'png/lib']
        png_include = [darwin_precomp + 'png/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/local/lib']
+       openexr_include = ['/usr/local/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['libjpeg']
        jpeg_libpath = [darwin_precomp + 'jpeg/lib']
        jpeg_include = [darwin_precomp + 'jpeg/include']
+       # TIFF library information
+       tiff_lib = ['libtiff']
+       tiff_libpath = [darwin_precomp + 'tiff/lib']
+       tiff_include = [darwin_precomp + 'tiff/include']
        # OpenGL library information
        opengl_lib = ['GL', 'GLU']
        opengl_static = []
@@ -269,10 +293,12 @@ elif sys.platform == 'cygwin':
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'true'
        use_sumo = 'false'
        use_ode = 'false'
        use_bullet = 'false'
        use_buildinfo = 'false'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
        build_blender_player = 'false'
@@ -298,10 +324,20 @@ elif sys.platform == 'cygwin':
        png_lib = ['png']
        png_libpath = ['#../lib/windows/png/lib']
        png_include = ['#../lib/windows/png/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = ['#../lib/windows/jpeg/lib']
        jpeg_include = ['#../lib/windows/jpeg/include']
+       # Tiff Library information
+       tiff_lib = ['libtiff']
+       tiff_libpath = ['#../lib/windows/tiff/lib']
+       tiff_include = ['#../lib/windows/tiff/include']
        # OpenGL library information
        opengl_lib = ['opengl32', 'glu32']
        opengl_static = []
@@ -354,10 +390,12 @@ elif sys.platform == 'win32':
        use_openal = 'true'
        use_fmod = 'false'
        use_quicktime = 'true'
+       use_openexr = 'true'
+       use_bullet = 'true'
        use_sumo = 'true'
        use_ode = 'false'
-       use_bullet = 'false'
        use_buildinfo = 'true'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
        build_blender_player = 'true'
@@ -367,14 +405,15 @@ elif sys.platform == 'win32':
        extra_flags = ['/EHsc', '/J', '/W3', '/Gd', '/MT']
        cxxflags = []
        defines = ['WIN32', '_CONSOLE']
-       defines += ['WITH_QUICKTIME']
+       if use_quicktime == 'true':
+               defines += ['WITH_QUICKTIME']
        defines += ['_LIB', 'USE_OPENAL']
        defines += ['FTGL_LIBRARY_STATIC']
        warn_flags = []
        platform_libs = [ 'qtmlClient', 'soundsystem',
                                         'ws2_32', 'dxguid', 'vfw32', 'winmm',
                                         'iconv', 'kernel32', 'user32', 'gdi32',
-                                        'winspool', 'comdlg32', 'advapi32', 'shell32',
+                                        'comdlg32', 'advapi32', 'shell32',
                                         'ole32', 'oleaut32', 'uuid', 
                                         'libcmt', 'libc']
        platform_libpath = ['#../lib/windows/iconv/lib',
@@ -404,10 +443,20 @@ elif sys.platform == 'win32':
        png_lib = ['libpng_st']
        png_libpath = ['#../lib/windows/png/lib']
        png_include = ['#../lib/windows/png/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['libjpeg']
        jpeg_libpath = ['#../lib/windows/jpeg/lib']
        jpeg_include = ['#../lib/windows/jpeg/include']
+       # Tiff Library information
+       tiff_lib = ['libtiff']
+       tiff_libpath = ['#../lib/windows/tiff/lib']
+       tiff_include = ['#../lib/windows/tiff/include']
        # OpenGL library information
        opengl_lib = ['opengl32', 'glu32']
        opengl_static = []
@@ -435,9 +484,9 @@ elif sys.platform == 'win32':
        ode_libpath = ['#../lib/windows/ode/lib']
        ode_include = ['#../lib/windows/ode/include']
        # Python lib name
-       python_include = ['#../lib/windows/python/include/python2.3']
+       python_include = ['#../lib/windows/python/include/python2.4']
        python_libpath = ['#../lib/windows/python/lib']
-       python_lib = ['python23']
+       python_lib = ['python24']
        python_linkflags = []
        # International stuff
        ftgl_lib = []
@@ -460,10 +509,12 @@ elif string.find (sys.platform, 'sunos') != -1:
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'false'
        use_sumo = 'false'
        use_ode = 'false'
        use_bullet = 'false'
        use_buildinfo = 'false'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
        build_blender_player = 'false'
@@ -487,6 +538,12 @@ elif string.find (sys.platform, 'sunos') != -1:
        png_lib = ['png']
        png_libpath = []
        png_include = []
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = []
@@ -543,10 +600,12 @@ elif string.find (sys.platform, 'irix') != -1:
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'false'
        use_sumo = 'false'
        use_ode = 'false'
        use_bullet = 'false'
        use_buildinfo = 'false'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
        build_blender_player = 'false'
@@ -578,6 +637,12 @@ elif string.find (sys.platform, 'irix') != -1:
        png_lib = ['png']
        png_libpath = [irix_precomp + '/png/lib']
        png_include = [irix_precomp + '/png/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = [irix_precomp + '/jpeg/lib']
@@ -638,10 +703,12 @@ elif sys.platform=='openbsd3':
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'false'
        use_sumo = 'false'
        use_ode = 'false'
        use_bullet = 'false'
        use_buildinfo = 'true'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
        build_blender_player = 'false'
@@ -664,6 +731,12 @@ elif sys.platform=='openbsd3':
        png_lib = ['png']
        png_libpath = ['/usr/local/lib']
        png_include = ['/usr/local/include/libpng']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = ['/usr/local/lib']
@@ -722,10 +795,12 @@ elif sys.platform=='freebsd4' or sys.platform=='freebsd5':
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'false'
        use_sumo = 'false'
        use_ode = 'false'
        use_bullet = 'false'
        use_buildinfo = 'true'
+       use_fluidsim = 'true'
        build_blender_dynamic = 'true'
        build_blender_static = 'false'
        build_blender_player = 'false'
@@ -748,6 +823,12 @@ elif sys.platform=='freebsd4' or sys.platform=='freebsd5':
        png_lib = ['png']
        png_libpath = ['/usr/local/lib']
        png_include = ['/usr/local/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = ['/usr/local/lib']
@@ -842,13 +923,15 @@ else:
        config.write ("BUILD_GAMEENGINE = %r\n"%(use_gameengine))
        if use_ode == 'true':
                config.write ("USE_PHYSICS = 'ode'\n")
-       elif use_bullet == 'true':
+       elif (use_bullet == 'true') and (use_sumo == 'false'):
                config.write("USE_PHYSICS = 'bullet'\n")
        else:
                config.write ("USE_PHYSICS = 'solid'\n")
        config.write ("USE_OPENAL = %r\n"%(use_openal))
        config.write ("USE_FMOD = %r\n"%(use_fmod))
        config.write ("USE_QUICKTIME = %r\n"%(use_quicktime))
+       config.write ("USE_OPENEXR = %r\n"%(use_openexr))
+       config.write ("USE_FLUIDSIM = %r\n"%(use_fluidsim))
        config.write ("\n# Compiler information.\n")
        config.write ("HOST_CC = %r\n"%(env_dict['CC']))
        config.write ("HOST_CXX = %r\n"%(env_dict['CXX']))
@@ -874,9 +957,15 @@ else:
        config.write ("PNG_INCLUDE = %r\n"%(png_include))
        config.write ("PNG_LIBPATH = %r\n"%(png_libpath))
        config.write ("PNG_LIBRARY = %r\n"%(png_lib))
+        config.write ("OPENEXR_INCLUDE = %r\n"%(openexr_include))
+        config.write ("OPENEXR_LIBPATH = %r\n"%(openexr_libpath))
+        config.write ("OPENEXR_LIBRARY = %r\n"%(openexr_lib))
        config.write ("JPEG_INCLUDE = %r\n"%(jpeg_include))
        config.write ("JPEG_LIBPATH = %r\n"%(jpeg_libpath))
        config.write ("JPEG_LIBRARY = %r\n"%(jpeg_lib))
+       config.write ("TIFF_INCLUDE = %r\n"%(tiff_include))
+       config.write ("TIFF_LIBPATH = %r\n"%(tiff_libpath))
+       config.write ("TIFF_LIBRARY = %r\n"%(tiff_lib))
        config.write ("OPENGL_INCLUDE = %r\n"%(opengl_include))
        config.write ("OPENGL_LIBPATH = %r\n"%(opengl_libpath))
        config.write ("OPENGL_LIBRARY = %r\n"%(opengl_lib))
@@ -957,6 +1046,12 @@ user_options.AddOptions (
                (BoolOption ('USE_QUICKTIME',
                                        'Set to 1 to add support for QuickTime.',
                                        'false')),
+               (BoolOption ('USE_OPENEXR',
+                                        'Set to 1 to add support for OpenEXR.',
+                                        'false')),
+               (BoolOption ('USE_FLUIDSIM', # NT test new
+                                       'Set to 0 to disable compilation of fluid simulation library El\'Beem.',
+                                       'true')),
                ('HOST_CC', 'C compiler for the host platfor. This is the same as target platform when not cross compiling.'),
                ('HOST_CXX', 'C++ compiler for the host platform. This is the same as target platform when not cross compiling.'),
                ('TARGET_CC', 'C compiler for the target platform.'),
@@ -980,9 +1075,15 @@ user_options.AddOptions (
                ('PNG_INCLUDE', 'Include directory for png header files.'),
                ('PNG_LIBPATH', 'Library path where the png library is located.'),
                ('PNG_LIBRARY', 'png library name.'),
+                ('OPENEXR_INCLUDE', 'Include directory for OpenEXR header files.'),
+                ('OPENEXR_LIBPATH', 'Library path where the OpenEXR libraries are located.'),
+                ('OPENEXR_LIBRARY', 'OpenEXR library names.'),
                ('JPEG_INCLUDE', 'Include directory for jpeg header files.'),
                ('JPEG_LIBPATH', 'Library path where the jpeg library is located.'),
                ('JPEG_LIBRARY', 'jpeg library name.'),
+               ('TIFF_INCLUDE', 'Include directory for TIFF header files.'),
+               ('TIFF_LIBPATH', 'Library path where the TIFF library is located.'),
+               ('TIFF_LIBRARY', 'TIFF library name.'),
                ('OPENGL_INCLUDE', 'Include directory for OpenGL header files.'),
                ('OPENGL_LIBPATH', 'Library path where the OpenGL libraries are located.'),
                ('OPENGL_LIBRARY', 'OpenGL library names.'),
@@ -1034,10 +1135,9 @@ bs_globals.config_guess = config_guess
 
 if user_options_dict['BUILD_GAMEENGINE'] == 1:
        defines += ['GAMEBLENDER=1']
+       defines += ['USE_BULLET']
        if user_options_dict['USE_PHYSICS'] == 'ode':
                defines += ['USE_ODE']
-       elif user_options_dict['USE_PHYSICS'] == 'bullet':
-               defines += ['USE_BULLET']
        else:
                defines += ['USE_SUMO_SOLID']
 else:
@@ -1058,6 +1158,9 @@ platform_linkflags += user_options_dict['LDFLAGS']
 
 user_options_dict['PLATFORM_LINKFLAGS'] = platform_linkflags
 
+if user_options_dict['USE_FLUIDSIM'] == 0: # NT test new
+       use_fluidsim='false';
+
 #-----------------------------------------------------------------------------
 # Generic library generation environment. This one is the basis for each
 # library.
@@ -1084,6 +1187,7 @@ if bs_globals.enable_clean==0: # only read SConscripts when not cleaning, this t
        Export ('user_options_dict')
        Export ('library_env')
        Export ('sdl_env')
+       Export ('use_fluidsim') # NT test
        
        BuildDir (bs_globals.root_build_dir+'/extern', 'extern', duplicate=0)
        SConscript (bs_globals.root_build_dir+'extern/SConscript')