Umakefil.upp
上传用户:dangjiwu
上传日期:2013-07-19
资源大小:42019k
文件大小:14k
- ### UMAKE PRE-PROCESSOR OUTPUT: DO NOT CHECK INTO CVS
- ### -*- Mode: Python -*-
- ### files: symbian.pcf -> Umakefil
- try:
- sourceRoot = sourceRoot
- except:
- sourceRoot = ""
- execfile("install.pcf")
- installName = GetInstallName('rplay')
- project.AddDefines('SYMBIANPLAYER_INSTALL_NAME=%s' % installName)
- 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"
- project.symbianUtil.create_mbm_file(mbmFileOut, mbmHeaderOut, "/c8", mbmList)
- mbmInclude = mbmBase[:-1]
- project.AddIncludes(mbmInclude)
- def CreateResourceIncludeFile(outputDir):
- 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")
- def CreateAIFIncludeFile(outputDir):
- 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")
- 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 = 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()
- 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)
- localIncludeList = ["platform/symbian", "platform/symbian/resource", "platform/symbian/util", "platform/symbian/file/pub", "platform/symbian/misc", "platform/symbian/help", "util/pub", "debug/pub"]
- 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)
- 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"]
- 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)
- SetSymbianProgramTargetType("app")
- project.symbianUtil.SetUIDs(0, 0x100039CE, 0x10009D06)
- theList = app_files + cfg_files
- project.copy_target_list = filter(lambda name:string.find(name,'realplayer.app') == -1, theList)
- 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' )
- project.post_target_buff = []
- 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):
- 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")
- project.post_target_buff.append('make_emul_dirs:n')
- AddMakefileEnsureDirLine(emulInstallDir)
- AddMakefileEnsureDirLine(emulDataDir)
- AddMakefileEnsureDirLine(emulLibDir)
- AddMakefileEnsureDirLine(emulRecogDir)
- project.post_target_buff.append('n')
- 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)
- project.post_target_buff.append("install: all make_emul_dirs %sn" % string.join(allFiles) )
- project.post_target_buff.append("n")
- 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:
- project.post_target_buff.append("install: allnn")
- project.post_target_buff.append("uninstall:nn")
- 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")
- project.post_target_buff.append("sis: %sn" % sisName)
- project.post_target_buff.append("sisclean:n")
- project.post_target_buff.append("t-rm -f %sn" % sisName)
- 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):
- project.post_target_buff.append("tcopy %s %sn" % (sisName, emulSisInstallDir))
- project.post_target_buff.append("n")
- project.post_target_buff.append("sisuninst:n")
- if (string.find(sysinfo.id, 'emulator') != -1):
- project.post_target_buff.append("trm -f %s%sn" % (emulSisInstallDir, os.path.basename(sisName)))
- UmakefileVersion(2,0)
- ProgramTarget("RealPlayer")
- pass ## pre-processor removed="DependTarget()"
- ### END UMAKE PRE-PROCESSOR OUTPUT