How to pass / convert file names?

Christian Britz cbritz at gmx.net
Tue Jul 26 11:39:41 CDT 2005


Hi,

I discovered only recently a problem which is probably quite prevalent,
but I could not find the answer on the web.

Example: I want to configure Mozilla for opening .DOC files with the
free Word Viewer that can be downloaded at http://www.microsoft.com. To
do so I go to Edit -> Preferences -> Navigator -> "Helper Applications"
and create a new MIME-Type "application/msword", extensions "doc dot"
and tell the beast to open such files with
/home/cbritz/.wine/drive_c/Programme/Microsoft Office/WORDVIEW.EXE (I
have configured binfmt support, so I can call the EXE directly)

Expected behaviour: The viewer program starts, opens the doc file and
displays it.

What happens: The viewer program starts and does not open any file. I
must manually select Z:\tmp\Example.doc from the application.

Next try from command line: .wine/drive_c/Programme/Microsoft\
Office/WORDVIEW.EXE /tmp/Example.doc - Again the doc file doesn't open.

It DOES WORK when I manually translate the path name to:
.wine/drive_c/Programme/Microsoft\ Office/WORDVIEW.EXE
Z:\tmp\Example.doc first.

I expected naively that wine automatically translates the Unix scheme to
it's own convention but this doesn's seem to be true.

Is it possible to instruct wine to translate the path string before it
passes it to the windows binary? If not, is there a workaround to do
that trick?

One solution would probably be to write a wrapper script that translates
the path name before it is passed to wine. One discussion board entry I
found indicates the CrossOver plugin does it that way.

I might even volunteer for trying to write a patch to wine if someone
could tell me where to start to look at in the code ;)

But probably the solution is already out there and I just don't see it.
Any help would be much appreciated!

Regards
Christian



More information about the wine-devel mailing list