PW_WOSB 2.13 KB
Newer Older
castro-fidel's avatar
castro-fidel committed
1 2 3 4 5 6
#!/usr/bin/env bash
# Author: Cefeiko
########################################################################
export PW_PREFIX_NAME="DOTNET"
export PW_DLL_INSTALL="faudio dotnet48"
export PW_VULKAN_USE=1
Mikhail Tergoev's avatar
Mikhail Tergoev committed
7
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/wos_client.exe"
castro-fidel's avatar
castro-fidel committed
8

9
WOSB_VERSION="$(curl -s --list-only --connect-timeout 3 https://www.worldofseabattle.com/download2 2>/dev/null | grep 'installer.exe' | awk -F'xsolla-launcher-update/' '{print $2}' | awk -F'/' '{print $1}')"
10
[[ -n "$WOSB_VERSION" ]] && print_info "Found version: $WOSB_VERSION" || yad_error "Error while get version of WOSB INSTALLER."
11

castro-fidel's avatar
castro-fidel committed
12
start_portwine
Mikhail Tergoev's avatar
Mikhail Tergoev committed
13
if try_download "https://installer.launcher.xsolla.com/xlauncher-builds/xsolla-launcher-update/${WOSB_VERSION}/bin/installer.exe" "${PW_AUTOINSTALL_EXE}" no_mirror
castro-fidel's avatar
castro-fidel committed
14
then
15
    pw_start_progress_bar_block "Installing World of Sea Battle."
Mikhail Tergoev's avatar
Mikhail Tergoev committed
16 17 18 19 20
    create_new_dir "$WINEPREFIX/drive_c/WoSB"
    "$pw_7z" x -y "${PW_AUTOINSTALL_EXE}" -o"$WINEPREFIX/drive_c/WoSB"
    try_remove_file "${PW_AUTOINSTALL_EXE}"
    try_remove_file "${portwine_exe}.ppdb"
    portwine_exe="$WINEPREFIX/drive_c/WoSB/launcher.exe"
castro-fidel's avatar
castro-fidel committed
21
    pw_stop_progress_bar
22

23
    export PW_NO_RESTART_PPDB="1"
24
    if [[ "$LANGUAGE" == "ru" ]] ; then
25
        export PORTWINE_CREATE_SHORTCUT_NAME="World of Sea Battle RU"
26 27 28 29 30 31
        pw_create_unique_exe "wosb_launcher_ru"
        try_remove_file "${portwine_exe}.ppdb"
        export PW_SKIP_RESTART_STEAM=1
        portwine_create_shortcut block_name
    fi

32
    export PORTWINE_CREATE_SHORTCUT_NAME="World of Sea Battle EN"
33 34 35 36
    pw_create_unique_exe "wosb_launcher_en"
    try_remove_file "${portwine_exe}.ppdb"
    portwine_create_shortcut block_name

castro-fidel's avatar
castro-fidel committed
37 38
fi
stop_portwine
Mikhail Tergoev's avatar
Mikhail Tergoev committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56




start_portwine
if try_download "${PW_URL_CEMU}" "${PW_AUTOINSTALL_EXE}" no_mirror
then
    pw_start_progress_bar_install_game "Cemu."
    
    portwine_exe="$WINEPREFIX/drive_c/Program Files (x86)/`echo ${PW_URL_CEMU} | awk -F/ '{print $5}' | sed 's/.zip//'`/Cemu.exe"
    try_remove_file "${PW_AUTOINSTALL_EXE}"
    try_remove_file "${portwine_exe}.ppdb"
    kill_portwine
    pw_stop_progress_bar
    export PORTWINE_CREATE_SHORTCUT_NAME="Cemu"
    portwine_create_shortcut
fi
stop_portwine