Commit c322b56e authored by Mikhail Tergoev's avatar Mikhail Tergoev

Scripts version 2257

parent 9a6e1f14
...@@ -2,6 +2,12 @@ You can help us in the development of the project on the website: https://linux- ...@@ -2,6 +2,12 @@ You can help us in the development of the project on the website: https://linux-
---------------------------------------- ----------------------------------------
Changelog: Changelog:
###Scripts version 2257### Date: 15.02.2024 / Download update size: 15 megabytes
* for all setup.exe is automatically selected by WINE_LG (corrects errors unarc.dll )
* added a function to disable compositing (thanks to Boria138)
* improved prefix update function
* many small script improvements
###Scripts version 2256### Date: 13.02.2024 / Download update size: 15 megabytes ###Scripts version 2256### Date: 13.02.2024 / Download update size: 15 megabytes
* updated WINE_LG to version 9-2 * updated WINE_LG to version 9-2
* updated versions: * updated versions:
......
...@@ -2,7 +2,13 @@ ...@@ -2,7 +2,13 @@
----------------------------------------- -----------------------------------------
История изменений: История изменений:
* для всех setup.exe автоматически используется WINE_LG (исправляет ошибки unarc.dll) ###Scripts version 2257### Дата: 15.02.2024 / Размер скачиваемого обновления: 15 мегабайт
* для всех setup.exe автоматически выбирается WINE_LG (исправляет ошибки unarc.dll)
* добавлена функция отключения композитинга (спасибо Boria138)
* для префиксов созданных вручную, добавлен выбор его наполнения (чистый, или с рекомендованными библиотеками)
* улучшена функция обновления префикса при смене версии WINE-PROTON
* улучшение переводов
* множество небольших улучшений скриптов
###Scripts version 2256### Дата: 13.02.2024 / Размер скачиваемого обновления: 15 мегабайт ###Scripts version 2256### Дата: 13.02.2024 / Размер скачиваемого обновления: 15 мегабайт
* обновлен WINE_LG до версии 9-2 * обновлен WINE_LG до версии 9-2
......
data_from_portwine/img/gui/citra.png

2.14 KB | W: | H:

data_from_portwine/img/gui/citra.png

8.23 KB | W: | H:

data_from_portwine/img/gui/citra.png
data_from_portwine/img/gui/citra.png
data_from_portwine/img/gui/citra.png
data_from_portwine/img/gui/citra.png
  • 2-up
  • Swipe
  • Onion skin
data_from_portwine/img/gui/separator.png

468 Bytes | W: | H:

data_from_portwine/img/gui/separator.png

4.06 KB | W: | H:

data_from_portwine/img/gui/separator.png
data_from_portwine/img/gui/separator.png
data_from_portwine/img/gui/separator.png
data_from_portwine/img/gui/separator.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -125,7 +125,7 @@ try_download_no_mirror () { ...@@ -125,7 +125,7 @@ try_download_no_mirror () {
set -o pipefail set -o pipefail
curl -f -# -A "Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)" -H 'Cache-Control: no-cache, no-store' -H 'Pragma: no-cache' -L "$1" -o "$2" 2>&1 | \ curl -f -# -A "Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)" -H 'Cache-Control: no-cache, no-store' -H 'Pragma: no-cache' -L "$1" -o "$2" 2>&1 | \
tr '\r' '\n' | sed -ur 's|[# ]+||g;s|.*=.*||g;s|.*|#Downloading at &\n&|g' | \ tr '\r' '\n' | sed -ur 's|[# ]+||g;s|.*=.*||g;s|.*|#Downloading at &\n&|g' | \
"${pw_yad_v12_3}" --progress --percentage=0 --text="Download ${PW_DOWNLOAD_FILE_NAME}" --auto-close --no-escape \ "${pw_yad_v12_3}" --progress --percentage=0 --text="${loc_downloading} ${PW_DOWNLOAD_FILE_NAME}" --auto-close --no-escape \
--auto-kill --center --text-align="center" --fixed --no-buttons --title "PortProton" --width=500 --height=90 \ --auto-kill --center --text-align="center" --fixed --no-buttons --title "PortProton" --width=500 --height=90 \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" --borders=15 --window-icon="$PW_GUI_ICON_PATH/portproton.svg" --borders=15
if [ "${PIPESTATUS[0]}" != 0 ] ; then if [ "${PIPESTATUS[0]}" != 0 ] ; then
...@@ -143,7 +143,7 @@ try_download () { ...@@ -143,7 +143,7 @@ try_download () {
set -o pipefail set -o pipefail
curl -f -# -A "Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)" -H 'Cache-Control: no-cache, no-store' -H 'Pragma: no-cache' -L "$1" -o "$2" 2>&1 | \ curl -f -# -A "Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)" -H 'Cache-Control: no-cache, no-store' -H 'Pragma: no-cache' -L "$1" -o "$2" 2>&1 | \
tr '\r' '\n' | sed -ur 's|[# ]+||g;s|.*=.*||g;s|.*|#Downloading at &\n&|g' | \ tr '\r' '\n' | sed -ur 's|[# ]+||g;s|.*=.*||g;s|.*|#Downloading at &\n&|g' | \
"${pw_yad_v12_3}" --progress --percentage=0 --text="Download ${PW_DOWNLOAD_FILE_NAME}" --auto-close --no-escape \ "${pw_yad_v12_3}" --progress --percentage=0 --text="${loc_downloading} ${PW_DOWNLOAD_FILE_NAME}" --auto-close --no-escape \
--auto-kill --center --text-align="center" --fixed --no-buttons --title "PortProton" --width=500 --height=90 \ --auto-kill --center --text-align="center" --fixed --no-buttons --title "PortProton" --width=500 --height=90 \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" --borders=15 --window-icon="$PW_GUI_ICON_PATH/portproton.svg" --borders=15
if [ "${PIPESTATUS[0]}" != 0 ] ; then if [ "${PIPESTATUS[0]}" != 0 ] ; then
...@@ -151,7 +151,7 @@ try_download () { ...@@ -151,7 +151,7 @@ try_download () {
print_info "Try download ${PW_DOWNLOAD_FILE_NAME} from FTP" print_info "Try download ${PW_DOWNLOAD_FILE_NAME} from FTP"
curl -f -# -A "Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)" -L "ftp://171.22.215.18/archives/${PW_DOWNLOAD_FILE_NAME}" -o "$2" 2>&1 | \ curl -f -# -A "Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)" -L "ftp://171.22.215.18/archives/${PW_DOWNLOAD_FILE_NAME}" -o "$2" 2>&1 | \
tr '\r' '\n' | sed -ur 's|[# ]+||g;s|.*=.*||g;s|.*|#Downloading at &\n&|g' | \ tr '\r' '\n' | sed -ur 's|[# ]+||g;s|.*=.*||g;s|.*|#Downloading at &\n&|g' | \
"${pw_yad_v12_3}" --progress --percentage=0 --text="Download ${PW_DOWNLOAD_FILE_NAME}" --auto-close --no-escape \ "${pw_yad_v12_3}" --progress --percentage=0 --text="${loc_downloading} ${PW_DOWNLOAD_FILE_NAME}" --auto-close --no-escape \
--auto-kill --center --text-align="center" --fixed --no-buttons --title "PortProton" --width=500 --height=90 \ --auto-kill --center --text-align="center" --fixed --no-buttons --title "PortProton" --width=500 --height=90 \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" --borders=15 --window-icon="$PW_GUI_ICON_PATH/portproton.svg" --borders=15
if [ "${PIPESTATUS[0]}" != 0 ] ; then if [ "${PIPESTATUS[0]}" != 0 ] ; then
...@@ -169,7 +169,7 @@ try_download_to_path () { ...@@ -169,7 +169,7 @@ try_download_to_path () {
set -o pipefail set -o pipefail
curl -f -# -A "Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)" -H 'Cache-Control: no-cache, no-store' -H 'Pragma: no-cache' -L "$1" -o "$2/$PW_DOWNLOAD_FILE_NAME" 2>&1 | \ curl -f -# -A "Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)" -H 'Cache-Control: no-cache, no-store' -H 'Pragma: no-cache' -L "$1" -o "$2/$PW_DOWNLOAD_FILE_NAME" 2>&1 | \
tr '\r' '\n' | sed -ur 's|[# ]+||g;s|.*=.*||g;s|.*|#Downloading at &\n&|g' | \ tr '\r' '\n' | sed -ur 's|[# ]+||g;s|.*=.*||g;s|.*|#Downloading at &\n&|g' | \
"${pw_yad_v12_3}" --progress --percentage=0 --text="Download ${PW_DOWNLOAD_FILE_NAME}" --auto-close --no-escape \ "${pw_yad_v12_3}" --progress --percentage=0 --text="${loc_downloading} ${PW_DOWNLOAD_FILE_NAME}" --auto-close --no-escape \
--auto-kill --center --text-align="center" --fixed --no-buttons --title "PortProton" --width=500 --height=90 \ --auto-kill --center --text-align="center" --fixed --no-buttons --title "PortProton" --width=500 --height=90 \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" --borders=15 --window-icon="$PW_GUI_ICON_PATH/portproton.svg" --borders=15
if [ "${PIPESTATUS[0]}" != 0 ] ; then if [ "${PIPESTATUS[0]}" != 0 ] ; then
...@@ -354,7 +354,7 @@ pw_reinstall_pp () { ...@@ -354,7 +354,7 @@ pw_reinstall_pp () {
echo "" echo ""
exit 1 exit 1
fi fi
elif ! gui_question "${port_reinstall}" elif ! yad_question "${port_reinstall}"
then exit 1 then exit 1
fi fi
pw_clear_pfx pw_clear_pfx
...@@ -682,18 +682,24 @@ pw_kill_autostart () { ...@@ -682,18 +682,24 @@ pw_kill_autostart () {
export -f pw_kill_autostart export -f pw_kill_autostart
stop_portwine () { stop_portwine () {
if [[ "$int_xneur" == "1" ]] ; then [[ "$int_xneur" == "1" ]] && xneur &
xneur &
fi if [[ "$PW_USE_US_LAYOUT" == "1" ]] \
if [[ "$PW_USE_US_LAYOUT" == "1" ]] && [[ "${XDG_SESSION_TYPE}" != "wayland" ]] && command -v setxkbmap &>/dev/null ; then && [[ "${XDG_SESSION_TYPE}" != "wayland" ]] \
&& command -v setxkbmap &>/dev/null
then
setxkbmap setxkbmap
fi fi
if [[ "${XDG_SESSION_TYPE}" != "wayland" ]] \ if [[ "${XDG_SESSION_TYPE}" != "wayland" ]] \
&& [[ "$(xrandr | sed -rn 's/^.*primary.* ([0-9]+x[0-9]+).*$/\1/p')" != "$PW_SCREEN_RESOLUTION" ]] && [[ "$(xrandr | sed -rn 's/^.*primary.* ([0-9]+x[0-9]+).*$/\1/p')" != "$PW_SCREEN_RESOLUTION" ]]
then then
xrandr --output "$PW_SCREEN_PRIMARY" --mode "$PW_SCREEN_RESOLUTION" xrandr --output "$PW_SCREEN_PRIMARY" --mode "$PW_SCREEN_RESOLUTION"
fi fi
if [[ "${PW_DISABLE_COMPOSITING}" == "1" ]] ; then
if [[ "${PW_DISABLE_COMPOSITING}" == "1" ]] \
&& ! check_gamescope_session
then
if [[ "${DESKTOP_SESSION}" =~ "plasma" ]] ; then if [[ "${DESKTOP_SESSION}" =~ "plasma" ]] ; then
qdbus org.kde.KWin /Compositor resume qdbus org.kde.KWin /Compositor resume
elif [[ "${DESKTOP_SESSION}" =~ "mate" ]] ; then elif [[ "${DESKTOP_SESSION}" =~ "mate" ]] ; then
...@@ -704,13 +710,14 @@ stop_portwine () { ...@@ -704,13 +710,14 @@ stop_portwine () {
gsettings set org.cinnamon.muffin unredirect-fullscreen-windows false gsettings set org.cinnamon.muffin unredirect-fullscreen-windows false
fi fi
fi fi
pw_stop_progress_bar pw_stop_progress_bar
try_remove_file "${PORT_SCRIPTS_PATH}/0" try_remove_file "${PORT_SCRIPTS_PATH}/0"
try_remove_file "${PORT_SCRIPTS_PATH}/1" try_remove_file "${PORT_SCRIPTS_PATH}/1"
kill_portwine && kill_portwine &&
try_remove_dir "${PW_WINELIB}/var" try_remove_dir "${PW_WINELIB}/var"
find "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/" -maxdepth 1 -type f -name "*.tmp" -delete find "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/" -maxdepth 1 -type f -name "*.tmp" -delete
if [ ! -z "`pgrep -a yad_v12_3 | grep "\--notification" | awk '{print $1}'`" ] ; then if [[ ! -z "$(pgrep -a yad_v12_3 | grep "\--notification" | awk '{print $1}')" ]] ; then
kill -s SIGUSR1 "`pgrep -a yad_v12_3 | grep "\--notification" | awk '{print $1}'`" 2>/dev/null kill -s SIGUSR1 "`pgrep -a yad_v12_3 | grep "\--notification" | awk '{print $1}'`" 2>/dev/null
fi fi
add_in_stop_portwine #&>/dev/null add_in_stop_portwine #&>/dev/null
...@@ -881,11 +888,11 @@ pw_check_and_download_plugins () { ...@@ -881,11 +888,11 @@ pw_check_and_download_plugins () {
if try_download "github.com/Castro-Fidel/wine_builds/releases/download/plugins${PW_PLUGINS_VER}/plugins${PW_PLUGINS_VER}.tar.xz" "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz" ; then if try_download "github.com/Castro-Fidel/wine_builds/releases/download/plugins${PW_PLUGINS_VER}/plugins${PW_PLUGINS_VER}.tar.xz" "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz" ; then
if unpack_tar_xz "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz" "${PORT_WINE_TMP_PATH}" ; then if unpack_tar_xz "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz" "${PORT_WINE_TMP_PATH}" ; then
try_remove_file "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz" try_remove_file "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz"
if [ ! -z "`ls ${PORT_WINE_TMP_PATH} | grep plugins_v | grep -v plugins${PW_PLUGINS_VER}`" ] ; then if [ ! -z "`ls ${PORT_WINE_TMP_PATH} | grep plugins_v | grep -v plugins${PW_PLUGINS_VER}`" ] ; then
for RM_PLUGINS in `ls ${PORT_WINE_TMP_PATH} | grep plugins_v | grep -v plugins${PW_PLUGINS_VER}` for RM_PLUGINS in `ls ${PORT_WINE_TMP_PATH} | grep plugins_v | grep -v plugins${PW_PLUGINS_VER}`
do try_remove_dir "${PORT_WINE_TMP_PATH}/${RM_PLUGINS}" do try_remove_dir "${PORT_WINE_TMP_PATH}/${RM_PLUGINS}"
done done
fi fi
else else
try_remove_file "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz" try_remove_file "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz"
try_remove_dir "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}" try_remove_dir "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}"
...@@ -906,7 +913,7 @@ pw_check_and_download_plugins () { ...@@ -906,7 +913,7 @@ pw_check_and_download_plugins () {
fi fi
else else
PW_NOTIFY_TEXT="Please wait for update PortProton" PW_NOTIFY_TEXT="Please wait for update PortProton"
pw_notify_send -u critical pw_notify_send -u normal
if try_download_silent "github.com/Castro-Fidel/wine_builds/releases/download/plugins${PW_PLUGINS_VER}/plugins${PW_PLUGINS_VER}.tar.xz" \ if try_download_silent "github.com/Castro-Fidel/wine_builds/releases/download/plugins${PW_PLUGINS_VER}/plugins${PW_PLUGINS_VER}.tar.xz" \
"${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz" ; then "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz" ; then
if unpack_tar_xz "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz" "${PORT_WINE_TMP_PATH}" ; then if unpack_tar_xz "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz" "${PORT_WINE_TMP_PATH}" ; then
...@@ -932,6 +939,70 @@ pw_check_and_download_plugins () { ...@@ -932,6 +939,70 @@ pw_check_and_download_plugins () {
return 0 return 0
} }
check_dirs_and_files_in_pfx () {
create_new_dir "${WINEPREFIX}/dosdevices"
create_new_dir "${WINEPREFIX}/drive_c/windows/syswow64/"
create_new_dir "${WINEPREFIX}/drive_c/windows/system32/"
create_new_dir "${WINEPREFIX}/drive_c/tmp/.private/$USER/"
create_new_dir "${WINEPREFIX}/drive_c/tmp/.private/steamuser/"
[ ! -d "${WINEPREFIX}/dosdevices/c:" ] && try_force_link_dir "${WINEPREFIX}/drive_c/" "${WINEPREFIX}/dosdevices/c:"
[ ! -d "${WINEPREFIX}/dosdevices/z:" ] && try_force_link_dir "/" "${WINEPREFIX}/dosdevices/z:"
[ ! -d "${WINEPREFIX}/dosdevices/h:" ] && try_force_link_dir "$HOME" "${WINEPREFIX}/dosdevices/h:"
create_new_dir "${WINEPREFIX}/drive_c/windows/Fonts/"
LN_FONTS="arialbd.ttf courbd.ttf georgia.ttf micross.ttf msyh.ttf simsun.ttc arial.ttf cour.ttf malgun.ttf msgothic.ttc nirmala.ttf times.ttf"
for link_font in $LN_FONTS ; do
if [[ ! -f "${WINEPREFIX}/drive_c/windows/Fonts/${link_font}" ]] ; then
try_force_link_file "${WINEDIR}/share/fonts/${link_font}" "${WINEPREFIX}/drive_c/windows/Fonts/"
fi
done
create_new_dir "${WINEPREFIX}/drive_c/users/steamuser"
if [[ ! -d "${WINEPREFIX}/drive_c/users/${USER}" ]]
then try_force_link_dir "${WINEPREFIX}/drive_c/users/steamuser" "${WINEPREFIX}/drive_c/users/${USER}"
fi
create_new_dir "${WINEPREFIX}/drive_c/users/Public/Documents/Steam"
create_new_dir "${WINEPREFIX}/drive_c/users/steamuser/Documents/Steam"
if [[ ! -d "${WINEPREFIX}/drive_c/users/steamuser/My Documents" ]]
then try_force_link_dir "${WINEPREFIX}/drive_c/users/steamuser/Documents" "${WINEPREFIX}/drive_c/users/steamuser/My Documents"
fi
create_new_dir "${WINEPREFIX}/drive_c/users/steamuser/AppData/Roaming"
if [[ ! -d "${WINEPREFIX}/drive_c/users/steamuser/Application Data" ]]
then try_force_link_dir "${WINEPREFIX}/drive_c/users/steamuser/AppData/Roaming" "${WINEPREFIX}/drive_c/users/steamuser/Application Data"
fi
create_new_dir "${WINEPREFIX}/drive_c/users/steamuser/AppData/Local"
create_new_dir "${WINEPREFIX}/drive_c/users/steamuser/Local Settings"
if [[ ! -d "${WINEPREFIX}/drive_c/users/steamuser/Local Settings/Application Data" ]]
then try_force_link_dir "${WINEPREFIX}/drive_c/users/steamuser/AppData/Local" "${WINEPREFIX}/drive_c/users/steamuser/Local Settings/Application Data"
fi
find "${WINEPREFIX}/dosdevices" -xtype l -maxdepth 1 2>/dev/null -exec rm {} \;
rm -f "${WINEPREFIX}/dosdevices/"*::
DRIVES=(d e f g i j k l m n o p q r s t u v w x y)
DEF_MOUNT_DIRS=('/media' "/media/$USER" '/mnt' '/run/media' "/run/media/$USER")
MOUNT_DIRS=($(find "${DEF_MOUNT_DIRS[@]}" -maxdepth 1 -type d 2>/dev/null | sort -u))
for drive_dir in "${MOUNT_DIRS[@]}" ; do
if [[ ! "${DEF_MOUNT_DIRS[@]}" =~ "$drive_dir" ]] \
&& ! realpath "${WINEPREFIX}/dosdevices"/*: | grep "$drive_dir" &>/dev/null ; then
drive_num=0
while [[ "$drive_num" -lt "${#DRIVES[@]}" ]] ; do
drive_path="${WINEPREFIX}/dosdevices/${DRIVES[$drive_num]}:"
if [ ! -d "$drive_path" ] ; then
ln -sf "$drive_dir" "$drive_path"
break
else
((drive_num++))
fi
done
fi
done
}
check_nvidia_rtx () { check_nvidia_rtx () {
if [[ ! -z $(echo "$LSPCI_VGA" | grep -i "nvidia") ]]; then if [[ ! -z $(echo "$LSPCI_VGA" | grep -i "nvidia") ]]; then
# Turing (without nvidia 16XX) # Turing (without nvidia 16XX)
...@@ -1138,15 +1209,15 @@ update_winetricks () { ...@@ -1138,15 +1209,15 @@ update_winetricks () {
edit_db_from_gui () { edit_db_from_gui () {
print_info "edit_db_from_gui PORTWINE_DB_FILE=$PORTWINE_DB_FILE" print_info "edit_db_from_gui PORTWINE_DB_FILE=$PORTWINE_DB_FILE"
for mod_db in $@ ; do for mod_db in $@ ; do
print_info "${mod_db}=${!mod_db}" if ! grep "export ${mod_db}=" "${PORTWINE_DB_FILE}" &>/dev/null
if [ -z "`cat "${PORTWINE_DB_FILE}" | grep "export ${mod_db}="`" ] ; then then echo "export ${mod_db}=\"${!mod_db}\"" >> "${PORTWINE_DB_FILE}"
echo "export ${mod_db}=\"${!mod_db}\"" >> "${PORTWINE_DB_FILE}" elif grep "export ${mod_db}=" "${PORTWINE_DB_FILE}" | grep -v "#" &>/dev/null
elif [ "`cat "${PORTWINE_DB_FILE}" | grep "export ${mod_db}=" | grep -v "#"`" ] ; then then
if [ "`cat "${PORTWINE_DB_FILE}" | grep "export ${mod_db}=" | grep -v "#"`" != "export ${mod_db}=\"${!mod_db}\"" ] ; then if [[ "$(grep "export ${mod_db}=" "${PORTWINE_DB_FILE}" | grep -v "#")" != "export ${mod_db}=\"${!mod_db}\"" ]]
sed -ri "s/^export ${mod_db}=.*/export ${mod_db}=\"${!mod_db}\"/" "${PORTWINE_DB_FILE}" then sed -ri "s/^export ${mod_db}=.*/export ${mod_db}=\"${!mod_db}\"/" "${PORTWINE_DB_FILE}"
fi fi
elif [ "`cat "${PORTWINE_DB_FILE}" | grep "export ${mod_db}="`" != "export ${mod_db}=${!mod_db}" ] ; then elif [[ "$(grep "export ${mod_db}=" "${PORTWINE_DB_FILE}")" != "export ${mod_db}=${!mod_db}" ]]
sed -ri "s/.*export ${mod_db}=.*/export ${mod_db}=\"${!mod_db}\"/g" "${PORTWINE_DB_FILE}" then sed -ri "s/.*export ${mod_db}=.*/export ${mod_db}=\"${!mod_db}\"/g" "${PORTWINE_DB_FILE}"
fi fi
done done
return 0 return 0
...@@ -1154,15 +1225,15 @@ edit_db_from_gui () { ...@@ -1154,15 +1225,15 @@ edit_db_from_gui () {
edit_user_conf_from_gui () { edit_user_conf_from_gui () {
for mod_db in $@ ; do for mod_db in $@ ; do
print_info "${mod_db}=${!mod_db}" if ! grep "export ${mod_db}=" "${USER_CONF}" &>/dev/null
if [ -z "`cat "${USER_CONF}" | grep "export ${mod_db}="`" ] ; then then echo "export ${mod_db}=\"${!mod_db}\"" >> "${USER_CONF}"
echo "export ${mod_db}=\"${!mod_db}\"" >> "${USER_CONF}" elif grep "export ${mod_db}=" "${USER_CONF}" | grep -v "#" &>/dev/null
elif [ "`cat "${USER_CONF}" | grep "export ${mod_db}=" | grep -v "#"`" ] ; then then
if [ "`cat "${USER_CONF}" | grep "export ${mod_db}=" | grep -v "#"`" != "export ${mod_db}=\"${!mod_db}\"" ] ; then if [[ "$(grep "export ${mod_db}=" "${USER_CONF}" | grep -v "#")" != "export ${mod_db}=\"${!mod_db}\"" ]]
sed -ri "s/^export ${mod_db}=.*/export ${mod_db}=\"${!mod_db}\"/" "${USER_CONF}" then sed -ri "s/^export ${mod_db}=.*/export ${mod_db}=\"${!mod_db}\"/" "${USER_CONF}"
fi fi
elif [ "`cat "${USER_CONF}" | grep "export ${mod_db}="`" != "export ${mod_db}=${!mod_db}" ] ; then elif [[ "$(grep "export ${mod_db}=" "${USER_CONF}")" != "export ${mod_db}=${!mod_db}" ]]
sed -ri "s/.*export ${mod_db}=.*/export ${mod_db}=\"${!mod_db}\"/g" "${USER_CONF}" then sed -ri "s/.*export ${mod_db}=.*/export ${mod_db}=\"${!mod_db}\"/g" "${USER_CONF}"
fi fi
done done
return 0 return 0
......
...@@ -122,9 +122,12 @@ if [[ "${update_loc}" == "RUS" ]] ; then ...@@ -122,9 +122,12 @@ if [[ "${update_loc}" == "RUS" ]] ; then
export loc_winetricks="Запустить префикс менеджер для установки доп. библиотек в выбранный префикс" export loc_winetricks="Запустить префикс менеджер для установки доп. библиотек в выбранный префикс"
export loc_edit_db="Изменить файл настроек для" export loc_edit_db="Изменить файл настроек для"
export loc_download_other_wine="Открыть меню для скачивания других версий WINE-PROTON" export loc_download_other_wine="Открыть меню для скачивания других версий WINE-PROTON"
export loc_downloading="Скачивание"
export loc_clear_pfx="Очистить префикс для исправления проблем" export loc_clear_pfx="Очистить префикс для исправления проблем"
export loc_gui_dll_new_pfx="Установить рекомендованные библиотеки в новый префикс: "
export ENABLE_VKBASALT_INFO='Включить vkBasalt по умолчанию для улучшение графики в играх работающих под Vulkan. (Горячая клавиша HOME отключает vkbasalt)' export ENABLE_VKBASALT_INFO='Включить vkBasalt по умолчанию для улучшение графики в играх работающих под Vulkan. (Горячая клавиша HOME отключает vkbasalt)'
export PW_NO_ESYNC_INFO='Не использовать примитивы внутрипроцессной синхронизации на основе eventfd. (Рекомендуется не изменять значение)' export PW_NO_ESYNC_INFO='Не использовать примитивы внутрипроцессной синхронизации на основе eventfd. (Рекомендуется не изменять значение)'
export PW_NO_FSYNC_INFO='Не использовать примитивы внутрипроцессной синхронизации на основе фьютексов. (Автоматически отключается в системах без FUTEX_WAIT_MULTIPLE поддержки) (Рекомендуется не изменять значение)' export PW_NO_FSYNC_INFO='Не использовать примитивы внутрипроцессной синхронизации на основе фьютексов. (Автоматически отключается в системах без FUTEX_WAIT_MULTIPLE поддержки) (Рекомендуется не изменять значение)'
...@@ -161,6 +164,7 @@ if [[ "${update_loc}" == "RUS" ]] ; then ...@@ -161,6 +164,7 @@ if [[ "${update_loc}" == "RUS" ]] ; then
export PW_USE_SYSTEM_VK_LAYERS_INFO='Использовать системные mangohud, vkBasalt, obs-vkcapture и прочие приложения использующие vulkan layers' export PW_USE_SYSTEM_VK_LAYERS_INFO='Использовать системные mangohud, vkBasalt, obs-vkcapture и прочие приложения использующие vulkan layers'
export PW_USE_OBS_VKCAPTURE_INFO='Включить возможность записи в OBS Studio с помощью obs-vkcapture (ВНИМАНИЕ: будет включено принудительное использование системных mangohud, vkBasalt, obs-vkcapture и прочих приложений использующих vulkan layers)' export PW_USE_OBS_VKCAPTURE_INFO='Включить возможность записи в OBS Studio с помощью obs-vkcapture (ВНИМАНИЕ: будет включено принудительное использование системных mangohud, vkBasalt, obs-vkcapture и прочих приложений использующих vulkan layers)'
export PW_USE_GALLIUM_ZINK_INFO='Использовать драйвер zink (OpenGL поверх Vulkan), позволяет использовать vkBasalt в играх на OpenGL (ВНИМАНИЕ: необходима поддержка vulkan, используется wined3d (opengl) вместо dxvk, подходит для игр на OpenGL и старых версий DirectX, на более новых версиях DirectX возможны артефакты)' export PW_USE_GALLIUM_ZINK_INFO='Использовать драйвер zink (OpenGL поверх Vulkan), позволяет использовать vkBasalt в играх на OpenGL (ВНИМАНИЕ: необходима поддержка vulkan, используется wined3d (opengl) вместо dxvk, подходит для игр на OpenGL и старых версий DirectX, на более новых версиях DirectX возможны артефакты)'
export PW_DISABLE_COMPOSITING_INFO='Отключить композитинг (эффекты) рабочего стола. Зачастую улучшает производительность.'
export PW_3DFX_INFO='Имитация старого графического ускорителя 3dfx (добавляет горизонтальные полосы)' export PW_3DFX_INFO='Имитация старого графического ускорителя 3dfx (добавляет горизонтальные полосы)'
export PW_AdaptiveSharpen_INFO='Увеличение резкости, можно использовать совместно с CAS' export PW_AdaptiveSharpen_INFO='Увеличение резкости, можно использовать совместно с CAS'
...@@ -527,9 +531,12 @@ elif [[ "${update_loc}" == "ENG" ]] ; then ...@@ -527,9 +531,12 @@ elif [[ "${update_loc}" == "ENG" ]] ; then
export loc_winetricks="Run winetricks to install additional libraries to the selected prefix" export loc_winetricks="Run winetricks to install additional libraries to the selected prefix"
export loc_edit_db="Edit database file for" export loc_edit_db="Edit database file for"
export loc_download_other_wine="Open the menu to download other versions of WINE-PROTON " export loc_download_other_wine="Open the menu to download other versions of WINE-PROTON "
export loc_downloading="Downloading"
export loc_clear_pfx="Clear the prefix to fix problems" export loc_clear_pfx="Clear the prefix to fix problems"
export loc_gui_dll_new_pfx="Do you want to installing recommended libraries in the new prefix: "
export ENABLE_VKBASALT_INFO='Enable vkBasalt by default to improve graphics in games running on Vulkan. (The HOME hotkey disables vkbasalt)' export ENABLE_VKBASALT_INFO='Enable vkBasalt by default to improve graphics in games running on Vulkan. (The HOME hotkey disables vkbasalt)'
export PW_NO_ESYNC_INFO='Do not use in-process synchronization primitives based on eventfd. (It is recommended not to change the value.)' export PW_NO_ESYNC_INFO='Do not use in-process synchronization primitives based on eventfd. (It is recommended not to change the value.)'
export PW_NO_FSYNC_INFO='Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems without FUTEX_WAIT_MULTIPLE support) (It is recommended not to change the value)' export PW_NO_FSYNC_INFO='Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems without FUTEX_WAIT_MULTIPLE support) (It is recommended not to change the value)'
...@@ -566,6 +573,7 @@ elif [[ "${update_loc}" == "ENG" ]] ; then ...@@ -566,6 +573,7 @@ elif [[ "${update_loc}" == "ENG" ]] ; then
export PW_USE_SYSTEM_VK_LAYERS_INFO='Use system mangohud, vkBasalt, obs-vkcapture and other applications using vulkan layers' export PW_USE_SYSTEM_VK_LAYERS_INFO='Use system mangohud, vkBasalt, obs-vkcapture and other applications using vulkan layers'
export PW_USE_OBS_VKCAPTURE_INFO='Enable the ability to write to OBS Studio using obs-vkcapture (ATTENTION: the forced use of system mangohud, vkBasalt, obs-vkcapture and other applications using vulkan layers will be enabled)' export PW_USE_OBS_VKCAPTURE_INFO='Enable the ability to write to OBS Studio using obs-vkcapture (ATTENTION: the forced use of system mangohud, vkBasalt, obs-vkcapture and other applications using vulkan layers will be enabled)'
export PW_USE_GALLIUM_ZINK_INFO='Use the zink driver (OpenGL on top of Vulkan), allows you to use vkBasalt in OpenGL games (ATTENTION: vulkan support is required, wined3d (opengl) is used instead of dxvk, suitable for games on OpenGL and older versions of DirectX, artifacts are possible on newer versions of DirectX)' export PW_USE_GALLIUM_ZINK_INFO='Use the zink driver (OpenGL on top of Vulkan), allows you to use vkBasalt in OpenGL games (ATTENTION: vulkan support is required, wined3d (opengl) is used instead of dxvk, suitable for games on OpenGL and older versions of DirectX, artifacts are possible on newer versions of DirectX)'
export PW_DISABLE_COMPOSITING_INFO='Disable desktop compositing (effects). It often improves performance.'
export PW_3DFX_INFO='Simulation of an old 3dfx graphics accelerator (adds horizontal stripes)' export PW_3DFX_INFO='Simulation of an old 3dfx graphics accelerator (adds horizontal stripes)'
export PW_AdaptiveSharpen_INFO='Sharpness increase, can be used with CAS' export PW_AdaptiveSharpen_INFO='Sharpness increase, can be used with CAS'
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
#Rating=1-5 #Rating=1-5
#####################examples########################### #####################examples###########################
export PW_VULKAN_USE="2" export PW_VULKAN_USE="2"
export PW_WINE_USE="WINE_LG_9-0" export PW_WINE_USE="WINE_LG"
export PW_PREFIX_NAME="CALIBER" export PW_PREFIX_NAME="CALIBER"
export DISABLE_CP_DEFPFX=1 export DISABLE_CP_DEFPFX=1
...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
#LOTF2.exe #LOTF2.exe
#Rating=5 #Rating=5
#####################examples########################### #####################examples###########################
export PW_WINE_USE="WINE_LG_8-18-1" export PW_WINE_USE="WINE_LG"
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#Rating=1-5 #Rating=1-5
#####################examples########################### #####################examples###########################
export TEXT_OPSSL="" export TEXT_OPSSL=""
[[ -z `which openssl` ]] && export TEXT_OPSSL="Install openssl in your system!!!\n" [[ -z `which openssl` ]] && export TEXT_OPSSL="Install openssl in your system!\n"
export PW_COMMENT_DB="${TEXT_OPSSL}Dwnload and start League of Legends can take a long time" export PW_COMMENT_DB="${TEXT_OPSSL}Dwnload and start League of Legends can take a long time"
# export WINEDLLOVERRIDES="mscoree,mshtml=" # export WINEDLLOVERRIDES="mscoree,mshtml="
export LAUNCH_PARAMETERS="--launch-product=league_of_legends --launch-patchline=live" export LAUNCH_PARAMETERS="--launch-product=league_of_legends --launch-patchline=live"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
export PW_PREFIX_NAME="CALIBER" export PW_PREFIX_NAME="CALIBER"
export LAUNCH_PARAMETERS=("/VERYSILENT") export LAUNCH_PARAMETERS=("/VERYSILENT")
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/CaliberSetup.exe" export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/CaliberSetup.exe"
export PW_WINE_USE=WINE_LG_9-0 export PW_WINE_USE=WINE_LG
export DISABLE_CP_DEFPFX=1 export DISABLE_CP_DEFPFX=1
export PORTWINE_CREATE_SHORTCUT_NAME="CALIBER" export PORTWINE_CREATE_SHORTCUT_NAME="CALIBER"
......
#!/usr/bin/env bash
# Author: chal55rus (Sergey P.)
########################################################################
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/duckstation-windows-x64-release.zip"
start_portwine
if try_download_no_mirror "https://github.com/stenzek/duckstation/releases/download/preview/duckstation-windows-x64-release.zip" "${PW_AUTOINSTALL_EXE}"
then
pw_start_progress_bar_block "${loc_gui_installing_the} VBA-M. ${loc_gui_please_wait} "
"$pw_7z" x -y "${PW_AUTOINSTALL_EXE}" -o"$WINEPREFIX/drive_c/Program Files (x86)/Duckstation"
portwine_exe="$WINEPREFIX/drive_c/Program Files (x86)/Duckstation/duckstation-qt-x64-ReleaseLTCG.exe"
try_remove_file "${PW_AUTOINSTALL_EXE}"
try_remove_file "${portwine_exe}.ppdb"
kill_portwine
pw_stop_progress_bar
export PORTWINE_CREATE_SHORTCUT_NAME="DuckStation"
portwine_create_shortcut
fi
stop_portwine
#!/usr/bin/env bash
# Author: chal55rus (Sergey P.)
########################################################################
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/rpcs3-v0.0.29-15676-9fce7080_win64.7z"
start_portwine
if try_download_no_mirror "https://github.com/RPCS3/rpcs3-binaries-win/releases/download/build-9fce70809ee06a7e61a3dbe5bb9b0179fc541d9f/rpcs3-v0.0.29-15676-9fce7080_win64.7z" "${PW_AUTOINSTALL_EXE}"
then
pw_start_progress_bar_block "${loc_gui_installing_the} RPCS3. ${loc_gui_please_wait} "
"$pw_7z" x -y "${PW_AUTOINSTALL_EXE}" -o"$WINEPREFIX/drive_c/Program Files (x86)/RPCS3"
portwine_exe="$WINEPREFIX/drive_c/Program Files (x86)/RPCS3/rpcs3.exe"
try_remove_file "${PW_AUTOINSTALL_EXE}"
try_remove_file "${portwine_exe}.ppdb"
kill_portwine
pw_stop_progress_bar
export PORTWINE_CREATE_SHORTCUT_NAME="RPCS3"
portwine_create_shortcut
fi
stop_portwine
#!/usr/bin/env bash
# Author: chal55rus (Sergey P.)
##########################################################################
export LAUNCH_PARAMETERS=("/VERYSILENT")
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/scummvm-2.7.1-win32.exe"
start_portwine
if try_download_no_mirror "https://downloads.scummvm.org/frs/scummvm/2.7.1/scummvm-2.7.1-win32.exe" "${PW_AUTOINSTALL_EXE}"
then
pw_start_progress_bar_block "${loc_gui_installing_the} ScummVM. ${loc_gui_please_wait} "
#pw_kill_autostart launcher101xp.exe &
pw_run "${PW_AUTOINSTALL_EXE}"
portwine_exe="$WINEPREFIX/drive_c/Program Files/ScummVM/scummvm.exe"
try_remove_file "${PW_AUTOINSTALL_EXE}"
try_remove_file "${portwine_exe}.ppdb"
kill_portwine
pw_stop_progress_bar
export PORTWINE_CREATE_SHORTCUT_NAME="ScummVM"
portwine_create_shortcut
fi
stop_portwine
...@@ -22,50 +22,36 @@ fi ...@@ -22,50 +22,36 @@ fi
. "$(dirname $(readlink -f "$0"))/functions_helper" . "$(dirname $(readlink -f "$0"))/functions_helper"
start_portwine () { start_portwine () {
var_winedlloverride_update "${PW_MUST_WINEDLLOVERRIDES}"
export WINEPREFIX="$(readlink -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}")" export WINEPREFIX="$(readlink -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}")"
if [[ "$WINEPREFIX" != "${PORT_WINE_PATH}/data/prefixes/"* ]] && [[ ! -d "$WINEPREFIX" ]] ; then
yad_error "Path to PREFIX not found:\n$WINEPREFIX"
exit 1
fi
create_new_dir "${WINEPREFIX}/drive_c/windows/system32/"
create_new_dir "${WINEPREFIX}/drive_c/windows/syswow64/"
try_force_link_dir "${PORT_WINE_PATH}/data/prefixes" "${WINEPREFIX}/drive_c/"
export WINEARCH="win64"
if [[ "${PW_VULKAN_USE}" == 3 ]] ; then
export PW_WINE_USE="${PW_PROTON_LG_VER}"
echo "Force to use $PW_WINE_USE"
if [ ! -d "${PORT_WINE_PATH}/data/dist/${PW_WINE_USE}" ] ; then
if try_download "github.com/Castro-Fidel/wine_builds/releases/download/${PW_WINE_USE}/${PW_WINE_USE}.tar.xz" \
"${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz" ; then
if unpack_tar_xz "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz" "${PORT_WINE_PATH}/data/dist/" ; then
try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz"
UNPACK_STATUS=0
else
try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz"
try_remove_dir "${PORT_WINE_PATH}/data/dist/${PW_WINE_USE}"
fi
fi
[[ "${UNPACK_STATUS}" != 0 ]] && exit 1
fi
edit_db_from_gui PW_WINE_USE
else
pw_check_and_download_wine "${PW_WINE_USE}"
fi
pw_install_dll_in_prefix
init_wine_ver
if [[ -f "$portwine_exe" ]] && [[ "${WARN_CYRILLIC_IN_PATH}" == 1 ]] ; then PROGPFX_URL="github.com/Castro-Fidel/PortWINE/releases/download/progpfx${PROGPFX_VER}/progpfx${PROGPFX_VER}.tar.xz"
edit_db_from_gui WARN_CYRILLIC_IN_PATH if [[ "${PW_PREFIX_NAME}" == "PROGRAMS" && ! -f "${WINEPREFIX}"/.progpfx ]] ; then
unset WARN_CYRILLIC_IN_PATH print_info "Download and install PROGRAMS pfx..."
if try_download "${PROGPFX_URL}" "${PORT_WINE_PATH}/data/tmp/progpfx.tar.xz" ; then
unpack_tar_xz "${PORT_WINE_PATH}/data/tmp/progpfx.tar.xz" "${PORT_WINE_PATH}/data/prefixes/"
try_remove_file "${PORT_WINE_PATH}/data/tmp/progpfx.tar.xz"
else
try_remove_file "${PORT_WINE_PATH}/data/tmp/progpfx.tar.xz"
yad_error_download && exit 1
fi
fi fi
if [[ "$PW_USE_OBS_VKCAPTURE" == "1" ]] ; then DOTPFX_URL="github.com/Castro-Fidel/PortWINE/releases/download/dotpfx${DOTPFX_VER}/dotpfx${DOTPFX_VER}.tar.xz"
export OBS_VKCAPTURE="1" if [[ "${PW_PREFIX_NAME}" == "DOTNET" ]] && [[ ! -f "${WINEPREFIX}"/.dotnet${DOTPFX_VER} ]] ; then
export PW_USE_SYSTEM_VK_LAYERS="1" print_info "Download and install DOTNET pfx..."
print_warning "System mangohud, vkBasalt, obs-vk capture and other applications using vulkan layers are forcibly used." if try_download "${DOTPFX_URL}" "${PORT_WINE_PATH}/data/tmp/dotpfx.tar.xz" ; then
unpack_tar_xz "${PORT_WINE_PATH}/data/tmp/dotpfx.tar.xz" "${PORT_WINE_PATH}/data/prefixes/"
try_remove_file "${PORT_WINE_PATH}/data/tmp/dotpfx.tar.xz"
else
try_remove_file "${PORT_WINE_PATH}/data/tmp/dotpfx.tar.xz"
yad_error_download && exit 1
fi
fi fi
var_winedlloverride_update "${PW_MUST_WINEDLLOVERRIDES}"
pw_list_install_dll_in_prefix
pw_check_and_download_wine "${PW_WINE_USE}"
init_wine_ver
pw_init_runtime pw_init_runtime
check_variables VKD3D_DEBUG none check_variables VKD3D_DEBUG none
...@@ -82,6 +68,65 @@ start_portwine () { ...@@ -82,6 +68,65 @@ start_portwine () {
unset WINE_MONO_TRACE unset WINE_MONO_TRACE
fi fi
if [[ ! -d "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"/drive_c/windows ]] \
|| [[ ! -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"/userdef.reg ]] \
|| [[ ! -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"/system.reg ]] \
|| [[ ! -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"/user.reg ]]
then
pw_clear_pfx
check_dirs_and_files_in_pfx
pw_wineboot () {
print_info "Used wineboot $@ for prefix: ${PW_PREFIX_NAME}"
${pw_runtime} env GST_PLUGIN_SYSTEM_PATH_1_0="" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" \
"${WINELOADER}" wineboot $@ &>>"${PORT_WINE_TMP_PATH}/update_pfx_log"
wait_wineserver
print_info "The prefix has been updated."
}
if [[ "${PW_PREFIX_NAME}" == DEFAULT ]] ; then
pw_update_pfx_cover_gui
unpack_tar_xz "${PW_WINELIB}/default_pfx.tar.xz" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/" silent
pw_wineboot -u
elif [[ "${PW_CHECK_AUTOINSTAL}" == 1 ]] \
&& [[ "${DISABLE_CP_DEFPFX}" != 1 ]] ; then
pw_update_pfx_cover_gui
unpack_tar_xz "${PW_WINELIB}/default_pfx.tar.xz" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/" silent
pw_wineboot -u
elif yad_question "$loc_gui_dll_new_pfx ${PW_PREFIX_NAME}" ; then
pw_update_pfx_cover_gui
unpack_tar_xz "${PW_WINELIB}/default_pfx.tar.xz" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/" silent
pw_wineboot -u
else
pw_update_pfx_cover_gui
pw_wineboot -i
fi
else
check_dirs_and_files_in_pfx
if [[ ! -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.wine_ver" ]] \
|| ! grep "${PW_WINE_USE}" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.wine_ver" &>/dev/null
then
pw_update_pfx_cover_gui
# HOTFIX - update prefix for vkPlay
if echo "$portwine_exe" | grep -i vkplay &>/dev/null
then pw_kill_autostart GameCe 5 please & :
fi
pw_wineboot -u
fi
fi
echo "${PW_WINE_USE}" > "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.wine_ver"
# if [[ -f "$portwine_exe" ]] && [[ "${WARN_CYRILLIC_IN_PATH}" == 1 ]] ; then
# edit_db_from_gui WARN_CYRILLIC_IN_PATH
# unset WARN_CYRILLIC_IN_PATH
# fi
if [[ "$PW_USE_OBS_VKCAPTURE" == "1" ]] ; then
export OBS_VKCAPTURE="1"
export PW_USE_SYSTEM_VK_LAYERS="1"
print_warning "System mangohud, vkBasalt, obs-vk capture and other applications using vulkan layers are forcibly used."
fi
if [[ "${PW_NO_ESYNC}" == 1 ]] if [[ "${PW_NO_ESYNC}" == 1 ]]
then export WINEESYNC="0" then export WINEESYNC="0"
else export WINEESYNC="1" else export WINEESYNC="1"
...@@ -134,18 +179,6 @@ start_portwine () { ...@@ -134,18 +179,6 @@ start_portwine () {
export PW_USE_GAMESCOPE="0" export PW_USE_GAMESCOPE="0"
export PW_RUN_GAMESCOPE="" export PW_RUN_GAMESCOPE=""
fi fi
if [[ "${PW_DISABLE_COMPOSITING}" == "1" ]] ; then
if [[ "${DESKTOP_SESSION}" =~ "plasma" ]] ; then
qdbus org.kde.KWin /Compositor suspend
elif [[ "${DESKTOP_SESSION}" =~ "mate" ]] ; then
gsettings set org.mate.Marco.general compositing-manager false
elif [[ "${DESKTOP_SESSION}" =~ "xfce" ]] ; then
xfconf-query -c xfwm4 -p /general/use_compositing -s false
elif [[ "${DESKTOP_SESSION}" =~ "cinnamon" ]] ; then
gsettings set org.cinnamon.muffin unredirect-fullscreen-windows true
fi
fi
enabled_fake_nvidia_videocard () enabled_fake_nvidia_videocard ()
{ {
...@@ -222,8 +255,8 @@ start_portwine () { ...@@ -222,8 +255,8 @@ start_portwine () {
var_winedlloverride_update "nvngx,_nvngx=" var_winedlloverride_update "nvngx,_nvngx="
fi fi
if [[ "${PW_USE_GALLIUM_ZINK}" == 1 ]] ; then if [[ "${PW_USE_GALLIUM_ZINK}" == 1 ]]
export PW_VULKAN_USE=5 then export PW_VULKAN_USE=5
fi fi
if [[ "${PW_HEAP_DELAY_FREE}" == 1 ]] if [[ "${PW_HEAP_DELAY_FREE}" == 1 ]]
...@@ -265,36 +298,6 @@ start_portwine () { ...@@ -265,36 +298,6 @@ start_portwine () {
fi fi
fi fi
# if [[ "${PW_AMD_VULKAN_USE}" == "amdvlk" ]] ; then
# export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
# if grep -i -q -E '(rosa|redos|nobara|linuxmint|ubuntu|centos|rhel|fedora)' "/etc/os-release" ; then
# export VK_ICD_FILENAMES="/opt/amdgpu/etc/vulkan/icd.d/amd_icd32.json:/opt/amdgpu/etc/vulkan/icd.d/amd_icd64.json"
# elif grep -i -q "altlinux" '/etc/os-release' ; then
# export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/amd_icd.json"
# else
# export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/amd_icd32.json:/usr/share/vulkan/icd.d/amd_icd64.json"
# fi
# elif [[ "${PW_AMD_VULKAN_USE}" == "amdgpupro" ]] ; then
# export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
# if grep -i -q -E '(rosa|redos|nobara|linuxmint|ubuntu|centos|rhel|fedora)' "/etc/os-release" ; then
# export VK_ICD_FILENAMES="/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd32.json:/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd64.json"
# var_ld_library_path_update "/opt/amdgpu/libdrm/lib64:/opt/amdgpu/libdrm/lib32"
# else
# export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/amd_pro_icd32.json:/usr/share/vulkan/icd.d/amd_pro_icd64.json"
# fi
# elif [[ "${PW_AMD_VULKAN_USE}" == "radv" ]] ; then
# export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
# export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json"
# elif [[ "${PW_AMD_VULKAN_USE}" == "radv_aco" ]] ; then
# export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
# var_radv_perftest_config_update aco
# export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json"
# elif [[ "${PW_AMD_VULKAN_USE}" == "radv_gpl" ]] ; then
# export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
# var_radv_perftest_config_update gpl
# export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json"
# fi
case "$PW_FORCE_USE_VSYNC" in # 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT case "$PW_FORCE_USE_VSYNC" in # 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
0) 0)
export vblank_mode=0 export vblank_mode=0
...@@ -308,14 +311,15 @@ start_portwine () { ...@@ -308,14 +311,15 @@ start_portwine () {
unset vblank_mode __GL_SYNC_TO_VBLANK unset vblank_mode __GL_SYNC_TO_VBLANK
;; ;;
esac esac
export int_xneur=0 export int_xneur=0
if [[ ! -z "`pgrep xneur`" ]]; then if [[ ! -z "`pgrep xneur`" ]]; then
killall xneur killall xneur
export int_xneur=1 export int_xneur=1
fi fi
if [[ "$PW_USE_GAMEMODE" = "1" ]] ; then
if command -v gamemoded ; then if [[ "$PW_USE_GAMEMODE" = "1" ]] ; then
if command -v gamemoded &>/dev/null ; then
export GAMEMODERUN=1 export GAMEMODERUN=1
PW_GAMEMODERUN_SLR="gamemoderun" PW_GAMEMODERUN_SLR="gamemoderun"
systemctl enable --now --user gamemoded &>/dev/null systemctl enable --now --user gamemoded &>/dev/null
...@@ -342,110 +346,7 @@ start_portwine () { ...@@ -342,110 +346,7 @@ start_portwine () {
print_info "Gamemod is not installed or disabled in vars script or db file: PW_USE_GAMEMODE=$PW_USE_GAMEMODE" print_info "Gamemod is not installed or disabled in vars script or db file: PW_USE_GAMEMODE=$PW_USE_GAMEMODE"
fi fi
pw_other_fixes pw_other_fixes
check_dirs_and_files_in_pfx () {
create_new_dir "${WINEPREFIX}"
create_new_dir "${WINEPREFIX}/drive_c"
create_new_dir "${WINEPREFIX}/dosdevices"
create_new_dir "${WINEPREFIX}/drive_c/windows/syswow64/"
create_new_dir "${WINEPREFIX}/drive_c/windows/system32/"
create_new_dir "${WINEPREFIX}/drive_c/tmp/.private/$USER/"
create_new_dir "${WINEPREFIX}/drive_c/tmp/.private/steamuser/"
[ ! -d "${WINEPREFIX}/dosdevices/c:" ] && try_force_link_dir "${WINEPREFIX}/drive_c/" "${WINEPREFIX}/dosdevices/c:"
[ ! -d "${WINEPREFIX}/dosdevices/z:" ] && try_force_link_dir "/" "${WINEPREFIX}/dosdevices/z:"
[ ! -d "${WINEPREFIX}/dosdevices/h:" ] && try_force_link_dir "$HOME" "${WINEPREFIX}/dosdevices/h:"
create_new_dir "${WINEPREFIX}/drive_c/windows/Fonts/"
LN_FONTS="arialbd.ttf courbd.ttf georgia.ttf micross.ttf msyh.ttf simsun.ttc arial.ttf cour.ttf malgun.ttf msgothic.ttc nirmala.ttf times.ttf"
for link_font in $LN_FONTS ; do
if [[ ! -f "${WINEPREFIX}/drive_c/windows/Fonts/${link_font}" ]] ; then
try_force_link_file "${WINEDIR}/share/fonts/${link_font}" "${WINEPREFIX}/drive_c/windows/Fonts/"
fi
done
find "${WINEPREFIX}/dosdevices" -xtype l -maxdepth 1 2>/dev/null -exec rm {} \;
rm -f "${WINEPREFIX}/dosdevices/"*::
DRIVES=(d e f g i j k l m n o p q r s t u v w x y)
DEF_MOUNT_DIRS=('/media' "/media/$USER" '/mnt' '/run/media' "/run/media/$USER")
MOUNT_DIRS=($(find "${DEF_MOUNT_DIRS[@]}" -maxdepth 1 -type d 2>/dev/null | sort -u))
for drive_dir in "${MOUNT_DIRS[@]}" ; do
if [[ ! "${DEF_MOUNT_DIRS[@]}" =~ "$drive_dir" ]] \
&& ! realpath "${WINEPREFIX}/dosdevices"/*: | grep "$drive_dir" &>/dev/null ; then
drive_num=0
while [[ "$drive_num" -lt "${#DRIVES[@]}" ]] ; do
drive_path="${WINEPREFIX}/dosdevices/${DRIVES[$drive_num]}:"
if [ ! -d "$drive_path" ] ; then
ln -sf "$drive_dir" "$drive_path"
break
else
((drive_num++))
fi
done
fi
done
}
PROGPFX_URL="github.com/Castro-Fidel/PortWINE/releases/download/progpfx${PROGPFX_VER}/progpfx${PROGPFX_VER}.tar.xz"
if [[ "${PW_PREFIX_NAME}" == "PROGRAMS" && ! -f "${WINEPREFIX}"/.progpfx ]] ; then
print_info "Download and install PROGRAMS pfx..."
if try_download "${PROGPFX_URL}" "${PORT_WINE_PATH}/data/tmp/progpfx.tar.xz" ; then
unpack_tar_xz "${PORT_WINE_PATH}/data/tmp/progpfx.tar.xz" "${PORT_WINE_PATH}/data/prefixes/"
try_remove_file "${PORT_WINE_PATH}/data/tmp/progpfx.tar.xz"
else
try_remove_file "${PORT_WINE_PATH}/data/tmp/progpfx.tar.xz"
yad_error_download && exit 1
fi
fi
DOTPFX_URL="github.com/Castro-Fidel/PortWINE/releases/download/dotpfx${DOTPFX_VER}/dotpfx${DOTPFX_VER}.tar.xz"
if [[ "${PW_PREFIX_NAME}" == "DOTNET" ]] && [[ ! -f "${WINEPREFIX}"/.dotnet${DOTPFX_VER} ]] ; then
print_info "Download and install DOTNET pfx..."
if try_download "${DOTPFX_URL}" "${PORT_WINE_PATH}/data/tmp/dotpfx.tar.xz" ; then
unpack_tar_xz "${PORT_WINE_PATH}/data/tmp/dotpfx.tar.xz" "${PORT_WINE_PATH}/data/prefixes/"
try_remove_file "${PORT_WINE_PATH}/data/tmp/dotpfx.tar.xz"
else
try_remove_file "${PORT_WINE_PATH}/data/tmp/dotpfx.tar.xz"
yad_error_download && exit 1
fi
fi
pw_update_pfx_cover_gui
if [[ ! -d "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}" \
|| ! -d "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"/drive_c/windows \
|| ! -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"/userdef.reg \
|| ! -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"/system.reg \
|| ! -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"/user.reg ]]
then
pw_clear_pfx
check_dirs_and_files_in_pfx
if [[ -f "${PW_WINELIB}/default_pfx.tar.xz" ]] && [[ "${DISABLE_CP_DEFPFX}" != 1 ]] ; then
unpack_tar_xz "${PW_WINELIB}/default_pfx.tar.xz" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/" silent
fi
fi
echo "${PW_WINE_USE}" > "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.wine_ver"
check_dirs_and_files_in_pfx
create_new_dir "${WINEPREFIX}/drive_c/users/steamuser"
if [ ! -d "${WINEPREFIX}/drive_c/users/${USER}" ]; then
try_force_link_dir "${WINEPREFIX}/drive_c/users/steamuser" "${WINEPREFIX}/drive_c/users/${USER}"
fi
create_new_dir "${WINEPREFIX}/drive_c/users/Public/Documents/Steam"
create_new_dir "${WINEPREFIX}/drive_c/users/steamuser/Documents/Steam"
if [ ! -d "${WINEPREFIX}/drive_c/users/steamuser/My Documents" ]
then try_force_link_dir "${WINEPREFIX}/drive_c/users/steamuser/Documents" "${WINEPREFIX}/drive_c/users/steamuser/My Documents"
fi
create_new_dir "${WINEPREFIX}/drive_c/users/steamuser/AppData/Roaming"
if [ ! -d "${WINEPREFIX}/drive_c/users/steamuser/Application Data" ]
then try_force_link_dir "${WINEPREFIX}/drive_c/users/steamuser/AppData/Roaming" "${WINEPREFIX}/drive_c/users/steamuser/Application Data"
fi
create_new_dir "${WINEPREFIX}/drive_c/users/steamuser/AppData/Local"
create_new_dir "${WINEPREFIX}/drive_c/users/steamuser/Local Settings"
if [ ! -d "${WINEPREFIX}/drive_c/users/steamuser/Local Settings/Application Data" ]
then try_force_link_dir "${WINEPREFIX}/drive_c/users/steamuser/AppData/Local" "${WINEPREFIX}/drive_c/users/steamuser/Local Settings/Application Data"
fi
#enabled BattleEye_Runtime and EasyAntiCheat_Runtime #enabled BattleEye_Runtime and EasyAntiCheat_Runtime
if [[ "${PW_USE_EAC_AND_BE}" == 1 ]] ; then if [[ "${PW_USE_EAC_AND_BE}" == 1 ]] ; then
export PROTON_BATTLEYE_RUNTIME="${PW_PLUGINS_PATH}/BattlEye_Runtime" export PROTON_BATTLEYE_RUNTIME="${PW_PLUGINS_PATH}/BattlEye_Runtime"
...@@ -462,7 +363,10 @@ start_portwine () { ...@@ -462,7 +363,10 @@ start_portwine () {
unset PULSE_LATENCY_MSEC unset PULSE_LATENCY_MSEC
fi fi
if [[ "$PW_USE_US_LAYOUT" == "1" ]] && [[ "${XDG_SESSION_TYPE}" != "wayland" ]] && command -v setxkbmap &>/dev/null ; then if [[ "$PW_USE_US_LAYOUT" == "1" ]] \
&& [[ "${XDG_SESSION_TYPE}" != "wayland" ]] \
&& command -v setxkbmap &>/dev/null
then
setxkbmap -model pc101 us -print | xkbcomp - $DISPLAY &>/dev/null setxkbmap -model pc101 us -print | xkbcomp - $DISPLAY &>/dev/null
else else
export PW_USE_US_LAYOUT="0" export PW_USE_US_LAYOUT="0"
...@@ -692,6 +596,7 @@ start_portwine () { ...@@ -692,6 +596,7 @@ start_portwine () {
fi fi
done done
if [[ "${USE_WT_FROM_DB}" == "1" ]] ; then if [[ "${USE_WT_FROM_DB}" == "1" ]] ; then
pw_update_pfx_cover_gui
update_winetricks update_winetricks
echo "START WINETRICKS..." >> "${PORT_WINE_TMP_PATH}/update_pfx_log" echo "START WINETRICKS..." >> "${PORT_WINE_TMP_PATH}/update_pfx_log"
echo "Try to install DLL in prefix: ${PW_DLL_NEED_INSTALL}" >> "${PORT_WINE_TMP_PATH}/update_pfx_log" echo "Try to install DLL in prefix: ${PW_DLL_NEED_INSTALL}" >> "${PORT_WINE_TMP_PATH}/update_pfx_log"
...@@ -731,6 +636,20 @@ start_portwine () { ...@@ -731,6 +636,20 @@ start_portwine () {
if [[ -f "${PATH_TO_GAME}/dxvk.conf" ]] ; then if [[ -f "${PATH_TO_GAME}/dxvk.conf" ]] ; then
export DXVK_CONFIG_FILE="${PATH_TO_GAME}/dxvk.conf" export DXVK_CONFIG_FILE="${PATH_TO_GAME}/dxvk.conf"
fi fi
if [[ "${PW_DISABLE_COMPOSITING}" == "1" ]] \
&& ! check_gamescope_session
then
if [[ "${DESKTOP_SESSION}" =~ "plasma" ]] ; then
qdbus org.kde.KWin /Compositor suspend
elif [[ "${DESKTOP_SESSION}" =~ "mate" ]] ; then
gsettings set org.mate.Marco.general compositing-manager false
elif [[ "${DESKTOP_SESSION}" =~ "xfce" ]] ; then
xfconf-query -c xfwm4 -p /general/use_compositing -s false
elif [[ "${DESKTOP_SESSION}" =~ "cinnamon" ]] ; then
gsettings set org.cinnamon.muffin unredirect-fullscreen-windows true
fi
fi
} }
pw_run () { pw_run () {
......
...@@ -45,7 +45,7 @@ if [[ -f "${PORT_WINE_TMP_PATH}/tmp_main_gui_size" ]] && [[ ! -z "$(cat ${PORT_W ...@@ -45,7 +45,7 @@ if [[ -f "${PORT_WINE_TMP_PATH}/tmp_main_gui_size" ]] && [[ ! -z "$(cat ${PORT_W
export PW_MAIN_SIZE_H="$(cat ${PORT_WINE_TMP_PATH}/tmp_main_gui_size | awk '{print $2}')" export PW_MAIN_SIZE_H="$(cat ${PORT_WINE_TMP_PATH}/tmp_main_gui_size | awk '{print $2}')"
else else
export PW_MAIN_SIZE_W="1100" export PW_MAIN_SIZE_W="1100"
export PW_MAIN_SIZE_H="300" export PW_MAIN_SIZE_H="350"
fi fi
if [[ ! -z $(basename "${portwine_exe}" | grep .ppack) ]] ; then if [[ ! -z $(basename "${portwine_exe}" | grep .ppack) ]] ; then
...@@ -249,9 +249,9 @@ portwine_start_debug () { ...@@ -249,9 +249,9 @@ portwine_start_debug () {
sed -i '/.fx$/d' "${PORT_WINE_PATH}/${portname}.log" sed -i '/.fx$/d' "${PORT_WINE_PATH}/${portname}.log"
sed -i '/HACK_does_openvr_work/d' "${PORT_WINE_PATH}/${portname}.log" sed -i '/HACK_does_openvr_work/d' "${PORT_WINE_PATH}/${portname}.log"
sed -i '/Uploading is disabled/d' "${PORT_WINE_PATH}/${portname}.log" sed -i '/Uploading is disabled/d' "${PORT_WINE_PATH}/${portname}.log"
sed -i '/dlopen failed - libgamemode.so/d' "${PORT_WINE_PATH}/${portname}.log"
sed -i '/gamemodeauto: /d' "${PORT_WINE_PATH}/${portname}.log"
sed -i '/wine: RLIMIT_NICE is <= 20/d' "${PORT_WINE_PATH}/${portname}.log" sed -i '/wine: RLIMIT_NICE is <= 20/d' "${PORT_WINE_PATH}/${portname}.log"
sed -i '/ALT_2.24/d' "${PORT_WINE_PATH}/${portname}.log"
sed -i '/UDEV monitor/d' "${PORT_WINE_PATH}/${portname}.log"
deb_text=$(cat "${PORT_WINE_PATH}/${portname}.log" | awk '! a[$0]++') deb_text=$(cat "${PORT_WINE_PATH}/${portname}.log" | awk '! a[$0]++')
echo "$deb_text" > "${PORT_WINE_PATH}/${portname}.log" echo "$deb_text" > "${PORT_WINE_PATH}/${portname}.log"
"$pw_yad" --title="${portname}.log" --borders=${YAD_BORDERS} --no-buttons --text-align=center \ "$pw_yad" --title="${portname}.log" --borders=${YAD_BORDERS} --no-buttons --text-align=center \
...@@ -680,7 +680,7 @@ else ...@@ -680,7 +680,7 @@ else
export -f run_desktop_b_click export -f run_desktop_b_click
gui_clear_pfx () { gui_clear_pfx () {
if gui_question "${port_clear_pfx}" ; then if yad_question "${port_clear_pfx}" ; then
pw_clear_pfx pw_clear_pfx
print_info "Restarting PP after clearing prefix..." print_info "Restarting PP after clearing prefix..."
export SKIP_CHECK_UPDATES=1 export SKIP_CHECK_UPDATES=1
...@@ -691,7 +691,7 @@ else ...@@ -691,7 +691,7 @@ else
export -f gui_clear_pfx export -f gui_clear_pfx
gui_rm_portproton () { gui_rm_portproton () {
if gui_question "${port_del2}" ; then if yad_question "${port_del2}" ; then
rm -fr "${PORT_WINE_PATH}" rm -fr "${PORT_WINE_PATH}"
rm -fr "${PORT_WINE_TMP_PATH}" rm -fr "${PORT_WINE_TMP_PATH}"
rm -fr "${HOME}/PortWINE" rm -fr "${HOME}/PortWINE"
...@@ -847,20 +847,16 @@ else ...@@ -847,20 +847,16 @@ else
# --field=" Bethesda.net Launcher"!"$PW_GUI_ICON_PATH/bethesda.png"!"":"FBTN" '@bash -c "button_click PW_BETHESDA"' # --field=" Bethesda.net Launcher"!"$PW_GUI_ICON_PATH/bethesda.png"!"":"FBTN" '@bash -c "button_click PW_BETHESDA"'
# --field=" ROBLOX"!"$PW_GUI_ICON_PATH/roblox.png"!"":"FBTN" '@bash -c "button_click PW_ROBLOX"' # --field=" ROBLOX"!"$PW_GUI_ICON_PATH/roblox.png"!"":"FBTN" '@bash -c "button_click PW_ROBLOX"'
# --field=" DuckStation"!"$PW_GUI_ICON_PATH/duckstation.png"!"${loc_duckstation}":"FBTN" '@bash -c "button_click PW_DUCKSTATION"' # if command -v wmctrl &>/dev/null ; then
# --field=" ScummVM"!"$PW_GUI_ICON_PATH/scummvm.png"!"${loc_scummvm}":"FBTN" '@bash -c "button_click PW_SCUMMVM"' # sleep 2
# --field=" Rpcs3"!"$PW_GUI_ICON_PATH/rpcs3.png"!"${loc_rpcs3}":"FBTN" '@bash -c "button_click PW_RPCS3"' # while [[ -n $(pgrep -a yad_v12_3 | head -n 1 | awk '{print $1}' 2>/dev/null) ]] ; do
# sleep 2
if [[ `command -v wmctrl` ]] &>/dev/null ; then # PW_MAIN_GUI_SIZE_TMP="$(wmctrl -lG | grep "PortProton-${install_ver}" | awk '{print $5" "$6}' 2>/dev/null)"
sleep 2 # if [[ ! -z "${PW_MAIN_GUI_SIZE_TMP}" ]] ; then
while [[ $(pgrep -a yad_v12_3 | head -n 1 | awk '{print $1}' 2>/dev/null) ]] ; do # echo "${PW_MAIN_GUI_SIZE_TMP}" > "${PORT_WINE_TMP_PATH}/tmp_main_gui_size"
sleep 2 # fi
PW_MAIN_GUI_SIZE_TMP="$(wmctrl -lG | grep PortProton-1.0 | awk '{print $5" "$6}' 2>/dev/null)" # done
if [[ ! -z "${PW_MAIN_GUI_SIZE_TMP}" ]] ; then # fi &
echo "${PW_MAIN_GUI_SIZE_TMP}" > "${PORT_WINE_TMP_PATH}/tmp_main_gui_size"
fi
done
fi &
export START_FROM_PP_GUI=1 export START_FROM_PP_GUI=1
......
#!/usr/bin/env bash #!/usr/bin/env bash
#Author: Castro-Fidel (linux-gaming.ru) #Author: Castro-Fidel (linux-gaming.ru)
#SCRIPTS_NEXT_VERSION=2256 #SCRIPTS_NEXT_VERSION=2257
######################################################################## ########################################################################
export PW_MANGOHUD="0" export PW_MANGOHUD="0"
export DEFAULT_MANGOHUD_CONFIG="cpu_stats,cpu_temp,cpu_mhz,gpu_stats,gpu_temp,gpu_core_clock,gpu_mem_clock,vulkan_driver,gpu_name,vram,ram,frame_timing=1,time,arch,wine,toggle_hud=Shift_R+F12,resolution,vkbasalt,gamemode" export DEFAULT_MANGOHUD_CONFIG="cpu_stats,cpu_temp,cpu_mhz,gpu_stats,gpu_temp,gpu_core_clock,gpu_mem_clock,vulkan_driver,gpu_name,vram,ram,frame_timing=1,time,arch,wine,toggle_hud=Shift_R+F12,resolution,vkbasalt,gamemode"
...@@ -60,7 +60,7 @@ export PW_MUST_WINEDLLOVERRIDES="steam_api,steam_api64,steamclient,steamclient64 ...@@ -60,7 +60,7 @@ export PW_MUST_WINEDLLOVERRIDES="steam_api,steam_api64,steamclient,steamclient64
################################################################# #################################################################
export DXVK_CONFIG_FILE="${PORT_WINE_PATH}/data/dxvk.conf" export DXVK_CONFIG_FILE="${PORT_WINE_PATH}/data/dxvk.conf"
################################################################# #################################################################
pw_install_dll_in_prefix () pw_list_install_dll_in_prefix ()
{ {
case $PW_PREFIX_NAME in case $PW_PREFIX_NAME in
DEFAULT) export PW_MUST_HAVE_DLL="d3dx9 d3dcompiler_43 physx mfc42 vcrun2022 sandbox" ;; DEFAULT) export PW_MUST_HAVE_DLL="d3dx9 d3dcompiler_43 physx mfc42 vcrun2022 sandbox" ;;
......
...@@ -36,7 +36,7 @@ yad_error_download () { ...@@ -36,7 +36,7 @@ yad_error_download () {
[[ "$?" != 0 ]] && return 1 || return 0 [[ "$?" != 0 ]] && return 1 || return 0
} }
gui_question () { yad_question () {
if [[ ! -f "${pw_yad_v12_3}" ]] ; then if [[ ! -f "${pw_yad_v12_3}" ]] ; then
local pw_yad_v12_3="yad" local pw_yad_v12_3="yad"
command -v "${pw_yad_v12_3}" &>/dev/null || fatal "yad not found" command -v "${pw_yad_v12_3}" &>/dev/null || fatal "yad not found"
...@@ -73,14 +73,14 @@ pw_start_progress_bar_cover_block () { ...@@ -73,14 +73,14 @@ pw_start_progress_bar_cover_block () {
} }
pw_update_pfx_cover_gui () { pw_update_pfx_cover_gui () {
if ! check_start_from_steam ; then if ! check_start_from_steam && ! pgrep -a yad | grep "yad_v12_3 --notebook --key=$PW_KEY_PROGRESS_BAR_UP" &>/dev/null ; then
PW_KEY_PROGRESS_BAR=$RANDOM PW_KEY_PROGRESS_BAR_UP=$RANDOM
PW_GIF_FILE="${PW_GUI_ICON_PATH}/covers/update_prefix_${update_loc}.gif" PW_GIF_FILE="${PW_GUI_ICON_PATH}/covers/update_prefix_${update_loc}.gif"
PW_GIF_SIZE_X=`file "${PW_GIF_FILE}" | awk '{print $7 + 40}'` PW_GIF_SIZE_X=`file "${PW_GIF_FILE}" | awk '{print $7 + 40}'`
PW_GIF_SIZE_Y=`file "${PW_GIF_FILE}" | awk '{print $9 + 80}'` PW_GIF_SIZE_Y=`file "${PW_GIF_FILE}" | awk '{print $9 + 80}'`
echo "UPDATE PREFIX..." > "${PORT_WINE_TMP_PATH}/update_pfx_log" echo "UPDATE PREFIX..." > "${PORT_WINE_TMP_PATH}/update_pfx_log"
export PW_TIMER=0 export PW_TIMER=0
while read -r line || [[ ! -z `pgrep -a yad | grep "yad_v12_3 --notebook --key="$PW_KEY_PROGRESS_BAR"" | awk '{print $1}'` ]] ; do while read -r line || [[ ! -z `pgrep -a yad | grep "yad_v12_3 --notebook --key=$PW_KEY_PROGRESS_BAR_UP" | awk '{print $1}'` ]] ; do
sleep 0.005 sleep 0.005
if [[ ! -z "${line}" ]] && [[ -z "`echo "${line}" | grep -i "gstreamer"`" ]] \ if [[ ! -z "${line}" ]] && [[ -z "`echo "${line}" | grep -i "gstreamer"`" ]] \
&& [[ -z "`echo "${line}" | grep -i "kerberos"`" ]] \ && [[ -z "`echo "${line}" | grep -i "kerberos"`" ]] \
...@@ -92,10 +92,10 @@ pw_update_pfx_cover_gui () { ...@@ -92,10 +92,10 @@ pw_update_pfx_cover_gui () {
sleep 3 sleep 3
PW_TIMER=1 PW_TIMER=1
fi fi
done < "${PORT_WINE_TMP_PATH}/update_pfx_log" | "${pw_yad_v12_3}" --plug=$PW_KEY_PROGRESS_BAR --tabnum="2" --text-info --tail 2>/dev/null & done < "${PORT_WINE_TMP_PATH}/update_pfx_log" | "${pw_yad_v12_3}" --plug=$PW_KEY_PROGRESS_BAR_UP --tabnum="2" --text-info --tail 2>/dev/null &
"${pw_yad_v12_3}" --plug=$PW_KEY_PROGRESS_BAR --tabnum="1" --picture --filename="${PW_GIF_FILE}" --image-on-top 2>/dev/null & "${pw_yad_v12_3}" --plug=$PW_KEY_PROGRESS_BAR_UP --tabnum="1" --picture --filename="${PW_GIF_FILE}" --image-on-top 2>/dev/null &
"${pw_yad_v12_3}" --notebook --key="$PW_KEY_PROGRESS_BAR" --tab=LOGO --tab=TERMINAL --no-buttons --undecorated \ "${pw_yad_v12_3}" --notebook --key="$PW_KEY_PROGRESS_BAR_UP" --tab=LOGO --tab=TERMINAL --no-buttons --undecorated \
--center --auto-close --skip-taskbar --width=$PW_GIF_SIZE_X --height=$PW_GIF_SIZE_Y --tab-pos=bottom 2>/dev/null & --center --auto-close --skip-taskbar --width=$PW_GIF_SIZE_X --height=$PW_GIF_SIZE_Y --tab-pos=bottom 2>/dev/null &
export PW_YAD_PID_PFX_COVER_UI="$!" export PW_YAD_PID_PFX_COVER_UI="$!"
return 0 return 0
...@@ -452,7 +452,7 @@ gui_proton_downloader () { ...@@ -452,7 +452,7 @@ gui_proton_downloader () {
if unpack_tar_${archive_type} "${PORT_WINE_PATH}/data/tmp/${PW_WINE_ARCHIVE}.tar.${archive_type}" "${PORT_WINE_PATH}/data/dist/" ; then if unpack_tar_${archive_type} "${PORT_WINE_PATH}/data/tmp/${PW_WINE_ARCHIVE}.tar.${archive_type}" "${PORT_WINE_PATH}/data/dist/" ; then
try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_WINE_ARCHIVE}.tar.${archive_type}" try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_WINE_ARCHIVE}.tar.${archive_type}"
if [ ! -z "${portwine_exe}" ]; then if [ ! -z "${portwine_exe}" ]; then
PW_WINE_USE=${VERSION_WINE_GIT} PW_WINE_USE="$(echo ${VERSION_WINE_GIT} | tr [[:lower:]] [[:upper:]])"
edit_db_from_gui PW_WINE_USE edit_db_from_gui PW_WINE_USE
fi fi
else else
...@@ -468,6 +468,7 @@ gui_proton_downloader () { ...@@ -468,6 +468,7 @@ gui_proton_downloader () {
if [[ "$1" != "silent" ]] ; then if [[ "$1" != "silent" ]] ; then
export SKIP_CHECK_UPDATES=1 export SKIP_CHECK_UPDATES=1
edit_db_from_gui
/usr/bin/env bash -c ${pw_full_command_line[*]} & /usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0 exit 0
else else
...@@ -765,7 +766,7 @@ portwine_create_shortcut () { ...@@ -765,7 +766,7 @@ portwine_create_shortcut () {
"${PORT_SCRIPTS_PATH}/add_in_steam.sh" "${PORT_SCRIPTS_PATH}/add_in_steam.sh"
done done
if [[ "${PW_SKIP_RESTART_STEAM}" != 1 ]] && pgrep -i steam &>/dev/null ; then if [[ "${PW_SKIP_RESTART_STEAM}" != 1 ]] && pgrep -i steam &>/dev/null ; then
if gui_question "$sc_restert_steam" ; then if yad_question "$sc_restert_steam" ; then
pw_start_progress_bar_block "Restarting STEAM... Please wait." pw_start_progress_bar_block "Restarting STEAM... Please wait."
kill -s SIGTERM $(pgrep -a steam) &>/dev/null kill -s SIGTERM $(pgrep -a steam) &>/dev/null
while pgrep -i steam &>/dev/null ; do while pgrep -i steam &>/dev/null ; do
......
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