fix null pointer dereference in BM_edge_is_contiguous() (own code).
[blender.git] / SConstruct
index e4cbb9cd470008386c5bbcb485dd4246e8f977bd..93e7dc38f5f653e7a4c6183af4b04183200ad56a 100644 (file)
@@ -438,15 +438,17 @@ if not quickie and do_clean:
 # with _any_ library but since we used a fixed python version this tends to
 # be most problematic.
 if env['WITH_BF_PYTHON']:
-    found_python_h = False
+    found_python_h = found_pyconfig_h = False
     for bf_python_inc in env.subst('${BF_PYTHON_INC}').split():
         py_h = os.path.join(Dir(bf_python_inc).abspath, "Python.h")
         if os.path.exists(py_h):
             found_python_h = True
         py_h = os.path.join(Dir(bf_python_inc).abspath, "pyconfig.h")
+        if os.path.exists(py_h):
+            found_pyconfig_h = True
 
-    if not (found_python_h):
-        print("""\nMissing: Python.h in "%s"
+    if not (found_python_h and found_pyconfig_h):
+        print("""\nMissing: Python.h and/or pyconfig.h in "%s"
          Set 'BF_PYTHON_INC' to point to valid include path(s),
          containing Python.h and pyconfig.h for Python version "%s".
 
@@ -515,79 +517,91 @@ def data_to_c_simple(FILE_FROM):
        data_to_c(FILE_FROM, FILE_TO, VAR_NAME)
        
 
-data_to_c("source/blender/compositor/operations/COM_OpenCLKernels.cl",
-          B.root_build_dir + "data_headers/COM_OpenCLKernels.cl.h",
-          "datatoc_COM_OpenCLKernels_cl")
-
-data_to_c_simple("release/datafiles/startup.blend")
-data_to_c_simple("release/datafiles/preview.blend")
-
-# --- glsl ---
-data_to_c_simple("source/blender/gpu/shaders/gpu_shader_material.glsl")
-data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vertex.glsl")
-data_to_c_simple("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl")
-data_to_c_simple("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl")
-data_to_c_simple("source/blender/gpu/shaders/gpu_shader_material.glsl")
-data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl")
-data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl")
-
-# --- blender ---
-data_to_c_simple("release/datafiles/bfont.pfb")
-data_to_c_simple("release/datafiles/bfont.ttf")
-data_to_c_simple("release/datafiles/bmonofont.ttf")
-
-data_to_c_simple("release/datafiles/splash.png")
-data_to_c_simple("release/datafiles/blender_icons16.png")
-data_to_c_simple("release/datafiles/blender_icons32.png")
-data_to_c_simple("release/datafiles/prvicons.png")
-
-data_to_c_simple("release/datafiles/brushicons/add.png")
-data_to_c_simple("release/datafiles/brushicons/blob.png")
-data_to_c_simple("release/datafiles/brushicons/blur.png")
-data_to_c_simple("release/datafiles/brushicons/clay.png")
-data_to_c_simple("release/datafiles/brushicons/claystrips.png")
-data_to_c_simple("release/datafiles/brushicons/clone.png")
-data_to_c_simple("release/datafiles/brushicons/crease.png")
-data_to_c_simple("release/datafiles/brushicons/darken.png")
-data_to_c_simple("release/datafiles/brushicons/draw.png")
-data_to_c_simple("release/datafiles/brushicons/fill.png")
-data_to_c_simple("release/datafiles/brushicons/flatten.png")
-data_to_c_simple("release/datafiles/brushicons/grab.png")
-data_to_c_simple("release/datafiles/brushicons/inflate.png")
-data_to_c_simple("release/datafiles/brushicons/layer.png")
-data_to_c_simple("release/datafiles/brushicons/lighten.png")
-data_to_c_simple("release/datafiles/brushicons/mask.png")
-data_to_c_simple("release/datafiles/brushicons/mix.png")
-data_to_c_simple("release/datafiles/brushicons/multiply.png")
-data_to_c_simple("release/datafiles/brushicons/nudge.png")
-data_to_c_simple("release/datafiles/brushicons/pinch.png")
-data_to_c_simple("release/datafiles/brushicons/scrape.png")
-data_to_c_simple("release/datafiles/brushicons/smear.png")
-data_to_c_simple("release/datafiles/brushicons/smooth.png")
-data_to_c_simple("release/datafiles/brushicons/snake_hook.png")
-data_to_c_simple("release/datafiles/brushicons/soften.png")
-data_to_c_simple("release/datafiles/brushicons/subtract.png")
-data_to_c_simple("release/datafiles/brushicons/texdraw.png")
-data_to_c_simple("release/datafiles/brushicons/thumb.png")
-data_to_c_simple("release/datafiles/brushicons/twist.png")
-data_to_c_simple("release/datafiles/brushicons/vertexdraw.png")
-
-data_to_c_simple("release/datafiles/matcaps/mc01.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc02.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc03.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc04.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc05.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc06.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc07.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc08.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc09.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc10.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc11.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc12.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc13.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc14.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc15.jpg")
-data_to_c_simple("release/datafiles/matcaps/mc16.jpg")
+if B.targets != ['cudakernels']:
+    data_to_c("source/blender/compositor/operations/COM_OpenCLKernels.cl",
+              B.root_build_dir + "data_headers/COM_OpenCLKernels.cl.h",
+              "datatoc_COM_OpenCLKernels_cl")
+
+    data_to_c_simple("release/datafiles/startup.blend")
+    data_to_c_simple("release/datafiles/preview.blend")
+    data_to_c_simple("release/datafiles/preview_cycles.blend")
+
+    # --- glsl ---
+    data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fixed_fragment.glsl")
+    data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fixed_vertex.glsl")
+    data_to_c_simple("source/blender/gpu/shaders/gpu_shader_material.glsl")
+    data_to_c_simple("source/blender/gpu/shaders/gpu_shader_material.glsl")
+    data_to_c_simple("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl")
+    data_to_c_simple("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl")
+    data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vertex.glsl")
+    data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl")
+    data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl")
+
+    # --- blender ---
+    data_to_c_simple("release/datafiles/bfont.pfb")
+    data_to_c_simple("release/datafiles/bfont.ttf")
+    data_to_c_simple("release/datafiles/bmonofont.ttf")
+
+    data_to_c_simple("release/datafiles/splash.png")
+    data_to_c_simple("release/datafiles/blender_icons16.png")
+    data_to_c_simple("release/datafiles/blender_icons32.png")
+    data_to_c_simple("release/datafiles/prvicons.png")
+
+    data_to_c_simple("release/datafiles/brushicons/add.png")
+    data_to_c_simple("release/datafiles/brushicons/blob.png")
+    data_to_c_simple("release/datafiles/brushicons/blur.png")
+    data_to_c_simple("release/datafiles/brushicons/clay.png")
+    data_to_c_simple("release/datafiles/brushicons/claystrips.png")
+    data_to_c_simple("release/datafiles/brushicons/clone.png")
+    data_to_c_simple("release/datafiles/brushicons/crease.png")
+    data_to_c_simple("release/datafiles/brushicons/darken.png")
+    data_to_c_simple("release/datafiles/brushicons/draw.png")
+    data_to_c_simple("release/datafiles/brushicons/fill.png")
+    data_to_c_simple("release/datafiles/brushicons/flatten.png")
+    data_to_c_simple("release/datafiles/brushicons/grab.png")
+    data_to_c_simple("release/datafiles/brushicons/inflate.png")
+    data_to_c_simple("release/datafiles/brushicons/layer.png")
+    data_to_c_simple("release/datafiles/brushicons/lighten.png")
+    data_to_c_simple("release/datafiles/brushicons/mask.png")
+    data_to_c_simple("release/datafiles/brushicons/mix.png")
+    data_to_c_simple("release/datafiles/brushicons/multiply.png")
+    data_to_c_simple("release/datafiles/brushicons/nudge.png")
+    data_to_c_simple("release/datafiles/brushicons/pinch.png")
+    data_to_c_simple("release/datafiles/brushicons/scrape.png")
+    data_to_c_simple("release/datafiles/brushicons/smear.png")
+    data_to_c_simple("release/datafiles/brushicons/smooth.png")
+    data_to_c_simple("release/datafiles/brushicons/snake_hook.png")
+    data_to_c_simple("release/datafiles/brushicons/soften.png")
+    data_to_c_simple("release/datafiles/brushicons/subtract.png")
+    data_to_c_simple("release/datafiles/brushicons/texdraw.png")
+    data_to_c_simple("release/datafiles/brushicons/thumb.png")
+    data_to_c_simple("release/datafiles/brushicons/twist.png")
+    data_to_c_simple("release/datafiles/brushicons/vertexdraw.png")
+
+    data_to_c_simple("release/datafiles/matcaps/mc01.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc02.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc03.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc04.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc05.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc06.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc07.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc08.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc09.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc10.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc11.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc12.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc13.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc14.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc15.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc16.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc17.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc18.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc19.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc20.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc21.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc22.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc23.jpg")
+    data_to_c_simple("release/datafiles/matcaps/mc24.jpg")
 
 ##### END DATAFILES ##########
 
@@ -853,6 +867,8 @@ if env['OURPLATFORM']=='linux':
         td, tf = os.path.split(targetdir)
         iconinstall.append(env.Install(dir=td, source=srcfile))
 
+    scriptinstall.append(env.Install(dir=env['BF_INSTALLDIR'], source='release/bin/blender-thumbnailer.py'))
+
 # dlls for linuxcross
 # TODO - add more libs, for now this lets blenderlite run
 if env['OURPLATFORM']=='linuxcross':