Commit bc4552ac authored by Mikhail Tergoev's avatar Mikhail Tergoev

###Scripts version 2039###

parent 771b0c06
......@@ -7,8 +7,9 @@
* добавить проверку количества db файлов на один exe
* заниматься только развитием проекта за счет вашей подписки на https://boosty.to/portwine-linux.ru
-----------------------------------------
###Scripts version 2037 - 2038###
* продолжение исправление функции AUTOINSTALL
###Scripts version 2037 - 2039###
* функция AUTOINSTALL снова работает без проблема
* возвращено разделение mangohud и mangohud --dlsym
###Scripts version 2036###
* улучшено скачивание с github
......
......@@ -160,10 +160,11 @@ unpack_tar () {
pw_mangohud_check () {
export RUN_MANGOHUD=""
if [ "${PW_MANGOHUD}" == "1" ] ; then
#if [ "${PW_VULKAN_USE}" = "0" ] ; then
if [ "${PW_VULKAN_USE}" = "0" ] ; then
export RUN_MANGOHUD="mangohud --dlsym"
#else export RUN_MANGOHUD="mangohud"
#fi
else
export RUN_MANGOHUD="mangohud"
fi
else
export DISABLE_MANGOHUD=1
fi
......@@ -291,7 +292,6 @@ init_wine_ver () {
try_force_link_dir "${PORT_WINE_TMP_PATH}/${mono_gecko_chk}" "${WINEDIR}"/share/wine/
fi
done
return 0
}
cabextract_fix () {
......@@ -320,7 +320,6 @@ pw_stop_progress_bar () {
while [ ! -z "`pgrep -a yad | grep "\-\-progress" | awk '{print $1}'`" ]
do kill -n 9 `pgrep -a yad | grep "\-\-progress" | awk '{print $1}' | head -n 1` > /dev/null 2>&1
done
return 0
}
pw_download_libs () {
......@@ -439,22 +438,27 @@ wait_wineserver () {
while [ ! -z "$(ls -l /proc/*/exe 2>/dev/null | grep -ie ${portname} | grep -E 'wine(64)?-preloader|wineserver' | awk -F/ '{print $3}')" ] ; do
sleep 1
done
return 0
}
kill_portwine () {
wine_pids=`ls -l /proc/*/exe 2>/dev/null | grep -ie ${portname} | grep -E 'wine(64)?-preloader| ' | awk -F/ '{print $3}'`
wine_pids="`ls -l /proc/*/exe 2>/dev/null | grep -ie ${portname} | grep -E 'wine(64)?-preloader|wineserver' | awk -F/ '{print $3}'`"
if [ ! -z "${wine_pids}" ] ; then
for pw_kill_pids in ${wine_pids} ; do
if [ "`ps cax | grep ${pw_kill_pids}`" ] ; then
kill -n 9 ${pw_kill_pids}
echo "kill -n 9 ${pw_kill_pids}"
fi
done
fi
if [ ! -z `pgrep -a bwrap | grep ${portname} | head -n 1 | awk '{print $1}'` ] ; then
kill -n 9 `pgrep -a bwrap | grep ${portname} | head -n 1 | awk '{print $1}'`
bwrap_pids="`pgrep -a wrap | grep ${portname} | head -n 1 | awk '{print $1}'`"
if [ ! -z "${bwrap_pids}" ] ; then
for pw_kill_pids in ${bwrap_pids} ; do
if [ "`ps cax | grep ${pw_kill_pids}`" ] ; then
kill -n 9 ${pw_kill_pids}
echo "kill -n 9 ${pw_kill_pids}"
fi
done
fi
return 0
}
export -f kill_portwine
......@@ -613,7 +617,7 @@ pw_kill_autostart () {
if [ "$PW_USE_RUNTIME" != 1 ]
then print_info "PW_USE_RUNTIME=$PW_USE_RUNTIME"
else
sleep 10
sleep 10
while true ; do
if [[ -z "`ps aux | grep -m 1 "$1" | grep -v grep | awk '{print $2}'`" && ! -z "`ps aux | grep wrap | grep -v grep | grep -i ${portname} | head -n 1`" ]] ; then
echo -e "PID "$1" not found"
......@@ -624,7 +628,7 @@ pw_kill_autostart () {
fi
done
fi
if [ ! -z "`ls "${WINEPREFIX}"/drive_c/ | grep -m 1 ".tmp"`" ] ; then
if [[ ! -z "`ls "${WINEPREFIX}"/drive_c/ | grep -m 1 ".tmp"`" ]] ; then
rm -f "${WINEPREFIX}"/drive_c/*.tmp
fi
}
......@@ -706,7 +710,6 @@ pw_gui_for_edit_db () {
# PW_DB_TMP=`cat "${PORTWINE_DB_FILE}"`
# echo "${PW_DB_TMP}" | awk '! a[$0]++' > "${PORTWINE_DB_FILE}"
# unset PW_DB_TMP
return 0
}
pw_check_and_download_wine () {
......
......@@ -20,6 +20,7 @@ then
pw_kill_autostart wgc.exe &
pw_run "${PW_AUTOINSTALL_EXE}"
portwine_exe="$WINEPREFIX/drive_c/ProgramData/Wargaming.net/GameCenter/wgc_api/wgc_api.exe"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
export PORTWINE_CREATE_SHORTCUT_NAME="Wargaming Game Center"
try_remove_file "${PW_AUTOINSTALL_EXE}"
kill_portwine
......
......@@ -453,7 +453,6 @@ pw_run () {
${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
fi
fi
stop_portwine
}
###MAIN###
......@@ -463,7 +462,7 @@ if [ $(id -u) -eq 0 ] ; then
exit 1
fi
unset MANGOHUD MANGOHUD_DLSYM PW_NO_ESYNC PW_NO_FSYNC PW_VULKAN_USE WINEDLLOVERRIDES PW_NO_WRITE_WATCH PW_GUI_DISABLED_CS
unset PW_CHECK_AUTOINSTAL PW_VKBASALT_EFFECTS PW_VKBASALT_FFX_CAS PORTWINE_DB PORTWINE_DB_FILE PW_DISABLED_CREAT_DB PW_YAD_SET
unset PW_CHECK_AUTOINSTAL PW_VKBASALT_EFFECTS PW_VKBASALT_FFX_CAS PORTWINE_DB PORTWINE_DB_FILE PW_DISABLED_CREATE_DB PW_YAD_SET
unset CHK_SYMLINK_FILE
export portname=PortProton
......
......@@ -230,7 +230,7 @@ pw_autoinstall_from_db () {
export PW_NO_FSYNC=1
export PW_NO_ESYNC=1
unset PORTWINE_CREATE_SHORTCUT_NAME
export PW_DISABLED_CREAT_DB=1
export PW_DISABLED_CREATE_DB=1
. "${PORT_SCRIPTS_PATH}/pw_autoinstall/${PW_YAD_SET}"
}
......@@ -389,7 +389,7 @@ fi
init_wine_ver
if [ -z "${PW_DISABLED_CREAT_DB}" ] ; then
if [ -z "${PW_DISABLED_CREATE_DB}" ] ; then
if [ ! -z "${PORTWINE_DB}" ] ; then
PORTWINE_DB_FILE=`grep -il "\#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/*`
if [ -z "${PORTWINE_DB_FILE}" ] ; then
......@@ -423,3 +423,5 @@ case "$PW_YAD_SET" in
120) gui_vkBasalt ;;
PW_*) pw_autoinstall_from_db ;;
esac
stop_portwine
#!/bin/bash
#Author: Castro-Fidel (PortWINE-Linux.ru)
#SCRIPTS_NEXT_VERSION=2038
#SCRIPTS_NEXT_VERSION=2039
#PORT_NEXT_VERSION=97
########################################################################
export PW_MANGOHUD=0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment