JosefNemec / PlayniteExtensions

Extensions for Playnite game launcher and manager.
MIT License
175 stars 41 forks source link

Rockstar Library: GTA V is not being detected by plugin #69

Closed darklinkpower closed 3 years ago

darklinkpower commented 3 years ago

Describe the bug

It looks like the uninstall string of the game can differ, which can make the plugin not detect the game.

Case 1 (Game is detected)

DisplayName        UninstallString
-----------        ---------------
Grand Theft Auto V "C:\Program Files\Rockstar Games\Launcher\Launcher.exe" -enableFullMode -uninstall=gta5

Case 2 (Game is not detected)

DisplayName        UninstallString
-----------        ---------------
Grand Theft Auto V "C:\Program Files\Rockstar Games\Grand Theft Auto V\uninstall.exe" -enableFullMode -uninstall=gta5

Changing the regex from "Launcher\.exe.+uninstall=(.+)$" to Rockstar Games\\[^\\]+\\(?:Launcher|uninstall)\.exe.+uninstall=(.+)$ in here should fix it, but needs to be tested since I don't know if Rockstar Games is always part of the string

Edit: Rockstar Games is only part of the string if you use the default path or a path that contains that string so the 2nd option will need to be used

The other option is to use (?:Launcher|uninstall)\.exe.+uninstall=(.+)$, even if it processes some unwanted items but will not affect anything.

To Reproduce It's unclear why in some cases the uninstall string differs.

Edit: I can confirm that the string changed with the latest update of the game. This is my string after updating it

DisplayName        UninstallString
-----------        ---------------
Grand Theft Auto V "G:\Games\PC\Rockstar Games\Grand Theft Auto V\uninstall.exe" -enableFullMode -uninstall=gta5

Screenshots Not applicable.

Diagnostics ID Not applicable.

darklinkpower commented 3 years ago

Grand Theft Auto San Andreas still matches old string

DisplayName                   UninstallString
-----------                   ---------------
Grand Theft Auto: San Andreas "C:\Program Files\Rockstar Games\Launcher\Launcher.exe" -enableFullMode -uninstall=gtasa
JosefNemec commented 3 years ago

So are you saying that GTA4 installed via Rockstar launcher actually doesn't use launcher's uninstaller? wtf? Are they intentionally trying to be worse than Xbox app?