21
clrmame Discussion / Re: clrmame first-run questions
« on: 21 October 2024, 18:58 »
well, actually I made a little bit of success....I wrote a wrapper script file which is able to convert given wine paths to real linux paths, changes to the folder, runs the export. Yippie....this can be triggered from the wine clrmame executable.
Current problem is that the process is returned as being finished too early, so clrmame says that it can't read the export (which is still exporting). Another click on scan will then find the now finished export...
Close...but not fully there...but I guess it can be done....
Interested in the script?
w2l() {
wine_path="$1"
if [[ "$wine_path" =~ ^([A-Z]):\\ ]]; then
drive="${BASH_REMATCH[1]}"
linux_drive=$(readlink "$HOME/.wine/dosdevices/${drive}:")
linux_path="${wine_path/${drive}:\\/$linux_drive/}"
linux_path="${linux_path//\\//}"
else
echo "no valid wine path"
return 1
fi
echo "$linux_path"
}
linuxExeFile="$(w2l "$1")"
linuxOutFile="$(w2l "$3")"
folder="$(dirname "$linuxExeFile")"
base="$(basename "$linuxExeFile")"
cd "$folder"
$base "$2" > "$linuxOutFile"
so you give in z:\home\vboxuser\something\mame -listxml z:\home\vboxuser\somewhereelse\blaexport.xml
...and it should work in Linux :-)
....well...and you'd need to tell clrmame to use the wrapper...guess that'll be a simple entry in its settings.xml then
Current problem is that the process is returned as being finished too early, so clrmame says that it can't read the export (which is still exporting). Another click on scan will then find the now finished export...
Close...but not fully there...but I guess it can be done....
Interested in the script?
w2l() {
wine_path="$1"
if [[ "$wine_path" =~ ^([A-Z]):\\ ]]; then
drive="${BASH_REMATCH[1]}"
linux_drive=$(readlink "$HOME/.wine/dosdevices/${drive}:")
linux_path="${wine_path/${drive}:\\/$linux_drive/}"
linux_path="${linux_path//\\//}"
else
echo "no valid wine path"
return 1
fi
echo "$linux_path"
}
linuxExeFile="$(w2l "$1")"
linuxOutFile="$(w2l "$3")"
folder="$(dirname "$linuxExeFile")"
base="$(basename "$linuxExeFile")"
cd "$folder"
$base "$2" > "$linuxOutFile"
so you give in z:\home\vboxuser\something\mame -listxml z:\home\vboxuser\somewhereelse\blaexport.xml
...and it should work in Linux :-)
....well...and you'd need to tell clrmame to use the wrapper...guess that'll be a simple entry in its settings.xml then