Commit graph

42 commits

Author SHA1 Message Date
Etaash Mathamsetty c56a81ab64
[lfs] Allow setting config dir via LEGENDARY_CONFIG_PATH env var (#590) 2023-10-14 12:51:14 +02:00
derrod 4145381b93 [cli/core/lfs] Add slightly janky lock for installed game data
In order to prevent multiple instances of Legendary mucking with installed game data
acquire a lock as soon as it is required and only release it (implicitly) when
Legendary exits.

This is a bit jank, but should prevent people from messing up their local data by
running two install commands at a time.

EGL sync is technically also affected by this, but in its case we simply skip the
sync/import/export and leave it to the next instance with a lock to do.
2023-06-17 23:46:52 +02:00
derrod e26b9e60ff [core/lfs] Use filelock for user data
Closes #566

Co-authored-by: Mathis Dröge <mathis.droege@ewe.net>
2023-06-17 22:58:16 +02:00
derrod 0e23b8e4f0 Cherry-pick some Sourcery refactoring suggestions 2022-10-25 15:38:55 +02:00
derrod 85f6bd3220 Move some files from utils to more sensible locations 2022-10-25 15:14:26 +02:00
derrod 2b71b50d5c [cli/lfs] Fix cleanup deleting in-use manifests using new naming convention 2022-05-31 13:26:17 +02:00
derrod b5120fa99d [lfs] Cache overlay info in memory to avoid unnecessary reads 2021-12-28 18:14:59 +01:00
derrod c7030c480e [lfs] Fix log message 2021-12-28 17:48:55 +01:00
derrod 8d71df0cc4 [cli/core/lfs] Add update check for installed overlay 2021-12-28 17:48:24 +01:00
derrod efaf25b9d9 [cli/core/lfs] Add EOS overlay management command/backend
- Supports installing and updating the overlay
- Supports enabling/disabling the overlay
- Can find existing EGL overlay for enabling/disabling
- Should work!
2021-12-28 17:47:48 +01:00
derrod 6f7989ab50 [cli/core/utils/lfs] Also enable update notification on macOS 2021-12-02 16:51:48 +01:00
derrod 8c56bd93d5 [core/lfs] Include platform in saved manifest name 2021-12-01 21:26:21 +01:00
derrod f280d53496 [cli/core/lfs] Add support for mixing platforms 2021-12-01 20:57:43 +01:00
derrod 0ef916e9c5 [cli/lfs] Prune game metadata that's no longer needed 2021-10-16 19:44:48 +02:00
derrod 07ae84c6a0 [lfs/utils] Prevent app name colliding with itself 2021-10-12 15:00:11 +02:00
derrod c4695d2b99 [cli/models/lfs] Clean up some old code/comments 2021-10-05 09:22:17 +02:00
derrod f2639a7e67 [lfs] Make lowercase app name an alias rather than conflict 2021-10-05 08:18:53 +02:00
derrod 02c83405fb [lfs] Fix old aliases not being cleared when regenerating 2021-10-05 07:11:33 +02:00
derrod 2f4ad78e27 [lfs] Prevent aliases from shadowing app names
This is probably somewhat unlikely to actually happen given
that app names are largely random strings and only some are
actual words, but just to be sure we declare app names to be
collisions.
2021-10-04 01:28:22 +02:00
derrod 0d8b74a9e0 [cli/core/utils/lfs] Add automatic alias generation 2021-10-02 21:10:25 +02:00
derrod ee2432c443 [cli/core/lfs] Allow specifying custom config file 2021-09-28 03:07:15 +02:00
derrod b12798e6b0 [cli/core/lfs/utils] Fetch SDL data from API 2021-09-05 09:41:54 +02:00
derrod 791bc77c7c [core/lfs] Enable update notification for PyInstaller on Linux 2021-09-05 00:49:11 +02:00
derrod b33396915e [lfs] Fix get_cached_version() reading from disk every time 2021-09-03 20:11:29 +02:00
derrod 5fe35c7008 [lfs] Add options with comments for update opt-out to config 2021-09-03 20:11:11 +02:00
derrod ad2912a88e [lfs] Move optionxform to custom config parser 2021-09-03 19:58:06 +02:00
derrod a465966954 [api/cli/core/lfs] Add Legendary update check 2021-09-02 19:31:04 +02:00
derrod 8726843bdb [lfs] Fix first time config creation 2021-09-02 17:31:58 +02:00
derrod 0e6b63d1a2 [utils/lfs] Use custom configparser wrapper
The main reason is to prevent user configs from being overwritten
and also to only actually write the config file if it has been
modified from within Legendary itself.

Closes #279
2021-05-30 18:57:23 +02:00
derrod 477827033e [cli/lfs] Add "cleanup" command to remove unused files 2020-11-02 15:53:11 +01:00
derrod 3ea394937b [lfs] Migrate old manifest structure to new 2020-11-02 15:14:59 +01:00
derrod 83e3af344f [core/lfs] Remove unversioned local manifest saving/loading 2020-11-02 14:58:23 +01:00
derrod d842780c73 [lfs] Do not remove comments from ini files
Fixes #105
2020-10-24 19:23:40 +02:00
derrod 10cf1f7c00 [lfs] Ensure "Legendary" config section exists
Fixes #50
2020-05-30 21:15:13 +02:00
derrod 1622b415ea [core/utils] Move lfs helpers to utils 2020-05-19 17:45:46 +02:00
derrod d6abbcc694 Cleanup! (Remove shebangs, unused files) 2020-05-15 07:01:30 +02:00
derrod b6a701708b [lfs] Honor XDG_CONFIG_HOME env variables 2020-05-15 06:52:58 +02:00
derrod 0d08263afa [lfs] Return empty installed list if installed is None
Fixes #9
2020-04-28 06:13:03 +02:00
derrod 035e23b964 [core/lfs] Clean up local manifest saving/loading 2020-04-25 23:06:46 +02:00
derrod a59107e503 [core/lfs] Load correct old manifest file after aborted installation
If a user were to start and then abort an installation previously
we would have loaded the downloaded new manifest, rather than the
one of the installed version. By explicitly setting the version
we can avoid this.
2020-04-24 06:29:22 +02:00
derrod 92a0003e6f [core/lfs] Fix old manifest saving and install version saving 2020-04-20 01:27:28 +02:00
derrod e00e534f2c First public test version of legendary
Unfortunately the history from before this commit is lost to time. And
that's probably for the best.
2020-04-14 15:40:41 +02:00