This property reports the default platform to use for a game based
on legendary's configuration and if they platform is available in the
game's assets.
Using that property we can make better choices on what platform to operate
on without user intervention. Currently we use it to infer the platform
in when installing, importing, and calculating game versions.
Using `LegendaryCore.get_game_and_dlc_list` with platform `Windows`
updated the assets only for the `Windows` builds of the games missing
`Win32` and `MacOS` assets on clean installs. This caused Rare to not
include MacOS install options on MacOS (duh!). This might also have been
the cause that users were unable to launch games, since they where only
offered the `Windows` build of the games (big duh!).
To fix this, fetch the assets for `Win32` and `MacOS` games before getting
the final list of games and dlcs based on the `Windows` platform.
In this regard, also re-use the existing options for getting metadata to
give the option to the user to include them when updating assets. Also add
an option to include Unreal engine assets which until now were fetched
unconditionally.
* Include Unreal: When the user option is `true` or debugging.
Defaults to `false`
* Update Win32: When the user option is `true` or debugging.
Defaults to `false`
* Update MacOS: Force on MacOS, when the option is `true` or debugging on
other platforms. Defaults to `true` on MacOS and is disabled,
`false` on others
Furthermore, respect legendary's `default_platform` config option and
set it in the config on new configurations. The new method in our
LegendaryCore monkey allows us to use that option in RareGame when doing
version checks on not installed games, and not defaulting to `Windows`.
Finally, set `install_platform_fallback` to false in a new config to
avoid unwanted side-effects.
With launchable DLCs we will need to replace the InstalledGame in the
DLC with the InstalledGame from the base game so depend these properties
solely on the Game attribute. Furthermore, since we do not need backwards
compatibility any more, remove the `title` property and rename its uses
to use `app_title`
The factories are also usable in Rare's code to create compatible
functions for the callbacks. If they there is no callback they just
log what is happening. It also removes the need for `typing-extentions`
module.
These properties or methods were moved to RareGameBase
* `version`: For RareEosOverlay and maybe RareGameSlim
* `is_origin`: For RareGameSlim
* `install_path`: A partial Origin-unaware version
* `is_mac/is_win32`: For completeness
New methods
* `is_overlay`: For the download manager
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
By making the attribute into a set, we avoid adding already existing dlcs
back into it when refreshing the library. Fixes duplicated entries in
the DLC page.
Fortnite specifically doesn't provide `FolderName` in `customAttributes`, meaning we can't create the shortcut. If the attribute is not provided, assume that it is safe to use the application title.
Fixes: #283
`egl_unintall` and `egl_export` try to access EGL's programdata folder which raises an exception if the folder doesn't exist (Windows) or it isn't specified (Linux). Copy the relevant bits from LegendaryCore to LgndrCore and create two new methods that only manipulate the `.egstore` folder.
If the save path wasn't known at startup, dt_local will be None. This led
to the UI displaying wrong information about the local save. Detect that
case and resolve the save's status again.
When importing a game, the first thing being checked for import information
is `<install_dir>/.egstore`. Due to erroneous handling, that directory can
contain multiples of `.mancpn` and `.manifest` files. This could lead to
importing an older version as legendary expects only one pair of these
files to exist in that directory.
The `.egstore` folder is normally updated/created as part of synchronizing
with EGL. To aid with importing games in the future, we always export this
data for Rare to be able to import games between different OSes
We don't need to know if Origin is installed before launching the window,
so we can save on startup time by executing the worker after the window
has become visible.
To save time and requests, bulk get saves for all games and
load them into each respective RareGame.
Co-authored-by: Dummerle <44114474+dummerle@users.noreply.github.com>
Seems like Epic are changing their API again, and some image types have been renamed. This made the list of updates to be empty after filtering it for image types we could handle. This also had the side effect of an infinite recursion when downloading images, as the resulting pixmap would be null.
To fix this situation, the new image type has been added, and the image loading in RareGame has become two methods, one for loading and one for setting it.
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>