Exemplo n.º 1
0
    def prelaunch(self):
        super(winesteam, self).prelaunch()

        def check_shutdown(is_running, times=10):
            for x in range(1, times):
                time.sleep(1)
                if not is_running():
                    return True
        # Stop Wine Steam to prevent Wine prefix/version problems
        if is_running():
            logger.info("Waiting for Steam to shutdown...")
            self.shutdown()
            if not check_shutdown(is_running):
                logger.info("Wine Steam does not shut down, killing it...")
                kill()
                if not check_shutdown(is_running, 5):
                    logger.error("Failed to shut down Wine Steam :(")
                    return False
        # Stop Linux Steam
        from lutris.runners import steam
        if steam.is_running():
            logger.info("Waiting for Steam shutdown...")
            steam.shutdown()
            if not check_shutdown(steam.is_running):
                logger.info("Steam does not shut down, killing it...")
                steam.kill()
                if not check_shutdown(steam.is_running, 5):
                    logger.error("Failed to shut down Steam :(")
                    return False
        return True
Exemplo n.º 2
0
 def prelaunch(self):
     from lutris.runners import steam
     if steam.is_running():
         steam.shutdown()
         logger.info("Waiting for Steam to shutdown...")
         time.sleep(2)
         if steam.is_running():
             logger.info("Steam does not shutdown, killing it...")
             steam.kill()
             time.sleep(2)
             if steam.is_running():
                 logger.error("Failed to shutdown Steam for Windows :(")
                 return False
     return True
Exemplo n.º 3
0
 def prelaunch(self):
     from lutris.runners import steam
     if steam.is_running():
         steam.shutdown()
         logger.info("Waiting for Steam to shutdown...")
         time.sleep(2)
         if steam.is_running():
             logger.info("Steam does not shutdown, killing it...")
             steam.kill()
             time.sleep(2)
             if steam.is_running():
                 logger.error("Failed to shutdown Steam for Windows :(")
                 return False
     return True