#!/usr/bin/env bash
#Author: dez
#Battle.net Launcher.exe
#Battle.net-Setup.exe
#Battle.net.exe
#Rating=5
################################################
#export PW_COMMENT_DB="We recommend using PROTON_GE + VULKAN!"
export PW_WINE_USE=PROTON_GE
export PW_VULKAN_USE=1
export LAUNCH_PARAMETERS=""
export WINEDLLOVERRIDES="locationapi="
export PW_DLL_INSTALL="vcrun2019 d3dx11_42 d3dx11_43"
export PW_WINDOWS_VER=10

add_in_start_portwine () {
    rm -fr "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/ProgramData/Agent/data"
    rm -fr "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/users/${USER}/Blizzard Entertainment/Battle.net/Cache"
    rm -fr "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/users/Public/Blizzard Entertainment/Battle.net/Cache"
    try_remove_file "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/windows/Fonts/sourcehansans.ttc"
    sed -i 's/"GrabFullscreen"="Y"/"GrabFullscreen"="N"/' "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/user.reg"
}
