symbian.pcf
上传用户:dangjiwu
上传日期:2013-07-19
资源大小:42019k
文件大小:18k
- #
- # ***** 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 *****
- # root directory for source relative to current directory; empty means current directory
- try:
- sourceRoot = sourceRoot
- except:
- sourceRoot = ""
- #
- # get list of files for installation (in app_files, cfg_files, lib_files, mdl_files)
- #
- execfile("install.pcf")
- installName = GetInstallName('rplay')
- #
- # ************* local defines *************
- #
- # debug feature for debugging/testing mmc lock/unlock related functionality
- # project.AddDefines('SYMBIANPLAYER_INCLUDE_LOCK_DRIVE_UI')
- # for about box
- project.AddDefines('SYMBIANPLAYER_INSTALL_NAME=%s' % installName)
- #
- # ************* MBM file generation *************
- #
- mbmList = ["audio_icon_left.bmp",
- "audio_icon_right.bmp",
- "background_logo.bmp",
- "file_folder.bmp",
- "file_folder_mask.bmp",
- "file_local.bmp",
- "file_local_mask.bmp",
- "file_mmc.bmp",
- "file_mmc_broken.bmp",
- "file_mmc_broken_mask.bmp",
- "file_mmc_mask.bmp",
- "file_network.bmp",
- "file_network_mask.bmp",
- "fileview_mmc_tab.bmp",
- "fileview_mmc_tab_mask.bmp",
- "fileview_local_tab.bmp",
- "fileview_local_tab_mask.bmp",
- "mark_check.bmp",
- "mark_check_mask.bmp",
- "qgn_menu_rp_grey_cxt.bmp",
- "qgn_menu_rp_grey_cxt_mask.bmp",
- "qgn_prop_media_sub.bmp",
- "qgn_prop_media_sub_mask.bmp",
- "qgn_indi_live_disabled.bmp",
- "qgn_indi_live_disabled_mask.bmp",
- "qgn_indi_live_enabled.bmp",
- "qgn_indi_live_enabled_mask.bmp",
- "qgn_indi_paused.bmp",
- "qgn_indi_paused_mask.bmp",
- "qgn_prop_sett_network_sub.bmp",
- "qgn_prop_sett_network_sub_mask.bmp",
- "qgn_prop_sett_network_tab.bmp",
- "qgn_prop_mmc_locked_small.bmp",
- "qgn_prop_mmc_locked_small_mask.bmp",
- "qgn_prop_mmc_non_small.bmp",
- "qgn_prop_mmc_non_small_mask.bmp",
- "qgn_prop_phone_small.bmp",
- "qgn_prop_phone_small_mask.bmp",
- "qgn_prop_mmc_small.bmp",
- "qgn_prop_mmc_small_mask.bmp",
- "qgn_prop_network_sub.bmp",
- "qgn_prop_network_sub_mask.bmp",
- "qgn_prop_sett_network_tab_mask.bmp",
- "qgn_prop_sett_playback_sub.bmp",
- "qgn_prop_sett_playback_sub_mask.bmp",
- "qgn_prop_sett_playback_tab.bmp",
- "qgn_prop_sett_playback_tab_mask.bmp",
- "qgn_prop_sett_proxy_sub.bmp",
- "qgn_prop_sett_proxy_sub_mask.bmp",
- "qgn_prop_sett_proxy_tab.bmp",
- "qgn_prop_sett_proxy_tab_mask.bmp",
- "qgn_prop_sett_video_sub.bmp",
- "qgn_prop_sett_video_sub_mask.bmp",
- "qgn_prop_sett_video_tab.bmp",
- "qgn_prop_sett_video_tab_mask.bmp",
- "vol_mute.bmp",
- "vol_mute_mask.bmp"]
- mbmBase = sourceRoot + "platform/symbian/images/"
- mbmList = AddPrefixForEach(mbmBase, mbmList)
- if (not os.path.exists(project.output_dir)):
- os.mkdir(project.output_dir)
- mbmFileOut = project.output_dir + "/realplayer.mbm"
- mbmHeaderOut = mbmBase + "realplayer.mbg"
- # XXXLCM mbm file and includes output to dir where source is; consider revising!
- project.symbianUtil.create_mbm_file(mbmFileOut, mbmHeaderOut, "/c8", mbmList)
- # add include for generated mbm header file
- mbmInclude = mbmBase[:-1] # get rid of trailing '/'
- project.AddIncludes(mbmInclude)
- #
- # ************* resource file generation *************
- #
- def CreateResourceIncludeFile(outputDir):
- # Writes out include file with preprocessor defines for inclusion
- # by app rss file. We do this because the rss generation tool does
- # not allow us to pass macros on the command line.
- name = os.path.join(outputDir, "realplayer_rss.inc")
- file = open(name, 'w')
- file.write("/* GENERATED FILE - DO NOT EDIT */n")
- if project.IsDefined("HELIX_FEATURE_DPRINTF"):
- file.write("#define HELIX_FEATURE_DPRINTFn");
- file.write("n")
- file.close();
- resourceSourceDir = os.path.join(sourceRoot, "platform\symbian\resource")
- CreateResourceIncludeFile(resourceSourceDir)
- resourceFiles = ["platform/symbian/resource/realplayer.rss",
- "platform/symbian/resource/realplayer_caption.rss"]
- resourceFiles = AddPrefixForEach(sourceRoot, resourceFiles)
- apply(project.symbianUtil.AddResourceFiles, resourceFiles)
- project.symbianUtil.AddResourceIncludes(sourceRoot + "platform/symbian/resource")
- #
- # ************* aif file generation *************
- #
- def CreateAIFIncludeFile(outputDir):
- # Writes out include file with preprocessor defines for inclusion
- # by AIF rss file. We do this because the aif generation tool
- # (epocaif.pl) does not allow us to pass macros on the command
- # line.
- name = os.path.join(outputDir, "realplayer_aif.inc")
- file = open(name, 'w')
- file.write("/* GENERATED FILE - DO NOT EDIT */n")
- if project.IsDefined("HELIX_FEATURE_3GPP"):
- file.write("#define HELIX_FEATURE_3GPPn");
- if project.IsDefined("HELIX_FEATURE_AUDIO_MPA_LAYER3"):
- file.write("#define HELIX_FEATURE_AUDIO_MPA_LAYER3n");
- if project.IsDefined("HELIX_FEATURE_SMIL2"):
- file.write("#define HELIX_FEATURE_SMIL2n");
- file.write("n")
- file.close();
- aifSourceDir = os.path.join(sourceRoot, "platform\symbian\aif")
- # generate include file first
- CreateAIFIncludeFile(aifSourceDir)
- aifIcons = "qgn_menu_rp_cxt.bmp qgn_menu_rp_cxt_mask.bmp qgn_menu_rp_lst.bmp qgn_menu_rp_lst_mask.bmp"
- aifIconList = string.split(aifIcons)
- aif = SymbianAIF(aifSourceDir, "realplayer_aif.rss", aifIconList)
- aif.AddIncludeDir(sourceRoot + "platform\symbian\resource")
- aif.AddIncludeDir(aifSourceDir)
- aifOutputDir = project.output_dir
- EnsureDirExists(aifOutputDir)
- aifOutputName = os.path.join(aifOutputDir, "realplayer.aif")
- aif.Generate(aifOutputName)
- #
- # ************* pkg file generation ***************
- #
-
- pkg = SymbianPkg(installName, "RealPlayer", ["EN"])
- pkg.SetHeader(['RealOne Player'], 0x10009D06, 4, 0, 0)
- pkg.AddPackageDependency(0x101F6F88, 0, 0, 0, 'Series60ProductID')
- for file in app_files:
- pkg.AddFile(file)
- for file in cfg_files:
- pkg.AddFile(file, 'data%s' % os.path.basename(file))
- for file in lib_files:
- pkg.AddFile(file, 'lib\%s' % os.path.basename(file))
- for file in mdl_files:
- pkg.AddFile(file, "!:\system\recogs\hxsymrecog.mdl")
- pkg.Generate()
- #
- # ************* module inclues *************
- #
- # module includes relative to build root
- moduleIncludeList = ["common/runtime/pub",
- "clientapps_rn/symbianplayer",
- "client/include",
- "datatype/rm/include",
- "common/container/pub",
- "common/util/pub",
- "common/fileio/pub",
- "common/include",
- "common/dbgtool/pub",
- "common/dbgtool/pub/platform/symbian",
- "common/system/pub",
- "video/sitelib/pub",
- "video/sitelib/pub/platform/symbian"]
- apply(project.AddModuleIncludes, moduleIncludeList)
- #
- # ************* local inclues *************
- #
- # local includes relative to current dir
- localIncludeList = ["platform/symbian",
- "platform/symbian/resource",
- "platform/symbian/util",
- "platform/symbian/file/pub",
- "platform/symbian/misc",
- "platform/symbian/help",
- "util/pub",
- "debug/pub"]
- # local includes that are debug/release specific
- if (project.IsDefined("HELIX_FEATURE_DPRINTF")):
- localIncludeList.append("debug/pub/dbg")
- else:
- localIncludeList.append("debug/pub/rel")
- localIncludeList = AddPrefixForEach(sourceRoot, localIncludeList)
- apply(project.AddIncludes, localIncludeList)
- #
- # ************* local sources *************
- #
- sourceList = ["platform/symbian/chxavactivewatcher.cpp",
- "platform/symbian/chxavaccesspointdb.cpp",
- "platform/symbian/chxavaccesspointsettingsitem.cpp",
- "platform/symbian/chxavnetconnectui.cpp",
- "platform/symbian/chxavselectsettingsview.cpp",
- "platform/symbian/chxavselectsettingsviewwindow.cpp",
- "platform/symbian/chxavsettingsview.cpp",
- "platform/symbian/chxavsettingsviewwindow.cpp",
- "platform/symbian/chxavsettingsdata.cpp",
- "platform/symbian/chxavsettingslist.cpp",
- "platform/symbian/chxavcallback.cpp",
- "platform/symbian/chxavclipinfolist.cpp",
- "platform/symbian/chxavdefines.cpp",
- "platform/symbian/chxaveditplaylistdialog.cpp",
- "platform/symbian/chxavescapedstring.cpp",
- "platform/symbian/chxavfileui.cpp",
- "platform/symbian/chxavfileview.cpp",
- "platform/symbian/chxavfileviewpageinfo.cpp",
- "platform/symbian/chxavfileviewwindow.cpp",
- "platform/symbian/chxavfolderdisplayinfo.cpp",
- "platform/symbian/chxavfolderpopuplist.cpp",
- "platform/symbian/chxavinfolist.cpp",
- "platform/symbian/chxavinfolistpopup.cpp",
- "platform/symbian/chxavmediafolderinfo.cpp",
- "platform/symbian/chxavmessagedialog.cpp",
- "platform/symbian/chxavnamedisplaytrait.cpp",
- "platform/symbian/chxavnavipanecontrol.cpp",
- "platform/symbian/chxavplaylistnavicontrol.cpp",
- "platform/symbian/chxavpathselector.cpp",
- "platform/symbian/chxavplayer.cpp",
- "platform/symbian/chxavplayerapp.cpp",
- "platform/symbian/chxavplayerdoc.cpp",
- "platform/symbian/chxavplayerstate.cpp",
- "platform/symbian/chxavplayerstatedispatch.cpp",
- "platform/symbian/chxavplayerui.cpp",
- "platform/symbian/chxavplaylist.cpp",
- "platform/symbian/chxavplayview.cpp",
- "platform/symbian/chxavplayviewwindow.cpp",
- "platform/symbian/chxavrecentclipspopuplist.cpp",
- "platform/symbian/chxavsitesupplier.cpp",
- "platform/symbian/chxavstringutils.cpp",
- "platform/symbian/chxavtextcontrol.cpp",
- "platform/symbian/chxavurlinfo.cpp",
- "platform/symbian/chxavurllist.cpp",
- "platform/symbian/chxavviewbase.cpp",
- "platform/symbian/chxavwaitnote.cpp",
- "platform/symbian/chxsymclipinfo.cpp",
- "platform/symbian/chxsymsysagentwatcher.cpp",
- "platform/symbian/chxclientenginemanager.cpp",
- "platform/symbian/file/chxavfilestore.cpp",
- "platform/symbian/file/chxavfileutil.cpp",
- "platform/symbian/file/hxsym_filetype.cpp",
- "platform/symbian/misc/chxavcompositecommand.cpp",
- "platform/symbian/misc/chxavfilesystemwatcher.cpp",
- "platform/symbian/misc/chxavmisc.cpp",
- "platform/symbian/misc/chxavramparser.cpp",
- "platform/symbian/misc/chxavrandom.cpp",
- "platform/symbian/misc/chxavtimevalue.cpp",
- "platform/symbian/misc/chxavurlfix.cpp",
- "platform/symbian/misc/chxavurlrep.cpp",
- "platform/symbian/misc/hxsym_mmc_utils.cpp",
- "platform/symbian/util/chxavbuffer.cpp",
- "platform/symbian/util/chxavconvertutil.cpp",
- "platform/symbian/util/chxavdirectoryreader.cpp",
- "platform/symbian/util/chxavnextline.cpp",
- "platform/symbian/util/chxavthread.cpp",
- "platform/symbian/util/chxavutil.cpp",
- "util/hxapihelp.cpp",
- "util/hxsym_leaveutil.cpp",
- "util/hxapihelp_player.cpp",
- "util/chxresourcetoken.cpp"]
- # debug-only files
- if (project.IsDefined("HELIX_FEATURE_DPRINTF")):
- dbgSourceList = ["platform/symbian/chxavcheckboxlistsettingitem.cpp",
- "debug/hxdebug_hxapi.cpp",
- "debug/hxsym_debug_print.cpp",
- "debug/hxsym_debug.cpp"]
- sourceList = sourceList + dbgSourceList
- sourceList = AddPrefixForEach(sourceRoot, sourceList)
- apply(project.AddSources, sourceList)
- #
- # ************* app uid and extension *************
- #
- SetSymbianProgramTargetType("app")
- project.symbianUtil.SetUIDs(0, 0x100039CE, 0x10009D06)
- #
- # ************* additional output files that should be copied to output folder ***********
- #
- # app is already included
- #copyList = ['realplayer.aif', 'realplayer.mbm', 'realplayer.rsc', 'realplayer_caption.rsc']
- #project.copy_target_list = AddPrefixForEach(project.output_dir + '\', copyList)
- theList = app_files + cfg_files
- # remove 'realplayer.app' because it will already be added
- project.copy_target_list = filter(lambda name:string.find(name,'realplayer.app') == -1, theList)
- #
- # ************* libraries *************
- #
- project.AddModuleLibraries("common/system[syslib]",
- "common/util[utillib]",
- "common/fileio[fileiolib]",
- "common/container[contlib]",
- "common/runtime[runtlib]",
- "common/dbgtool[debuglib]",
- "client/common/util[utlclntlib]",
- "client/common/system[sysclntlib]",
- "client/common/container[contclntlib]",
- "common/system[syslib]",
- "common/runtime[runtlib]",
- "client/common/util[utlclntlib]",
- "client/core[clntcorelib]"
- )
- project.AddSystemLibraries('EUSER.LIB',
- 'APPARC.LIB',
- 'APSETTINGSHANDLERUI.LIB',
- 'CONE.LIB',
- 'EIKCORE.LIB',
- 'commdb.lib',
- 'EIKDLG.LIB',
- 'apengine.lib',
- 'EIKCDLG.LIB',
- 'EIKCOCTL.LIB',
- 'aknnotify.lib',
- 'charconv.lib',
- 'ws32.lib',
- 'AVKON.LIB',
- 'APGRFX.LIB',
- 'BAFL.LIB',
- 'EALWL.LIB',
- 'EFSRV.LIB',
- 'GDI.LIB',
- 'FBSCLI.LIB',
- 'ESTLIB.LIB',
- 'INSOCK.LIB',
- 'ESOCK.LIB',
- 'SENDUI.LIB',
- 'SYSAGT.LIB',
- 'APMIME.LIB',
- 'PINBMDL.LIB',
- 'egul.lib',
- 'hal.lib',
- 'bitgdi.lib',
- 'hlplch.lib',
- 'sysutil.lib',
- 'commonui.lib',
- 'etext.lib',
- 'field.lib',
- 'msgs.lib',
- 'eikctl.lib'
- )
- #
- #
- #
- #
- # *********** Makefile rules ************
- #
- #
- #
- #
- project.post_target_buff = []
- #
- # ************* "install"/"uninstall" ********
- #
- def AddMakefileEnsureDirs(list, base, subdir):
- ''' helper: add windows nmake line to ensure that 'base' (relative) exists under 'subdir' '''
- parts = string.split(subdir, os.sep)
- dir = base
- for part in parts:
- dir = os.path.join(dir, part)
- list.append('t-@if NOT exist "%s" mkdir "%s"n' % (dir,dir))
- def AddMakefileEnsureDirLine(dir):
- ''' helper: add windows nmake line to ensure that 'dir' exists '''
- project.post_target_buff.append('t-@if NOT exist "%s" mkdir "%s"n' % (dir,dir))
-
- def AddMakefileCopyRule(emulDir, sourcePath, copyLines, allFiles):
- ''' helper '''
- targetFile = '%s\%s' % (emulDir, os.path.basename(sourcePath))
- copyLines.append('%s : %sn' % (targetFile, sourcePath))
- copyLines.append('tcopy "%s" "%s"n' % ( sourcePath, emulDir))
- allFiles.append(targetFile)
- copyLines.append('n')
-
- if (string.find(sysinfo.id,'emulator') != -1):
- #
- # write out install/uninstall (and related) rules for emulator environment
- #
- # emulator install directories
- emulInstallDir = os.path.join(GetSDKPath('SYMBIANSDK'), "Epoc32\wins\c\system\apps\RealPlayer")
- emulDataDir = os.path.join(emulInstallDir, "data")
- emulLibDir = os.path.join(emulInstallDir, "lib")
- emulRecogDir = os.path.join(GetSDKPath('SYMBIANSDK'), "Epoc32\wins\c\system\recogs")
-
- #
- # rules for ensuring emul directories exist
- #
- project.post_target_buff.append('make_emul_dirs:n')
- AddMakefileEnsureDirLine(emulInstallDir)
- AddMakefileEnsureDirLine(emulDataDir)
- AddMakefileEnsureDirLine(emulLibDir)
- AddMakefileEnsureDirLine(emulRecogDir)
- project.post_target_buff.append('n')
-
- #
- # 'copy' rules for installing files to emulator
- #
- copyLines = []
- allFiles = []
- for file in app_files:
- AddMakefileCopyRule(emulInstallDir, file, copyLines, allFiles)
- for file in cfg_files:
- AddMakefileCopyRule(emulDataDir, file, copyLines, allFiles)
- for file in mdl_files:
- AddMakefileCopyRule(emulRecogDir, file, copyLines, allFiles)
-
- for file in lib_files:
- AddMakefileCopyRule(emulLibDir, file, copyLines, allFiles)
- project.post_target_buff.extend(copyLines)
- #
- # 'install": installs all player files to emulator directory
- #
- project.post_target_buff.append("install: all make_emul_dirs %sn" % string.join(allFiles) )
- project.post_target_buff.append("n")
- #
- # "uninstall": erases player emulator directory
- #
- project.post_target_buff.append("uninstall:n")
- project.post_target_buff.append('t-rm -rf "%s"n' % emulInstallDir)
- for file in mdl_files:
- file = os.path.basename(file)
- project.post_target_buff.append('t-rm -f "%s\%s"n' % (emulRecogDir, file))
-
- else:
- #
- # "install"/"uninstall": do nothing for non-emulator builds
- #
- project.post_target_buff.append("install: allnn")
- project.post_target_buff.append("uninstall:nn")
-
- #
- # *************** "sis"/"sisinst" ****************
- #
- #
- # "{sisname}.sis"
- #
- sisName = "%s\%s.sis" % (project.output_dir, installName)
- sisDepends = string.join(app_files + cfg_files + lib_files)
- project.post_target_buff.append("%s: all %s.pkg %sn" % (sisName, installName, sisDepends))
- project.post_target_buff.append("tmakesis -v %s.pkg %s" % (installName, sisName))
- project.post_target_buff.append("n")
- #
- # "sis"
- #
- project.post_target_buff.append("sis: %sn" % sisName)
- #
- # "sisclean"
- #
- project.post_target_buff.append("sisclean:n")
- project.post_target_buff.append("t-rm -f %sn" % sisName)
- #
- # "sisinst" - copy sis to emulator install folder for emulator build
- #
- emulSisInstallDir = os.path.join(GetSDKPath('SYMBIANSDK'), "Epoc32\wins\c\nokia\installs\")
- project.post_target_buff.append("sisinst: sisn")
- if (string.find(sysinfo.id, 'emulator') != -1):
- # copy to emulator install folder; enables you to use emulator installer app to install sis
- project.post_target_buff.append("tcopy %s %sn" % (sisName, emulSisInstallDir))
- project.post_target_buff.append("n")
- #
- # "sisuninst"
- #
- project.post_target_buff.append("sisuninst:n")
- if (string.find(sysinfo.id, 'emulator') != -1):
- # copy to emulator install folder; enables you to use emulator installer app to install sis
- project.post_target_buff.append("trm -f %s%sn" % (emulSisInstallDir, os.path.basename(sisName)))