Commit bc4552ac authored by Mikhail Tergoev's avatar Mikhail Tergoev

###Scripts version 2039###

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