示例#1
0
 def gen_library_file(self, output_dir=None):
     '''
     Generates library files (.lib) for the dll's provided by this recipe
     '''
     if output_dir is None:
         output_dir = os.path.join(self.config.prefix,
                                   'lib' + self.config.lib_suffix)
     genlib = GenLib()
     for (libname, dllpaths) in list(self.libraries().items()):
         if len(dllpaths) > 1:
             m.warning(
                 "BUG: Found multiple DLLs for libname {}:\n{}".format(
                     libname, '\n'.join(dllpaths)))
             continue
         if len(dllpaths) == 0:
             m.warning(
                 "Could not create {}.lib, no matching DLLs found".format(
                     libname))
             continue
         try:
             implib = genlib.create(
                 libname, os.path.join(self.config.prefix, dllpaths[0]),
                 self.config.target_arch, output_dir)
             logging.debug('Created %s' % implib)
         except:
             m.warning(
                 "Could not create {}.lib, gendef might be missing".format(
                     libname))
示例#2
0
 def gen_library_file(self, output_dir=None):
     '''
     Generates library files (.lib) for the dll's provided by this recipe
     '''
     genlib = GenLib()
     for dllpath in self.libraries():
         try:
             implib = genlib.create(os.path.join(self.config.prefix, dllpath),
                     os.path.join(self.config.prefix, 'lib'))
             logging.debug('Created %s' % implib)
         except:
             m.warning("Could not create .lib, gendef might be missing")
示例#3
0
 def gen_library_file(self, output_dir=None):
     '''
     Generates library files (.lib) for the dll's provided by this recipe
     '''
     genlib = GenLib()
     for dllpath in self.libraries():
         try:
             implib = genlib.create(
                 os.path.join(self.config.prefix, dllpath),
                 os.path.join(self.config.prefix, 'lib'))
             logging.debug('Created %s' % implib)
         except:
             m.warning("Could not create .lib, gendef might be missing")
示例#4
0
文件: recipe.py 项目: leemgs/cerbero
 def gen_library_file(self, output_dir=None):
     '''
     Generates library files (.lib or .dll.a) for the DLLs provided by this recipe
     '''
     if output_dir is None:
         output_dir = os.path.join(self.config.prefix,
                                   'lib' + self.config.lib_suffix)
     # Generate a GNU import library or an MSVC import library
     genlib = GenGnuLib() if self.using_msvc() else GenLib()
     # Generate the .dll.a or .lib file as needed
     for (libname, dllpaths) in list(self.libraries().items()):
         if len(dllpaths) > 1:
             m.warning(
                 "BUG: Found multiple DLLs for libname {!r}:\n{}".format(
                     libname, '\n'.join(dllpaths)))
             continue
         if len(dllpaths) == 0:
             m.warning(
                 "Could not create import library for {!r}, no matching DLLs found"
                 .format(libname))
             continue
         try:
             implib = genlib.create(
                 libname, os.path.join(self.config.prefix, dllpaths[0]),
                 self.config.platform, self.config.target_arch, output_dir)
             logging.debug('Created %s' % implib)
         except FatalError as e:
             m.warning("Could not create {!r}: {}".format(
                 genlib.filename, e.msg))
示例#5
0
 def gen_library_file(self, output_dir=None):
     '''
     Generates library files (.lib) for the dll's provided by this recipe
     '''
     genlib = GenLib()
     for (libname, dllpaths) in self.libraries().items():
         if len(dllpaths) > 1:
             m.warning("BUG: Found multiple DLLs for libname {}:\n{}".format(libname, '\n'.join(dllpaths)))
         if len(dllpaths) == 0:
             m.warning("Could not create {}.lib, no matching DLLs found".format(libname))
         try:
             implib = genlib.create(libname,
                 os.path.join(self.config.prefix, dllpaths[0]),
                 self.config.target_arch,
                 os.path.join(self.config.prefix, 'lib'))
             logging.debug('Created %s' % implib)
         except:
             m.warning("Could not create {}.lib, gendef might be missing".format(libname))