Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

"""Generic runner functions""" 

from lutris.util.log import logger 

 

__all__ = ("linux", "steam", "wine", "winesteam", "sdlmame", "sdlmess", 

           "mednafen", "scummvm", "snes9x", "gens", "uae", "fsuae", "nulldc", 

           "openmsx", "dosbox", "pcsxr", "atari800", "mupen64plus", "frotz", 

           "browser", "osmose", "vice", "hatari", "stella", "jzintv", "o2em") 

 

 

def import_runner(runner_name): 

    """Dynamically import a runner class""" 

    try: 

        runner_module = __import__('lutris.runners.%s' % runner_name, 

                                   globals(), locals(), [runner_name], -1) 

        runner_cls = getattr(runner_module, runner_name) 

    except ImportError: 

        logger.error("Invalid runner %s" % runner_name) 

        raise 

    return runner_cls 

 

 

def import_task(runner, task): 

    """Return a runner task""" 

    try: 

        runner_module = __import__('lutris.runners.%s' % runner, 

                                   globals(), locals(), [runner], -1) 

        runner_task = getattr(runner_module, task) 

    except ImportError: 

        logger.error("Invalid runner %s" % runner) 

        raise 

    return runner_task