Commit bce579bf authored by Mikhail Tergoev's avatar Mikhail Tergoev

###Scripts version 2012###

parent f869816c
File mode changed from 100644 to 100755
......@@ -2,10 +2,24 @@
-----------------------------------------
В планах:
* добавить проверку количества db файлов на один exe
* перенести скрипты установки порта на github
* добавить комментарии описывающие функционал скриптов и db файлов
* заниматься только развитием проекта за счет вашей подписки на https://boosty.to/portwine-linux.ru
-----------------------------------------
###PortProton-97### 17.09.2021
* глобальное обновление установщика порта и его перенос на github
###PortProton-96### 16.09.2021 ###Scripts version 2012### --- TEST ---
* PortProton переведен в режим обновлений "rolling release":
- проверка и обновление скриптов в приоритете перед другими обновлениями
- создана ветка https://github.com/Castro-Fidel/wine_builds/releases
- реализован функционал позволяющий добавлять любую версию WINE/PROTON/GE/LUTRIS в каталог dist и эта версия автоматически появиться при выборе в графическом интерфейсе
- обновлен скрипт установки порта
* проверка версии PortProton перенесена с ftp на github
* в функциях скачивания увеличено время тайм-аута с 2 до 20
* продолжение подготовки к переносу League Of Legends в PortProton
* возвращена переменная "WINEDLLPATH"
* отключены по умолчанию библиотеки: lsteamclient, GameOverlayRenderer, GameOverlayRenderer64
###Scripts version 2011###
* в GUI AUTOINSTALL добавлены лаунчеры GAMEFORGE (TEST), ANKAMA и GLYPH - Спасибо chal55rus (Sergey P.)!
* удален скрипт autoinstall и создан каталог pw_autoinstall (для удобного добавления новых автоустановщиков)
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -78,14 +78,14 @@ try_force_link_dir () {
try_download () {
set -o pipefail
wget -c -t 5 -T 2 "$1" --output-document="$2" 2>&1 | \
wget -c -t 5 -T 20 "$1" --output-document="$2" 2>&1 | \
sed -u 's/.* \([0-9]\+%\)\ \+\([0-9,.]\+.\) \(.*\)/\1\n#Downloading at \1\/, \2\/s, ETA \3/; s/^20[0-9][0-9].*/#Done./' | \
zenity --progress --percentage=0 --title="Download $(basename $1)" --text=Starting... --auto-close --auto-kill --width=500 --height=90
[ "${PIPESTATUS[0]}" != 0 ] && print_error "failed to download $1. Scipping." && return 1 || return 0
}
try_download_silent () {
wget -c -t 5 -T 2 "$1" --output-document="$2"
wget -c -t 5 -T 20 "$1" --output-document="$2"
[ "$?" != 0 ] && print_error "failed to download $1. Scipping." && return 1 || return 0
}
......@@ -125,6 +125,12 @@ unpack_tar_gz () {
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File 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
}
pw_mangohud_check () {
export RUN_MANGOHUD=""
if [ "${PW_MANGOHUD}" == "1" ] ; then
......@@ -205,11 +211,8 @@ check_user_conf () {
}
init_wine_ver () {
if [ ! -z "${PW_WINE_VER}" ] && [ `echo "${PW_WINE_VER}" | grep "PROTON_GE"` ]
then export PW_WINE_USE=proton_ge
elif [ ! -z "${PW_WINE_VER}" ] && [ `echo "${PW_WINE_VER}" | grep "PROTON_STEAM"` ]
then export PW_WINE_USE=proton_steam
fi
[ ! -z "${PW_WINE_VER}" ] && export PW_WINE_USE=`echo "${PW_WINE_VER}" | tr [[:lower:]] [[:upper:]]`
[ ! -z "${PW_WINE_USE}" ] && export PW_WINE_USE=`echo "${PW_WINE_USE}" | tr [[:lower:]] [[:upper:]]`
unset PW_WINE_VER
export WINEDIR="${PORT_WINE_PATH}/data/dist/${PW_WINE_USE}"
export GST_PLUGIN_SYSTEM_PATH_1_0="${WINEDIR}/lib64/gstreamer-1.0:${WINEDIR}/lib/gstreamer-1.0"
......@@ -234,6 +237,27 @@ init_wine_ver () {
then export PATH="${WINEDIR}/bin:${PATH}"
else export PATH="${WINEDIR}/bin"
fi
if [ -d "${WINEDIR}/files" ] ; then
chmod -R 755 "${WINEDIR}"
for clear_dist_files in `ls "${WINEDIR}" | sed -e "s/^files$//g" | sed -e "s/^version$//g"` ; do
rm -fr "${WINEDIR}/$clear_dist_files"
done
mv -f "${WINEDIR}/files"/* "${WINEDIR}/"
rm -fr "${WINEDIR}/files"
elif [ -f "${WINEDIR}/proton_dist.tar" ] ; then
unpack_tar "${WINEDIR}/proton_dist.tar" "${WINEDIR}/"
for clear_dist_files in `ls "${WINEDIR}" | sed -e "s/^bin$//g" | sed -e "s/^lib$//g" | sed -e "s/^lib64$//g" | sed -e "s/^share$//g" | sed -e "s/^version$//g"` ; do
rm -fr "${WINEDIR}/$clear_dist_files"
done
fi
for copy_proton_dll in "dxvk" "vkd3d-proton" ; do
if [ ! -d "${WINEDIR}/lib/wine/${copy_proton_dll}/" ] ; then
try_copy_dir "${PORT_WINE_PATH}/data/dist/PROTON_STEAM/lib/wine/${copy_proton_dll}" "${WINEDIR}/lib/wine/"
try_copy_dir "${PORT_WINE_PATH}/data/dist/PROTON_STEAM/lib64/wine/${copy_proton_dll}" "${WINEDIR}/lib64/wine/"
fi
done
}
cabextract_fix () {
......@@ -445,35 +469,33 @@ pw_tray_icon () {
pw_init_db () {
if [ ! -z "${portwine_exe}" ]; then
export PORTWINE_DB=`echo "${portwine_exe}" | awk -F '/' 'NF>1{print $NF}' | sed s/".exe"/""/gi`
# export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
# export WIN_PATH_TO_GAME=`echo "C:${PATH_TO_GAME}" | sed "s%$WINEPREFIX%%g" | sed "s/drive_c//g" | sed 's#/#\\\#g'`
fi
if [ ! -z "${PORTWINE_DB}" ]; then
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."
else
. "${PORT_SCRIPTS_PATH}/portwine_db/default"
echo "Use default db file."
fi
init_wine_ver
fi
fi
init_wine_ver
# export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
# export WIN_PATH_TO_GAME=`echo "C:${PATH_TO_GAME}" | sed "s%$WINEPREFIX%%g" | sed "s/drive_c//g" | sed 's#/#\\\#g'`
}
pw_update_notifier () {
if [ ! -f "${PORT_WINE_TMP_PATH}/${portname}_ver" ] ; then
echo "10" > "${PORT_WINE_TMP_PATH}/${portname}_ver"
fi
if [ ! -f "${PORT_WINE_TMP_PATH}/update_notifier" ] ; then
echo "1" > "${PORT_WINE_TMP_PATH}/update_notifier"
fi
read "update_not" < "${PORT_WINE_TMP_PATH}/update_notifier"
if [ "${update_not}" = "1" ] ; then
if try_download_silent "${PW_FTP_URL}/current_version/${portname}_ver" "${PORT_WINE_TMP_PATH}/${portname}_cur_ver" ; then
read current_ver < "${PORT_WINE_TMP_PATH}/${portname}_cur_ver"
try_remove_file "${PORT_WINE_TMP_PATH}/${portname}_cur_ver"
if [ ! -z "${current_ver}" ] && [ "${current_ver}" -gt "${install_ver}" ] ; then
pw_port_update () {
###PORT UPDATE###
if try_download_silent "https://github.com/Castro-Fidel/PortWINE/raw/master/data_from_portwine/scripts/var" "${PORT_WINE_TMP_PATH}/curent_var_ver" ; then
if [ ! -f "${PORT_WINE_TMP_PATH}/${portname}_ver" ] ; then
echo "10" > "${PORT_WINE_TMP_PATH}/${portname}_ver"
fi
export port_install_ver=`cat "${PORT_WINE_TMP_PATH}/${portname}_ver" | head -n 1`
if [ ! -f "${PORT_WINE_TMP_PATH}/update_notifier" ] ; then
echo "1" > "${PORT_WINE_TMP_PATH}/update_notifier"
fi
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}"
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}" \
FALSE "${port_upd5}" \
......@@ -490,49 +512,44 @@ pw_update_notifier () {
esac
fi
fi
fi
if [ ! -f "${HOME}/.config/.PortTime" ] ; then
echo "10" > "${HOME}/.config/.PortTime"
fi
read "port_time" < "${HOME}/.config/.PortTime"
if [ "${port_time}" -gt "1" ] ; then
port_time=$((${port_time}-1))
echo "${port_time}" > "${HOME}/.config/.PortTime"
else
xsd2=`zenity --title "${port_time1}" --text "${port_time2}" --list --radiolist --height=230 --column="${inst_set3}" --column "${port_time3}" \
TRUE "${port_time4}" \
FALSE "${port_time5}" \
FALSE "${port_time6}" `
if [ $? = 1 ] ; then
echo "1" > "${HOME}/.config/.PortTime"
if [ ! -f "${HOME}/.config/.PortTime" ] ; then
echo "10" > "${HOME}/.config/.PortTime"
fi
read "port_time" < "${HOME}/.config/.PortTime"
if [ "${port_time}" -gt "1" ] ; then
port_time=$((${port_time}-1))
echo "${port_time}" > "${HOME}/.config/.PortTime"
else
case $xsd2 in
"${port_time4}")
xdg-open "$urlg" &
echo "300" > "${HOME}/.config/.PortTime"
exit 0 ;;
"${port_time5}")
echo "75" > "${HOME}/.config/.PortTime" ;;
"${port_time6}")
echo "150" > "${HOME}/.config/.PortTime" ;;
esac
xsd2=`zenity --title "${port_time1}" --text "${port_time2}" --list --radiolist --height=230 --column="${inst_set3}" --column "${port_time3}" \
TRUE "${port_time4}" \
FALSE "${port_time5}" \
FALSE "${port_time6}" `
if [ $? = 1 ] ; then
echo "1" > "${HOME}/.config/.PortTime"
else
case $xsd2 in
"${port_time4}")
xdg-open "$urlg" &
echo "300" > "${HOME}/.config/.PortTime"
exit 0 ;;
"${port_time5}")
echo "75" > "${HOME}/.config/.PortTime" ;;
"${port_time6}")
echo "150" > "${HOME}/.config/.PortTime" ;;
esac
fi
fi
fi
}
pw_scripts_update () {
if [ ! -f "${PORT_WINE_TMP_PATH}/scripts_ver" ] ; then
echo "2000" > "${PORT_WINE_TMP_PATH}/scripts_ver"
fi
export scripts_install_ver=`cat "${PORT_WINE_TMP_PATH}/scripts_ver" | head -n 1`
if [ ! -f "${PORT_WINE_TMP_PATH}/scripts_update_notifier" ] ; then
echo "1" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
fi
read "scripts_update_not" < "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
if [ "${scripts_update_not}" = "1" ] ; then
if try_download_silent "https://github.com/Castro-Fidel/PortWINE/raw/master/data_from_portwine/scripts/var" "${PORT_WINE_TMP_PATH}/scripts_cur_ver" ; then
export scripts_current_ver=`cat "${PORT_WINE_TMP_PATH}/scripts_cur_ver" | grep SCRIPTS_NEXT_VERSION | awk -F "=" '{print $2}'`
try_remove_file "${PORT_WINE_TMP_PATH}/scripts_cur_ver"
###SCRIPTS UPDATE###
if [ ! -f "${PORT_WINE_TMP_PATH}/scripts_ver" ] ; then
echo "2000" > "${PORT_WINE_TMP_PATH}/scripts_ver"
fi
export scripts_install_ver=`cat "${PORT_WINE_TMP_PATH}/scripts_ver" | head -n 1`
if [ ! -f "${PORT_WINE_TMP_PATH}/scripts_update_notifier" ] ; then
echo "1" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
fi
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}"
if [ ! -z "${scripts_current_ver}" ] && [ "${scripts_current_ver}" -gt "${scripts_install_ver}" ] ; then
......@@ -552,10 +569,8 @@ pw_scripts_update () {
try_remove_file "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz"
try_remove_dir "${PORT_WINE_TMP_PATH}/PortWINE-master/"
echo "${scripts_current_ver}" > "${PORT_WINE_TMP_PATH}/scripts_ver"
"${pw_yad}" --title="Changelog" --borders=10 \
--text="Скрипты были успешно обновлены.\nДля продолжения запуска порта нажмите ОК." \
--text-align=center --text-info --show-uri --wrap --center --width=1200 --height=550 \
--filename="${PORT_WINE_PATH}/data/changelog" --uri-color=red
zenity --title="Changelog" --text-info --width=1200 --height=550 \
--filename="${PORT_WINE_PATH}/data/changelog"
[ "$?" == 0 ] && /bin/bash -c ${pw_full_command_line[*]} &
exit 0
fi
......@@ -569,6 +584,7 @@ pw_scripts_update () {
esac
fi
fi
try_remove_file "${PORT_WINE_TMP_PATH}/curent_var_ver"
fi
}
......@@ -649,33 +665,57 @@ pw_gui_for_edit_db () {
}
pw_check_and_download_wine () {
if [ "${1}" == "proton_ge" ] ; then
if [ "`cat "${PORT_WINE_PATH}"/data/dist/proton_ge/version | head -n 1`" != "${PW_PROTON_GE_VER}" ]
then try_remove_dir "${PORT_WINE_PATH}/data/dist/proton_ge/"
[ ! -d "${PORT_WINE_PATH}/data/dist/" ] && create_new_dir "${PORT_WINE_PATH}/data/dist"
if [ "${1}" == "PROTON_GE" ] ; then
if [ "`cat "${PORT_WINE_PATH}"/data/dist/PROTON_GE/version | head -n 1`" != "${PW_PROTON_GE_VER}" ]
then try_remove_dir "${PORT_WINE_PATH}/data/dist/PROTON_GE/"
fi
if [ ! -d "${PORT_WINE_PATH}/data/dist/proton_ge" ] ; then
print_info "Download and install proton_ge..."
if try_download "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/${PW_PROTON_GE_VER}/Proton-${PW_PROTON_GE_VER}.tar.gz" "${PORT_WINE_PATH}/data/tmp/Proton-${PW_PROTON_GE_VER}.tar.gz" ; then
if unpack_tar_gz "${PORT_WINE_PATH}/data/tmp/Proton-${PW_PROTON_GE_VER}.tar.gz" "${PORT_WINE_PATH}/data/tmp/" ; then
mv -f "${PORT_WINE_PATH}/data/tmp/Proton-${PW_PROTON_GE_VER}/files" "${PORT_WINE_PATH}/data/dist/proton_ge"
echo "${PW_PROTON_GE_VER}" > "${PORT_WINE_PATH}/data/dist/proton_ge/version"
try_remove_file "${PORT_WINE_PATH}/data/tmp/Proton-${PW_PROTON_GE_VER}.tar.gz"
try_remove_dir "${PORT_WINE_PATH}/data/tmp/Proton-${PW_PROTON_GE_VER}"
try_remove_dir "${PORT_WINE_PATH}/data/dist/proton_ge/share/default_pfx/"
if [ ! -d "${PORT_WINE_PATH}/data/dist/PROTON_GE" ] ; then
print_info "Download and install PROTON_GE..."
if try_download "https://github.com/Castro-Fidel/wine_builds/releases/download/${PW_PROTON_GE_VER}/${PW_PROTON_GE_VER}.tar.xz" "${PORT_WINE_PATH}/data/tmp/${PW_PROTON_GE_VER}.tar.xz" ; then
if unpack_tar_xz "${PORT_WINE_PATH}/data/tmp/${PW_PROTON_GE_VER}.tar.xz" "${PORT_WINE_PATH}/data/dist/" ; then
echo "${PW_PROTON_GE_VER}" > "${PORT_WINE_PATH}/data/dist/PROTON_GE/version"
try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_PROTON_GE_VER}.tar.xz"
try_remove_dir "${PORT_WINE_PATH}/data/tmp/${PW_PROTON_GE_VER}"
else
try_remove_file "${PORT_WINE_PATH}/data/tmp/Proton-${PW_PROTON_GE_VER}.tar.gz"
try_remove_dir "${PORT_WINE_PATH}/data/tmp/Proton-${PW_PROTON_GE_VER}"
try_remove_dir "${PORT_WINE_PATH}/data/dist/proton_ge"
try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_PROTON_GE_VER}.tar.xz"
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" \
--text "Failed to download WINE: PROTON_GE.\nCheck internet connection and press OK" \
--no-wrap ` > /dev/null 2>&1 && pw_check_and_download_wine
fi
else
`zenity --error --title "Error..." \
--text "Failed to download WINE: proton_ge.\nCheck internet connection and press OK" \
--text "Failed to download WINE: PROTON_GE.\nCheck internet connection and press OK" \
--no-wrap ` > /dev/null 2>&1 && pw_check_and_download_wine
fi
fi
fi
if [ "`cat "${PORT_WINE_PATH}"/data/dist/PROTON_STEAM/version | head -n 1`" != "${PW_PROTON_STEAM_VER}" ]
then try_remove_dir "${PORT_WINE_PATH}/data/dist/PROTON_STEAM/"
fi
if [ ! -d "${PORT_WINE_PATH}/data/dist/PROTON_STEAM" ] ; then
print_info "Download and install PROTON_STEAM..."
if try_download "https://github.com/Castro-Fidel/wine_builds/releases/download/${PW_PROTON_STEAM_VER}/${PW_PROTON_STEAM_VER}.tar.xz" "${PORT_WINE_PATH}/data/tmp/${PW_PROTON_STEAM_VER}.tar.xz" ; then
if unpack_tar_xz "${PORT_WINE_PATH}/data/tmp/${PW_PROTON_STEAM_VER}.tar.xz" "${PORT_WINE_PATH}/data/dist/" ; then
echo "${PW_PROTON_STEAM_VER}" > "${PORT_WINE_PATH}/data/dist/PROTON_STEAM/version"
try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_PROTON_STEAM_VER}.tar.xz"
try_remove_dir "${PORT_WINE_PATH}/data/tmp/${PW_PROTON_STEAM_VER}"
else
try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_PROTON_STEAM_VER}.tar.xz"
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
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
fi
fi
}
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -6,7 +6,7 @@
#Rating=5
################################################
export PW_COMMENT_DB="We recommend using PROTON_GE + DXVK!"
export PW_WINE_USE=proton_ge
export PW_WINE_USE=PROTON_GE
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
export WINEDLLOVERRIDES="locationapi="
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
#!/bin/bash
#Author: xuser
#LeagueClient.exe
#RiotClientServices.exe
#Rating=1-5
#####################examples###########################
##export PW_COMMENT_DB="blablabla"
export PW_COMMENT_DB="Check openssl in your system!"
##export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
##export PW_DLL_INSTALL="vcrun2017" # Install DDL in port prefix (used winetricks)
##export WINEDLLOVERRIDES="blabla=n,b"
export LAUNCH_PARAMETERS="('--launch-product=league_of_legends' '--launch-patchline=live')" # Additional launch options
export PW_WINE_USE=proton_ge
export LAUNCH_PARAMETERS=("--launch-product=league_of_legends" "--launch-patchline=live") # Additional launch options
export PW_WINE_USE=PROTON_GE
export PW_VULKAN_USE=dxvk
##export PW_DXR_ON=1
##export PW_VULKAN_NO_ASYNC=1 # Disabled ASYNC for VULKAN
......@@ -21,17 +22,42 @@ export PW_VULKAN_USE=dxvk
##export ENABLE_VKBASALT=1
##export PW_VKBASALT_EFFECTS="FakeHDR:cas" # Use Reshade in others games (dx9-12 to vulkan only)
##export PW_VKBASALT_FFX_CAS="0.75" # FidelityFX Contrast Adaptive Sharpening (min 0 - max 1)
##export PW_NO_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
##export PW_NO_ESYNC=0 # Do not use eventfd-based in-process synchronization primitives
export PW_NO_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
export PW_NO_ESYNC=1 # Do not use eventfd-based in-process synchronization primitives
##export PULSE_LATENCY_MSEC=60 # Fix crackling audio in games
##export PW_NO_WRITE_WATCH=1 # Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games).
##export PW_HEAP_DELAY_FREE=1
##export PW_WINE_ALLOW_XIM=1 # Disable XIM support until libx11 >= 1.7 is widespread
export WINEARCH=win32 # defaut = win64
export WINEPREFIX="${PORT_WINE_PATH}/data/pfx_x86"
export WINEARCH=win32 # defaut = win64
export WINEPREFIX="${PORT_WINE_PATH}/data/pfx_lol"
export PW_MONO_VER="6.3.0"
export PW_GECKO_VER="2.47.2"
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
check_port_for_lol () {
process=LeagueClientUx.exe
uxpid=$(timeout 2m sh -c "until pidof ${process}; do sleep 1; done")
if [[ ! -n $uxpid ]]; then
echo "Could not find process ${process}"
exit 1
fi
echo "LeagueClientUx pid: ${uxpid}"
port=$(xargs -0 < /proc/${uxpid}/cmdline | sed -n 's/.*--app-port=\([[:digit:]]*\).*/\1/p')
if [[ ! -n $port ]]; then
echo "Could not find port"
exit 1
fi
echo "Waiting for port ${port}"
kill -STOP ${uxpid}
timeout 5m sh -c "
until openssl s_client -connect :${port} <<< Q > /dev/null 2>&1; do
sleep 1
done"
kill -CONT ${uxpid}
}
add_in_start_portwine () {
if [ "$(cat /proc/sys/abi/vsyscall32)" -ne 0 ] ; then
zenity --question --title="Fix for LoL anti-cheat" \
......@@ -39,4 +65,5 @@ add_in_start_portwine () {
[ "$?" = 1 ] && exit 0
pkexec sh -c 'sysctl -w abi.vsyscall32=0 && sysctl -p'
fi
check_port_for_lol &
}
\ No newline at end of file
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -3,7 +3,7 @@
#Torchlight.exe
#Rating=1-5
########################################################
export PW_WINE_USE=proton_ge
export PW_WINE_USE=PROTON_GE
export PW_VULKAN_USE=dxvk
export ENABLE_VKBASALT=1
export PW_VKBASALT_EFFECTS="FakeHDR:cas:FilmGrain2"
......@@ -14,7 +14,7 @@ export PW_VKBASALT_FFX_CAS="1"
##export PW_DLL_INSTALL="" # Install DDL in port prefix (used winetricks)
##export WINEDLLOVERRIDES="blabla=n,b"
##export LAUNCH_PARAMETERS="('"+com_skipIntroVideo 1"' '"+com_skipSignInManager 1"')" # Additional launch options
##export PW_WINE_USE=proton_ge # proton_steam or proton_ge
##export PW_WINE_USE=PROTON_GE # PROTON_STEAM or PROTON_GE
##export PW_VULKAN_USE=vkd3d # dxvk, vkd3d or 0 for OpenGL
##export PW_DXR_ON=1
##export PW_VULKAN_NO_ASYNC=1 # Disabled ASYNC for VULKAN
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -10,7 +10,7 @@
##export WINEDLLOVERRIDES="blabla=n,b"
##export LAUNCH_PARAMETERS="('"+com_skipIntroVideo 1"' '"+com_skipSignInManager 1"')" # Additional launch options
##export PW_WINE_USE=proton_ge # proton_steam or proton_ge
##export PW_WINE_USE=PROTON_GE # PROTON_STEAM or PROTON_GE
##export PW_VULKAN_USE=vkd3d # dxvk, vkd3d or 0 for OpenGL
##export PW_DXR_ON=1
##export PW_VULKAN_NO_ASYNC=1 # Disabled ASYNC for VULKAN
......
File mode changed from 100644 to 100755
......@@ -5,7 +5,7 @@
#Rating=5
#####################examples###########################
##export PW_COMMENT_DB="blablabla"
export PW_WINE_USE=proton_ge
export PW_WINE_USE=PROTON_GE
export PW_VULKAN_USE=dxvk
export PW_WINDOWS_VER=7 # Set windows version 10, 7 or XP
export PW_DLL_INSTALL="vcrun2019 d3dcompiler_47" # Install DDL in port prefix (used winetricks)
......@@ -29,7 +29,7 @@ export WINEDLLOVERRIDES="concrt140,msvcp140,msvcp140_1,msvcp140_2,d3dcompiler_47
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=0 # Force run in terminal
##export PW_LOG=0 # Enable debug mode fo terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##export PW_LOG=0 # Enable debug mode fo terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##add_in_start_portwine () { commands ; }
......@@ -5,7 +5,7 @@
#####################examples###########################
export PW_COMMENT_DB="GameForge\nClient"
export PW_VULKAN_USE=dxvk
export PW_WINE_USE=proton_ge
export PW_WINE_USE=PROTON_GE
export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
export PW_DLL_INSTALL="vcrun2019 d3dcompiler_43 d3dcompiler_47" # Install DDL in port prefix (used winetricks)
export WINEDLLOVERRIDES="gfclient0_msvc140=n;ucrtbase=b"
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -8,7 +8,7 @@
#export PW_COMMENT_DB="blablabla"
################################################
export PW_VULKAN_USE=0 #dxvk or vkd3d
export PW_WINE_USE=proton_steam
export PW_WINE_USE=PROTON_STEAM
#export WINEDLLOVERRIDES="blabla=n,b"
#export PW_LOG=0 # Enable debug mode fo terminal
export PW_NO_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
......
......@@ -9,4 +9,4 @@ export PW_DLL_INSTALL="vcrun2019 d3dcompiler_46"
export WINEDLLOVERRIDES="libglesv2,lsteamclient="
export LAUNCH_PARAMETERS="-no-cef-sandbox"
export PW_VULKAN_USE=dxvk
export PW_WINE_USE=proton_ge
export PW_WINE_USE=PROTON_GE
File mode changed from 100644 to 100755
......@@ -32,6 +32,6 @@ export PW_WINE_ALLOW_XIM=0
export PW_WINEDBG_DISABLE=0
export PW_USE_TERMINAL=0
##ADD_IN_START_PORTWINE () { commands ; }
export PW_WINE_USE=proton_ge
export PW_WINE_USE=PROTON_GE
export PW_USE_NVAPI=0
export PW_GUI_DISABLED_CS=0
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -40,6 +40,8 @@ start_portwine () {
export MEDIACONV_VIDEO_TRANSCODED_FILE="${PORT_WINE_TMP_PATH}"/transcoded_video.foz
export STAGING_SHARED_MEMORY=1
export PW_FORCE_LARGE_ADDRESS_AWARE=1
export WINEDLLPATH="${WINEDIR}/lib64/wine:${WINEDIR}/lib/wine"
create_new_dir "${WINEDIR}/share/wine/"
try_remove_dir "${WINEDIR}"/share/wine/gecko
try_remove_dir "${WINEDIR}"/share/wine/mono
......@@ -254,7 +256,7 @@ start_portwine () {
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
var_winedlloverride_update "steam_api,steam_api64,steamclient,steamclient64=n"
var_winedlloverride_update "steam_api,steam_api64,steamclient,steamclient64=n;lsteamclient,GameOverlayRenderer,GameOverlayRenderer64,winemenubuilder.exe="
# export TOTAL_VRAM=`"${PW_WINELIB}/runtime/bin/glxinfo" -B | grep Total | awk -F: '{print $2}' | awk '{print $1}'`
# echo "TOTAL_VRAM=${TOTAL_VRAM}"
......@@ -373,7 +375,7 @@ start_portwine () {
cabextract_fix
fi
${pw_runtime} xterm -e env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" "${PORT_WINE_TMP_PATH}/winetricks" -q -f ${PW_DLL_NEED_INSTALL}
if [ "${PW_WINE_USE}" != "proton_steam" ] ; then
if [ "${PW_WINE_VER_FROM_DB}" != "PROTON_STEAM" ] ; then
/bin/bash -c ${pw_full_command_line[*]} &
exit 0
fi
......@@ -425,15 +427,28 @@ pw_run () {
}
###MAIN###
[ $(id -u) -eq 0 ] && echo "Do not run the script from the superuser!" && zenity --error --text "Do not run the script from the superuser!" 2> /dev/null && exit 1
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
export portname=PortProton
cd "$(dirname "`readlink -f "$0"`")" && export PORT_SCRIPTS_PATH="$(pwd)"
cd "${PORT_SCRIPTS_PATH}/../../" && export PORT_WINE_PATH="$(pwd)"
export PORT_WINE_TMP_PATH="${PORT_WINE_PATH}/data/tmp"
if [ -d "${PORT_WINE_PATH}/data/dist" ] ; then
chmod -R 755 "${PORT_WINE_PATH}/data/dist"
orig_IFS="$IFS"
IFS=$'\n'
for dist_dir in $(ls -1 "${PORT_WINE_PATH}/data/dist/") ; do
dist_dir_new=`echo "${dist_dir}" | awk '$1=$1' | sed -e s/[[:blank:]]/_/g`
if [ ! -d "${PORT_WINE_PATH}/data/dist/${dist_dir_new^^}" ] ; then
mv -- "${PORT_WINE_PATH}/data/dist/$dist_dir" "${PORT_WINE_PATH}/data/dist/${dist_dir_new^^}"
fi
done
IFS="$orig_IFS"
fi
create_new_dir "${PORT_WINE_TMP_PATH}"
create_new_dir "${HOME}/.PortWINE/tmp"
read "portname" < "${PORT_WINE_TMP_PATH}/portname" && export portname
cd "${PORT_SCRIPTS_PATH}"
. "${PORT_SCRIPTS_PATH}/var"
......@@ -446,7 +461,6 @@ if [ ! -f "${PORT_WINE_TMP_PATH}/${portname}_loc" ] ; then
fi
. "${PORT_SCRIPTS_PATH}"/lang
var_winedlloverride_update "winemenubuilder.exe="
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}"
......@@ -458,11 +472,10 @@ check_user_conf
if [ -z "${INSTALLING_PORT}" ] ; then
. "${USER_CONF}"
pw_port_update
pw_download_libs
pw_download_mono
pw_download_gecko
pw_update_notifier
pw_scripts_update
pw_init_db
. "${USER_CONF}"
fi
......@@ -3,18 +3,8 @@
. "$(dirname $(readlink -f "$0"))/runlib"
try_remove_file "${PORT_WINE_TMP_PATH}/update_notifier"
try_remove_file "${PORT_WINE_TMP_PATH}/init_run_suc"
try_remove_file "${PORT_WINE_PATH}/settings.desktop"
try_remove_file "${PORT_WINE_PATH}/debug.desktop"
try_remove_file "${PORT_WINE_PATH}/reset.desktop"
try_remove_dir "${PORT_WINE_PATH}/data/pfx/dosdevices"
try_remove_dir "${PORT_WINE_PATH}/Settings"
try_remove_dir "${PORT_SCRIPTS_PATH}/vars"
create_new_dir "/home/${USER}/.local/share/applications"
name_desktop="PortProton"
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Name=${name_desktop}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
......@@ -47,5 +37,4 @@ else
`zenity --info --title "${inst_set_top}" --text "${inst_succ}" --no-wrap ` > /dev/null 2>&1
xdg-open "http://portwine-linux.ru/portwine-faq/" > /dev/null 2>&1 & exit 0
fi
unset INSTALLING_PORT
\ No newline at end of file
......@@ -203,7 +203,7 @@ pw_winetricks () {
pw_edit_db () {
pw_gui_for_edit_db ENABLE_VKBASALT PW_NO_ESYNC PW_NO_FSYNC PW_DXR_ON PW_VULKAN_NO_ASYNC PW_USE_NVAPI \
PW_OLD_GL_STRING PW_HIDE_NVIDIA_GPU PW_FORCE_USE_VSYNC PW_VIRTUAL_DESKTOP PW_WINEDBG_DISABLE PW_USE_TERMINAL \
PW_WINE_ALLOW_XIM PW_HEAP_DELAY_FREE PW_NO_WRITE_WATCH PW_GUI_DISABLED_CS
PW_WINE_ALLOW_XIM PW_HEAP_DELAY_FREE PW_NO_WRITE_WATCH PW_GUI_DISABLED_CS
if [ "$?" == 0 ] ; then
/bin/bash -c ${pw_full_command_line[*]} &
exit 0
......@@ -222,7 +222,7 @@ pw_autoinstall_from_db () {
export PW_NO_WRITE_WATCH=0
export PW_VULKAN_USE=0
unset PW_WINE_VER
export PW_WINE_USE=proton_steam
export PW_WINE_USE=PROTON_STEAM
export PW_NO_FSYNC=1
export PW_NO_ESYNC=1
unset PORTWINE_CREATE_SHORTCUT_NAME
......@@ -231,13 +231,19 @@ pw_autoinstall_from_db () {
}
###MAIN###
PW_ALL_DIST=`ls "${PORT_WINE_PATH}/data/dist/" | sed -e s/"PROTON_GE$//g" | sed -e s/"PROTON_STEAM$//g"`
unset DIST_ADD_TO_GUI
for DAIG in ${PW_ALL_DIST}
do
export DIST_ADD_TO_GUI="${DIST_ADD_TO_GUI}\!${DAIG}"
done
if [ ! -z "${PORTWINE_DB_FILE}" ] ; then
export YAD_EDIT_DB="--button=EDIT DB!!${loc_edit_db} ${PORTWINE_DB}:118"
[ -z "${PW_COMMENT_DB}" ] && PW_COMMENT_DB="PortWINE database file for "\"${PORTWINE_DB}"\" was found."
if [ -z "${PW_VULKAN_USE}" ] || [ -z "${PW_WINE_USE}" ] ; then
unset PW_GUI_DISABLED_CS
[ -z "${PW_VULKAN_USE}" ] && export PW_VULKAN_USE=dxvk
[ -z "${PW_WINE_USE}" ] && export PW_WINE_USE=proton_steam
[ -z "${PW_WINE_USE}" ] && export PW_WINE_USE=PROTON_STEAM
fi
case "${PW_VULKAN_USE}" in
"vkd3d") export PW_DEFAULT_VULKAN_USE='VKD3D (DX 12 to Vulkan)\!DXVK (DX 9-11 to Vulkan)\!OPENGL ' ;;
......@@ -245,12 +251,15 @@ if [ ! -z "${PORTWINE_DB_FILE}" ] ; then
*) export PW_DEFAULT_VULKAN_USE='DXVK (DX 9-11 to Vulkan)\!VKD3D (DX 12 to Vulkan)\!OPENGL ' ;;
esac
case "${PW_WINE_USE}" in
"proton_ge") export PW_DEFAULT_WINE_USE='PROTON_GE (FSR included)\!PROTON_STEAM' ;;
*) export PW_DEFAULT_WINE_USE='PROTON_STEAM\!PROTON_GE (FSR included)' ;;
"PROTON_GE") export PW_DEFAULT_WINE_USE="PROTON_GE\!PROTON_STEAM${DIST_ADD_TO_GUI}" ;;
"PROTON_STEAM") export PW_DEFAULT_WINE_USE="PROTON_STEAM\!PROTON_GE${DIST_ADD_TO_GUI}" ;;
*)
export DIST_ADD_TO_GUI=`echo ${DIST_ADD_TO_GUI} | sed -e s/"\!${PW_WINE_USE}$//g"`
export PW_DEFAULT_WINE_USE="${PW_WINE_USE}\!PROTON_STEAM\!PROTON_GE${DIST_ADD_TO_GUI}" ;;
esac
else
export PW_DEFAULT_VULKAN_USE='DXVK (DX 9-11 to Vulkan)\!VKD3D (DX 12 to Vulkan)\!OPENGL '
export PW_DEFAULT_WINE_USE='PROTON_STEAM\!PROTON_GE (FSR included)'
export PW_DEFAULT_WINE_USE="PROTON_STEAM\!PROTON_GE${DIST_ADD_TO_GUI}"
unset PW_GUI_DISABLED_CS
fi
if [ ! -z "${portwine_exe}" ]; then
......@@ -347,7 +356,7 @@ else
--field=":LBL" "" \
--field='DEBUG'!!"${loc_debug}":"BTN" '@bash -c "button_click DEBUG"' \
--field='WINECFG'!!"${loc_winecfg}":"BTN" '@bash -c "button_click WINECFG"' \
--field=":CB" " PROTON_STEAM"\!" PROTON_GE (FSR included)" \
--field=":CB" "PROTON_STEAM\!PROTON_GE${DIST_ADD_TO_GUI}" \
--field=":LBL" "" \
--field='WINEFILE'!!"${loc_winefile}":"BTN" '@bash -c "button_click WINEFILE"' \
--field='WINECMD'!!"${loc_winecmd}":"BTN" '@bash -c "button_click WINECMD"' \
......
#!/bin/bash
#Author: Castro-Fidel (PortWINE-Linux.ru)
#SCRIPTS_NEXT_VERSION=2011
#SCRIPTS_NEXT_VERSION=2012
#PORT_NEXT_VERSION=95
########################################################################
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
......@@ -28,14 +29,14 @@ export PW_LIBS_VER="_v17"
export PORTWINE_URL="http://portwine-linux.ru/"
export GDK_BACKEND="x11"
export PW_PROTON_GE_VER="6.16-GE-1"
export PW_PROTON_STEAM_VER="PROTON_STEAM_6.3-6C"
export PW_PROTON_GE_VER="PROTON_GE_6.16-1"
export PW_MONO_VER="6.3.0"
export PW_GECKO_VER="2.47.2"
export WINEPREFIX="${PORT_WINE_PATH}/data/pfx"
export WINE_WIN_START="start.exe /i /unix"
export WINE_FULLSCREEN_FSR="1"
export WINE_FULLSCREEN_FSR_STRENGTH="2"
#################################################################
add_in_start_portwine ()
{
......
File mode changed from 100644 to 100755
......@@ -10,19 +10,14 @@ clear && echo '
'
########################################################################
export gamedir="PortProton"
export gamename="Proton"
export portname="PortProton"
export port_ver=XX
export port_ver=97
########################################################################
export PW_FTP_URL="https://portwine-linux.ru/ftp"
export INSTALLING_PORT=1
export PROGS_INST=""
export vexit=0
export minimum_ldd_ver="2.21"
########################################################################
for PROGS in "wget" "curl" "tar" "sha256sum" "awk"
do
for PROGS in "wget" "curl" "tar" "awk" "zenity" "cabextract" ; do
if [ ! -x "`which "${PROGS}" 2>/dev/null`" ] ; then
PROGS_INST="${PROGS_INST} ${PROGS}" && vexit=1
fi
......@@ -31,33 +26,18 @@ if [ "${vexit}" -eq "1" ] ; then
echo "You will need to install: ${PROGS_INST}, and restart the script"
exit 1
fi
export local_script_hash=$(sha256sum "$0" | awk '{print $1}')
export remote_script_hash=`curl -s --list-only "${PW_FTP_URL}/portwine/${portname}-${port_ver}.sha256sum" | awk '{print $1}'`
if [ "${local_script_hash}" != "${remote_script_hash}" ] ; then
echo "\033[31mHash sum does not match, please download the ${portname}-${port_ver} again.\033[0m"
zenity --error --no-wrap --text "Hash sum does not match, please download the ${portname}-${port_ver} again." 2> /dev/null
exit 1
fi
export system_ldd_ver=`ldd --version | grep -m1 ldd | awk '{print $NF}'`
if [ `echo ${system_ldd_ver} | tr -d .` -lt `echo ${minimum_ldd_ver} | tr -d .` ] ; then
echo "\033[31mYour system doesn\`t support ${portname}.\nGlibc version required >= ${minimum_ldd_ver}\nGlibc in your system = ${system_ldd_ver}\033[0m"
zenity --error --no-wrap --text "Your system doesn\`t support ${portname}.\nGlibc version required >= ${minimum_ldd_ver}\nGlibc in your system = ${system_ldd_ver}" 2> /dev/null
exit 1
fi
########################################################################
cd "$(dirname "`readlink -f "$0"`")"
links="$(pwd)"
setup_script="${portname}"-"${port_ver}"
ARCH_NAME="${setup_script}.tar.xz"
deflink="/home/${USER}/PortWINE/${portname}"
[ $(id -u) -eq 0 ] && echo "Do not run the script from the superuser!" && zenity --error --text "Do not run the script from the superuser!" 2> /dev/null && exit 1
########################################################################
if [ "$1" = "-rus" ] ; then
SET_LANG="Russian"
export s_install="1"
export silent_install="1"
elif [ "$1" = "-eng" ] ; then
SET_LANG="English"
export s_install="1"
export silent_install="1"
else
SET_LANG=`zenity --title "Install $portname" --text "Select the installation language" --list --radiolist \
--column="Set:" --column "Language:" \
......@@ -66,15 +46,15 @@ else
if [ $? -eq 1 ] ; then exit 1 ; fi
case $SET_LANG in
"Russian")
INFO_TEXT="Вы запустили установщик PortWINE ${gamename} версии ${port_ver}. \n\nЭто не коммерческий продукт и развивается исключительно за идею и Ваши пожертвования. \nВсе права сторонего програмного обеспечения принадлежат их владельцам! \nПродолжая установку вы автоматически соглашаетесь с данными условиями." > /dev/null 2>&1 ;;
INFO_TEXT="Вы запустили установщик PortWINE ${portname} версии ${port_ver}. \n\nЭто не коммерческий продукт и развивается исключительно за идею и Ваши пожертвования. \nВсе права сторонего програмного обеспечения принадлежат их владельцам! \nПродолжая установку вы автоматически соглашаетесь с данными условиями." > /dev/null 2>&1 ;;
"English")
INFO_TEXT="You run the installer PortWINE ${gamename} v. ${port_ver}. \n\nThis is not a commercial product and developed exclusively for the idea and donate. \nAll rights to third-party software belong to their respective owners! \nContinuing the installation of you agree to these terms." > /dev/null 2>&1 ;;
INFO_TEXT="You run the installer PortWINE ${portname} v. ${port_ver}. \n\nThis is not a commercial product and developed exclusively for the idea and donate. \nAll rights to third-party software belong to their respective owners! \nContinuing the installation of you agree to these terms." > /dev/null 2>&1 ;;
esac
`zenity --info --title "INFO" --text "$INFO_TEXT" --no-wrap ` 2> /dev/null
if [ $? -eq 1 ] ; then echo "error" && exit 1 ; fi
fi
########################################################################
if [ "${s_install}" = "1" ] ; then
if [ "${silent_install}" = "1" ] ; then
echo "${portname} is installed in ${deflink}"
D_PATH="${deflink}"
else
......@@ -109,15 +89,15 @@ else
if [ $? -eq 1 ] ; then echo "error" && exit 1 ; fi
fi
########################################################################
if [ "${s_install}" != "1" ] ; then
if [ "${silent_install}" != "1" ] ; then
case $SET_LANG in
"Russian")
zen() {
zenity --progress --title="Установка..." --text="Настройка ${portname}" --pulsate --auto-close --auto-kill --width=450 > /dev/null 2>&1
progress_bar() {
zenity --progress --title="Установка..." --text="Настройка ${portname}" --pulsate --auto-close --auto-kill --width=450 > /dev/null 2>&1
} ;;
"English")
zen() {
zenity --progress --title="Install..." --text="Install ${portname}" --pulsate --auto-close --auto-kill --width=450 > /dev/null 2>&1
progress_bar() {
zenity --progress --title="Install..." --text="Install ${portname}" --pulsate --auto-close --auto-kill --width=450 > /dev/null 2>&1
} ;;
esac
if [ $? -eq 1 ] ; then echo "error" && exit 1 ; fi
......@@ -127,41 +107,44 @@ export PORT_WINE_PATH="${D_PATH}"
if [ ! -d "${PORT_WINE_PATH}" ] ; then
mkdir -p "$PORT_WINE_PATH"
else
for CLEAN_PORT in "dist" "dist_dxvk" "dist_vkd3d" "libs" "tmp"
do
if [ -d "${PORT_WINE_PATH}/data/${CLEAN_PORT}" ] ; then
rm -fR "${PORT_WINE_PATH}/data/${CLEAN_PORT}"
fi
done
fi
if [ -d "${PORT_WINE_PATH}/data/scripts" ] ; then
rm -f "${PORT_WINE_PATH}/data/scripts/"* > /dev/null 2>&1
rm -fr "${PORT_WINE_PATH}/data/tmp"
rm -f "${PORT_WINE_PATH}/data/scripts/"* > /dev/null 2>&1
fi
########################################################################
mkdir -p "${PORT_WINE_PATH}/data/tmp"
echo "${port_ver}" > "${PORT_WINE_PATH}/data/tmp/${portname}_ver"
case $SET_LANG in
"Russian")
echo "RUS" > "${PORT_WINE_PATH}/data/tmp/${portname}_loc" ;;
"English")
echo "ENG" > "${PORT_WINE_PATH}/data/tmp/${portname}_loc" ;;
"Russian") echo "RUS" > "${PORT_WINE_PATH}/data/tmp/${portname}_loc" ;;
"English") echo "ENG" > "${PORT_WINE_PATH}/data/tmp/${portname}_loc" ;;
esac
if [ $? -eq 1 ] ; then echo "error" && exit 1 ; fi
export PORT_WINE_TMP_PATH="${PORT_WINE_PATH}/data/tmp"
read "update_loc" < "${PORT_WINE_TMP_PATH}/${portname}_loc"
export update_loc=${update_loc}
########################################################################
cd "${PORT_WINE_PATH}"
tail -n +169 "${links}/${setup_script}" > "${PORT_WINE_PATH}/${ARCH_NAME}"
if [ "${s_install}" = "1" ] ; then
tar -Jxvf "${PORT_WINE_PATH}/${ARCH_NAME}" -C "${PORT_WINE_PATH}/"
export PORT_WINE_TMP_PATH="${PORT_WINE_PATH}/data/tmp"
cd "${PORT_WINE_PATH}"
try_download_scripts () {
wget -c -t 5 -T 20 "https://github.com/Castro-Fidel/PortWINE/archive/refs/heads/master.tar.gz" --output-document="${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz"
if [ "$?" = "0" ] ; then
tar -xvzf "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz" -C "${PORT_WINE_TMP_PATH}"
if [ "$?" = "0" ] ; then
[ ! -d "${PORT_WINE_PATH}/data/" ] && mkdir "${PORT_WINE_PATH}/data/"
cp -fr "${PORT_WINE_TMP_PATH}/PortWINE-master/data_from_portwine/"* "${PORT_WINE_PATH}/data/"
rm -f "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz"
rm -fr "${PORT_WINE_TMP_PATH}/PortWINE-master/"
export scripts_current_ver=`cat "${PORT_WINE_PATH}/data/scripts/var" | grep SCRIPTS_NEXT_VERSION | awk -F "=" '{print $2}'`
echo "${scripts_current_ver}" > "${PORT_WINE_TMP_PATH}/scripts_ver"
else
rm -f "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz"
try_download_scripts
fi
else
try_download_scripts
fi
}
if [ "${silent_install}" = "1" ] ; then
try_download_scripts
else
tar -Jxvf "${PORT_WINE_PATH}/${ARCH_NAME}" -C "${PORT_WINE_PATH}/" | zen
try_download_scripts | progress_bar
fi
chmod 755 -R "${PORT_WINE_PATH}"
mv -f "${PORT_WINE_PATH}/${ARCH_NAME}" "${PORT_WINE_PATH}/data/tmp"
sed -n 1,168p "${links}/${setup_script}" > "${PORT_WINE_PATH}/data/tmp/${setup_script}"
echo "${portname}" > "${PORT_WINE_PATH}/data/tmp/portname"
########################################################################
cd "${PORT_WINE_PATH}/data/scripts"
/bin/bash -c "${PORT_WINE_PATH}/data/scripts/setup.sh" && exit 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