[Wine] Re: Winepath on Mac

doh123 wineforum-user at winehq.org
Thu Apr 15 20:38:55 CDT 2010


tpatko wrote:
> if your like getting that string, and pulling it into a string variable, you can do some simple string manipulation to add a \ in front of the :'s .. or just add single quotes tot he front and back, which would be easier, since you need to already quote it. 
> 
> Yes, I understand that I could write a script to do this manipulation but the point here is that it seems to me that calling winepath with -u commandline switch should really return a PROPER native UNIX path, and not one that has to be further processed with a script.  I am just asking any of the WINE developers if this can be implemented or how the source code can be modified to do this directly rather than having to use a secondary script to accomplish this.  That is all.
> 
> Hopefully there is some reasonably simple way to accomplish this.  Any advice to reach this goal is appreciated.
> 
> --Thomas


I guess I'm missing how you are using this.. your not already scripting it, just typing it manually?

I just recommend never changing source code for such simple little fixes... it hurts you in the long run when you want to change Wine versions and make sure you do it again.

if your using like open -a ... you can just change it then in the same line

if $ABSOLUTEPATH was "/Users/doh123/.wine/dosdevices/z:/Applications/Chess.app/Contents/Info.plist"

and I wrote it as... ${ABSOLUTEPATH#${ABSOLUTEPATH%:*}:} it would be "/Applications/Chess.app/Contents/Info.plist" just simple Bash string manipulation... well maybe not so simple if you don't know Bash well.

open -a "/Developer/Applications/Utilities/Propert List Editor.app" "${ABSOLUTEPATH#${ABSOLUTEPATH%:*}:}"

is like saying

open -a "/Developer/Applications/Utilities/Propert List Editor.app" "/Applications/Chess.app/Contents/Info.plist"

If you don;t want to remember it every time in every place you need to use it, you could make a winepath launcher bash script that calls winepath and fixes it for you and comes out with the right answer always, without modifying any source code.







More information about the wine-users mailing list