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

Feature Request: Validate all files post install #32

Open
coffandro opened this issue Aug 2, 2024 · 11 comments
Open

Feature Request: Validate all files post install #32

coffandro opened this issue Aug 2, 2024 · 11 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@coffandro
Copy link
Collaborator

Checking a hash of every file after installing and redownloading the depot if not valid might alleviate some issues

@coffandro coffandro added good first issue Good for newcomers help wanted Extra attention is needed labels Aug 2, 2024
@coffandro
Copy link
Collaborator Author

Currently my idea is to have an array of arrays like so

[
    [FILEPATH, HASH, DEPOT]  
]

@coffandro
Copy link
Collaborator Author

Maybe adding a bool at the end would also help, then you could download the depots, check files for errors, if the file has an error the bool gets set to true, the depot gets redownloaded, the files gets checked again and if the bools is true it comes with a popup about the users pc being weird

@coffandro coffandro added the enhancement New feature or request label Aug 2, 2024
@coffandro
Copy link
Collaborator Author

@coffandro
Copy link
Collaborator Author

Don't know if this is possibly while keeping windows support :/

@coffandro
Copy link
Collaborator Author

I'll keep it open for now but this probably won't become anything

@coffandro coffandro reopened this Aug 6, 2024
@thomascrha
Copy link
Contributor

Why would this not work on windows ? I think this is a great idea.

@thomascrha
Copy link
Contributor

thomascrha commented Aug 6, 2024

is it because haslib doesn't work on windows ?
I noticed your inline import on the branch above - I'm surprised considering its a stdlib funtion

@coffandro
Copy link
Collaborator Author

My idea would need be able to redownload depots, that would either require prompting the user for auth again or keeping the process with steamcmd running, if we did that it'd either require a lot of stuff I have no idea how to do or the pexpect library but that thing's flacky as hell on windows

@thomascrha
Copy link
Contributor

thomascrha commented Aug 9, 2024

I think I know what you mean - you want a mechanism that confirms the files hash - and if that check fails the application then can re-downloads the failed depots associated with the hash. That would then require us to restart the steam command meaning we would need to re-login to steam.

I don't know if this is possible without requiring the user to relogin - this could only be possible if steamcmd supported an interactive shell i.e. you run steamcmd and its start like a command line session which you send commands - from looking at the docs its seems it only has a command line interface. If that is present you can use subprocess to hold the command open and send in things via a piped stdin - like you suggested.

With all that being said - I don't think its a bad thing to ask the user to relogin - yeah its annoying - but they have corrupted files so without this intervention they won't be able to play.

Final thought - wouldn't steamcmd have its own verification system inbuilt ? Like if i was building a downloader (which steamcmd seems to basically be) you would probably have a simple hash based check to make sure the file is not corrupted. I had a cursory glance at there docs - but nothing was mentioned.

@coffandro
Copy link
Collaborator Author

It does but the command gives an error +validite

@coffandro
Copy link
Collaborator Author

I went ahead and tried adding it to the dev branch on windows, I'll improve the message and add Linux support after a break

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants