Merging r49775 through r49807 from trunk into soc-2011-tomato
[blender.git] / SConstruct
index 6cb2da36ccdfcdb08b07a071b28d68c7c9dc1ed2..4d33eb7d6a5e18167f5d16dfc1796769abdbb96e 100644 (file)
@@ -450,8 +450,11 @@ if not os.path.isdir ( B.root_build_dir):
 ###################################
 if not os.path.isdir ( B.root_build_dir + 'data_headers'):
     os.makedirs ( B.root_build_dir + 'data_headers' )
+if not os.path.isdir ( B.root_build_dir + 'data_sources'):
+    os.makedirs ( B.root_build_dir + 'data_sources' )
 # use for includes
 env['DATA_HEADERS'] = os.path.join(os.path.abspath(env['BF_BUILDDIR']), "data_headers")
+env['DATA_SOURCES'] = os.path.join(os.path.abspath(env['BF_BUILDDIR']), "data_sources")
 def ensure_data(FILE_FROM, FILE_TO, VAR_NAME):
     if os.sep == "\\":
         FILE_FROM = FILE_FROM.replace("/", "\\")
@@ -487,6 +490,39 @@ ensure_data("source/blender/compositor/operations/COM_OpenCLKernels.cl",
             B.root_build_dir + "data_headers/COM_OpenCLKernels.cl.h",
             "clkernelstoh_COM_OpenCLKernels_cl")
 
+ensure_data("./release/datafiles/startup.blend",
+            B.root_build_dir + "data_sources/startup.blend.c",
+            "datatoc_startup_blend")
+
+ensure_data("./release/datafiles/preview.blend",
+            B.root_build_dir + "data_sources/preview.blend.c",
+            "datatoc_preview_blend")
+
+# --- glsl ---
+ensure_data("source/blender/gpu/shaders/gpu_shader_material.glsl",
+            B.root_build_dir + "data_sources/gpu_shader_material.glsl.c",
+            "datatoc_gpu_shader_material_glsl")
+ensure_data("source/blender/gpu/shaders/gpu_shader_vertex.glsl",
+            B.root_build_dir + "data_sources/gpu_shader_vertex.glsl.c",
+            "datatoc_gpu_shader_vertex_glsl")
+ensure_data("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl",
+            B.root_build_dir + "data_sources/gpu_shader_sep_gaussian_blur_frag.glsl.c",
+            "datatoc_gpu_shader_sep_gaussian_blur_frag_glsl")
+ensure_data("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl",
+            B.root_build_dir + "data_sources/gpu_shader_sep_gaussian_blur_vert.glsl.c",
+            "datatoc_gpu_shader_sep_gaussian_blur_vert_glsl")
+ensure_data("source/blender/gpu/shaders/gpu_shader_material.glsl",
+            B.root_build_dir + "data_sources/gpu_shader_material.glsl.c",
+            "datatoc_gpu_shader_material_glsl")
+ensure_data("source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl",
+            B.root_build_dir + "data_sources/gpu_shader_vsm_store_frag.glsl.c",
+            "datatoc_gpu_shader_vsm_store_frag_glsl")
+ensure_data("source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl",
+            B.root_build_dir + "data_sources/gpu_shader_vsm_store_vert.glsl.c",
+            "datatoc_gpu_shader_vsm_store_vert_glsl")
+
+
+
 ##### END DATAFILES ##########
 
 Help(opts.GenerateHelpText(env))