-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Attempt to handle unexpected (old or weird) OSes that may not support our directory detection #3566
Comments
@Cervator Looks like a good beginner issue to work on. Can I start working on this |
Hi @sladyn98, feel free to start working on this, as as far as I know noone else is yet. |
My plan was to add a FileChooser to the above point and instead of catching an IO Exception would catch a general Exception, thereby catching the OS error.This would give the user a chance to select the file path and thus proceed normally. |
@sladyn98 its will be problem in headless server |
@DarkWeird So in that case we could use the fallback path that has been defined for the operating system. And according to the flow the default paths are tried first.
After this we prompt the user for the path, in a headless server since we cannot interact we can fallback to the using the |
@sladyn98 |
Oh okay so could we add a try block around that code and in the catch block we prompt the user to enter the file path using FileChooser, for headless servers we just use the current directory. |
What you were trying to do
A user attempted to run the game on a Windows XP system. Yes, WinXP still exists. No, it isn't likely to run the game well even if it didn't instantly crash :-)
It made me think though that there might be other current (or future) OSes we might encounter and maybe we can harden the process for a second chance at being able to run the game.
What actually happened
Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking up function 'SHGetKnownFolderPath': The specified procedure could not be found.
- apparently XP can't handle the Windows specific call trying to get a default directory to store game data.How to reproduce
Possible improvement
I've come up with two brief ideas that might be able to get around this issue, which is namely using native/OS specific code trying to get a game data dir to call default.
The text was updated successfully, but these errors were encountered: