def GetMacBundleResources(product_dir, xcode_settings, resources):
 dest = os.path.join(product_dir, xcode_settings.GetBundleResourceFolder())
 for res in resources:
  output = dest
  assert (' ' not in res), ('Spaces in resource filenames not supported (%s)' % res)
  res_parts = os.path.split(res)
  lproj_parts = os.path.split(res_parts[0])
  if lproj_parts[1].endswith('.lproj'):
   output = os.path.join(output, lproj_parts[1])
  output = os.path.join(output, res_parts[1])
  if output.endswith('.xib'):
   output = (os.path.splitext(output)[0] + '.nib')
  if output.endswith('.storyboard'):
   output = (os.path.splitext(output)[0] + '.storyboardc')
  (yield (output, res))

def GetMacBundleResources ( product_dir , xcode_settings , resources ) : dest = os . path . join ( product_dir , xcode_settings . GetBundleResourceFolder ( ) ) for res in resources : output = dest assert ( ' ' not in res ) , ( 'Spaces in resource filenames not supported (%s)' % res ) res_parts = os . path . split ( res ) lproj_parts = os . path . split ( res_parts [ 0 ] ) if lproj_parts [ 1 ] . endswith ( '.lproj' ) : output = os . path . join ( output , lproj_parts [ 1 ] ) output = os . path . join ( output , res_parts [ 1 ] ) if output . endswith ( '.xib' ) : output = ( os . path . splitext ( output ) [ 0 ] + '.nib' ) if output . endswith ( '.storyboard' ) : output = ( os . path . splitext ( output ) [ 0 ] + '.storyboardc' ) ( yield ( output , res ) )
yields pairs for every resource in |resources| .