I am trying to use winepath to convert between the WINE native file path and the normal Mac native filepath. Unfortunately, I do not seem to be able to return the logical Mac UNIX path when using winepath: Macintosh:~ tpatko$ /Applications/Firefly/WINE/bin/wine winepath -u Z:\Applications\Firefly\BENCH1.out /Users/tpatko/.wine/dosdevices/z:/Users/tpatko/ApplicationsFireflyBENCH1.out Macintosh:~ tpatko$ When making this call, for example, the correct Mac UNIX native filepath should be: /Applications/Firefly/Bench1.out Is there some options that I am missing or are there some changes to the source code required to make this work? http://wiki.winehq.org/winepath My build is from source code version 1.1.33 (I know that there are newer version but it they do not address this issue then the difference are moot). If anyone has some good ideas I would be appreciate. Cheers, Thomas
The behavior you are seeing is normal. Conversion from unix -> wine always works fine but the backwards conversion doesn't result in the shortest possible path. I looked into it a while ago but forgot what it was. I think it had something to do with some knowledge about the drive symlinks which doesn't know about (the code is in kernel32).
Well actually the issue is not just that it is not the "shortest possible" path returned but rather that the path is altogether useless for calling any native Mac apps or passing a file path as a parameter using this utility. In addition, even accounting for the oddities that winepath does in the WINE to UNIX filesystem conversion, it seems that even if the things in front of the true UNIX filesystem path were somehow removed (as they should be), the proper forward slashes seem to have be mysteriously removed. For example: /Users/tpatko/.wine/dosdevices/z:/Users/tpatko/ApplicationsFireflyBENCH1.out should a the VERY least be: /Users/tpatko/.wine/dosdevices/z:/Users/tpatko/Applications/Firefly/BENCH1.out Which ultimately should really be: /Applications/Firefly/Bench1.out Is there any way to modify the WINE source so that this winepath program works properly for the WINE -> UNIX conversion? Regards, Thomas
Dear Charles: Thank you very much for the advise regarding the blackslash issue. This advice will get me to the proper: /Users/tpatko/.wine/dosdevices/z:/Users/tpatko/Applications/Firefly/BENCH1.out versus the stripped /Users/tpatko/.wine/dosdevices/z:/Users/tpatko/ApplicationsFireflyBENCH1.out That is certainly a step in the right direction. I appreciate the tip. Is there a way to get all the way to the correct path shown below? /Applications/Firefly/Bench1.out In sort, is there an option in the winepath call or a change to the source that will automatically drop the preceding wine portion of the path that is not needed for Mac systems calls. How did I strip: /Users/tpatko/.wine/dosdevices/z:/Users/tpatko out of the returned path? I am working on something that will be used by other users besides myself, so it would need to systematically strip out this preceding portion on any given user's machine. Thanks, Thomas
Can anyone direct me to the part of the code that would build the winepath binary in WINE? It would seem to me that the cwd path for the wine installation (/Users/tpatko/.wine/dosdevices/z:/Users/tpatko in my example case) and the path to the actual file (/Applications/Firefly/BENCH1.out) must actually be concatenated together so there should be a way to modify the code to simply drop the preceding cwd portion. Any tips would be greatly appreciated. Thanks, Thomas