Commit graph

495 commits

Author SHA1 Message Date
derrod 02c83405fb [lfs] Fix old aliases not being cleared when regenerating 2021-10-05 07:11:33 +02:00
derrod 638578283b [core/utils/lfs] Fix auth import with now encrypted EGL user data
It took way too long to find the key.
It's not even hidden, I'm just dumb.
2021-10-04 09:26:44 +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 a116013f05 [utils] Also make raw game name (lowercase) a valid alias 2021-10-02 23:48:44 +02:00
derrod 5960cb8699 Bump version 2021-10-02 23:23:28 +02:00
derrod 09c52b66ff [cli] Log app title/name when preparing download 2021-10-02 23:09:59 +02:00
derrod 0b97cdeeef [cli] Add alias management commands 2021-10-02 22:54:56 +02:00
derrod 3f04de448b [utils] Improve alias generation and fix explanation 2021-10-02 22:19:11 +02:00
derrod e7ce2e5cb7 [core] Force-refresh aliases when fetching games without assets 2021-10-02 21:21:46 +02:00
derrod 0d8b74a9e0 [cli/core/utils/lfs] Add automatic alias generation 2021-10-02 21:10:25 +02:00
derrod d70d5a6521 [downloader] Fix ETA calculation for runtimes >= 1 hour
Closes #345
2021-10-02 19:00:09 +02:00
derrod d15b882929 Bump version 2021-10-02 07:41:29 +02:00
derrod 8f6cb9c856 [cli] Add alias feature for app names 2021-10-02 07:41:11 +02:00
derrod 55f9f05206 [utils] Change wording of SDL prompt, support space-separated list 2021-09-29 09:04:09 +02:00
derrod f22c8d0ab6 [cli] Add --skip-sdl and --disable-sdl options
--skip-sdl simply skips the prompt and selects the defaults.
--disable-sdl disables selective downloading for the title and
will reset existing SDL settings (if any). Can be re-enabled
with --reset-sdl or by removing the config option manually.

The combination "--reset-sdl --disable-sdl" is allowed and will
reset existing tags while keeping SDL disabled.
2021-09-29 08:05:37 +02:00
derrod f9dad549c3 [cli] Add manifest size and fix crash with no DLC 2021-09-28 09:43:49 +02:00
derrod ff29b949cb [cli] Add "--with-dlcs" flag to automatically install all DLCs 2021-09-28 08:07:28 +02:00
derrod 3a608610f3 [cli] Add "info" command for app metadata 2021-09-28 07:58:50 +02:00
derrod 4706a42cee [cli] Verify app name to be an Origin title when using --origin 2021-09-28 05:57:39 +02:00
derrod 7509550eb1 [cli/core] Add option to force refresh game metadata 2021-09-28 05:56:19 +02:00
derrod dbc4131ec2 [cli] Use new launch command method in Origin launch
By doing this support for wrappers (e.g. Proton) is now also included.
2021-09-28 05:23:39 +02:00
derrod a1993eb568 [core] Refactor getting wine/wrapper launch command into its own function 2021-09-28 05:21:16 +02:00
derrod 156b4716f4 [cli] Add --json to Origin launch as well 2021-09-28 05:20:40 +02:00
derrod b5d4224664 [cli/core] Only return legendary-defined environment variables 2021-09-28 05:07:06 +02:00
derrod 888d62a96d [cli/core/models] Refactor launch parameters and add --json option
Primarily intended to make it easier for third-party applications
(mainly Heroic) to handle launch options on their own by simply
taking the necessary information from legendary and ignoring
user-defined stuff.

Also useful for debugging.
2021-09-28 04:06:54 +02:00
derrod ee2432c443 [cli/core/lfs] Allow specifying custom config file 2021-09-28 03:07:15 +02:00
derrod b319cb505c [cli/downloader.mp] Explicitly set UTF-8 encoding for resume/repair file
Fixes #297
2021-09-28 02:42:17 +02:00
derrod e881e42d5f [core] Save non-install game metadata 2021-09-18 20:02:52 +02:00
derrod 730225c06b [cli] Include DLC install size 2021-09-10 20:36:51 +02:00
derrod fbd0df1ecc [cli/core] Include DLCs in installed games list
This should be replaced later on by including information
about the main game in the InstalledGame metadata.
2021-09-10 20:30:53 +02:00
derrod cffd9040f7 [cli] Strip whitespace from game titles
Yoku's Island Express has a \t for some reason...
2021-09-10 16:09:15 +02:00
derrod 6b4cf6558b [core] Warn if parsing manifest-defined launch parameters fails 2021-09-09 09:55:48 +02:00
derrod a725dd0ad8 Bump version 2021-09-08 11:10:42 +02:00
derrod 21eac6ecfa [cli] Enable (very manual) Origin linking on Linux 2021-09-08 10:43:30 +02:00
derrod 0bf7110653 [core] Move getting env vars to separate method 2021-09-08 10:37:40 +02:00
derrod e8a3a3ec8d [cli] Use pyinstaller check rather than OS name only 2021-09-08 10:27:26 +02:00
derrod b12798e6b0 [cli/core/lfs/utils] Fetch SDL data from API 2021-09-05 09:41:54 +02:00
derrod 82a2706e4c [api] Add method for downloading SDL data 2021-09-05 09:06:57 +02:00
derrod 72aea19853 [api] Add version to API urls 2021-09-05 08:40:12 +02:00
derrod 791bc77c7c [core/lfs] Enable update notification for PyInstaller on Linux 2021-09-05 00:49:11 +02:00
derrod 43bb09a1ad [utils] Add helper to determine if running PyInstaller package 2021-09-05 00:49:04 +02:00
derrod 39bfa3df15 [api] Update Legendary API host 2021-09-04 10:06:26 +02:00
derrod 5a8de3a3bc [core/utils] Update auth EGL version and game workarounds from API 2021-09-03 23:20:17 +02:00
derrod ba6ec3ecca [cli/core] Add option to launch games via Origin (Windows only) 2021-09-03 22:59:47 +02:00
derrod 6876371325 [cli] Disable update notice if JSON/CSV/TSV output are used 2021-09-03 21:11:09 +02:00
derrod d82870a5d3 [cli] Show notice on non-Windows about update delays 2021-09-03 20:14:00 +02:00
derrod d21e002272 [cli] Force check for updates when trying to login 2021-09-03 20:12:37 +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 315bdfb4a4 [cli/core/lfs] Enable update check by default, make notice optional
This will allow legendary to force checking for updates in critical
situations where it may be required. Also enables updating configuration
data on Linux by default.
2021-09-03 20:10:30 +02:00
derrod 0acfc47b33 [cli] Properly catch exception on import 2021-09-03 20:08:20 +02:00
derrod ad2912a88e [lfs] Move optionxform to custom config parser 2021-09-03 19:58:06 +02:00
derrod dd5f77c3d1 Bump version 2021-09-03 19:25:32 +02:00
derrod c53ac14c64 [cli] Catch exception if EGL path resolution fails 2021-09-03 19:23:25 +02:00
derrod d3026672d1 [core] Fix for epic authentication API changes 2021-09-03 19:16:37 +02:00
derrod d6e9c5ef46 [cli] Fix EGL Local AppData resolution with newer WINE versions
Closes #332
2021-09-03 19:00:56 +02:00
derrod f3991d3ee2 [api] Clean up imports and add OS name to User-Agent 2021-09-03 10:58:57 +02:00
derrod 65085e5b4a Bump version 2021-09-02 19:48:24 +02:00
derrod a465966954 [api/cli/core/lfs] Add Legendary update check 2021-09-02 19:31:04 +02:00
derrod 69eeccec21 [api.egs] Add method to update EGL version/credentials 2021-09-02 19:31:04 +02:00
derrod 4d5539c889 [cli/utils] Automatically create missing config sections 2021-09-02 19:31:04 +02:00
derrod 0416b472d3 [api] Add support for fetching launcher manifest 2021-09-02 18:10:26 +02:00
derrod 8726843bdb [lfs] Fix first time config creation 2021-09-02 17:31:58 +02:00
derrod 87d55c5d31 Bump version to 0.20.7 2021-09-01 15:46:11 +02:00
derrod f78674b3ed [core] Formatting and type hint fixes 2021-09-01 15:29:25 +02:00
derrod a80244ed37 [cli/core] Add flag to show non-installable games/DLCs
This primarily means titles that have to be activated on external stores
such as Battlefront II which has to be installed via Origin.

Addresses half of #202
2021-09-01 15:28:25 +02:00
derrod 6746ce85a1 [downloader] Fix wrong property being used
This caused re-using old files to fail.
2021-09-01 02:38:58 +02:00
derrod 7ff16aad44 [core/downloader] Move downloader to new sub-package
Preparing to add a new AIO based downloader
2021-08-14 05:12:10 +02:00
derrod 9e01ae1c5b [downloader] Update to use new dataclasses 2021-08-14 05:10:31 +02:00
derrod 1fe0dab78b [models] Further adjustments to new dataclasses 2021-08-14 05:10:00 +02:00
derrod dc381cacb0 [downloader] Adjust for changes in new dataclass attribute names 2021-08-11 09:21:19 +02:00
derrod 782a18f8f1 [models] Add type hints and migrate downloader models to dataclasses 2021-08-11 09:19:52 +02:00
derrod d86039dd9b [cli/core] Add option to disable HTTPS for downloads
The EGS client does not use HTTPS for downloads in order to facilitate
the use of tools such as LanCache that use DNS based CDN redirection.

Legendary should be usable in such an environment as well,
but HTTPS will remain on by default.

See: https://lancache.net/news/2019/06/15/steamcache-is-rebranding-to-lancachenet/
2021-08-09 11:31:03 +02:00
derrod 1760c34703 [cli/core] Add option for preferred CDN host
Allows a user to specify a preferred CDN via config or command line.
Also changes selection process to match EGS client
(no random selection anymore).
2021-08-09 11:17:15 +02:00
derrod 454e2a2a69 [utils] Set config modified state and mod time on write 2021-06-21 12:22:08 +02:00
derrod a4cbf5892a [cli/utils] Save manually specified install tags to config
Requires some testing, may cause issues with supported SDL titles.
2021-06-17 15:21:46 +02:00
derrod dd3c0429fe [cli] Filter files by install tag before verifying 2021-06-17 15:08:31 +02:00
derrod bb3d6f9348 [core/utils] Improve minimum disk space calculation when updating 2021-06-17 15:00:34 +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 7ae4eda5b8 [utils] Fix manifest combiner for delta patching
Previously this would result in duplicated chunks,
causing calculations for download sizes to be incorrect.

Fixes #278
2021-05-24 18:18:28 +02:00
derrod f040f4bd40 [api] EGS: Add method to fetch library items
This is required for us to also get items that don't have assets
(e.g. some DLCs/Origin-managed games)
2021-01-20 14:43:32 +01:00
derrod edad963200 [models/utils] Track file offset for chunk parts
Preparation for smarter patching with downloader rewrite.
2021-01-10 14:25:35 +01:00
derrod a2280edea8 [cli/core] Add option to override launch executable 2021-01-10 14:24:06 +01:00
derrod ee3b3fb9fe Fix various typos and some style complaints
Closes #175
2021-01-02 06:53:21 +01:00
derrod 58edb22fce [cli] egl-sync: Error out if asset information missing 2021-01-02 06:31:47 +01:00
derrod 19c66bee11 Bump version to 0.20.6 2020-12-27 22:01:45 +01:00
derrod 3c71229b7e [core] Fix missing {} around KnownFolders GUID 2020-12-26 22:01:30 +01:00
derrod ba867f1ce6 [cli] Sort game names case-insensitively 2020-12-23 18:04:53 +01:00
derrod d861668bc1 [models] Update CustomFields with items() method 2020-12-22 18:10:03 +01:00
derrod bd0b9248ee Bump version to 0.20.5 2020-12-20 20:48:31 +01:00
derrod 104b928e3a [core] Increase default shared memory to 2048 MiB
This should still be reasonable for most machines people are going to run games on,
and means no manual increases are required for every game it has been previously
needed for.
2020-12-18 17:26:51 +01:00
derrod 254c22eaec Update README & Bump version 2020-12-18 17:02:00 +01:00
derrod 1a015a3ba7 [core] Only attempt to delete untagged files that exist 2020-12-18 17:01:52 +01:00
derrod f42d63767c [cli] Fix crash when not installing 2020-12-17 16:31:38 +01:00
derrod 1226cd1b08 [cli] Remove untagged files when install tags changed 2020-12-17 15:25:01 +01:00
derrod 1cec4c6cb0 [core] Add method to remove untagged files 2020-12-17 15:25:01 +01:00
derrod 40f8c553ba [utils] Allow silent deletion of files 2020-12-17 15:25:01 +01:00
derrod 51c8b67f91 [cli] Add flag to reset SDL selection 2020-12-17 15:24:59 +01:00
derrod efad90d951 [cli] Do not run SDL for DLC 2020-12-17 15:23:06 +01:00
derrod dca216d053 [cli] Fix repair-and-update not working correctly 2020-12-17 15:23:06 +01:00
derrod 86ea066e8d [core] Save install tags to InstalledGame 2020-12-17 15:23:06 +01:00
derrod cff8abd0da [core] Import/Export install tags to EGL 2020-12-17 15:23:05 +01:00
derrod 30acc7d55e [models] Add install tags to game models 2020-12-17 15:23:05 +01:00
derrod df9380ab3d [core] Fix calculating install size *again* 2020-12-17 15:23:05 +01:00
Simão Gomes Viana 34677cc02e
[cli/README] Fix typo in CLI help (manfiests -> manifests) (#157) 2020-12-16 20:21:20 +01:00
derrod 1430e321e6 [core/utils] Miscellaneous whitespace, comment, text fixes 2020-12-16 12:37:12 +01:00
derrod 7609553b12 [core/utils] More generic/robust selective dl, add support for Fortnite
Existing installations should ask for the install tags that should be used
on first update. It will now be easier to add more games as well.
2020-12-16 12:35:31 +01:00
derrod fd004db4b9 [downloader] Move optional file deletion tasks to the end 2020-12-16 12:32:19 +01:00
derrod 4d138c1a22 [downloader] Silently attempt to delete files not selected for install
This is to clean up when changes are made to the selected install tags
2020-12-16 12:29:26 +01:00
derrod 08c2008281 [downloader/models] Add silent deletion task flag 2020-12-16 12:28:37 +01:00
derrod 691fd9bc8f [core] Fix calculating install size (again) 2020-12-16 12:15:18 +01:00
derrod bece6ef5de [downloader] Fix skipping unneeded chunks
This was erroneously removed in daeee2e
2020-12-16 12:14:31 +01:00
derrod e710bb893f [core] Fall back to default wine prefix location
This and the previous commit fix #41
2020-12-16 11:29:39 +01:00
derrod 5e061d6946 [core/utils] Add save path resolution on Linux
If a wine prefix is specified in the config, attempt to
find savegames in there.
2020-12-16 11:18:58 +01:00
derrod 3e2a6011ff [core] Ignore comments in configuration environment variables
Comments are treated as keys with no value by configparser, but env
variables with None as the value are not valid so this would crash.

Fixes #156
2020-12-16 05:45:05 +01:00
derrod 5e1896cf2c [downloader] Make insufficient memory message error more helpful 2020-12-14 08:42:22 +01:00
derrod cb7ea25a18 [core/utils] Add version check to game workarounds
Also add more games to the list of optimizations being enabled by default.

This will bring Pillars of Eternity down to around ~2 GiB shared memory,
which is still too much but without implementing another workaround that
adds a prefix filter I cannot really fix this. Certainly better than 24...
2020-12-14 08:27:02 +01:00
derrod daeee2eb8d [downloader] Rework order optimizer to be significantly faster
Also allow for a larger amount of files to be optimized.
2020-12-14 08:04:28 +01:00
derrod 9c87f8ab4f [downloader] Log optimization time and increase upper file limit 2020-12-14 06:28:03 +01:00
derrod b7db0ac721 [api/core/downloader] Update User-Agents 2020-12-13 03:14:55 +01:00
derrod 8e012c0441 Bump version to 0.20.4 2020-12-08 23:05:52 +01:00
derrod 80153d07b5 [cli/utils] Add Cyberpunk 2077 language pack hack 2020-12-08 06:43:43 +01:00
derrod 1640a47d6a [downloader] Correctly support empty install tag 2020-12-08 06:12:47 +01:00
derrod 5db6d9c73f [core/README] Add max_workers config option
Addresses #148
2020-12-07 23:52:43 +01:00
derrod 3aeb48efdf [core] Always initialize locale on startup 2020-11-25 18:50:09 +01:00
derrod 81463e6908 Bump version to 0.20.3 2020-11-25 06:53:36 +01:00
derrod 8a98c14055 [core] Fix CDN URI building for new Akamai CDN 2020-11-21 17:57:54 +01:00
derrod 22b7db7a29 [cli] Allow -y/--yes to be specified as part of the subcommand arguments 2020-11-21 14:30:30 +01:00
derrod 1598844bc6 [core] Always use default.env
Also fixes minor typo
2020-11-21 06:21:59 +01:00
derrod 3f3366c632 Bump version to 0.20.2 and Update README 2020-11-12 17:52:02 +01:00
derrod 3e6e173772 [core] Fix Uplay installer check 2020-11-05 15:25:37 +01:00
derrod 8206283755 [core/cli] Warn/Fail if game requires Uplay
Addresses #69 but does not fix it.
2020-11-02 19:08:06 +01:00
derrod 3310f7e7a7 [core] Fix crash if no old manifest present 2020-11-02 18:35:22 +01:00
derrod 80841f89bb [cli] Add "--keep-files" to uninstall without deleting 2020-11-02 15:55:36 +01:00
derrod 477827033e [cli/lfs] Add "cleanup" command to remove unused files 2020-11-02 15:53:11 +01:00
derrod e97941327e [core] Return empty asset list if not authenticated
Fixes #106
2020-11-02 15:26:10 +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 effc74b73b [core] Exclude mods from games list 2020-11-01 16:38:43 +01:00
derrod 37083b01de [core] Disable delta manifests if versions identical 2020-11-01 15:38:18 +01:00
derrod 7046b06f14 [api/core/downloader] User-Agent update 2020-11-01 14:34:36 +01:00
derrod ace9ce8b5d [core] Show warning when looking up DLC fails
Might fix #101
2020-10-31 19:48:08 +01:00
derrod d842780c73 [lfs] Do not remove comments from ini files
Fixes #105
2020-10-24 19:23:40 +02:00
derrod d95fd20e76 [core] Use non-POSIX mode for parsing manifest launch arguments
(hopefully) Fixes #128
2020-10-24 19:19:25 +02:00
derrod 28f0b72f42 Bump version to 0.20.1 2020-09-09 10:32:37 +02:00
derrod f03a0a46fd [cli] Add --delta-manifest override 2020-09-09 10:29:57 +02:00
derrod dcbf8db54d [core] Properly handle Delta manifests (update base manifest)
Also removes the old workaround.
2020-09-09 10:29:46 +02:00
derrod 36d02fa5ce [downloader] Fix original file offset when using delta manifests 2020-09-09 10:28:28 +02:00
derrod e898fe03fc [downloader] Remove delta manifest workarounds 2020-09-09 10:13:21 +02:00
derrod 70ed243b32 [utils] Add manifest combiner for delta manifests 2020-09-09 10:13:03 +02:00