Commit 2dd5edb0 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Scripts version 2092

parent 79cc8e6c
......@@ -2,6 +2,14 @@ You can help us in the development of the project on the website: https://boosty
-----------------------------------------
Changelog:
###Scripts version 2092###
* added separation of WINE and PORTPROTON settings in the main interface
* added quick creation of backup copies of assembly scripts before updating them (SCRIPTS FROM BACKUP in the PORTPROTON SETTINGS tab)
* other minor scripting improvements included in PortProton v1.0 release
###Scripts version 2091###
* RELEASE PORTPROTON v.1.0
###Scripts version 2086 - 2090###
* HOTFIX - fixed creation of symbolic links
......
......@@ -2,6 +2,11 @@
-----------------------------------------
История изменений:
###Scripts version 2092###
* добавлено разделение настроек WINE и PORTPROTON в основном интерфейсе
* добавлено автоматическое создание резервных копий установленных скриптов, перед их обновлением (востановление копий реализовано в SCRIPTS FROM BACKUP во вкладке PORTPROTON SETTINGS)
* прочие небольшие улучшения скриптов связанных с релизом PortProton v1.0
###Scripts version 2091###
* RELEASE PORTPROTON v.1.0
......
......@@ -171,19 +171,19 @@ var_vkd3d_config_update () {
unpack_tar_xz () {
set -o pipefail
tar -Jxvf "$1" -C "$2" | sszen
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File unpacking error." && return 1 || return 0
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0
}
unpack_tar_gz () {
set -o pipefail
tar -xzvf "$1" -C "$2" | sszen
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File unpacking error." && return 1 || return 0
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0
}
unpack_tar () {
set -o pipefail
tar -xvf "$1" -C "$2" | sszen
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File unpacking error." && return 1 || return 0
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0
}
pw_mangohud_check () {
......@@ -625,7 +625,12 @@ pw_port_update () {
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
if unpack_tar_gz "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz" "${PORT_WINE_TMP_PATH}" ; then
if unpack_tar_gz "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz" "${PORT_WINE_TMP_PATH}"
then
create_new_dir "${PORT_WINE_TMP_PATH}/scripts_backup"
cd "${PORT_WINE_PATH}/data/"
tar -czpf "${PORT_WINE_TMP_PATH}/scripts_backup/scripts_v.${scripts_install_ver}.tar.gz" ./scripts ./img \
./changelog* ./dxvk.conf ./vkBasalt.conf ./tmp/scripts_ver
cp -fr "${PORT_WINE_TMP_PATH}/PortWINE-master/data_from_portwine/"* "${PORT_WINE_PATH}/data/"
try_remove_file "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz"
try_remove_dir "${PORT_WINE_TMP_PATH}/PortWINE-master/"
......
......@@ -621,6 +621,10 @@ export PW_WINELIB="${PORT_WINE_TMP_PATH}/libs${PW_LIBS_VER}"
try_remove_dir "${PW_WINELIB}/var"
export PW_GUI_ICON_PATH="${PORT_WINE_PATH}/data/img/gui"
export install_ver=`cat "${PORT_WINE_TMP_PATH}/${portname}_ver" | head -n 1`
if [[ "${install_ver}" == 97 ]] ; then
export install_ver="1.0"
echo "1.0" > "${PORT_WINE_TMP_PATH}/${portname}_ver"
fi
export WINETRICKS_DOWNLOADER="curl"
export USER_CONF="${PORT_WINE_PATH}/data/user.conf"
check_user_conf
......
......@@ -423,8 +423,28 @@ else
}
export -f gui_open_user_conf
gui_open_scripts_from_backup () {
cd "${PORT_WINE_TMP_PATH}/scripts_backup/"
PW_SCRIPT_FROM_BACKUP=`"${pw_yad_new}" --file --borders=5 --width=650 --height=500 --auto-close --center \
--window-icon="$PW_GUI_ICON_PATH/port_proton.png" --title "SCRIPTS FROM BACKUP" --file-filter="backup_scripts|scripts_v*.tar.gz"`
YAD_STATUS="$?"
if [[ "$YAD_STATUS" == "1" || "$YAD_STATUS" == "252" ]] ; then exit 0 ; fi
unpack_tar_gz "$PW_SCRIPT_FROM_BACKUP" "${PORT_WINE_PATH}/data/"
echo "0" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
}
export -f gui_open_scripts_from_backup
export KEY=$RANDOM
"${pw_yad_new}" --plug=${KEY} --tabnum=3 --columns=4 --align-buttons --form --separator=";" \
"${pw_yad_new}" --plug=${KEY} --tabnum=4 --columns=3 --align-buttons --form --separator=";" \
--field=" REMOVE PORTPROTON"!""!"":"FBTN" '@bash -c "button_click gui_rm_portproton"' \
--field=" UPDATE PORTPROTON"!""!"":"FBTN" '@bash -c "button_click gui_pw_update"' \
--field=" CHANGELOG"!""!"":"FBTN" '@bash -c "button_click open_changelog"' \
--field=" EDIT USER.CONF"!""!"":"FBTN" '@bash -c "button_click gui_open_user_conf"' \
--field=" SCRIPTS FROM BACKUP"!""!"":"FBTN" '@bash -c "button_click gui_open_scripts_from_backup"' &
"${pw_yad_new}" --plug=${KEY} --tabnum=3 --columns=3 --align-buttons --form --separator=";" \
--field=" 3D API : :CB" "VULKAN (DXVK and VKD3D)!VULKAN (WINE DXGI)!OPENGL" \
--field=" PREFIX : :CBE" "${PW_ADD_PREFIXES_TO_GUI}" \
--field=" WINE : :CB" "${PW_DEFAULT_WINE_USE}" \
......@@ -436,11 +456,7 @@ else
--field=' WINEREG'!""!"${loc_winereg}":"FBTN" '@bash -c "button_click WINEREG"' \
--field=' WINETRICKS'!""!"${loc_winetricks}":"FBTN" '@bash -c "button_click WINETRICKS"' \
--field=" WINE UNINSTALLER"!""!"":"FBTN" '@bash -c "button_click gui_wine_uninstaller"' \
--field=" CLEAR PREFIX"!""!"":"FBTN" '@bash -c "button_click gui_clear_pfx"' \
--field=" EDIT USER.CONF"!""!"":"FBTN" '@bash -c "button_click gui_open_user_conf"' \
--field=" REMOVE PORTPROTON"!""!"":"FBTN" '@bash -c "button_click gui_rm_portproton"' \
--field=" UPDATE PORTPROTON"!""!"":"FBTN" '@bash -c "button_click gui_pw_update"' \
--field=" CHANGELOG"!""!"":"FBTN" '@bash -c "button_click open_changelog"' &> "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" &
--field=" CLEAR PREFIX"!""!"":"FBTN" '@bash -c "button_click gui_clear_pfx"' &> "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" &
"${pw_yad_new}" --plug=$KEY --tabnum=2 --form --columns=3 --align-buttons --keep-icon-size --scroll \
--field=" Dolphin 5.0"!"$PW_GUI_ICON_PATH/dolphin.png"!"":"FBTN" '@bash -c "button_click PW_DOLPHIN"' \
......@@ -474,9 +490,9 @@ else
--field=" Gameforge Client"!"$PW_GUI_ICON_PATH/gameforge.png"!"":"FBTN" '@bash -c "button_click PW_GAMEFORGE"' \
--field=" ITCH.IO"!"$PW_GUI_ICON_PATH/itch.png"!"":"FBTN" '@bash -c "button_click PW_ITCH"' &
"${pw_yad_new}" --key=$KEY --notebook --borders=5 --width=1000 --height=235 --no-buttons --auto-close \
"${pw_yad_new}" --key=$KEY --notebook --borders=5 --width=1000 --height=235 --no-buttons --auto-close --center \
--window-icon="$PW_GUI_ICON_PATH/port_proton.png" --title "${portname}-${install_ver} (${scripts_install_ver})" \
--tab-pos=bottom --tab="AUTOINSTALL"!""!"" --tab="EMULATORS"!""!"" --tab="SETTINGS"!""!"" --center
--tab-pos=bottom --tab="AUTOINSTALL"!""!"" --tab="EMULATORS"!""!"" --tab=" WINE SETTINGS"!""!"" --tab=" PORPROTON SETTINGS"!""!""
YAD_STATUS="$?"
if [[ "$YAD_STATUS" == "1" || "$YAD_STATUS" == "252" ]] ; then exit 0 ; fi
......@@ -541,6 +557,7 @@ case "$PW_YAD_SET" in
gui_rm_portproton) gui_rm_portproton ;;
gui_pw_update) gui_pw_update ;;
gui_proton_downloader) gui_proton_downloader ;;
gui_open_scripts_from_backup) gui_open_scripts_from_backup ;;
open_changelog) open_changelog ;;
120) gui_vkBasalt ;;
PW_*) pw_autoinstall_from_db ;;
......
#!/bin/env bash
#Author: Castro-Fidel (PortWINE-Linux.ru)
#SCRIPTS_NEXT_VERSION=2091
#SCRIPTS_NEXT_VERSION=2092
#PORT_NEXT_VERSION=97
########################################################################
export PW_MANGOHUD=1
......
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