native_client_sdk/src/tools/create_nmf.py
def _GenerateManifest(self):
    """Create a JSON formatted dict containing the files

    NaCl will map url requests based on architecture.  The startup NEXE
    can always be found under the top key PROGRAM.  Additional files are under
    the FILES key further mapped by file name.  In the case of 'runnable' the
    PROGRAM key is populated with urls pointing the runnable-ld.so which acts
    as the startup nexe.  The application itself is then placed under the
    FILES key mapped as 'main.exe' instead of the original name so that the
    loader can find it.
    """
    manifest = { FILES_KEY: {}, PROGRAM_KEY: {} }

    needed = self.GetNeeded()

    extra_files_kv = [(key, ArchFile(name=key,
                                     arch=arch,
                                     path=url,
                                     url=url))
                      for key, arch, url in self.extra_files]

    manifest_items = list(needed.items()) + extra_files_kv

    # Add dynamic loader to the program section.
    for need, archinfo in manifest_items:
      if IsLoader(need):
        urlinfo = { URL_KEY: archinfo.url }
        manifest[PROGRAM_KEY][archinfo.arch] = urlinfo

    for need, archinfo in manifest_items:
      urlinfo = { URL_KEY: archinfo.url }
      name = archinfo.name
      arch = archinfo.arch

      if IsLoader(need):
        continue

      if need in self.main_files:
        if need.endswith(".nexe"):
          # Place it under program if we aren't using the runnable-ld.so.
          program = manifest[PROGRAM_KEY]
          if arch not in program:
            program[arch] = urlinfo
            continue
          # Otherwise, treat it like another another file named main.nexe.
          name = MAIN_NEXE

      name = self.remap.get(name, name)
      fileinfo = manifest[FILES_KEY].get(name, {})
      fileinfo[arch] = urlinfo
      manifest[FILES_KEY][name] = fileinfo
    self.manifest = manifest
Create a JSON formatted dict containing the files

    NaCl will map url requests based on architecture.  The startup NEXE
    can always be found under the top key PROGRAM.  Additional files are under
    the FILES key further mapped by file name.  In the case of 'runnable' the
    PROGRAM key is populated with urls pointing the runnable-ld.so which acts
    as the startup nexe.  The application itself is then placed under the
    FILES key mapped as 'main.exe' instead of the original name so that the
    loader can find it.
    
Create a JSON formatted dict containing the files
NaCl will map url requests based on architecture.  The startup NEXE
can always be found under the top key PROGRAM.  Additional files are under
the FILES key further mapped by file name.  In the case of 'runnable' the
PROGRAM key is populated with urls pointing the runnable-ld.so which acts
as the startup nexe.  The application itself is then placed under the
FILES key mapped as 'main.exe' instead of the original name so that the
loader can find it.
Create a JSON formatted dict containing the files NaCl will map url requests based on architecture . The startup NEXE can always be found under the top key PROGRAM . Additional files are under the FILES key further mapped by file name . In the case of ' runnable ' the PROGRAM key is populated with urls pointing the runnable - ld . so which acts as the startup nexe . The application itself is then placed under the FILES key mapped as ' main . exe ' instead of the original name so that the loader can find it .
def _GenerateManifest(self):
    manifest = { FILES_KEY: {}, PROGRAM_KEY: {} }
    needed = self.GetNeeded()
    extra_files_kv = [(key, ArchFile(name=key,
                                     arch=arch,
                                     path=url,
                                     url=url))
                      for key, arch, url in self.extra_files]
    manifest_items = list(needed.items()) + extra_files_kv
    for need, archinfo in manifest_items:
      if IsLoader(need):
        urlinfo = { URL_KEY: archinfo.url }
        manifest[PROGRAM_KEY][archinfo.arch] = urlinfo
    for need, archinfo in manifest_items:
      urlinfo = { URL_KEY: archinfo.url }
      name = archinfo.name
      arch = archinfo.arch
      if IsLoader(need):
        continue
      if need in self.main_files:
        if need.endswith(".nexe"):
          program = manifest[PROGRAM_KEY]
          if arch not in program:
            program[arch] = urlinfo
            continue
          name = MAIN_NEXE
      name = self.remap.get(name, name)
      fileinfo = manifest[FILES_KEY].get(name, {})
      fileinfo[arch] = urlinfo
      manifest[FILES_KEY][name] = fileinfo
    self.manifest = manifest
def _GenerateManifest ( self ) : manifest = { FILES_KEY : { } , PROGRAM_KEY : { } } needed = self . GetNeeded ( ) extra_files_kv = [ ( key , ArchFile ( name = key , arch = arch , path = url , url = url ) ) for key , arch , url in self . extra_files ] manifest_items = list ( needed . items ( ) ) + extra_files_kv for need , archinfo in manifest_items : if IsLoader ( need ) : urlinfo = { URL_KEY : archinfo . url } manifest [ PROGRAM_KEY ] [ archinfo . arch ] = urlinfo for need , archinfo in manifest_items : urlinfo = { URL_KEY : archinfo . url } name = archinfo . name arch = archinfo . arch if IsLoader ( need ) : continue if need in self . main_files : if need . endswith ( ".nexe" ) : program = manifest [ PROGRAM_KEY ] if arch not in program : program [ arch ] = urlinfo continue name = MAIN_NEXE name = self . remap . get ( name , name ) fileinfo = manifest [ FILES_KEY ] . get ( name , { } ) fileinfo [ arch ] = urlinfo manifest [ FILES_KEY ] [ name ] = fileinfo self . manifest = manifest
Create a JSON formatted dict containing the files
NaCl will map url requests based on architecture.
Create a JSON formatted dict containing the files NaCl will map url requests based on architecture .
"""Create a JSON formatted dict containing the files

    NaCl will map url requests based on architecture.  The startup NEXE
    can always be found under the top key PROGRAM.  Additional files are under
    the FILES key further mapped by file name.  In the case of 'runnable' the
    PROGRAM key is populated with urls pointing the runnable-ld.so which acts
    as the startup nexe.  The application itself is then placed under the
    FILES key mapped as 'main.exe' instead of the original name so that the
    loader can find it.
    """ # Add dynamic loader to the program section. # Place it under program if we aren't using the runnable-ld.so. # Otherwise, treat it like another another file named main.nexe.
self