My Windows application is frequently used on *nix using Wine.
As it is a file-centric application, it frequently uses (and presents to an user) Windows "documents" folder (as resolved using CSIDL_PERSONAL
). Unfortunately under Wine that points to fake Wine/Windows directory that's usually empty and unused. I'd like to point user to his Unix home folder instead.
Is there any reliable way to find out its location under Wine?
I was hoping I can read HOME
environment variable, but it's not exported (contrary to most other variables) to Windows environment.
Currently I'm guessing the home using Z:\home\%USERNAME%
. But that does not look robust to me.
If there's no way to find home directory, is there at least a way to detect Wine root drive (Z:
by default), so I do not need to hard-code at least a drive-part of path?