Commit af5f505b authored by Mikhail Tergoev's avatar Mikhail Tergoev

updated try_download and try_check_sha256sum func.

parent 259fcdff
...@@ -2,10 +2,14 @@ ...@@ -2,10 +2,14 @@
----------------------------------------- -----------------------------------------
История изменений: История изменений:
* ###Scripts version 2353### / Дата: 27.09.2024 / Размер скачиваемого обновления: 4 мегабайт
* оптимизированы функции автоустановки всех игр/лаунчеров
* ускорен первичный запуск PortProton (спасибо Htylol)
* удалена автоустановка эмулятора "CITRA" * удалена автоустановка эмулятора "CITRA"
* обновлена автоустановка эмулятора "CEMU" * обновлена автоустановка эмулятора "CEMU"
* возвращена установка игры "Secret World Legends (ENG)" * возвращена установка игры "Secret World Legends (ENG)"
* исправлена и обновлена автоустановка иры "OSU!"
* улучшена функция скачивания сторонних версий WINE
* добавлены файлы настроек для игр (спасибо Мэлс): * добавлены файлы настроек для игр (спасибо Мэлс):
* LEGO Star Wars: The Skywalker Saga * LEGO Star Wars: The Skywalker Saga
* God of War Ragnarok * God of War Ragnarok
......
...@@ -419,6 +419,10 @@ check_process () { ...@@ -419,6 +419,10 @@ check_process () {
export -f check_process export -f check_process
try_check_sha256sum () { try_check_sha256sum () {
if [[ "$no_mirror" == true ]] ; then
print_ok "Used no_mirror downloading. Skipping check sha256sum."
return 0
fi
SHA256SUM_EXT=$(curl --silent -L "${1//.tar*/}.sha256sum" | awk '{print $1}') SHA256SUM_EXT=$(curl --silent -L "${1//.tar*/}.sha256sum" | awk '{print $1}')
if [[ ${#SHA256SUM_EXT} == 64 ]] ; then if [[ ${#SHA256SUM_EXT} == 64 ]] ; then
SHA256SUM_INT=$(sha256sum "$dest" | awk '{print $1}') SHA256SUM_INT=$(sha256sum "$dest" | awk '{print $1}')
...@@ -438,7 +442,7 @@ try_check_sha256sum () { ...@@ -438,7 +442,7 @@ try_check_sha256sum () {
try_download () { try_download () {
export dest="$2" export dest="$2"
local silent="false" local silent="false"
local no_mirror="false" export no_mirror="false"
case "$3" in case "$3" in
silent) silent)
...@@ -3991,7 +3995,11 @@ gui_proton_downloader () { ...@@ -3991,7 +3995,11 @@ gui_proton_downloader () {
pw_download_get_wine () { pw_download_get_wine () {
print_info "Download and install ${VERSION_WINE_GIT}..." print_info "Download and install ${VERSION_WINE_GIT}..."
FILENAME="$(basename "${URL_VERSION_PROTON_GIT}")" FILENAME="$(basename "${URL_VERSION_PROTON_GIT}")"
if try_download "${URL_VERSION_PROTON_GIT}" "${PORT_WINE_PATH}/data/tmp/$FILENAME" ; then if [[ "${URL_VERSION_PROTON_GIT}" =~ _LG ]]
then USE_MIRROR=""
else USE_MIRROR="no_mirror"
fi
if try_download "${URL_VERSION_PROTON_GIT}" "${PORT_WINE_PATH}/data/tmp/$FILENAME" "$USE_MIRROR" ; then
if unpack "${PORT_WINE_PATH}/data/tmp/${FILENAME}" "${PORT_WINE_PATH}/data/dist/" ; then if unpack "${PORT_WINE_PATH}/data/tmp/${FILENAME}" "${PORT_WINE_PATH}/data/dist/" ; then
try_remove_file "${PORT_WINE_PATH}/data/tmp/${FILENAME}" try_remove_file "${PORT_WINE_PATH}/data/tmp/${FILENAME}"
if [[ -n "${portwine_exe}" ]] ; then if [[ -n "${portwine_exe}" ]] ; then
...@@ -4039,7 +4047,6 @@ gui_proton_downloader () { ...@@ -4039,7 +4047,6 @@ gui_proton_downloader () {
edit_db_from_gui edit_db_from_gui
restart_pp restart_pp
else else
# init_wine_ver
print_error "$PW_WINE_USE" print_error "$PW_WINE_USE"
for GIVE_WINE_URL in ${WINE_GE_CUSTOM[@]} ${PROTON_GE_GIT[@]} ${WINE_KRON4EK[@]} ${PROTON_PW_GIT[@]} ; do for GIVE_WINE_URL in ${WINE_GE_CUSTOM[@]} ${PROTON_GE_GIT[@]} ${WINE_KRON4EK[@]} ${PROTON_PW_GIT[@]} ; do
if [[ -n $(echo ${GIVE_WINE_URL} | grep -i "${PW_WINE_USE}") ]] ; then if [[ -n $(echo ${GIVE_WINE_URL} | grep -i "${PW_WINE_USE}") ]] ; then
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
########################################################################## ##########################################################################
export LAUNCH_PARAMETERS=("--silent") export LAUNCH_PARAMETERS=("--silent")
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/itch-setup.exe" export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/itch-setup.exe"
start_portwine start_portwine
if try_download "https://itch.io/app/download?platform=windows" "${PW_AUTOINSTALL_EXE}" no_mirror if try_download "https://itch.io/app/download?platform=windows" "${PW_AUTOINSTALL_EXE}" no_mirror
then then
pw_start_progress_bar_install_game "ITCH.IO." pw_start_progress_bar_install_game "ITCH.IO."
pw_kill_autostart itch.exe & pw_kill_autostart itch.exe &
pw_run "${PW_AUTOINSTALL_EXE}" pw_run "${PW_AUTOINSTALL_EXE}"
portwine_exe=`find "$WINEPREFIX/drive_c/users" -type f -name "itch.exe"` portwine_exe=$(find "$WINEPREFIX/drive_c/users" -type f -name "itch.exe")
# portwine_exe="$WINEPREFIX/drive_c/users/steamuser/AppData/Local/itch/app-25.5.1/itch.exe"
try_remove_file "${PW_AUTOINSTALL_EXE}" try_remove_file "${PW_AUTOINSTALL_EXE}"
try_remove_file "${portwine_exe}.ppdb" try_remove_file "${portwine_exe}.ppdb"
kill_portwine kill_portwine
......
#!/usr/bin/env bash #!/usr/bin/env bash
# Author: cefeiko # Author: cefeiko
######################################################################## ########################################################################
export PW_PREFIX_NAME=DOTNET export PW_PREFIX_NAME="OSU"
export PORTWINE_CREATE_SHORTCUT_NAME="OSU" export PORTWINE_CREATE_SHORTCUT_NAME="OSU"
start_portwine start_portwine
...@@ -18,10 +18,9 @@ then ...@@ -18,10 +18,9 @@ then
export portwine_exe="$WINEPREFIX/drive_c/Program Files (x86)/OSU/osu!.exe" export portwine_exe="$WINEPREFIX/drive_c/Program Files (x86)/OSU/osu!.exe"
pw_create_unique_exe pw_create_unique_exe
try_remove_file "${portwine_exe}.ppdb" try_remove_file "${portwine_exe}.ppdb"
# pw_run "${PW_AUTOINSTALL_EXE}"
pw_stop_progress_bar pw_stop_progress_bar
portwine_create_shortcut portwine_create_shortcut
kill_portwine kill_portwine
fi fi
stop_portwine stop_portwine
\ No newline at end of file
#!/usr/bin/env bash #!/usr/bin/env bash
# Author: cefeiko # Author: cefeiko
######################################################################## ########################################################################
export PW_PREFIX_NAME=DOTNET export PW_PREFIX_NAME="DOTNET"
export PORTWINE_CREATE_SHORTCUT_NAME="Pulse Online" export PORTWINE_CREATE_SHORTCUT_NAME="Pulse Online"
start_portwine start_portwine
......
...@@ -6,6 +6,7 @@ export PW_PREFIX_NAME="VK_PLAY" ...@@ -6,6 +6,7 @@ export PW_PREFIX_NAME="VK_PLAY"
export PW_AUTOINSTALL_EXE="${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/users/steamuser/AppData/Local/VKPlayLoader.exe" export PW_AUTOINSTALL_EXE="${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/users/steamuser/AppData/Local/VKPlayLoader.exe"
export WINEDLLOVERRIDES="mscoree,mshtml=" export WINEDLLOVERRIDES="mscoree,mshtml="
export PW_MUST_HAVE_DLL="" export PW_MUST_HAVE_DLL=""
export PW_WINE_USE="WINE_LG"
start_portwine start_portwine
if try_download "https://static.gc.my.games/VKPlayLoader.exe" "${PW_AUTOINSTALL_EXE}" no_mirror if try_download "https://static.gc.my.games/VKPlayLoader.exe" "${PW_AUTOINSTALL_EXE}" no_mirror
......
#!/usr/bin/env bash #!/usr/bin/env bash
#Author: Castro-Fidel (linux-gaming.ru) #Author: Castro-Fidel (linux-gaming.ru)
#SCRIPTS_NEXT_VERSION=2352 #SCRIPTS_NEXT_VERSION=2353
#SCRIPTS_STABLE_VERSION=2342 #SCRIPTS_STABLE_VERSION=2342
######################################################################## ########################################################################
# export PROTON_USE_XALIA="1" # export PROTON_USE_XALIA="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