PW_LGC 819 Bytes
Newer Older
castro-fidel's avatar
castro-fidel committed
1 2 3 4 5
#!/usr/bin/env bash
# Author: chal55rus
########################################################################
export LAUNCH_PARAMETERS=("/VERYSILENT")
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/Lesta_Game_Center_Install_RU.exe"
Boria138's avatar
Boria138 committed
6
export PW_PREFIX_NAME="LGC"
7

castro-fidel's avatar
castro-fidel committed
8
start_portwine
9

Mikhail Tergoev's avatar
Mikhail Tergoev committed
10
if try_download "https://redirect.lesta.ru/LGC/Lesta_Game_Center_Install_RU.exe" "${PW_AUTOINSTALL_EXE}" no_mirror
11
then
Mikhail Tergoev's avatar
Mikhail Tergoev committed
12
    pw_start_progress_bar_install_game "Lesta Game Center"
13 14
    pw_kill_autostart lgc.exe &
    pw_run "${PW_AUTOINSTALL_EXE}"
castro-fidel's avatar
castro-fidel committed
15
    portwine_exe="$WINEPREFIX/drive_c/ProgramData/Lesta/GameCenter/api/lgc_api.exe"
16 17
    export PORTWINE_CREATE_SHORTCUT_NAME="Lesta Game Center"
    try_remove_file "${PW_AUTOINSTALL_EXE}"
Mikhail Tergoev's avatar
Mikhail Tergoev committed
18
    try_remove_file "${portwine_exe}.ppdb"
19 20
    kill_portwine
    portwine_create_shortcut
castro-fidel's avatar
castro-fidel committed
21
fi
22

castro-fidel's avatar
castro-fidel committed
23
stop_portwine