⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 win32-msvc.cf

📁 linux下的一款播放器
💻 CF
字号:
# -*- python -*-# # ***** BEGIN LICENSE BLOCK *****# Source last modified: $Id: win32-msvc.cf,v 1.9 2004/08/20 01:46:16 hubbe Exp $# # Portions Copyright (c) 1995-2004 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 (the "RPSL") available at# http://www.helixcommunity.org/content/rpsl unless you have licensed# the file under the current version of the RealNetworks Community# Source License (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.# # Alternatively, the contents of this file may be used under the# terms of the GNU General Public License Version 2 or later (the# "GPL") in which case the provisions of the GPL are applicable# instead of those above. If you wish to allow use of your version of# this file only under the terms of the GPL, and not to allow others# to use your version of this file under the terms of either the RPSL# or RCSL, indicate your decision by deleting the provisions above# and replace them with the notice and other provisions required by# the GPL. If you do not delete the provisions above, a recipient may# use your version of this file under the terms of any one of the# RPSL, the RCSL or the GPL.# # 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 *****# """Settings for builds using VC++ 5.0 VC Service pack 3."""exec_config_file('win-msvc.cf')## instance Window compiler objectplatform.cc = platform.cxx = WinCompiler()cc = platform.cccc.cmd = 'cl'cc.source_arg = '/c 'cc.target_arg = '/Fo'cc.make_var = 'CC'cc.make_flags = 'CCFLAGS'cc.include_arg = '/I'## define base arguments for build modescc.args['default'] = '/nologo /Zp1 /Zm200 /W3 /GX- /FD'cc.args['debug'] = '/Od'## no_optimize: no optimization on release buildsif project.BuildOption('no_optimize'):    cc.args['release'] = ''else:    cc.args['release'] = '/O2'## no_optimize: no optimization on release buildsif not project.BuildOption('nt_stackframe'):    cc.args['release'] = cc.args['release'] + ' /Oy-'## symbols: add symbols to release buildsif project.BuildOption('symbols') and \       not project.BuildOption('pdb') and \       not project.BuildOption('incremental'):    cc.args['release'] = '%s /Z7' % (cc.args['release'])class WinLinker(Linker2):    def __init__(self):        Linker2.__init__(self)        ## these are here to emulate the old linker class        ## for Umakefil/*.pcf files which do direct modification        ## of this class        self.def_file = ""        self.generate_def_file = 1        self.implib_file = ""        self.args = {}        self.args["default"] = ""        self.args["debug"] = "/debug"        self.args["release"] = "/OPT:REF"        self.args["dll"] = ""    def read_ordinal_file(self, path):        fil = open(path, "r")        sym_ord_list = []        for line in fil.readlines():            field_list = string.split(line)            symbol = string.strip(field_list[1])            ordinal = string.strip(field_list[0])            sym_ord_list.append(symbol, ordinal)        return sym_ord_list    def write_def_file(self, path):        fil = open(path, 'w')                fil.write('DESCRIPTION\t\'RealMedia Player\'\n')        fil.write('HEAPSIZE\t1024\n')        if project.target_type == "dll":            ## exported functions            fil.write("EXPORTS\n")            for func in project.exported_func:                fil.write("\t%s\n" % (func))            ## check for the data file which defines ordinally-exported            ## methods/functions            if project.BuildOption("ordinal") and \               os.path.isfile("ordinal.dat"):                for (symbol, ordinal) in self.read_ordinal_file("ordinal.dat"):                    fil.write("\t%s @%s NONAME\n" % (symbol, ordinal))        ## Add imports section to the DEF file        if project.BuildOption('ordinal') and len(project.module_libs):            fil.write('IMPORTS\n')            for module_lib in project.module_libs:                filename = os.path.join(os.pardir, module_lib, "ordinal.dat")                if not os.path.isfile(filename):                    continue                for (symbol, ordinal) in self.read_ordinal_file(filename):                    fil.write('\t%s=%s.%s\n' % (symbol, symbol, ordinal))        fil.close()    def subsystem_option(self):        if project.target_type == "dll":            return [ "/SUBSYSTEM:windows" ]        elif project.BuildOption("console-app"):            return ["/SUBSYSTEM:console" ]        elif project.BuildOption("mfc"):            return ["/SUBSYSTEM:windows" ]        return []            def machine_option(self):        return [ "/MACHINE:i386"]            def extra_options(self):        return []            def option_arg_list(self):        arg_list = [ "/NOLOGO" ]        arg_list.extend(self.machine_option())        arg_list.extend(self.extra_options())        arg_list.extend(self.subsystem_option())        ## add any arguments from old build option/argument hash        for choice in project.build_choices:            try:                temp = string.split(self.args[choice])                arg_list = arg_list + temp            except KeyError:                pass        ## generate map files if "map" option selected        if project.BuildOption('map') and \           project.target_type in ["dll", "exe"]:            arg_list.append("/map")            base, ext = os.path.splitext(project.OutputName())            temp = os.path.join(project.output_dir, "%s.map" % (base))            project.AddCopyTargets(temp)        if not project.BuildOption('static') and \           not project.BuildOption('suppress_nodefaultlibs') and \           project.IsDefined('HELIX_CONFIG_RN_CRT'):            pncrt_path = os.path.join(project.src_root_path, 'pncrt')                        arg_list = arg_list + [                '/NODEFAULTLIB:"msvcrt.lib"',                '/NODEFAULTLIB:"msvcrtd.lib"',                '/NODEFAULTLIB:"msvcprt.lib"',                '/NODEFAULTLIB:"msvcprtd.lib"',                '/NODEFAULTLIB:"libcmt.lib"',                '/NODEFAULTLIB:"libcmtd.lib"',                '/NODEFAULTLIB:"libc.lib"',                '/LIBPATH:"%s"' % (pncrt_path)]                ## somewhat nasty behavior because some of the umakefils        ## modify this directly        if project.target_type == "dll":            if project.opt_target_name:                implib_basename = project.opt_target_name            else:                implib_basename = project.target_name            implib_basename = "%s.lib" % (implib_basename)            if self.implib_file:                implib_basename = os.path.basename(self.implib_file)             implib_file = os.path.join(project.output_dir, implib_basename)            arg_list.append("/IMPLIB:%s" % (implib_file))        ## write the .def file        if project.target_type in ["dll"]:            if self.def_file == "":                self.def_file = "%s.def" % (project.target_name)            arg_list.append("/DEF:%s" % (self.def_file))            if self.generate_def_file:                self.write_def_file(self.def_file)        if not project.BuildOption('incremental'):            arg_list.append("/INCREMENTAL:no")                ## form link string        if project.BuildOption('pdb') or project.BuildOption('incremental'):            arg_list.append("/PDB:%s.pdb" % (project.target_name))            project.AddCopyTargets("%s.pdb" % (project.target_name))        else:            arg_list.append("/PDB:NONE")        return arg_list    def LinkLIB(self, target_path, objects):        cmd_list = []        arg_list = [            "/LIB",  ## XXX: "/lib" must be the first argument! --JMP            "/NOLOGO",            "/OUT:%s" % (target_path),            objects]        cmd = "link %s" % (string.join(arg_list))        cmd_list.append(cmd)        return cmd_list    def CleanLIB(self, target_path):        return [target_path]    def LinkDLL(self, target_path, objects, static_libs, dynamic_libs):        global project        cmd_list = []        if project.BuildOption('debug'):            dbg = "debug"        else:            dbg = "release"                arg_list = ["/DLL"] + self.option_arg_list()        arg_list.append("/OUT:%s" % (target_path))        arg_list.append(objects)        arg_list.append(static_libs)        arg_list.append(dynamic_libs)        cmd = "python %s -basefile:%s -basedir:%s /base:0x60000000 %s" % (            os.path.join(BUILD_ROOT,"bin","pylink"),            os.path.join(project.src_root_path,dbg,"rebase.lst"),            project.module_directory(),            string.join(arg_list))        cmd_list.append(cmd)        return cmd_list    def CleanDLL(self, target_path):        list = []        list.append(target_path)        return list    def LinkEXE(self, target_path, objects, static_libs, dynamic_libs):        cmd_list = []        arg_list = self.option_arg_list()        arg_list.append("/OUT:%s" % (target_path))        arg_list.append(objects)        arg_list.append(static_libs)        arg_list.append(dynamic_libs)        cmd = "link %s" % (string.join(arg_list))        cmd_list.append(cmd)        return cmd_list        def CleanEXE(self, target_path):        list = []        list.append(target_path)        return list    def SetDEFFile(self, def_file):        self.def_file = def_file        self.generate_def_file = 0platform.link = WinLinker()# In case .DEF file is generated separately, give calling umake file an# easy way to say where it is.def SetDEFFile(def_file):    platform.link.SetDEFFile(def_file)## symbols: keep symbols in release buildsif project.BuildOption('symbols') or \       project.BuildOption('pdb') or \       project.BuildOption('incremental'):    platform.link.args['release'] = platform.link.args['release'] + ' /debug'def identify_cl_callback():    import shell    cdata=shell.run(cc.cmd)[1]    cdata=string.replace(cdata,"\r\n","\n")    cdata=string.split(cdata,"\n\n")[0]    print "Using compiler: %s" % cc.cmd    print cdata    print "Listing environment variables:"    data=shell.run("cmd.exe /c set")[1]    data=string.replace(data,"\r\n","\n")    print data    printAddIdentifyCallback(identify_cl_callback)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -