urwrstkn8mare / galaxy-riot-integration

A GOG Galaxy 2.0 Community integration for Riot!
MIT License
71 stars 2 forks source link

Games don't show up as installed if I didn't enable shortcuts before installing. #6

Closed urwrstkn8mare closed 3 years ago

urwrstkn8mare commented 3 years ago

I'm opening this issue myself as a way for people to get notified when it is fixed (out of my control). All you have to do to get notified is to subscribe to this issue.

Issue: Games don't show up as installed Answer: The games may not show up as installed if you didn't enable shortcuts when installing them. While the plugin now uses the registry meaning you don't have to specify the location of RiotClientServices.exe, Riot Games for some reason doesn't add a registry entry unless you enable shortcuts. If you didn't enable shortcuts you would have also noticed you can't find the games in Programs & Features, that is why. Unfortunately, this is up to Riot Games to fix. Fortunately, however, you can delete both the desktop shortcuts and start menu shortcuts after.

Edit: The above still apply but it is no longer out of my control (read below for more info).

FriendsOfGalaxy commented 3 years ago

Hey, are you sure there is no other place in registry that denotes installed game status? Maybe try tools like this https://www.nirsoft.net/utils/registry_changes_view.html ?

Another often approach is to inspect cache/helper files created by riot launcher. It knows which games are installed, right? Check in %appdata% %localappdata% %programdata%

If there are some binary files you don't know how to inspect you may want to firstly check if they are changed after game installation.

urwrstkn8mare commented 3 years ago

Thanks alot @FriendsOfGalaxy for that suggestion. Turns out there are some JSON and YAML files in %localappdata% and %programdata% that could completely take away the need for the registry. I could use the registry as only a backup. This seems exciting but I've got a pretty full plate right now. I will try to work on it a little on the weekends and definitely over the holidays. As of now, I will leave the information I've found currently.

Under %localappdata%\Riot Games\Riot Client\Config there are two files (one JSON + one YAML). Both files from what I've seen don't seem very useful. However, under %programdata%\Riot Games\RiotClientInstalls.json has the path to RiotClientServices.exe which is very handy. In the Metadata subfolder there are folders named with the name of the game + .live. Some game folders are leftover even after uninstalling. However, going into the product settings YAML has information on the installed status and installed location.

Examples: An excerpt from: %programdata%\Riot Games\Metadata\valorant.live\valorant.live.product_settings.yaml (Valorant is installed)

product_install_full_path: "D:/Programs/Riot Games/VALORANT/live"
product_install_root: "D:/Programs/Riot Games"

Another: %programdata%\Riot Games\Metadata\league_of_legends.live\league_of_legends.live.product_settings.yaml (LOL isn't installed)

product_install_root: "D:/Programs/Riot Games/"

The product_install_full_path key is missing on uninstalled games' files if the files exist at all. This also simultaneously gives me the folder to get the size of to report the game size to GOG Galaxy.

So that's what I've found so far and I'm pretty sure it can be used to replace the registry in the integration. One thing I'm yet to test is if those files are still available even if the shortcuts are disabled. However, I'm confident they are as there's information on whether the shortcut is enabled in the same file. The information I left in this long message is mainly for me to come back to but also for anyone if they want to do it. This seems pretty straight forward so I'll try to do this as soon as possible.

urwrstkn8mare commented 3 years ago

This should be fixed in https://github.com/urwrstkn8mare/galaxy-riot-integration/releases/tag/v0.2.4