import scripts.bzr
import os
Import('env')
rev = env.Command('revision.cc', None, scripts.bzr.makeRevisionHeader)
files = ['VosApp.cc',
'a3dlComponents.cc',
'lfa3dlComponents.cc',
'guiComponents.cc',
'interreality3dInit.cc',
'viewsComponents.cc',
'WxFrame.cc',
'wxguiComponents.cc',
'WxMultiframeContext.cc',
'WxWindow.cc',
'TreeView.cc',
'Clock.cc',
'Scene.cc',
'Node.cc',
'Transform.cc',
'Camera.cc',
'RenderLayer.cc',
'RenderLayer2D.cc',
'RenderLayer3D.cc',
'Light.cc',
'GeometryNode.cc',
'MeshData.cc',
'Material.cc',
'Texture.cc',
'LFScene.cc',
'LFNode.cc',
'LFTransform.cc',
'LFCamera.cc',
'LFLight.cc',
'LFGeometryNode.cc',
'LFMeshData.cc',
'LFMaterial.cc',
'LFTexture.cc',
'LFWXCanvas.cc',
'ThreeDeeView.cc',
rev]
if env['PLATFORM'] == 'win32':
linkflags = ['/SUBSYSTEM:WINDOWS']
resourcefile = env.Command('VosApp.res', 'VosApp.rc', 'rc /r /i $THIRDPARTY_STAGEDIR\include /fo $TARGET $SOURCE')
files.append(resourcefile)
else:
linkflags = []
infoPlist = """
CFBundleDocumentTypes
CFBundleTypeExtensions
cod
CFBundleTypeName
Compact Object Description
CFBundleTypeOSTypes
****
CFBundleTypeRole
Viewer
"""
ir3d = env.Program('interreality3d', files,
CPPPATH=(env['CPPPATH']+env['LFPE_CPPPATH']),
CPPDEFINES=(env['LFPE_CPPDEFINES'] + [env.subst('-DVOS_ROOT=\'"$DESTDIR"\'')]),
LIBS=(['$XERCES_LIBS', 'vos', 'libicui18n'] + env['LFPE_LIBS'] + env['WX_LIBS']),
FRAMEWORKS=env['LF_FRAMEWORKS']+['CoreFoundation'],
LINKFLAGS = env['LINKFLAGS']+linkflags)
gui = env.InstallGUIProgram(ir3d,
osxIcon='vosuiprototype.icns',
extraInfoPlist=infoPlist,
resources=['../../../../../data/park.cod', '../../../../../data/redrobot.cod'])
blendExp = env.Install(os.path.join(env['DESTDIR'], 'lib', 'blender', 'scripts'),
'../../../../../data/blenderExportCOD.py')
if env['PLATFORM'] == 'darwin':
inst = env.CreateOSXDiskImage('../../../interreality3d-'+env['VERSION'], 512, gui + blendExp)
env.Alias('installer', inst)
env.Default(gui)