[Bug 19356] New: some features for winepath to make it better work in scripts
http://bugs.winehq.org/show_bug.cgi?id=19356 Summary: some features for winepath to make it better work in scripts Product: Wine Version: 1.0.1 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: programs AssignedTo: wine-bugs(a)winehq.org ReportedBy: HoraK-FDF(a)gmx.de Hi, i'm currently working on a bash script that must handle DOS paths and so i found some things that would make winepath better for scripts. first thing: If u have the DOS path C:\nop and convert it to unix style u get /root/.wine/dosdevices/c:/nop but for some scripts you need the real mounted path that would be in my case /mnt/C/nop. To get this done with bash i must cut out the /root/.wine/dosdevices/c: make an REALPATH=$(df /root/.wine/dosdevices/c: | cut -d ' ' -f 25) (REALPATH is than /mnt/C) and combine it with the /nop that takes much time in bash if winepath can do this by it self that would be a giant speed up, bound this to an option like -r --realmountedpath or so would be great. secound thing: If a file lies on the dos dirve G:\file.nfo and the drive is assigned with winecfg to ../dosdevices/k: winepath outputs ../dosdevices/g:/file.nfo witch results to that the file cannot be found because its on ../dosdevices/k:/file.nfo. So you must have all drives exactly assigned like the would appear on real DOS (G:\ = ../dosdevices/g:). This can be avoided with checking the wine config, a option like -c --checkwinecfg would do it. ... greetings HoraK-FDF -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19356 --- Comment #1 from Alexandre Julliard <julliard(a)winehq.org> 2009-07-18 05:36:20 --- (In reply to comment #0)
first thing: If u have the DOS path C:\nop and convert it to unix style u get /root/.wine/dosdevices/c:/nop but for some scripts you need the real mounted path that would be in my case /mnt/C/nop. To get this done with bash i must cut out the /root/.wine/dosdevices/c: make an REALPATH=$(df /root/.wine/dosdevices/c: | cut -d ' ' -f 25) (REALPATH is than /mnt/C) and combine it with the /nop that takes much time in bash if winepath can do this by it self that would be a giant speed up, bound this to an option like -r --realmountedpath or so would be great.
readlink(1) is your friend.
secound thing: If a file lies on the dos dirve G:\file.nfo and the drive is assigned with winecfg to ../dosdevices/k: winepath outputs ../dosdevices/g:/file.nfo witch results to that the file cannot be found because its on ../dosdevices/k:/file.nfo. So you must have all drives exactly assigned like the would appear on real DOS (G:\ = ../dosdevices/g:). This can be avoided with checking the wine config, a option like -c --checkwinecfg would do it.
There's no wine config, it's all in the symlinks. Making a drive symlink pointing to another drive is not a good idea anyway. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19356 --- Comment #2 from HoraK-FDF <HoraK-FDF(a)gmx.de> 2009-07-18 06:29:59 --- (In reply to comment #1)
(In reply to comment #0)
first thing: If u have the DOS path C:\nop and convert it to unix style u get /root/.wine/dosdevices/c:/nop but for some scripts you need the real mounted path that would be in my case /mnt/C/nop. To get this done with bash i must cut out the /root/.wine/dosdevices/c: make an REALPATH=$(df /root/.wine/dosdevices/c: | cut -d ' ' -f 25) (REALPATH is than /mnt/C) and combine it with the /nop that takes much time in bash if winepath can do this by it self that would be a giant speed up, bound this to an option like -r --realmountedpath or so would be great.
readlink(1) is your friend.
secound thing: If a file lies on the dos dirve G:\file.nfo and the drive is assigned with winecfg to ../dosdevices/k: winepath outputs ../dosdevices/g:/file.nfo witch results to that the file cannot be found because its on ../dosdevices/k:/file.nfo. So you must have all drives exactly assigned like the would appear on real DOS (G:\ = ../dosdevices/g:). This can be avoided with checking the wine config, a option like -c --checkwinecfg would do it.
There's no wine config, it's all in the symlinks. Making a drive symlink pointing to another drive is not a good idea anyway.
Hi Alexandre, for the first thing: thank you for the tip, readlink -f "link/dir/file" works but it's allways a extra step if winepath make this alone it would be much better/faster. for the secound: so winecfg makes an readlink every time started for every link in dosdevices to get the mountpath of the symlinks? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19356 --- Comment #3 from Alexandre Julliard <julliard(a)winehq.org> 2009-07-18 09:38:56 --- (In reply to comment #2)
for the first thing: thank you for the tip, readlink -f "link/dir/file" works but it's allways a extra step if winepath make this alone it would be much better/faster.
Not really, it has to do roughly the same amount of work. I'd be extremely surprised if performance was an issue here.
for the secound: so winecfg makes an readlink every time started for every link in dosdevices to get the mountpath of the symlinks?
Pretty much yes. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19356 Dmitry Timoshkov <dmitry(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #4 from Dmitry Timoshkov <dmitry(a)codeweavers.com> 2009-07-20 02:40:55 --- According to Alexandre's comments there is nothing in Wine that could be fixed. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19356 Dmitry Timoshkov <dmitry(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED Severity|normal |enhancement --- Comment #5 from Dmitry Timoshkov <dmitry(a)codeweavers.com> 2009-07-20 02:41:21 --- Closing. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org