forked from CastroFidel/PortWINE
###Scripts version 2021###
This commit is contained in:
@ -4,8 +4,17 @@
|
||||
export LAUNCH_PARAMETERS=("/VERYSILENT")
|
||||
[ "${update_loc}" = "RUS" ] && export WGC_LOC=RU || export WGC_LOC=EU
|
||||
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/Wargaming_Game_Center_Install_WoT_${WGC_LOC}.exe"
|
||||
|
||||
try_download_wgc () {
|
||||
set -o pipefail
|
||||
wget -t 5 -T 3 "$1" --output-document="$2" 2>&1 | \
|
||||
tr '\r' '\n' | 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
|
||||
}
|
||||
|
||||
start_portwine
|
||||
if try_download "https://redirect.wargaming.net/WGC/Wargaming_Game_Center_Install_WoT_${WGC_LOC}.exe" "${PW_AUTOINSTALL_EXE}"
|
||||
if try_download_wgc "https://redirect.wargaming.net/WGC/Wargaming_Game_Center_Install_WoT_${WGC_LOC}.exe" "${PW_AUTOINSTALL_EXE}"
|
||||
then
|
||||
pw_start_progress_bar_block "Starting WGC installation..."
|
||||
pw_kill_autostart wgc.exe &
|
||||
|
Reference in New Issue
Block a user