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