New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prevent users from using the wrong game path (again) #1355
Comments
How can we distinguish the two? Currently the client just looks for the bin folder. |
Vanilla has a |
Duplicate of #1100 |
@PhilipJFryFAF @speed2CZ is there a use case where u select the vanilla game for coop??? I need to know because otherwise I can quickly do this here |
Ok so I checked @Brutus5000 and
is wrong my FA game has an EXE called SupremeCommander.exe |
So how do I detect somebody selects the vanilla game. I don't have the vanilla game some somebody needs to tell me preferably I would like to check for the existence of a file that is not there is the noral FA installation. |
Good candidates would be the "Microsoft.VC80.CRT.manifest" or the "LuaPlus.exe" file of the vanilla bin folder. Both are not present in the FA bin folder. |
Well there are also valid not steam version of the game so those files are probably a bad idea |
Or maybe use the hash of the vanilla exe.... not sure if that's a good idea. There are probably different version of the game |
Isn't a steam version of the game required nowadays, due to the multiacc issue? If not, you are of course right. Super low effort solution would be to just check the path given by the user itself. If the user did not manually rename the folders, they should be You could also check files in the movies folder, these are (almost?) entirely different. Hashing sure is the way to go if you also want to ensure an unaltered game (or want to remind the user he has a altered game which will not work). Would you then just hash the main .exe or the whole game folder, which could take a while (especially on HDD's)? Afaik most if not all normal mods were/are installed to the supcom/mods folder, so I don't think that they have an impact on FAF at all. |
Well yes the folder name is probably a good indicator as well and no steam version is not required, steam lining is required! There is a difference. Users are not forced to install via steam they just need to own it in steam |
@Slothologist so u own the vanilla game on steam? Can you provide me the SHA-2 hash of it? Like only the exe |
SupCom |
CRC32 does not prevent collisions by design which is probably not bad since there are only a few files that we will ever run the chec on but I think SHA is at least in theory more fitting. |
CRC is built to detect bit errors, so yes, we don't have single bits, go for a longer checksum/hashfnct. |
@Geosearchef @Slothologist go test the PR ;) I included the hash from Geosearched but we could also include further hashes |
I also avoided that the user selects the faf ProgrammData one because I also had reports about users selecting that one |
Sadly this does not work (at least on linux). Edit: I fixed that in bugfix/#1594-ask-for-game...Slothologist:bugfix/#1594-ask-for-game |
Fixes FAForever#1594 Fixes FAForever#1355 Fixes FAForever#1100 Fixes FAForever#1614 * fixed hash function for supcom.exe (FAForever#1614) Co-authored-by: Slothologist <rfeldh@gmail.com>
had a user this week on discord who couldn't run the game
he managed to select vanilla supcom for the base game install instead of forged alliance
please don't allow users to select the vanilla supcom install directory (tested myself and the client doesn't throw an error when trying to do so in 0.10.7)
The text was updated successfully, but these errors were encountered: