PW_MW 918 Bytes
Newer Older
1 2 3 4
#!/usr/bin/env bash
# Author: ValoKarDin
########################################################################
export LAUNCH_PARAMETERS=("/VERYSILENT")
5 6 7
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/modern_warships.exe"
export PW_PREFIX_NAME="MODERN_WARSHIPS"
export PORTWINE_CREATE_SHORTCUT_NAME="Modern Warships"
8 9 10 11 12

start_portwine

if try_download_game "https://gdn.gaijin.net/launcher/current.php?id=ModernWarshipsLauncher"  "${PW_AUTOINSTALL_EXE}"
then
13
    pw_start_progress_bar_block "${loc_gui_installing_the} Modern Warships. ${loc_gui_please_wait} "
14 15
    pw_kill_autostart launcher.exe &
    pw_run "${PW_AUTOINSTALL_EXE}"
16 17
    portwine_exe="$WINEPREFIX/drive_c/users/$USER/AppData/Local/ModernWarships/launcher.exe"
    pw_create_unique_exe "modern_warships_pp"
18 19 20 21 22 23 24
    try_remove_file "${PW_AUTOINSTALL_EXE}"
    try_remove_file "${portwine_exe}.ppdb"
    kill_portwine
    portwine_create_shortcut
fi

stop_portwine