install.pcf
上传用户:dangjiwu
上传日期:2013-07-19
资源大小:42019k
文件大小:10k
- #
- # ***** BEGIN LICENSE BLOCK *****
- # Version: RCSL 1.0/RPSL 1.0
- #
- # Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved.
- #
- # The contents of this file, and the files included with this file, are
- # subject to the current version of the RealNetworks Public Source License
- # Version 1.0 (the "RPSL") available at
- # http://www.helixcommunity.org/content/rpsl unless you have licensed
- # the file under the RealNetworks Community Source License Version 1.0
- # (the "RCSL") available at http://www.helixcommunity.org/content/rcsl,
- # in which case the RCSL will apply. You may also obtain the license terms
- # directly from RealNetworks. You may not use this file except in
- # compliance with the RPSL or, if you have a valid RCSL with RealNetworks
- # applicable to this file, the RCSL. Please see the applicable RPSL or
- # RCSL for the rights, obligations and limitations governing use of the
- # contents of the file.
- #
- # This file is part of the Helix DNA Technology. RealNetworks is the
- # developer of the Original Code and owns the copyrights in the portions
- # it created.
- #
- # This file, and the files included with this file, is distributed and made
- # available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- # EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS
- # FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- #
- # Technology Compatibility Kit Test Suite(s) Location:
- # http://www.helixcommunity.org/content/tck
- #
- # Contributor(s):
- #
- # ***** END LICENSE BLOCK *****
- #
- #
- # This file contains python code that determines which files need
- # to be installed for the current profile (feature set)
- #
- # Four lists are created: app_files, cfg_files, mdl_fils, lib_names
- #
- # Each list item is a full path to the file (path to module build output)
- # that needs to be installed
- #
- # app_files go to {app install dir}
- # cfg_files go to {app install dir}data
- # lib_files go to {app install dir}lib
- # mdl_files go to {system dir}recogs
- #
- # Each of these lists is mirrored by another list that contains paths
- # to files that are output by 'make copy', i.e.:
- #
- # app_files_copy
- # cfg_files_copy
- # lib_files_copy
- # mdl_files_copy
- #
- symbianPlayerMod = "clientapps\symbianplayer"
- symbianRecogMod = "clientapps\symbianrecog"
- #
- # dirs where files to be installed are located
- #
- playerOutputDir = "%s\%s\%s\" % (project.src_root_path, symbianPlayerMod, project.output_dir)
- playerConfigDir = "%s\%s\config\" % (project.src_root_path, symbianPlayerMod)
- recogOutputDir = "%s\%s\%s\" % (project.src_root_path, symbianRecogMod, project.output_dir)
- # where 'copy' copies output (i.e., debug or release)
- makeCopyOutputDir = "%s\" % (project.target_dir)
- #
- # app_files
- #
- # aif should be installed before app to work around Symbian installer bug
- app_file_names = [ 'realplayer.aif',
- 'realplayer.app',
- 'realplayer.rsc',
- 'realplayer_caption.rsc',
- 'realplayer.mbm']
- app_files = AddPrefixForEach(playerOutputDir, app_file_names)
- app_files_copy = AddPrefixForEach(makeCopyOutputDir, app_file_names)
- #
- # cfg_files
- #
- cfg_file_names = [ 'R1_Mobile_4_0.cfg',
- 'R1_Mobile_4_0_Operator.cfg',
- 'R1_Mobile_4_0_Factory.cfg']
- cfg_files = AddPrefixForEach(playerConfigDir, cfg_file_names)
- cfg_files_copy = AddPrefixForEach(makeCopyOutputDir, cfg_file_names)
- #
- # mdl_files
- #
- mdl_file_names = ['hxsymrecog.mdl']
- mdl_files = AddPrefixForEach(recogOutputDir, mdl_file_names)
- mdl_files_copy = AddPrefixForEach(makeCopyOutputDir, mdl_file_names)
- #
- # lib_files
- #
- lib_names = []
- # some dlls like vidplin aggregate functionality offered individually with
- # other dlls; this list tracks those dlls that can be removed from the list
- # of dlls to install because another dll duplicates or replaces the functionality
- lib_names_remove = []
- # maps lib short name to where it is output when built/distributed
- name_map = {
- '3gppttrenderer' : 'datatype/3gpptext/renderer/[target]/3gppttrenderer.dll',
- 'amrff' : 'datatype/amr/fileformat/[target]amrff.dll',
- 'amrn' : 'datatype/amr/codec/amr-nb/[target]/amrn.dll',
- 'amrw' : 'datatype/amr/codec/amr-wb/[target]/amrw.dll',
- 'audplin' : 'datatype/group/audio/[target]/audplin.dll',
- 'clntcore' : 'client/core/[target]/clntcore.dll',
- 'comimgff' : 'datatype/image/unified/fileformat/[target]/comimgff.dll',
- 'comimgrend' : 'datatype/image/unified/renderer/[target]/comimgrend.dll',
- 'cook' : 'datatype/rm/audio/codec/ra8lbr/[target]/cook.dll',
- 'drv2' : 'datatype/rm/video/codec/rvg2dec/[target]/drv2.dll',
- 'drvc' : 'datatype/rm/video/codec/rv89combo/[target]/drvc.dll',
- 'giffformat' : 'datatype/image/gif/fileformat/[target]/giffformat.dll',
- 'gifrender' : 'datatype/image/gif/renderer/[target]/gifrender.dll',
- 'h263render' : 'datatype/h263/renderer/[target]/h263/renderer/[target]/h263render.dll',
- 'httpfilesys' : 'filesystem/httplite/[target]/httpfilesys.dll',
- 'hxsdp' : 'protocol/sdp/[target]/hxsdp.dll',
- 'mp3d' : 'datatype/mp3/decoder/[target]/mp3d.dll',
- 'mp3fformat' : 'datatype/mp3/fileformat/[target]/mp3fformat.dll',
- 'mp3render' : 'datatype/mp3/renderer/[target]/mp3render.dll',
- 'mp4arender' : 'datatype/mp4/audio/renderer/[target]/mp4arender.dll',
- 'mp4fformat' : 'datatype/mp4/fileformat/[target]/mp4fformat.dll',
- 'mp4vrender' : 'datatype/mp4/video/renderer/[target]/mp4vrender',
- 'rafformat' : 'datatype/rm/fileformat/[target]/rafformat.dll',
- 'rarender' : 'datatype/rm/audio/renderer/[target]/rarender.dll',
- 'rmfformat' : 'datatype/rm/fileformat/[target]/rmfformat.dll',
- 'rv30' : 'datatype/rm/video/codec/rv89combo/[target]/rv30.dll',
- 'rv40' : 'datatype/rm/video/codec/rv89combo/[target]/rv40.dll',
- 'rvxrender' : 'datatype/rm/video/renderer/[target]/rvxrender',
- 'sipr' : 'datatype/rm/audio/codec/sipro/[target]/sipr.dll',
- 'smlfformat' : 'datatype/smil/fileformat/[target]/smlfformat.dll',
- 'smlrender' : 'datatype/smil/renderer/[target]/smlrender.dll',
- 'smplfsys' : 'filesystem/local/[target]/smplfsys.dll',
- 'vidplin' : 'datatype/group/video/[target]/vidplin.dll',
- 'vidsite' : 'video/site/[target]/vidsite.dll'
- }
- #
- # some helpers to reduce clutter...
- #
- def Add(*files):
- ''' add files to list of files to install '''
- global lib_names
- for f in files:
- lib_names.append(f)
- def Remove(*files):
- ''' add files to list of files remove from install list '''
- global lib_names_remove
- for f in files:
- lib_names_remove.append(f)
- def AddLocal(*files):
- ''' add files only if local playback feature supported'''
- if project.IsDefined("HELIX_FEATURE_PLAYBACK_LOCAL"):
- apply(Add, files)
- def StripDupes(list):
- ''' return new list with duplicates removed '''
- newList = []
- for item in list:
- if (item not in newList):
- newList.append(item)
- return newList
- # always add client core dll
- Add('clntcore')
- if project.IsDefined("HELIX_FEATURE_PLAYBACK_LOCAL"):
- Add('smplfsys')
- if project.IsDefined("HELIX_FEATURE_PLAYBACK_NET"):
- Add('hxsdp')
- Add('httpfilesys')
- if project.IsDefined("HELIX_FEATURE_3GPP"):
- Add('amrn', 'amrw')
- Add('rv40')
- # audplin aggregates mp4arender and armff
- Add('audplin')
- Remove('mp4arender', 'amrff')
- AddLocal('mp4fformat')
- if project.IsDefined("HELIX_FEATURE_VIDEO"):
- Add('vidsite', 'vidplin')
- # vidplin aggregates functionality for all these
- Remove('h263render', 'mp4vrender', 'rvxrender')
- if project.IsDefined("HELIX_FEATURE_VIDEO_H263"):
- Add('h263render', 'rv40', 'drv2')
- if project.IsDefined("HELIX_FEATURE_VIDEO_CODEC_RV20"):
- Add('rv40', 'drv2')
- if project.IsDefined("HELIX_FEATURE_VIDEO_CODEC_RV30"):
- Add('rv40', 'drvc')
- if project.IsDefined("HELIX_FEATURE_VIDEO_CODEC_RV40"):
- Add('rv40', 'drvc')
- Remove('rv30')
- #if project.IsDefined("HELIX_FEATURE_VIDEO_MPEG4"):
- # Add('mp4vrender', 'rv40')
- if project.IsDefined("HELIX_FEATURE_VIDEO_REAL"):
- AddLocal('rmfformat')
- Add('rvxrender')
- if project.IsDefined("HELIX_FEATURE_AUDIO_REAL"):
- Add('rarender')
- AddLocal('rmfformat')
- if project.IsDefined("HELIX_FEATURE_AUDIO_CODEC_GECKO"):
- Add('cook')
- if project.IsDefined("HELIX_FEATURE_AUDIO_CODEC_SIPRO"):
- Add('sipr')
- if project.IsDefined("HELIX_FEATURE_AUDIO_MPA_LAYER3"):
- AddLocal('mp3fformat')
- if project.IsDefined("HELIX_FEATURE_AUDIO_CODEC_MP3"):
- Add('mp3d')
- else:
- Add('mp3render')
- if project.IsDefined("HELIX_FEATURE_SMIL2"):
- Add('smlrender', 'smlfformat', 'comimgrend',
- 'comimgff', 'gifrender', 'giffformat')
- if project.IsDefined("HELIX_FEATURE_TIMEDTEXT"):
- Add('3gppttrenderer')
- # remove duplicates that fall under multiple features; sort so we can find more easily
- lib_names = StripDupes(lib_names)
- lib_names.sort()
- # remove redundant dlls
- for f in lib_names_remove:
- if f in lib_names:
- lib_names.remove(f)
- # replace '[target]' with target and add full path prefix to generate full path,
- # e.g., '../../filesystem/local/thumb-rel/smpfsys.dll'
- lib_files = []
- for f in lib_names:
- path = name_map[f].replace('[target]',project.output_dir)
- path = os.path.join(project.src_root_path, path)
- path = os.path.normpath(path)
- lib_files.append(path)
-
- # add make copy output dir prefix and .dll suffix, e.g. '../../debug/foo.dll'
- lib_files_copy = []
- for f in lib_names:
- path = os.path.join(makeCopyOutputDir, f)
- path += ".dll"
- path = os.path.normpath(path)
- lib_files_copy.append(path)
- def GetInstallName(default):
- ''' create an install name that describes current profile (if possible) '''
- installName = default
- if project.IsDefined('HELIX_PROFILE_S60_ADVANCED'):
- installName = '%s-s60-advanced' % installName
- elif project.IsDefined('HELIX_PROFILE_S60_BASIC'):
- installName = '%s-s60-basic' % installName
- return installName