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

Enable usage in enviroments without C drive letter #50

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

MagicalDrizzle
Copy link
Contributor

@MagicalDrizzle MagicalDrizzle commented May 15, 2024

The C drive letter is not required to use Windows. Using %USERPROFILE% is a much better idea than hardcoding the system drive.
This also enable portability of the data folder simply by redefining the env variable in a batch file.

@MagicalDrizzle
Copy link
Contributor Author

MagicalDrizzle commented May 15, 2024

That's my main proposal, and this is my second one which may or may not be a good idea since it only deals with portability.
If you override %USERPROFILE% to the current folder make the program portable, EmuGUI will fail to launch due to the Documents parent folder not existing.
There are two workarounds:

  • You can simply create the folder yourself
  • Or you can replace os.mkdir with pathlib.Path.mkdir, which has the option to create all parent folders if they don't exist.

Feel free to only merge the first commit if you don't think all this is worth it.

@Tech-FZ
Copy link
Owner

Tech-FZ commented May 16, 2024

I will try it when I start working on EmuGUI 2.1. If your solution works, I'll merge your pull request, otherwise, I'll discuss further action.

@Tech-FZ Tech-FZ merged commit e7a02a7 into Tech-FZ:main Aug 6, 2024
@MagicalDrizzle MagicalDrizzle deleted the patch-1 branch August 6, 2024 13:56
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.

None yet

2 participants