LRFLEW / OpenRCT2Launcher

An Open Source Launcher & Updater for OpenRCT2
MIT License
200 stars 20 forks source link

ORCT2 will not install to non-default user data directory #1

Closed dlee13 closed 8 years ago

dlee13 commented 8 years ago

I have my Documents folder located on my D: drive, so my ORCT2 directory path is: D:\Derek\Documents\OpenRCT2 However, the launcher always creates new folders and installs and tries to run ORCT2 at C:\Users\Derek\Documents\OpenRCT2

LRFLEW commented 8 years ago

Ok, I can see that there is likely a problem here, but I'm uncertain what exactly is going on. I don't use Windows often, and usually develop this on a virtual machine, so I haven't encountered this sort of error.

How exactly is that configured. I have never heard of having a user's folder not on the boot drive, so I didn't even know this could happen. I've also not hardcoded any sort of home folder path, and instead use QDir::homePath(), so any problems with this is likely stemming from that. I am willing to work around Qt's shortcomings (which I already have for a problem on OS X), but I don't exactly know the circumstances of this happening.

If you can explain how I could get my VM into the same situation, I can work on fixing this. (I can handle adding the virtual drive, I just don't know how to configure Windows to get it to do what you're describing).

dlee13 commented 8 years ago

Open a Windows Explorer window and find your Documents folder. Right click it and get the Properties window. In the Location tab, put in the new path and Apply.

For now, I've just created a symlink back in my C: drive so the launcher can find ORCT2, but ORCT2 has no problem finding its config file from my relocated user folder even without the symlink.

Please take a look at ORCT2's platform_resolve_openrct_data_path() and platform_resolve_user_data_path() methods.

LRFLEW commented 8 years ago

I was able to replicate this bug, and I think I've found the solution after a little bit of searching. I hadn't realized this was possible, so I originally didn't account for it. I'll fix it in an upcoming update.

dlee13 commented 8 years ago

Thank you.