#!/usr/bin/env bash
# Author: Boria138
########################################################################
export LAUNCH_PARAMETERS=("/q" )
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/RF4SetupRU.exe"
export PORTWINE_CREATE_SHORTCUT_NAME="Russian Fishing 4"
export PW_PREFIX_NAME="RUSSIAN_FISHING"

start_portwine
if try_download "https://cdn6.rf4game.ru/rf4/RF4SetupRU.exe" "${PW_AUTOINSTALL_EXE}" no_mirror
then
    create_new_dir "${WINEPREFIX}/drive_c/games/Russian Fishing 4"
    mv "${PW_USER_TEMP}/RF4SetupRU.exe" "${WINEPREFIX}/drive_c/games/Russian Fishing 4/RF4.exe"
    portwine_exe="${WINEPREFIX}/drive_c/games/Russian Fishing 4/RF4.exe"
    kill_portwine
    portwine_create_shortcut
fi
stop_portwine
