2008-10-31 23:50:02 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
import sys
|
|
|
|
|
import os
|
|
|
|
|
|
2009-03-30 07:28:37 +00:00
|
|
|
def normpath(path):
|
|
|
|
|
return os.path.abspath(os.path.normpath(path))
|
|
|
|
|
|
2008-10-31 23:50:02 +00:00
|
|
|
Import ('env')
|
2009-01-01 15:52:51 +00:00
|
|
|
cflags = '-Wall'
|
2008-10-31 23:50:02 +00:00
|
|
|
defines = []
|
2009-03-30 07:28:37 +00:00
|
|
|
root_build_dir=normpath(env['BF_BUILDDIR'])
|
2008-10-31 23:50:02 +00:00
|
|
|
|
|
|
|
|
source_files = env.Glob('*.c')
|
|
|
|
|
source_files.remove('rna_access.c')
|
|
|
|
|
|
2009-01-08 13:57:29 +00:00
|
|
|
generated_files = source_files[:]
|
|
|
|
|
generated_files.remove('rna_define.c')
|
|
|
|
|
generated_files.remove('makesrna.c')
|
|
|
|
|
|
2009-06-18 19:48:55 +00:00
|
|
|
api_files = env.Glob('*_api.c')
|
|
|
|
|
for api_file in api_files:
|
|
|
|
|
generated_files.remove(api_file)
|
|
|
|
|
|
|
|
|
|
generated_files = [filename[:-2] + '_gen.c' for filename in generated_files]
|
2009-04-08 16:40:46 +00:00
|
|
|
|
2008-11-07 19:21:52 +00:00
|
|
|
makesrna_tool = env.Clone()
|
|
|
|
|
rna = env.Clone()
|
2008-10-31 23:50:02 +00:00
|
|
|
makesrna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesrna/\\"" ')
|
|
|
|
|
|
2009-06-09 10:30:16 +00:00
|
|
|
defs = []
|
|
|
|
|
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
incs = '#/intern/guardedalloc ../../blenlib ../../blenkernel'
|
|
|
|
|
incs += ' ../../imbuf ../../makesdna ../../makesrna'
|
|
|
|
|
incs += ' ../../windowmanager ../../editors/include'
|
2009-07-21 14:11:51 +00:00
|
|
|
incs += ' ../../render/extern/include'
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2009-06-09 10:30:16 +00:00
|
|
|
if env['WITH_BF_OPENEXR']:
|
|
|
|
|
defs.append('WITH_OPENEXR')
|
|
|
|
|
|
|
|
|
|
if env['WITH_BF_OPENJPEG']:
|
|
|
|
|
defs.append('WITH_OPENJPEG')
|
|
|
|
|
|
|
|
|
|
if env['WITH_BF_DDS']:
|
|
|
|
|
defs.append('WITH_DDS')
|
|
|
|
|
|
|
|
|
|
if env['WITH_BF_FFMPEG']:
|
|
|
|
|
defs.append('WITH_FFMPEG')
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
incs += ' ' + env['BF_FFMPEG_INC']
|
|
|
|
|
|
|
|
|
|
if env['WITH_BF_OGG']:
|
|
|
|
|
defs.append('WITH_OGG')
|
2009-06-09 10:30:16 +00:00
|
|
|
|
|
|
|
|
if env['WITH_BF_QUICKTIME']:
|
|
|
|
|
defs.append('WITH_QUICKTIME')
|
|
|
|
|
|
2009-06-16 00:52:21 +00:00
|
|
|
if env['WITH_BF_LCMS']:
|
|
|
|
|
defs.append('WITH_LCMS')
|
|
|
|
|
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
if env['WITH_BF_GAMEENGINE']:
|
|
|
|
|
defs.append('GAMEBLENDER=1')
|
|
|
|
|
|
2009-06-09 10:30:16 +00:00
|
|
|
makesrna_tool.Append(CPPDEFINES=defs)
|
|
|
|
|
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
makesrna_tool.Append (CPPPATH = Split(incs))
|
2008-10-31 23:50:02 +00:00
|
|
|
|
|
|
|
|
if env['OURPLATFORM'] == 'linuxcross':
|
2009-01-28 09:32:31 +00:00
|
|
|
USE_WINE = True # when cross compiling on linux 64bit this is useful
|
|
|
|
|
else:
|
|
|
|
|
USE_WINE = False
|
|
|
|
|
|
|
|
|
|
if not USE_WINE:
|
|
|
|
|
if env['OURPLATFORM'] == 'linuxcross':
|
|
|
|
|
makesdna_tool.Replace(CC='gcc')
|
|
|
|
|
makesdna_tool.Replace(AR='ar')
|
|
|
|
|
makesdna_tool.Replace(LINK='gcc')
|
2008-10-31 23:50:02 +00:00
|
|
|
|
|
|
|
|
if sys.platform != 'cygwin':
|
2009-04-16 10:45:21 +00:00
|
|
|
makesrna_tool.Append (CCFLAGS = cflags)
|
2008-10-31 23:50:02 +00:00
|
|
|
makesrna_tool.Append (CPPDEFINES = defines)
|
2008-11-30 13:25:59 +00:00
|
|
|
|
|
|
|
|
libdir = root_build_dir+'/lib'
|
|
|
|
|
if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
|
|
|
|
|
libdir = '#' + libdir
|
|
|
|
|
|
|
|
|
|
makesrna_tool.Append (LIBPATH = libdir)
|
|
|
|
|
|
2008-10-31 23:50:02 +00:00
|
|
|
if env['BF_PROFILE']:
|
|
|
|
|
makesrna_tool.Append (LINKFLAGS = env['BF_PROFILE_FLAGS'])
|
|
|
|
|
|
2008-12-01 21:13:49 +00:00
|
|
|
if env['BF_DEBUG']:
|
|
|
|
|
makesrna_tool.Append(CFLAGS = env['BF_DEBUG_CFLAGS'])
|
|
|
|
|
makesrna_tool.Append(CCFLAGS = env['BF_DEBUG_CCFLAGS'])
|
2009-07-16 19:41:28 +00:00
|
|
|
if env['OURPLATFORM'] in ('win32-vc','win64-vc'):
|
2008-12-01 21:13:49 +00:00
|
|
|
makesrna_tool.Append(LINKFLAGS = ['/DEBUG','/PDB:makesrna.pdb'])
|
|
|
|
|
|
2008-11-30 13:25:59 +00:00
|
|
|
targetpath = root_build_dir+'/makesrna'
|
|
|
|
|
if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
|
|
|
|
|
targetpath = '#' + targetpath
|
|
|
|
|
|
2008-10-31 23:50:02 +00:00
|
|
|
if env['OURPLATFORM'] == 'linux2' and root_build_dir[0]==os.sep:
|
2009-04-16 10:45:21 +00:00
|
|
|
makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_guardedalloc', 'bf_dna'])
|
2008-10-31 23:50:02 +00:00
|
|
|
else:
|
2009-04-16 10:45:21 +00:00
|
|
|
makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_guardedalloc', 'bf_dna'])
|
2008-10-31 23:50:02 +00:00
|
|
|
|
|
|
|
|
rna_dict = rna.Dictionary()
|
2009-01-08 13:57:29 +00:00
|
|
|
rna.Depends (generated_files, makesrna)
|
|
|
|
|
|
|
|
|
|
# this seems bad, how to retrieve it from scons?
|
2009-04-16 10:45:21 +00:00
|
|
|
build_dir = root_build_dir + os.sep +'source' + os.sep + 'blender' + os.sep + 'makesrna' + os.sep + 'intern' + os.sep
|
2009-01-08 13:57:29 +00:00
|
|
|
|
2008-10-31 23:50:02 +00:00
|
|
|
if env['OURPLATFORM'] != 'linuxcross':
|
2009-04-16 10:45:21 +00:00
|
|
|
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'):
|
|
|
|
|
rna.Command (generated_files, '', "\"" + root_build_dir+os.sep+"makesrna.exe\" \"" + build_dir )
|
|
|
|
|
else:
|
|
|
|
|
rna.Command (generated_files, '', root_build_dir+os.sep+"makesrna " + build_dir)
|
2008-10-31 23:50:02 +00:00
|
|
|
else:
|
2009-04-16 10:45:21 +00:00
|
|
|
rna.Command (generated_files, '', root_build_dir+os.sep+"makesrna.exe " + build_dir)
|
2009-01-28 09:32:31 +00:00
|
|
|
|
2009-04-16 10:45:21 +00:00
|
|
|
if USE_WINE:
|
|
|
|
|
rna.Command (generated_files, '', 'wine ' + root_build_dir+os.sep+"makesrna.exe " + build_dir)
|
|
|
|
|
else:
|
|
|
|
|
rna.Command (generated_files, '', root_build_dir+os.sep+"makesrna.exe " + build_dir)
|
2009-01-28 09:32:31 +00:00
|
|
|
|
2009-01-08 13:57:29 +00:00
|
|
|
|
2009-03-23 13:24:48 +00:00
|
|
|
obj = ['intern/rna_access.c']
|
2009-01-08 13:57:29 +00:00
|
|
|
for generated_file in generated_files:
|
|
|
|
|
obj += ['intern/' + generated_file]
|
|
|
|
|
|
2008-10-31 23:50:02 +00:00
|
|
|
Return ('obj')
|
|
|
|
|
|