diff --git a/bin/lutris b/bin/lutris index b1fcd1651..b80b1a4fb 100755 --- a/bin/lutris +++ b/bin/lutris @@ -44,14 +44,13 @@ except ImportError: else: sys.exit() -from lutris.constants import CONFIG_EXTENSION, GAME_CONFIG_PATH from lutris.util.log import logger from lutris.installer import InstallerDialog from lutris.config import check_config # , register_handler from lutris.game import Game from lutris import pga from lutris.gui.lutriswindow import LutrisWindow -from lutris.settings import VERSION +from lutris.settings import VERSION, GAME_CONFIG_DIR # Support for command line options. @@ -114,7 +113,7 @@ for arg in args: break if game_slug or options.installer_file: - file_path = os.path.join(GAME_CONFIG_PATH, game_slug + CONFIG_EXTENSION) + file_path = os.path.join(GAME_CONFIG_DIR, game_slug + ".yml") db_game = pga.get_game_by_slug(game_slug) \ or pga.get_game_by_slug(game_slug, field='installer_slug') if db_game and db_game['installed'] and not options.reinstall: diff --git a/lutris/constants.py b/lutris/constants.py deleted file mode 100644 index e0a65aa8b..000000000 --- a/lutris/constants.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding:Utf-8 -*- -# -# Copyright (C) 2010 Mathieu Comandon -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 3 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -""" Constants module, soon to be deprecated. Replaced by settings module. """ - -from os.path import join -from xdg import BaseDirectory - -PROTOCOL_VERSION = 1 -CONFIG_EXTENSION = ".yml" - - -LUTRIS_CONFIG_PATH = join(BaseDirectory.xdg_config_home, 'lutris') -LUTRIS_DATA_PATH = join(BaseDirectory.xdg_data_home, 'lutris') -LUTRIS_CACHE_PATH = join(BaseDirectory.xdg_cache_home, 'lutris') - -RUNNER_CONFIG_PATH = join(LUTRIS_CONFIG_PATH, 'runners') -GAME_CONFIG_PATH = join(LUTRIS_CONFIG_PATH, 'games') -COVER_PATH = join(LUTRIS_CONFIG_PATH, 'covers') -TMP_PATH = join(LUTRIS_CACHE_PATH, 'tmp') diff --git a/lutris/settings.py b/lutris/settings.py index f2d1fc53e..e40fe11e4 100644 --- a/lutris/settings.py +++ b/lutris/settings.py @@ -16,6 +16,7 @@ CONFIG_FILE = os.path.join(CONFIG_DIR, "lutris.conf") DATA_DIR = os.path.join(BaseDirectory.xdg_data_home, 'lutris') RUNNER_DIR = os.path.join(DATA_DIR, "runners") CACHE_DIR = os.path.join(BaseDirectory.xdg_cache_home, 'lutris') +GAME_CONFIG_DIR = os.path.join(CONFIG_DIR, 'games') TMP_PATH = os.path.join(CACHE_DIR, 'tmp') BANNER_PATH = os.path.join(DATA_DIR, 'banners')