mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
Move some files from utils to more sensible locations
This commit is contained in:
parent
9e5fbaf21a
commit
85f6bd3220
|
@ -22,13 +22,13 @@ from legendary.core import LegendaryCore
|
||||||
from legendary.models.exceptions import InvalidCredentialsError
|
from legendary.models.exceptions import InvalidCredentialsError
|
||||||
from legendary.models.game import SaveGameStatus, VerifyResult, Game
|
from legendary.models.game import SaveGameStatus, VerifyResult, Game
|
||||||
from legendary.utils.cli import get_boolean_choice, get_int_choice, sdl_prompt, strtobool
|
from legendary.utils.cli import get_boolean_choice, get_int_choice, sdl_prompt, strtobool
|
||||||
from legendary.utils.crossover import *
|
from legendary.lfs.crossover import *
|
||||||
from legendary.utils.custom_parser import HiddenAliasSubparsersAction
|
from legendary.utils.custom_parser import HiddenAliasSubparsersAction
|
||||||
from legendary.utils.env import is_windows_mac_or_pyi
|
from legendary.utils.env import is_windows_mac_or_pyi
|
||||||
from legendary.utils.eos import add_registry_entries, query_registry_entries, remove_registry_entries
|
from legendary.lfs.eos import add_registry_entries, query_registry_entries, remove_registry_entries
|
||||||
from legendary.utils.lfs import validate_files, clean_filename
|
from legendary.lfs.utils import validate_files, clean_filename
|
||||||
from legendary.utils.selective_dl import get_sdl_appname
|
from legendary.utils.selective_dl import get_sdl_appname
|
||||||
from legendary.utils.wine_helpers import read_registry, get_shell_folders
|
from legendary.lfs.wine_helpers import read_registry, get_shell_folders
|
||||||
|
|
||||||
# todo custom formatter for cli logger (clean info, highlighted error/warning)
|
# todo custom formatter for cli logger (clean info, highlighted error/warning)
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
|
@ -2927,7 +2927,7 @@ def main():
|
||||||
print(f'\nCommand: {choice}')
|
print(f'\nCommand: {choice}')
|
||||||
print(subparser.format_help())
|
print(subparser.format_help())
|
||||||
elif os.name == 'nt':
|
elif os.name == 'nt':
|
||||||
from legendary.utils.windows_helpers import double_clicked
|
from legendary.lfs.windows_helpers import double_clicked
|
||||||
if double_clicked():
|
if double_clicked():
|
||||||
print('Please note that this is not the intended way to run Legendary.')
|
print('Please note that this is not the intended way to run Legendary.')
|
||||||
print('Follow https://github.com/derrod/legendary/wiki/Setup-Instructions to set it up properly')
|
print('Follow https://github.com/derrod/legendary/wiki/Setup-Instructions to set it up properly')
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import logging
|
|
||||||
import os
|
|
||||||
import shlex
|
import shlex
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
@ -26,7 +24,7 @@ from legendary.api.lgd import LGDAPI
|
||||||
from legendary.downloader.mp.manager import DLManager
|
from legendary.downloader.mp.manager import DLManager
|
||||||
from legendary.lfs.egl import EPCLFS
|
from legendary.lfs.egl import EPCLFS
|
||||||
from legendary.lfs.lgndry import LGDLFS
|
from legendary.lfs.lgndry import LGDLFS
|
||||||
from legendary.utils.lfs import clean_filename, delete_folder, delete_filelist, get_dir_size
|
from legendary.lfs.utils import clean_filename, delete_folder, delete_filelist, get_dir_size
|
||||||
from legendary.models.downloading import AnalysisResult, ConditionCheckResult
|
from legendary.models.downloading import AnalysisResult, ConditionCheckResult
|
||||||
from legendary.models.egl import EGLManifest
|
from legendary.models.egl import EGLManifest
|
||||||
from legendary.models.exceptions import *
|
from legendary.models.exceptions import *
|
||||||
|
@ -34,15 +32,15 @@ from legendary.models.game import *
|
||||||
from legendary.models.json_manifest import JSONManifest
|
from legendary.models.json_manifest import JSONManifest
|
||||||
from legendary.models.manifest import Manifest, ManifestMeta
|
from legendary.models.manifest import Manifest, ManifestMeta
|
||||||
from legendary.models.chunk import Chunk
|
from legendary.models.chunk import Chunk
|
||||||
from legendary.utils.crossover import *
|
from legendary.lfs.crossover import *
|
||||||
from legendary.utils.egl_crypt import decrypt_epic_data
|
from legendary.utils.egl_crypt import decrypt_epic_data
|
||||||
from legendary.utils.env import is_windows_mac_or_pyi
|
from legendary.utils.env import is_windows_mac_or_pyi
|
||||||
from legendary.utils.eos import EOSOverlayApp, query_registry_entries
|
from legendary.lfs.eos import EOSOverlayApp, query_registry_entries
|
||||||
from legendary.utils.game_workarounds import is_opt_enabled, update_workarounds, get_exe_override
|
from legendary.utils.game_workarounds import is_opt_enabled, update_workarounds, get_exe_override
|
||||||
from legendary.utils.savegame_helper import SaveGameHelper
|
from legendary.utils.savegame_helper import SaveGameHelper
|
||||||
from legendary.utils.selective_dl import games as sdl_games
|
from legendary.utils.selective_dl import games as sdl_games
|
||||||
from legendary.utils.manifests import combine_manifests
|
from legendary.utils.manifests import combine_manifests
|
||||||
from legendary.utils.wine_helpers import read_registry, get_shell_folders, case_insensitive_path_search
|
from legendary.lfs.wine_helpers import read_registry, get_shell_folders, case_insensitive_path_search
|
||||||
|
|
||||||
|
|
||||||
# ToDo: instead of true/false return values for success/failure actually raise an exception that the CLI/GUI
|
# ToDo: instead of true/false return values for success/failure actually raise an exception that the CLI/GUI
|
||||||
|
|
|
@ -4,7 +4,7 @@ import logging
|
||||||
from legendary.models.game import Game
|
from legendary.models.game import Game
|
||||||
|
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
from legendary.utils.windows_helpers import *
|
from legendary.lfs.windows_helpers import *
|
||||||
|
|
||||||
logger = logging.getLogger('EOSUtils')
|
logger = logging.getLogger('EOSUtils')
|
||||||
# Dummy Game objects to use with Core methods that expect them
|
# Dummy Game objects to use with Core methods that expect them
|
|
@ -8,11 +8,12 @@ from collections import defaultdict
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
|
from .utils import clean_filename
|
||||||
|
|
||||||
from legendary.models.game import *
|
from legendary.models.game import *
|
||||||
from legendary.utils.aliasing import generate_aliases
|
from legendary.utils.aliasing import generate_aliases
|
||||||
from legendary.utils.config import LGDConf
|
from legendary.models.config import LGDConf
|
||||||
from legendary.utils.env import is_windows_mac_or_pyi
|
from legendary.utils.env import is_windows_mac_or_pyi
|
||||||
from legendary.utils.lfs import clean_filename
|
|
||||||
|
|
||||||
|
|
||||||
class LGDLFS:
|
class LGDLFS:
|
||||||
|
|
Loading…
Reference in a new issue