Add Modern Warships autoinstall file

This commit is contained in:
valokardin 2024-01-16 10:03:45 +02:00 committed by GitHub
parent c83970539c
commit 1cb3ecdad9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Author: ValoKarDin
########################################################################
export LAUNCH_PARAMETERS=("/VERYSILENT")
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/.exe"
export PW_PREFIX_NAME="MW"
start_portwine
if try_download_game "https://gdn.gaijin.net/launcher/current.php?id=ModernWarshipsLauncher" "${PW_AUTOINSTALL_EXE}"
then
pw_start_progress_bar_block "Starting Modern Warships installation..."
pw_kill_autostart launcher.exe &
pw_run "${PW_AUTOINSTALL_EXE}"
portwine_exe="$WINEPREFIX/drive_c/users/steamuser/AppData/Local/ModernWarships/launcher.exe"
export PORTWINE_CREATE_SHORTCUT_NAME="Modern Warships"
try_remove_file "${PW_AUTOINSTALL_EXE}"
try_remove_file "${portwine_exe}.ppdb"
kill_portwine
portwine_create_shortcut
fi
stop_portwine