Commit 07aee4d8 authored by aldiserg's avatar aldiserg

installed tab has been added

parent 5be084cf
......@@ -803,18 +803,24 @@ gui_proton_downloader () {
sed -i "/${INSTALLING_VERSION_IN_DIST}$/Id" "${PORT_WINE_TMP_PATH}/tmp_proton_pw_git"
done
pw_stop_progress_bar
#Installed wine
ls -l ${PORT_WINE_PATH}/data/dist | awk '{print $9}' | sed '/^$/d' > ${PORT_WINE_TMP_PATH}/tmp_installed_wine
#GUI
export KEY_WINE=$RANDOM
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_proton_pw_set"
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_proton_set"
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_installed_wine_set"
`"${pw_yad}" --plug=$KEY_WINE --tabnum=2 --list --cheklist --separator="" --listen \
--column "Select WINE for download:" < "${PORT_WINE_TMP_PATH}/tmp_proton_pw_git" 1> "${PORT_WINE_TMP_PATH}/tmp_proton_pw_set"` &
`"${pw_yad}" --plug=$KEY_WINE --tabnum=1 --list --cheklist --separator="" --listen \
--column "Select WINE for download:" < "${PORT_WINE_TMP_PATH}/tmp_proton_ge_git" 1> "${PORT_WINE_TMP_PATH}/tmp_proton_set"` &
`"${pw_yad}" --plug=$KEY_WINE --tabnum=3 --list --cheklist --separator="" --listen \
--column "Select installed WINE for delete:" < "${PORT_WINE_TMP_PATH}/tmp_installed_wine" 1> "${PORT_WINE_TMP_PATH}/tmp_installed_wine_set"` &
`"${pw_yad}" --key=$KEY_WINE --notebook --width=500 --height=600 --text-align=center --center \
--window-icon="$PW_GUI_ICON_PATH/port_proton.png" --title "Download..." --separator="" \
--tab-pos=top --tab="PROTON-GE" --tab="PROTON-PW"`
--tab-pos=top --tab="PROTON-GE" --tab="PROTON-PW" --tab="Installed"`
YAD_WINE_STATUS="$?"
if [[ "$YAD_WINE_STATUS" == "1" || "$YAD_WINE_STATUS" == "252" ]] ; then
/bin/bash -c ${pw_full_command_line[*]} &
......@@ -825,35 +831,46 @@ gui_proton_downloader () {
export VERSION_WINE_GIT="`cat "${PORT_WINE_TMP_PATH}/tmp_proton_set"`"
elif [ ! -z `cat "${PORT_WINE_TMP_PATH}/tmp_proton_pw_set" | awk '{print $1}'` ] ; then
export VERSION_WINE_GIT="`cat "${PORT_WINE_TMP_PATH}/tmp_proton_pw_set"`"
elif [ ! -z `cat "${PORT_WINE_TMP_PATH}/tmp_installed_wine_set" | awk '{print $1}'` ] ; then
export VERSION_INSTALLED_WINE="`cat "${PORT_WINE_TMP_PATH}/tmp_installed_wine_set"`"
fi
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_proton_ge_git"
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_proton_pw_git"
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_proton_set"
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_installed_wine"
for GIVE_WINE_URL in ${PROTON_GE_GIT[@]} ${PROTON_PW_GIT[@]} ; do
if [ ! -z `echo ${GIVE_WINE_URL} | grep "$VERSION_WINE_GIT"` ] ; then
export URL_VERSION_PROTON_GIT="${GIVE_WINE_URL}"
fi
done
if [[ ${VERSION_INSTALLED_WINE} ]]; then
try_remove_dir "${PORT_WINE_PATH}/data/dist/${VERSION_INSTALLED_WINE}"
unset VERSION_INSTALLED_WINE
gui_proton_downloader
exit 0
fi
print_info "Download and install ${VERSION_WINE_GIT}..."
if try_download_to_path "${URL_VERSION_PROTON_GIT}" "${PORT_WINE_PATH}/data/tmp/" ; then
for archive_type in "gz" "xz" ; do
if [ -f "${PORT_WINE_PATH}/data/tmp/${VERSION_WINE_GIT}.tar.${archive_type}" ] ; then
if unpack_tar_${archive_type} "${PORT_WINE_PATH}/data/tmp/${VERSION_WINE_GIT}.tar.${archive_type}" "${PORT_WINE_PATH}/data/dist/" ; then
for archive_type in "gz" "xz" ; do
if [ -f "${PORT_WINE_PATH}/data/tmp/${VERSION_WINE_GIT}.tar.${archive_type}" ] ; then
if unpack_tar_${archive_type} "${PORT_WINE_PATH}/data/tmp/${VERSION_WINE_GIT}.tar.${archive_type}" "${PORT_WINE_PATH}/data/dist/" ; then
try_remove_file "${PORT_WINE_PATH}/data/tmp/${VERSION_WINE_GIT}.tar.${archive_type}"
else
try_remove_file "${PORT_WINE_PATH}/data/tmp/${VERSION_WINE_GIT}.tar.${archive_type}"
else
try_remove_file "${PORT_WINE_PATH}/data/tmp/${VERSION_WINE_GIT}.tar.${archive_type}"
try_remove_dir "${PORT_WINE_PATH}/data/dist/${VERSION_WINE_GIT}"
zenity_error_download && gui_proton_downloader
fi
fi
try_remove_dir "${PORT_WINE_PATH}/data/dist/${VERSION_WINE_GIT}"
zenity_error_download && gui_proton_downloader
fi
fi
done
else
zenity_error_download && gui_proton_downloader
fi
/bin/bash -c ${pw_full_command_line[*]} &
else
zenity_error_download && gui_proton_downloader
fi
/bin/bash -c ${pw_full_command_line[*]} &
exit 0
}
export -f gui_proton_downloader
......
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