Skip to content
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

Always ask for game path #1595

Merged
merged 3 commits into from
Mar 11, 2020
Merged

Always ask for game path #1595

merged 3 commits into from
Mar 11, 2020

Conversation

1-alex98
Copy link
Member

@1-alex98 1-alex98 commented Feb 29, 2020

@1-alex98 1-alex98 changed the title Fixes #1594 Always ask for game path Mar 1, 2020
@Askaholic
Copy link
Collaborator

While you are working on this can you take a look at #1100 and #1355. Those problems may be solvable or solved by similar changes.

@1-alex98
Copy link
Member Author

1-alex98 commented Mar 4, 2020

Well they are related yes but seperate issues

@1-alex98
Copy link
Member Author

1-alex98 commented Mar 4, 2020

#1100 kind of gets fixed by that because it checks with every game start which kind of is periodically

@1-alex98
Copy link
Member Author

1-alex98 commented Mar 4, 2020

Before the check was only done sometimes depending on how u started the game

@1-alex98
Copy link
Member Author

1-alex98 commented Mar 4, 2020

The check is also triggered if the game path is set but invalid

@1-alex98
Copy link
Member Author

1-alex98 commented Mar 5, 2020

Also fixes #1355

@Slothologist
Copy link
Contributor

The hashes created by the "sha256OfFile" function differ from the actual hashes (at least on linux).
Because of that I never run into the "vanilla exe detected" case.
I fixed that in bugfix/#1594-ask-for-game...Slothologist:bugfix/#1594-ask-for-game

It would maybe be better to check more explicitly like

If calculatedHash == FA.exe
    yay
else if calculatedHash == vanilla.exe
    oh no, you selected the wrong folder
else
    wtf this should not happen

@1-alex98
Copy link
Member Author

Well there are a ton of different FA version that are supported / ok I think so getting all the hashes might be hard @Slothologist I am not an expert on this but the steam version differs from the retail one but both are supported and therefore might have different hashes and who knows which other retail versions exist out there

@1-alex98
Copy link
Member Author

@Slothologist are u on Zulip? You wanna become part of Zulip(chat service)? We somehow need to test your thing on windows as well right?

@1-alex98
Copy link
Member Author

Write me an email if u want to alexander.von.trostorff@gmail.com

@Slothologist
Copy link
Contributor

@Slothologist are u on Zulip? You wanna become part of Zulip(chat service)? We somehow need to test your thing on windows as well right?

Thanks for the Zulip invite, I am now part of that.
Furthermore, I tried your version out in Windows and the hash the function provides is identical to the one I got on Linux. So something like xng1gM.... for the FA exe (which is wrong).

I see the problem with acquiring the hashes of all possible versions, but atm we are only filtering for the steam vanilla version.
Maybe we could just print a warning if an unknown exe is presented? Like "Alright, we seem to have no knowledge about this exe, make sure that you have selected the right folder, but go ahead, we won't stop you"?

@1-alex98
Copy link
Member Author

I think the way it is now is good(in your branch). For most ppl it will do and it is also a clear improvement. I rather have zero false positive errors or warnings and stay with it like it is now.

Co-authored-by: Slothologist <rfeldh@gmail.com>
@1-alex98
Copy link
Member Author

Merged in your changes @Slothologist

@1-alex98
Copy link
Member Author

tested again works out well

@1-alex98
Copy link
Member Author

The hash is defined in the properties file and it is a list should there ever be other hashes we can simply add them by adding one line. So everything covered .;)

@1-alex98 1-alex98 merged commit ab976de into develop Mar 11, 2020
@Brutus5000 Brutus5000 deleted the bugfix/#1594-ask-for-game branch November 4, 2020 21:40
mrchris2000 pushed a commit to mrchris2000/downlords-faf-client that referenced this pull request Apr 15, 2022
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Player not always asked if he has not set the game path prevent users from using the wrong game path (again)
4 participants