Commit ccf6296b authored by Mikhail Tergoev's avatar Mikhail Tergoev

###Scripts version 2013###

parent bce579bf
......@@ -5,6 +5,10 @@
* добавить комментарии описывающие функционал скриптов и db файлов
* заниматься только развитием проекта за счет вашей подписки на https://boosty.to/portwine-linux.ru
-----------------------------------------
###Scripts version 2013###
* добавлен автоматический перенос содержимого каталога ~/.PortWINE в ../PortProton/data/tmp
* в лог созданный с помощью DEBAG добавлен вывод команды lspci | grep -i vga
###PortProton-97### 17.09.2021
* глобальное обновление установщика порта и его перенос на github
......@@ -216,7 +220,7 @@ PS: не забывает для активации добавить перем
* немного ускорена инициализация префикса
* расширена функция чистки префикса
* исправлено определение использования RUNTIME в логах
* ${HOME}/.PortWINE под контейнетом всегда доступен, но только для чтения
* ${PORT_WINE_TMP_PATH} под контейнетом всегда доступен, но только для чтения
* добавлен автоматический проброс /media и /mnt в контейнер порта что позволяет запускать игры и программы установленные не в домашнем каталоге, как если бы порт работал без контейнера
* в AUTOINSTALL добавлены лаунчены UPLAY и STEAM
* тестовый фикс пропадания текстур под DXVK на некоторых системах
......
......@@ -90,7 +90,8 @@ try_download_silent () {
}
zenity_error_download () {
`zenity --error --title "Error..." --text "You will need to check internet connettion,\nand press OK for repeet download" --no-wrap ` > /dev/null 2>&1
`zenity --error --title "Error..." --text "You will need to check internet connettion,\nand press OK for repeet download" --no-wrap `
[ "$?" != 0 ] && exit 1 || return 0
}
create_new_dir () {
......@@ -291,22 +292,18 @@ pw_stop_progress_bar () {
pw_download_libs () {
if [ ! -e "${PW_WINELIB}/runtime/bin/yad" ] || [ ! -e "${PW_WINELIB}/runtime/lib/p7zip/7z" ] \
|| [ ! -e "${PW_WINELIB}/runtime/bin/vkcube" ] || [ ! -e "${PW_WINELIB}/runtime/bin/xterm" ] || \
[ -e "${HOME}/.PortWINE/tmp/libs${PW_LIBS_VER}.tar.xz" ] ; then
[ -e "${PORT_WINE_TMP_PATH}/libs${PW_LIBS_VER}.tar.xz" ] ; then
print_info "Download and install libraries..."
if try_download "https://github.com/Castro-Fidel/PortWINE/releases/download/libs${PW_LIBS_VER}/libs${PW_LIBS_VER}.tar.xz" "${HOME}/.PortWINE/tmp/libs${PW_LIBS_VER}.tar.xz" ; then
if unpack_tar_xz "${HOME}/.PortWINE/tmp/libs${PW_LIBS_VER}.tar.xz" "${HOME}/.PortWINE/" ; then
try_remove_file "${HOME}/.PortWINE/tmp/libs${PW_LIBS_VER}.tar.xz"
if try_download "https://github.com/Castro-Fidel/PortWINE/releases/download/libs${PW_LIBS_VER}/libs${PW_LIBS_VER}.tar.xz" "${PORT_WINE_TMP_PATH}/libs${PW_LIBS_VER}.tar.xz" ; then
if unpack_tar_xz "${PORT_WINE_TMP_PATH}/libs${PW_LIBS_VER}.tar.xz" "${PORT_WINE_TMP_PATH}/" ; then
try_remove_file "${PORT_WINE_TMP_PATH}/libs${PW_LIBS_VER}.tar.xz"
else
try_remove_dir "${HOME}/.PortWINE/libs${PW_LIBS_VER}"
try_remove_file "${HOME}/.PortWINE/tmp/libs${PW_LIBS_VER}.tar.xz"
`zenity --error --title "Error..." \
--text "Failed to install runtime libraries.\nCheck internet connection and press OK" \
--no-wrap ` > /dev/null 2>&1 && pw_download_libs
try_remove_dir "${PORT_WINE_TMP_PATH}/libs${PW_LIBS_VER}"
try_remove_file "${PORT_WINE_TMP_PATH}/libs${PW_LIBS_VER}.tar.xz"
zenity_error_download && pw_download_libs
fi
else
`zenity --error --title "Error..." \
--text "Failed to download runtime libraries.\nCheck internet connection and press OK" \
--no-wrap ` > /dev/null 2>&1 && pw_download_libs
zenity_error_download && pw_download_libs
fi
fi
export pw_yad="${PW_WINELIB}/runtime/bin/yad"
......@@ -322,18 +319,18 @@ pw_download_libs () {
}
pw_download_mono () {
if [ ! -d "${HOME}/.PortWINE/mono/wine-mono-${PW_MONO_VER}" ] ; then
if [ ! -d "${PORT_WINE_TMP_PATH}/mono/wine-mono-${PW_MONO_VER}" ] ; then
export url_mono="https://github.com/madewokherd/wine-mono/releases/download/wine-mono-${PW_MONO_VER}/wine-mono-${PW_MONO_VER}-x86.tar.xz"
echo "######################################################"
print_info "Download and install wine mono..."
if try_download "${url_mono}" "${HOME}/.PortWINE/tmp/wine-mono-${PW_MONO_VER}-x86.tar.xz" ; then
create_new_dir "${HOME}/.PortWINE/mono"
if ! unpack_tar_xz "${HOME}/.PortWINE/tmp/wine-mono-${PW_MONO_VER}-x86.tar.xz" "${HOME}/.PortWINE/mono/"
if try_download "${url_mono}" "${PORT_WINE_TMP_PATH}/wine-mono-${PW_MONO_VER}-x86.tar.xz" ; then
create_new_dir "${PORT_WINE_TMP_PATH}/mono"
if ! unpack_tar_xz "${PORT_WINE_TMP_PATH}/wine-mono-${PW_MONO_VER}-x86.tar.xz" "${PORT_WINE_TMP_PATH}/mono/"
then
try_remove_dir "${HOME}/.PortWINE/mono/wine-mono-${PW_MONO_VER}-x86"
try_remove_dir "${PORT_WINE_TMP_PATH}/mono/wine-mono-${PW_MONO_VER}-x86"
zenity_error_download && pw_download_mono
fi
try_remove_file "${HOME}/.PortWINE/tmp/wine-mono-${PW_MONO_VER}-x86.tar.xz"
try_remove_file "${PORT_WINE_TMP_PATH}/wine-mono-${PW_MONO_VER}-x86.tar.xz"
else
zenity_error_download && pw_download_mono
fi
......@@ -341,34 +338,34 @@ pw_download_mono () {
}
pw_download_gecko () {
if [ ! -d "${HOME}/.PortWINE/gecko/wine-gecko-${PW_GECKO_VER}-x86" ] ; then
if [ ! -d "${PORT_WINE_TMP_PATH}/gecko/wine-gecko-${PW_GECKO_VER}-x86" ] ; then
export url_gecko_x86="https://dl.winehq.org/wine/wine-gecko/${PW_GECKO_VER}/wine-gecko-${PW_GECKO_VER}-x86.tar.xz"
echo "######################################################"
echo "Download and install wine gecko x86..."
if try_download "${url_gecko_x86}" "${HOME}/.PortWINE/tmp/wine-gecko-${PW_GECKO_VER}-x86.tar.xz" ; then
create_new_dir "${HOME}/.PortWINE/gecko"
if ! unpack_tar_xz "${HOME}/.PortWINE/tmp/wine-gecko-${PW_GECKO_VER}-x86.tar.xz" "${HOME}/.PortWINE/gecko/"
print_info "Download and install wine gecko x86..."
if try_download "${url_gecko_x86}" "${PORT_WINE_TMP_PATH}/wine-gecko-${PW_GECKO_VER}-x86.tar.xz" ; then
create_new_dir "${PORT_WINE_TMP_PATH}/gecko"
if ! unpack_tar_xz "${PORT_WINE_TMP_PATH}/wine-gecko-${PW_GECKO_VER}-x86.tar.xz" "${PORT_WINE_TMP_PATH}/gecko/"
then
try_remove_dir "${HOME}/.PortWINE/gecko/wine-gecko-${PW_GECKO_VER}-x86"
try_remove_dir "${PORT_WINE_TMP_PATH}/gecko/wine-gecko-${PW_GECKO_VER}-x86"
zenity_error_download && pw_download_gecko
fi
try_remove_file "${HOME}/.PortWINE/tmp/wine-gecko-${PW_GECKO_VER}-x86.tar.xz"
try_remove_file "${PORT_WINE_TMP_PATH}/wine-gecko-${PW_GECKO_VER}-x86.tar.xz"
else
zenity_error_download && pw_download_gecko
fi
fi
if [ ! -d "${HOME}/.PortWINE/gecko/wine-gecko-${PW_GECKO_VER}-x86_64" ] ; then
if [ ! -d "${PORT_WINE_TMP_PATH}/gecko/wine-gecko-${PW_GECKO_VER}-x86_64" ] ; then
export url_gecko_x86_64="https://dl.winehq.org/wine/wine-gecko/${PW_GECKO_VER}/wine-gecko-${PW_GECKO_VER}-x86_64.tar.xz"
echo "######################################################"
echo "Download and install wine gecko x86_64..."
if try_download "${url_gecko_x86_64}" "${HOME}/.PortWINE/tmp/wine-gecko-${PW_GECKO_VER}-x86_64.tar.xz" ; then
create_new_dir "${HOME}/.PortWINE/gecko"
if ! unpack_tar_xz "${HOME}/.PortWINE/tmp/wine-gecko-${PW_GECKO_VER}-x86_64.tar.xz" "${HOME}/.PortWINE/gecko/"
print_info "Download and install wine gecko x86_64..."
if try_download "${url_gecko_x86_64}" "${PORT_WINE_TMP_PATH}/wine-gecko-${PW_GECKO_VER}-x86_64.tar.xz" ; then
create_new_dir "${PORT_WINE_TMP_PATH}/gecko"
if ! unpack_tar_xz "${PORT_WINE_TMP_PATH}/wine-gecko-${PW_GECKO_VER}-x86_64.tar.xz" "${PORT_WINE_TMP_PATH}/gecko/"
then
try_remove_dir "${HOME}/.PortWINE/gecko/wine-gecko-${PW_GECKO_VER}-x86_64"
try_remove_dir "${PORT_WINE_TMP_PATH}/gecko/wine-gecko-${PW_GECKO_VER}-x86_64"
zenity_error_download && pw_download_gecko
fi
try_remove_file "${HOME}/.PortWINE/tmp/wine-gecko-${PW_GECKO_VER}-x86_64.tar.xz"
try_remove_file "${PORT_WINE_TMP_PATH}/wine-gecko-${PW_GECKO_VER}-x86_64.tar.xz"
else
zenity_error_download && pw_download_gecko
fi
......@@ -472,7 +469,7 @@ pw_init_db () {
PORTWINE_DB_FILE=`grep -ilw "#${PORTWINE_DB}" "${PORT_SCRIPTS_PATH}/portwine_db"/* | sed s/".exe"/""/gi`
if [ ! -z "${PORTWINE_DB_FILE}" ]; then
. "${PORTWINE_DB_FILE}"
echo "Use ${PORTWINE_DB_FILE} db file."
print_info "Use ${PORTWINE_DB_FILE} db file."
init_wine_ver
fi
fi
......@@ -493,8 +490,8 @@ pw_port_update () {
read "update_not" < "${PORT_WINE_TMP_PATH}/update_notifier"
if [ "${update_not}" = "1" ] ; then
export port_current_ver=`cat "${PORT_WINE_TMP_PATH}/curent_var_ver" | grep PORT_NEXT_VERSION | awk -F "=" '{print $2}'`
echo "Port version in github = ${port_current_ver}"
echo "Port version local = ${port_install_ver}"
print_info "Port version in github = ${port_current_ver}"
print_info "Port version local = ${port_install_ver}"
if [ ! -z "${port_current_ver}" ] && [ "${port_current_ver}" -gt "${port_install_ver}" ] ; then
xsd=`zenity --title "${port_upd1}" --text "${port_upd2}" --list --radiolist --height=240 --column="${inst_set}" --column "${port_upd3}" \
TRUE "${port_upd4}" \
......@@ -550,8 +547,8 @@ pw_port_update () {
read "scripts_update_not" < "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
if [ "${scripts_update_not}" = "1" ] ; then
export scripts_current_ver=`cat "${PORT_WINE_TMP_PATH}/curent_var_ver" | grep SCRIPTS_NEXT_VERSION | awk -F "=" '{print $2}'`
echo "Scripts version in github = ${scripts_current_ver}"
echo "Scripts version local = ${scripts_install_ver}"
print_info "Scripts version in github = ${scripts_current_ver}"
print_info "Scripts version local = ${scripts_install_ver}"
if [ ! -z "${scripts_current_ver}" ] && [ "${scripts_current_ver}" -gt "${scripts_install_ver}" ] ; then
xcsd=`zenity --title "${scripts_upd1}" --text "${scripts_upd2}" --list --radiolist --height=240 --column="${inst_set}" --column "${scripts_upd3}" \
TRUE "${scripts_upd4}" \
......@@ -560,7 +557,7 @@ pw_port_update () {
case $xcsd in
"${scripts_upd4}")
echo "######################################################"
echo "Update scripts..."
print_info "Update scripts..."
try_remove_file "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz"
if try_download "https://github.com/Castro-Fidel/PortWINE/archive/refs/heads/master.tar.gz" "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz" ; then
tar -xvzf "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz" -C "${PORT_WINE_TMP_PATH}"
......@@ -590,7 +587,7 @@ pw_port_update () {
pw_kill_autostart () {
if [ "$PW_USE_RUNTIME" != 1 ]
then echo "PW_USE_RUNTIME: `echo $PW_USE_RUNTIME`"
then print_info "PW_USE_RUNTIME=$PW_USE_RUNTIME"
else
sleep 10
while true ; do
......@@ -682,14 +679,10 @@ pw_check_and_download_wine () {
try_remove_dir "${PORT_WINE_PATH}/data/tmp/${PW_PROTON_GE_VER}"
try_remove_dir "${PORT_WINE_PATH}/data/dist/PROTON_GE"
`zenity --error --title "Error..." \
--text "Failed to download WINE: PROTON_GE.\nCheck internet connection and press OK" \
--no-wrap ` > /dev/null 2>&1 && pw_check_and_download_wine
zenity_error_download && pw_check_and_download_wine
fi
else
`zenity --error --title "Error..." \
--text "Failed to download WINE: PROTON_GE.\nCheck internet connection and press OK" \
--no-wrap ` > /dev/null 2>&1 && pw_check_and_download_wine
zenity_error_download && pw_check_and_download_wine
fi
fi
fi
......@@ -708,14 +701,10 @@ pw_check_and_download_wine () {
try_remove_dir "${PORT_WINE_PATH}/data/tmp/${PW_PROTON_STEAM_VER}"
try_remove_dir "${PORT_WINE_PATH}/data/dist/PROTON_STEAM"
`zenity --error --title "Error..." \
--text "Failed to download WINE: PROTON_STEAM.\nCheck internet connection and press OK" \
--no-wrap ` > /dev/null 2>&1 && pw_check_and_download_wine
zenity_error_download && pw_check_and_download_wine
fi
else
`zenity --error --title "Error..." \
--text "Failed to download WINE: PROTON_STEAM.\nCheck internet connection and press OK" \
--no-wrap ` > /dev/null 2>&1 && pw_check_and_download_wine
zenity_error_download && pw_check_and_download_wine
fi
fi
}
......@@ -45,8 +45,8 @@ start_portwine () {
create_new_dir "${WINEDIR}/share/wine/"
try_remove_dir "${WINEDIR}"/share/wine/gecko
try_remove_dir "${WINEDIR}"/share/wine/mono
try_force_link_dir "${HOME}/.PortWINE/gecko" "${WINEDIR}"/share/wine/
try_force_link_dir "${HOME}/.PortWINE/mono" "${WINEDIR}"/share/wine/
try_force_link_dir "${PORT_WINE_TMP_PATH}/gecko" "${WINEDIR}"/share/wine/
try_force_link_dir "${PORT_WINE_TMP_PATH}/mono" "${WINEDIR}"/share/wine/
if [ "${PW_USE_RUNTIME}" = 0 ] ; then
export pw_runtime=""
......@@ -448,7 +448,11 @@ if [ -d "${PORT_WINE_PATH}/data/dist" ] ; then
IFS="$orig_IFS"
fi
create_new_dir "${PORT_WINE_TMP_PATH}"
create_new_dir "${HOME}/.PortWINE/tmp"
if [ -d "${HOME}/.PortWINE/" ] ; then
try_remove_dir "${HOME}/.PortWINE/tmp"
mv -f "${HOME}/.PortWINE"/* "${PORT_WINE_TMP_PATH}"
try_remove_dir "${HOME}/.PortWINE/"
fi
cd "${PORT_SCRIPTS_PATH}"
. "${PORT_SCRIPTS_PATH}/var"
......@@ -463,7 +467,7 @@ fi
export urlg="https://portwine-linux.ru/portwine-faq/"
export PW_FTP_URL="https://portwine-linux.ru/ftp"
export PW_WINELIB="${HOME}/.PortWINE/libs${PW_LIBS_VER}"
export PW_WINELIB="${PORT_WINE_TMP_PATH}/libs${PW_LIBS_VER}"
export PW_GUI_ICON_PATH="${PORT_WINE_PATH}/data/img/gui"
export install_ver=`cat "${PORT_WINE_TMP_PATH}/${portname}_ver" | head -n 1`
export WINETRICKS_DOWNLOADER="curl"
......
......@@ -128,6 +128,7 @@ portwine_start_debug () {
free -m >> "${PORT_WINE_PATH}/${portname}.log"
echo "-----------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Graphic cards and drivers" >> "${PORT_WINE_PATH}/${portname}.log"
echo `lspci | grep -i vga` >> "${PORT_WINE_PATH}/${portname}.log"
"${PW_WINELIB}/runtime/bin/glxinfo" -B >> "${PORT_WINE_PATH}/${portname}.log"
echo "----------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Vulkan info device name:" >> "${PORT_WINE_PATH}/${portname}.log"
......@@ -307,7 +308,7 @@ else
gui_rm_portproton () {
if gui_question "${port_del2}" ; then
rm -fr "${PORT_WINE_PATH}"
rm -fr "${HOME}/.PortWINE"
rm -fr "${PORT_WINE_TMP_PATH}"
rm -f `grep -il PortProton "${HOME}/.local/share/applications"/*`
update-desktop-database -q "${HOME}/.local/share/applications"
fi
......
#!/bin/bash
#Author: Castro-Fidel (PortWINE-Linux.ru)
#SCRIPTS_NEXT_VERSION=2012
#PORT_NEXT_VERSION=95
#SCRIPTS_NEXT_VERSION=2013
#PORT_NEXT_VERSION=97
########################################################################
export PW_MANGOHUD=1
export MANGOHUD_CONFIG=font_size=24,position=top-left,toggle_hud=Shift_R+F12,no_display,resolution,wine,gpu_name,vulkan_driver,gpu_stats,vkbasalt
......@@ -11,7 +11,7 @@ export MANGOHUD_CONFIG=font_size=24,position=top-left,toggle_hud=Shift_R+F12,no_
#export PW_XKBD_RU_HACK=1
export PW_USE_RUNTIME=1 # 0 - disabled; 1 - enabled
export PW_RT_MOUNT_RO=("${HOME}/.PortWINE")
export PW_RT_MOUNT_RO=("${PORT_WINE_TMP_PATH}")
export PW_RT_MOUNT_RW=("/media" "/mnt" "/run/media/${USER}" "${PORT_WINE_PATH}")
#export PW_SANDBOX_HOME_PATH="${PORT_WINE_PATH}"
......
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