parameters: (args)
docstring: Upgrades the project by calling it's engines cryrun.exe.
docstring_summary: Upgrades the project by calling it's engines cryrun.exe.
docstring_tokens: Upgrades the project by calling it s engines cryrun . exe .
function: def cmd_upgrade(args):
      """
      Upgrades the project by calling it's engines cryrun.exe.
      """
      registry = cryregistry.load_engines()
      engine_path = cryregistry.engine_path(registry, args.engine_id)
      if engine_path is None:
          error_engine_path_not_found(args, args.engine_id)
  
      if getattr(sys, 'frozen', False):
          subcmd = [get_cryrun_path(engine_path)]
      else:
          subcmd = [
              get_python_path(),
              get_cryrun_path(engine_path)
          ]
  
      if not os.path.isfile(subcmd[-1]):
          error_engine_tool_not_found(args, subcmd[-1])
  
      sys_argv = [x for x in sys.argv[1:] if x not in ('--silent', )]
      subcmd.extend(sys_argv)
  
      print_subprocess(subcmd)
      sys.exit(subprocess.call(subcmd))
function_tokens: def cmd_upgrade ( args ) : registry = cryregistry . load_engines ( ) engine_path = cryregistry . engine_path ( registry , args . engine_id ) if engine_path is None : error_engine_path_not_found ( args , args . engine_id ) if getattr ( sys , 'frozen' , False ) : subcmd = [ get_cryrun_path ( engine_path ) ] else : subcmd = [ get_python_path ( ) , get_cryrun_path ( engine_path ) ] if not os . path . isfile ( subcmd [ - 1 ] ) : error_engine_tool_not_found ( args , subcmd [ - 1 ] ) sys_argv = [ x for x in sys . argv [ 1 : ] if x not in ( '--silent' , ) ] subcmd . extend ( sys_argv ) print_subprocess ( subcmd ) sys . exit ( subprocess . call ( subcmd ) )