def install_game(self, appid): logger.debug("Installing steam game %s", appid) acf_data = get_default_acf(appid, appid) acf_content = to_vdf(acf_data) acf_path = os.path.join(self.get_game_path(), "SteamApps", "appmanifest_%s.acf" % appid) with open(acf_path, "w") as acf_file: acf_file.write(acf_content) if is_running(): shutdown() time.sleep(5) else: logger.debug("Steam not running") subprocess.Popen(["steam", "steam://preload/%s" % appid])
def install_game(self, appid): logger.debug("Installing steam game %s", appid) acf_data = get_default_acf(appid, appid) acf_content = to_vdf(acf_data) acf_path = os.path.join(self.steam_data_dir, "SteamApps", "appmanifest_%s.acf" % appid) with open(acf_path, "w") as acf_file: acf_file.write(acf_content) if is_running(): shutdown() time.sleep(5) else: logger.debug("Steam not running") subprocess.Popen(["steam", "steam://preload/%s" % appid])
def install_game(self, appid, generate_acf=False): logger.debug("Installing steam game %s", appid) if generate_acf: acf_data = get_default_acf(appid, appid) acf_content = to_vdf(acf_data) steamapps_path = self.get_default_steamapps_path() acf_path = os.path.join(steamapps_path, "appmanifest_%s.acf" % appid) with open(acf_path, "w") as acf_file: acf_file.write(acf_content) if is_running(): shutdown() time.sleep(5) command = ["steam", "steam://install/%s" % (appid)] subprocess.Popen(command)
def install_game(self, appid, generate_acf=False): logger.debug("Installing steam game %s", appid) if generate_acf: acf_data = get_default_acf(appid, appid) acf_content = to_vdf(acf_data) steamapps_path = self.get_default_steamapps_path() if not steamapps_path: raise RuntimeError('Could not find Steam path, is Steam installed?') acf_path = os.path.join(steamapps_path, "appmanifest_%s.acf" % appid) with open(acf_path, "w") as acf_file: acf_file.write(acf_content) if is_running(): shutdown() time.sleep(5) command = ["steam", "steam://install/%s" % (appid)] subprocess.Popen(command)