parameters: (self, source, dest)
return_statement: return ibtoolout.returncode
docstring: Compiles a XIB file with ibtool into a binary plist in the bundle.
docstring_summary: Compiles a XIB file with ibtool into a binary plist in the bundle.
docstring_tokens: Compiles a XIB file with ibtool into a binary plist in the bundle .
function: def _CopyXIBFile(self, source, dest):
      """Compiles a XIB file with ibtool into a binary plist in the bundle."""
  
      # ibtool sometimes crashes with relative paths. See crbug.com/314728.
      base = os.path.dirname(os.path.realpath(__file__))
      if os.path.relpath(source):
        source = os.path.join(base, source)
      if os.path.relpath(dest):
        dest = os.path.join(base, dest)
  
      args = ['xcrun', 'ibtool', '--errors', '--warnings', '--notices',
          '--output-format', 'human-readable-text', '--compile', dest, source]
      ibtool_section_re = re.compile(r'/\*.*\*/')
      ibtool_re = re.compile(r'.*note:.*is clipping its content')
      ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE)
      current_section_header = None
      for line in ibtoolout.stdout:
        if ibtool_section_re.match(line):
          current_section_header = line
        elif not ibtool_re.match(line):
          if current_section_header:
            sys.stdout.write(current_section_header)
            current_section_header = None
          sys.stdout.write(line)
      return ibtoolout.returncode
function_tokens: def _CopyXIBFile ( self , source , dest ) : # ibtool sometimes crashes with relative paths. See crbug.com/314728. base = os . path . dirname ( os . path . realpath ( __file__ ) ) if os . path . relpath ( source ) : source = os . path . join ( base , source ) if os . path . relpath ( dest ) : dest = os . path . join ( base , dest ) args = [ 'xcrun' , 'ibtool' , '--errors' , '--warnings' , '--notices' , '--output-format' , 'human-readable-text' , '--compile' , dest , source ] ibtool_section_re = re . compile ( r'/\*.*\*/' ) ibtool_re = re . compile ( r'.*note:.*is clipping its content' ) ibtoolout = subprocess . Popen ( args , stdout = subprocess . PIPE ) current_section_header = None for line in ibtoolout . stdout : if ibtool_section_re . match ( line ) : current_section_header = line elif not ibtool_re . match ( line ) : if current_section_header : sys . stdout . write ( current_section_header ) current_section_header = None sys . stdout . write ( line ) return ibtoolout . returncode