fixed: always return to DRIVE_C
This commit is contained in:
15
winehelper
15
winehelper
@@ -1387,14 +1387,14 @@ prepair_wine () {
|
||||
}
|
||||
|
||||
wine_run () {
|
||||
local wh_add_args win_file_exec
|
||||
local wh_add_args win_file_exec win_file_path win_file_name
|
||||
|
||||
if [[ $1 =~ (winecfg|regedit|winefile|wineconsole) ]] ; then
|
||||
win_file_exec="$1"
|
||||
win_file_name="$win_file_exec"
|
||||
win_file_path="$DRIVE_C"
|
||||
wh_add_args=""
|
||||
elif [[ -f "$1" ]] ; then
|
||||
local win_file_path win_file_name
|
||||
win_file_exec="$(readlink -f "$1")"
|
||||
win_file_path="$(dirname "$win_file_exec")"
|
||||
win_file_name="$(basename "$win_file_exec")"
|
||||
@@ -1410,12 +1410,12 @@ wine_run () {
|
||||
&& file "$win_file_exec" | grep -q "x86-64"
|
||||
then fatal "Нельзя запустить 64-битное приложение в 32-битном префиксе!"
|
||||
fi
|
||||
|
||||
else
|
||||
fatal "Команда введена не правильно или не найден исполняемый файл $1"
|
||||
fi
|
||||
|
||||
shift
|
||||
cd "$win_file_path"
|
||||
|
||||
if [[ $WINEDEBUG != "-all" ]] ; then
|
||||
local log_dir log_file
|
||||
@@ -1429,20 +1429,15 @@ wine_run () {
|
||||
|
||||
echo "##### Основные переменные #####" | tee -a "$log_file"
|
||||
env | grep -e "WH_" -e "WINE" -e "DXVK" -e "VKD3D" | tee -a "$log_file"
|
||||
|
||||
echo "##### Лог WINE #####" | tee -a "$log_file"
|
||||
(
|
||||
cd "$win_file_path"
|
||||
|
||||
$MANGOHUD_RUN "$WINELOADER" $wh_add_args "$win_file_exec" "$@" $LAUNCH_PARAMETERS 2>&1 | tee -a "$log_file"
|
||||
)
|
||||
else
|
||||
(
|
||||
cd "$win_file_path"
|
||||
$MANGOHUD_RUN "$WINELOADER" $wh_add_args "$win_file_exec" "$@" $LAUNCH_PARAMETERS
|
||||
)
|
||||
fi
|
||||
|
||||
wait_wineserver
|
||||
cd "$DRIVE_C"
|
||||
}
|
||||
|
||||
wine_run_install () {
|
||||
|
Reference in New Issue
Block a user