Winecfg -> browse for folder

Robert van Herk robert at robertvanherk.nl
Wed Nov 24 08:53:52 CST 2004


>>Is Z:\ always mapped to the root of the unix file system? Because that 
>>would seem to solve it: just let them choose a directory from Z:\ and 
>>then probably modify the returned string by removing Z: and replacing 
>>all /'s bij \'s.
>>    
>>
>
>No not always, it's not enforced by Wine. It could be any drive.
>
>Just back up the current config, ensure only Z: is mapped to / and then
>run the picker. You may need to adjust the winecfg drive management API a
>bit.
>
>We then have the UI issue of this random Z thing in the directory browser
>but we can introduce a magic Wine flag specifically for winecfg to improve
>usability here. That can be dealt with later.
>  
>
Also, we'd have the problem that when other processes are active and 
using the disks, these disks will be unmounted :-). Therefore, I'd say 
that using this approach, it is probably nicer to have a magic wine flag 
that let the SHBrowseForFolder thingy show the unix directory listing, 
then instead first unmount all drives and then remount just Z: on the / 
directory. Unmounting, replacing and restoring the entire windows file 
system seems a bit ugly to me...

Also, I think Andreas' approach isn't too bad, namely copying code from 
the SHBrowseForFolder thing, but then let it show the Unix tree using 
native system calls. Still though, I am not really fond of the idea that 
I would have to copy all ui code from SHBrowseForFolder, just because I 
want to use the Unix file system instead...

Oh, by the way, the SHBrowseForFolder thingy allow to specifiy a root 
folder:

*
pidlRoot*
    Pointer to an item identifier list (PIDL) specifying the location of
    the root folder from which to start browsing. Only the specified
    folder and any subfolders that are beneath it in the namespace
    hierarchy will appear in the dialog box. This member can be NULL; in
    that case, the namespace root (the desktop folder) is used.

So I guess all I'm needing is a temporary folder to mount the stuff in 
and then make that the root...

Anyways: the choice is still: should I reimplement SHBrowseForFolder, 
but then for Unix file system, or should I mount the stuff in a Windows 
directory and then use that as pidlRoot for the normal SHBrowseForFolder?

Robert



More information about the wine-devel mailing list