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

Added checks to the path in installer (setup.py) #14

Closed
wants to merge 1 commit into from

Conversation

parag477
Copy link

I have added the code on the setup.py file for checking if paths are all valid documents variable and gameFolder variable and also make the functionality to ask the user for entering the path again if its not valid.

I have added the code on the setup.py file for checking if paths are all valid documents variable and gameFolder variable and also make the functionality to ask the user for entering the path again if its not valid.
@ThiaudioTT ThiaudioTT self-requested a review May 20, 2023 16:06
Copy link
Owner

@ThiaudioTT ThiaudioTT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening the PR!

But, your commits doesn't close the issue.

We indeed check if the path is valid, but also check if the game is present in that folder. Checking if the path is valid we already do through exceptions. I will write this explicitly in #13.

@@ -27,6 +27,13 @@

# 1
documents = os.environ['USERPROFILE'] + "\\Documents\\Paradox Interactive\\Hearts of Iron IV"

if(os.path.exists(documents)):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already do this as an Exception. See line 42

@@ -69,6 +76,13 @@

# 3
gameFolder = os.environ['PROGRAMFILES(X86)'] + "\\Steam\\steamapps\\common\\Hearts of Iron IV"

if(os.path.exists(gameFolder)):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already do this, see line 91

@ThiaudioTT ThiaudioTT linked an issue May 20, 2023 that may be closed by this pull request
@ThiaudioTT
Copy link
Owner

Closing...

Feel free to open another PR anytime.

@ThiaudioTT ThiaudioTT closed this May 29, 2023
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.

Check if the paths in installer are all valid
2 participants