PW_WGC 1011 Bytes
Newer Older
1
#!/usr/bin/env bash
2 3 4 5
# Author: cefeiko
########################################################################
export LAUNCH_PARAMETERS=("/VERYSILENT")
[ "${update_loc}" = "RUS" ] && export WGC_LOC=RU || export WGC_LOC=EU
castro-fidel's avatar
castro-fidel committed
6
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/Wargaming_Game_Center_Install_WoT_${WGC_LOC}.exe"
Boria138's avatar
Boria138 committed
7
export PW_PREFIX_NAME="WGC"
8
export PW_WINE_USE="PROTON_LG_8-4"
9

10
gui_proton_downloader silent "${PW_WINE_USE}"
11
start_portwine
12

13
if try_download "https://redirect.wargaming.net/WGC/Wargaming_Game_Center_Install_WoT_${WGC_LOC}.exe"  "${PW_AUTOINSTALL_EXE}"
14
then
castro-fidel's avatar
castro-fidel committed
15 16 17
    pw_start_progress_bar_block "Starting WGC installation..."
    pw_kill_autostart wgc.exe &
    pw_run "${PW_AUTOINSTALL_EXE}"
Castro_Fidel's avatar
Castro_Fidel committed
18
    portwine_exe="$WINEPREFIX/drive_c/ProgramData/Wargaming.net/GameCenter/api/wgc_api.exe"
19
    export PORTWINE_CREATE_SHORTCUT_NAME="Wargaming Game Center"
castro-fidel's avatar
castro-fidel committed
20
    try_remove_file "${PW_AUTOINSTALL_EXE}"
Mikhail Tergoev's avatar
Mikhail Tergoev committed
21
    try_remove_file "${portwine_exe}.ppdb"
22 23 24 25
    kill_portwine
    portwine_create_shortcut
fi
stop_portwine