Scripts version 2204

This commit is contained in:
Mikhail Tergoev
2023-06-29 14:12:14 +03:00
parent de073dfd9f
commit 5c9ab48a18
6 changed files with 26 additions and 35 deletions

View File

@ -13,26 +13,18 @@ try_download_lgc () {
}
start_portwine
if [[ -f "$WINEPREFIX/drive_c/ProgramData/Lesta/GameCenter/api/lgc_api.exe" ]] ; then
if [[ ! -f "$WINEPREFIX/drive_c/ProgramData/Wargaming.net/GameCenter/api/wgc_api.exe" ]] ; then
try_remove_file "${HOME}/.local/share/applications/Wargaming Game Center.desktop"
try_remove_file "${PORT_WINE_PATH}/Wargaming Game Center.desktop"
fi
export PORTWINE_CREATE_SHORTCUT_NAME="Lesta Game Center"
if try_download_lgc "redirect.lesta.ru/LGC/Lesta_Game_Center_Install_RU.exe" "${PW_AUTOINSTALL_EXE}"
then
pw_start_progress_bar_block "Starting LGC installation..."
pw_kill_autostart lgc.exe &
pw_run "${PW_AUTOINSTALL_EXE}"
portwine_exe="$WINEPREFIX/drive_c/ProgramData/Lesta/GameCenter/api/lgc_api.exe"
portwine_create_shortcut
else
if try_download_lgc "redirect.lesta.ru/LGC/Lesta_Game_Center_Install_RU.exe" "${PW_AUTOINSTALL_EXE}"
then
pw_start_progress_bar_block "Starting LGC installation..."
pw_kill_autostart lgc.exe &
pw_run "${PW_AUTOINSTALL_EXE}"
portwine_exe="$WINEPREFIX/drive_c/ProgramData/Lesta/GameCenter/api/lgc_api.exe"
export PORTWINE_CREATE_SHORTCUT_NAME="Lesta Game Center"
try_remove_file "${PW_AUTOINSTALL_EXE}"
export PORTWINE_CREATE_SHORTCUT_NAME="Lesta Game Center"
try_remove_file "${PW_AUTOINSTALL_EXE}"
try_remove_file "${portwine_exe}.ppdb"
kill_portwine
portwine_create_shortcut
fi
kill_portwine
portwine_create_shortcut
fi
stop_portwine