Winepath doesn't appear to work properly

Questions about Wine on Linux
Locked
onech11
Newbie
Newbie
Posts: 3
Joined: Tue Feb 08, 2022 5:39 pm

Winepath doesn't appear to work properly

Post by onech11 »

I've been opening files in Windows applications using variations of the following shell script:

Code: Select all

#!/bin/bash
loc="/home/user/path/to/application.exe"
par=`winepath -w "$*"`
wine "$loc" "$par"
exit 0
For example, here's how I open sound files in Winamp:

Code: Select all

#!/bin/bash
loc="/home/user/.wine/drive_c/Winamp/WINAMP.EXE"
par=`winepath -w "$*"`
PULSE_LATENCY_MSEC=30 wine "$loc" "$par"
exit 0
It worked until Wine 7.5. Since Wine 7.5 it only opens the applications, not the file - for example, Winamp now opens with an "Open File" dialog instead of just playing the file.
How do I pass over the path to file to Wine applications in shell scripts now? I do need to use shell scripts for some of the applications that I use, because they leave a bunch of background processes open even after closing, and the script takes care of that.
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Winepath doesn't appear to work properly

Post by jkfloris »

It looks like the par variabele is empty.
Does the winepath command work?

Code: Select all

command -v winepath
onech11
Newbie
Newbie
Posts: 3
Joined: Tue Feb 08, 2022 5:39 pm

Re: Winepath doesn't appear to work properly

Post by onech11 »

jkfloris wrote: Sat Apr 16, 2022 8:21 am It looks like the par variabele is empty.
Does the winepath command work?

Code: Select all

command -v winepath
Sorry it took so long to reply, here's the output:

Code: Select all

/usr/bin/winepath
I think I figured it out. Instead of using "$par" I'm just using winepath directly.
Here's how the earlier script looks now:

Code: Select all

#!/bin/bash
loc="/home/user/.wine/drive_c/Winamp/WINAMP.EXE"
PULSE_LATENCY_MSEC=60 wine "$loc" winepath -w "$*"
exit 0
Now everything loads as it should.
Locked