PW_EPIC 1.25 KB
Newer Older
1
#!/usr/bin/env bash
castro-fidel's avatar
castro-fidel committed
2
# Author: Castro-Fidel (linux-gaming.ru)
3 4
########################################################################
export LAUNCH_PARAMETERS=("/q" )
castro-fidel's avatar
castro-fidel committed
5 6
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/EpicGamesLauncherInstaller.msi"
export PW_USE_D3D_EXTRAS=1
Mikhail Tergoev's avatar
Mikhail Tergoev committed
7

8
start_portwine
castro-fidel's avatar
castro-fidel committed
9
if try_download "launcher-public-service-prod06.ol.epicgames.com/launcher/api/installer/download/EpicGamesLauncherInstaller.msi" "${PW_AUTOINSTALL_EXE}"
10
then
castro-fidel's avatar
castro-fidel committed
11 12 13
    pw_start_progress_bar_block "Installing Epic Games Launcher. Please wait..."
#    pw_kill_autostart EpicGamesLauncher.exe &
    pw_run msiexec /i "${PW_AUTOINSTALL_EXE}"
Mikhail Tergoev's avatar
Mikhail Tergoev committed
14 15 16 17 18 19 20 21
#     sleep 10
#     if [ ! -z `pgrep msiexec* | head -n 1` ] ; then
#         while [ ! -z `pgrep msiexec* | head -n 1` ] || [ ! -z `pgrep rundll32* | head -n 1` ] || [ ! -z `pgrep -a wrap | grep ${portname} | head -n 1` ]
#         do
#             [ ! -z `pgrep rundll32* | head -n 1` ] && kill -n 9 `pgrep rundll32* | head -n 1` && echo "Kill rundll32.exe"
#             sleep 5
#         done
#     fi
22
    portwine_exe="$WINEPREFIX/drive_c/Program Files (x86)/Epic Games/Launcher/Portal/Binaries/Win32/EpicGamesLauncher.exe"
castro-fidel's avatar
castro-fidel committed
23
    try_remove_file "${PW_AUTOINSTALL_EXE}"
24
    kill_portwine
castro-fidel's avatar
castro-fidel committed
25
    pw_stop_progress_bar
26 27 28
    portwine_create_shortcut
fi
stop_portwine