Umakefil.upp
上传用户:zhongxx05
上传日期:2007-06-06
资源大小:33641k
文件大小:14k
源码类别:

Symbian

开发平台:

C/C++

  1. ### UMAKE PRE-PROCESSOR OUTPUT: DO NOT CHECK INTO CVS
  2. ### -*- Mode: Python -*-
  3. ### files: symbian.pcf -> Umakefil
  4. try:
  5.     sourceRoot = sourceRoot
  6. except:
  7.     sourceRoot = ""
  8. execfile("install.pcf")
  9. installName = GetInstallName('rplay')
  10. project.AddDefines('SYMBIANPLAYER_INSTALL_NAME=%s' % installName)
  11. 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"]
  12. mbmBase = sourceRoot + "platform/symbian/images/"
  13. mbmList = AddPrefixForEach(mbmBase, mbmList)
  14. if (not os.path.exists(project.output_dir)):
  15.     os.mkdir(project.output_dir)
  16. mbmFileOut = project.output_dir + "/realplayer.mbm"
  17. mbmHeaderOut = mbmBase + "realplayer.mbg"
  18. project.symbianUtil.create_mbm_file(mbmFileOut, mbmHeaderOut, "/c8", mbmList)
  19. mbmInclude = mbmBase[:-1]
  20. project.AddIncludes(mbmInclude)
  21. def CreateResourceIncludeFile(outputDir):
  22.     name = os.path.join(outputDir, "realplayer_rss.inc")
  23.     file = open(name, 'w')
  24.     file.write("/* GENERATED FILE - DO NOT EDIT */n")
  25.     if project.IsDefined("HELIX_FEATURE_DPRINTF"):
  26.         file.write("#define HELIX_FEATURE_DPRINTFn");
  27.     file.write("n")
  28.     file.close();
  29. resourceSourceDir = os.path.join(sourceRoot, "platform\symbian\resource")
  30. CreateResourceIncludeFile(resourceSourceDir)
  31. resourceFiles = ["platform/symbian/resource/realplayer.rss", "platform/symbian/resource/realplayer_caption.rss"]
  32. resourceFiles = AddPrefixForEach(sourceRoot, resourceFiles)
  33. apply(project.symbianUtil.AddResourceFiles, resourceFiles)
  34. project.symbianUtil.AddResourceIncludes(sourceRoot + "platform/symbian/resource")
  35. def CreateAIFIncludeFile(outputDir):
  36.     name = os.path.join(outputDir, "realplayer_aif.inc")
  37.     file = open(name, 'w')
  38.     file.write("/* GENERATED FILE - DO NOT EDIT */n")
  39.     if project.IsDefined("HELIX_FEATURE_3GPP"):
  40.         file.write("#define HELIX_FEATURE_3GPPn");
  41.     if project.IsDefined("HELIX_FEATURE_AUDIO_MPA_LAYER3"):
  42.         file.write("#define HELIX_FEATURE_AUDIO_MPA_LAYER3n");
  43.     if project.IsDefined("HELIX_FEATURE_SMIL2"):
  44.         file.write("#define HELIX_FEATURE_SMIL2n");
  45.     file.write("n")
  46.     file.close();
  47. aifSourceDir = os.path.join(sourceRoot, "platform\symbian\aif")
  48. CreateAIFIncludeFile(aifSourceDir)
  49. aifIcons = "qgn_menu_rp_cxt.bmp qgn_menu_rp_cxt_mask.bmp qgn_menu_rp_lst.bmp qgn_menu_rp_lst_mask.bmp"
  50. aifIconList = string.split(aifIcons)
  51. aif = SymbianAIF(aifSourceDir, "realplayer_aif.rss", aifIconList)
  52. aif.AddIncludeDir(sourceRoot + "platform\symbian\resource")
  53. aif.AddIncludeDir(aifSourceDir)
  54. aifOutputDir = project.output_dir
  55. EnsureDirExists(aifOutputDir)
  56. aifOutputName = os.path.join(aifOutputDir, "realplayer.aif")
  57. aif.Generate(aifOutputName)
  58. pkg = SymbianPkg(installName, "Helix", ["EN"])
  59. pkg.SetHeader(['Helix Player'], 0x10009D06, 4, 0, 0)
  60. pkg.AddPackageDependency(0x101F6F88, 0, 0, 0, 'Series60ProductID')
  61. for file in app_files:
  62.     pkg.AddFile(file)
  63. for file in cfg_files:
  64.     pkg.AddFile(file, 'data%s' % os.path.basename(file))
  65. for file in lib_files:
  66.     pkg.AddFile(file, 'lib\%s' % os.path.basename(file))
  67. for file in mdl_files:
  68.     pkg.AddFile(file, "!:\system\recogs\hxsymrecog.mdl")
  69. pkg.Generate()
  70. 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"]
  71. apply(project.AddModuleIncludes, moduleIncludeList)
  72. localIncludeList = ["platform/symbian", "platform/symbian/resource", "platform/symbian/util", "platform/symbian/file/pub", "platform/symbian/misc", "platform/symbian/help", "util/pub", "debug/pub"]
  73. if (project.IsDefined("HELIX_FEATURE_DPRINTF")):
  74.     localIncludeList.append("debug/pub/dbg")
  75. else:
  76.     localIncludeList.append("debug/pub/rel")
  77. localIncludeList = AddPrefixForEach(sourceRoot, localIncludeList)
  78. apply(project.AddIncludes, localIncludeList)
  79. 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"]
  80. if (project.IsDefined("HELIX_FEATURE_DPRINTF")):
  81.     dbgSourceList = ["platform/symbian/chxavcheckboxlistsettingitem.cpp", "debug/hxdebug_hxapi.cpp", "debug/hxsym_debug_print.cpp", "debug/hxsym_debug.cpp"]
  82.     sourceList = sourceList + dbgSourceList
  83. sourceList = AddPrefixForEach(sourceRoot, sourceList)
  84. apply(project.AddSources, sourceList)
  85. SetSymbianProgramTargetType("app")
  86. project.symbianUtil.SetUIDs(0, 0x100039CE, 0x10009D06)
  87. theList = app_files + cfg_files
  88. project.copy_target_list = filter(lambda name:string.find(name,'realplayer.app') == -1, theList)
  89. 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]" )
  90. 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', 'bitgdi.lib', 'hlplch.lib', 'sysutil.lib', 'commonui.lib', 'etext.lib', 'field.lib', 'msgs.lib', 'eikctl.lib' )
  91. project.post_target_buff = []
  92. def AddMakefileEnsureDirs(list, base, subdir):
  93.     ''' helper: add windows nmake line to ensure that 'base' (relative) exists under 'subdir' '''
  94.     parts = string.split(subdir, os.sep)
  95.     dir = base
  96.     for part in parts:
  97.         dir = os.path.join(dir, part)
  98.         list.append('t-@if NOT exist "%s" mkdir "%s"n' % (dir,dir))
  99. def AddMakefileEnsureDirLine(dir):
  100.     ''' helper: add windows nmake line to ensure that 'dir' exists '''
  101.     project.post_target_buff.append('t-@if NOT exist "%s" mkdir "%s"n' % (dir,dir))
  102. def AddMakefileCopyRule(emulDir, sourcePath, copyLines, allFiles):
  103.     ''' helper '''
  104.     targetFile = '%s\%s' % (emulDir, os.path.basename(sourcePath))
  105.     copyLines.append('%s : %sn' % (targetFile, sourcePath))
  106.     copyLines.append('tcopy "%s" "%s"n' % ( sourcePath, emulDir))
  107.     allFiles.append(targetFile)
  108.     copyLines.append('n')
  109. if (string.find(sysinfo.id,'emulator') != -1):
  110.     emulInstallDir = os.path.join(GetSDKPath('SYMBIANSDK'), "Epoc32\wins\c\system\apps\RealPlayer")
  111.     emulDataDir = os.path.join(emulInstallDir, "data")
  112.     emulLibDir = os.path.join(emulInstallDir, "lib")
  113.     emulRecogDir = os.path.join(GetSDKPath('SYMBIANSDK'), "Epoc32\wins\c\system\recogs")
  114.     project.post_target_buff.append('make_emul_dirs:n')
  115.     AddMakefileEnsureDirLine(emulInstallDir)
  116.     AddMakefileEnsureDirLine(emulDataDir)
  117.     AddMakefileEnsureDirLine(emulLibDir)
  118.     AddMakefileEnsureDirLine(emulRecogDir)
  119.     project.post_target_buff.append('n')
  120.     copyLines = []
  121.     allFiles = []
  122.     for file in app_files:
  123.         AddMakefileCopyRule(emulInstallDir, file, copyLines, allFiles)
  124.     for file in cfg_files:
  125.         AddMakefileCopyRule(emulDataDir, file, copyLines, allFiles)
  126.     for file in mdl_files:
  127.         AddMakefileCopyRule(emulRecogDir, file, copyLines, allFiles)
  128.     for file in lib_files:
  129.         AddMakefileCopyRule(emulLibDir, file, copyLines, allFiles)
  130.     project.post_target_buff.extend(copyLines)
  131.     project.post_target_buff.append("install: all make_emul_dirs %sn" % string.join(allFiles) )
  132.     project.post_target_buff.append("n")
  133.     project.post_target_buff.append("uninstall:n")
  134.     project.post_target_buff.append('t-rm -rf "%s"n' % emulInstallDir)
  135.     for file in mdl_files:
  136.         file = os.path.basename(file)
  137.         project.post_target_buff.append('t-rm -f "%s\%s"n' % (emulRecogDir, file))
  138. else:
  139.     project.post_target_buff.append("install: allnn")
  140.     project.post_target_buff.append("uninstall:nn")
  141. sisName = "%s\%s.sis" % (project.output_dir, installName)
  142. sisDepends = string.join(app_files + cfg_files + lib_files)
  143. project.post_target_buff.append("%s: all %s.pkg %sn" % (sisName, installName, sisDepends))
  144. project.post_target_buff.append("tmakesis -v %s.pkg %s" % (installName, sisName))
  145. project.post_target_buff.append("n")
  146. project.post_target_buff.append("sis: %sn" % sisName)
  147. project.post_target_buff.append("sisclean:n")
  148. project.post_target_buff.append("t-rm -f %sn" % sisName)
  149. emulSisInstallDir = os.path.join(GetSDKPath('SYMBIANSDK'), "Epoc32\wins\c\nokia\installs\")
  150. project.post_target_buff.append("sisinst: sisn")
  151. if (string.find(sysinfo.id, 'emulator') != -1):
  152.     project.post_target_buff.append("tcopy %s %sn" % (sisName, emulSisInstallDir))
  153. project.post_target_buff.append("n")
  154. project.post_target_buff.append("sisuninst:n")
  155. if (string.find(sysinfo.id, 'emulator') != -1):
  156.     project.post_target_buff.append("trm -f  %s%sn" % (emulSisInstallDir, os.path.basename(sisName)))
  157. UmakefileVersion(2,0)
  158. ProgramTarget("RealPlayer")
  159. pass ## pre-processor removed="DependTarget()"
  160. ### END UMAKE PRE-PROCESSOR OUTPUT