PW_CITRA 1.17 KB
Newer Older
1
#!/usr/bin/env bash
2 3 4
# Author: chal55rus (Sergey P.)
########################################################################
#export LAUNCH_PARAMETERS=("")
castro-fidel's avatar
castro-fidel committed
5
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/citra-setup-windows.exe"
6 7
export PORTWINE_CREATE_SHORTCUT_NAME="Citra"

8
start_portwine
9

Mikhail Tergoev's avatar
Mikhail Tergoev committed
10
if try_download "github.com/citra-emu/citra-web/releases/download/1.0/citra-setup-windows.exe" "${PW_AUTOINSTALL_EXE}" no_mirror
11
then
Mikhail Tergoev's avatar
Mikhail Tergoev committed
12
    pw_start_progress_bar_install_game "Citra."
castro-fidel's avatar
castro-fidel committed
13
    pw_run "${PW_AUTOINSTALL_EXE}"
14 15 16 17 18 19 20
    if [[ -f "$WINEPREFIX/drive_c/users/steamuser/AppData/Local/Citra/nightly/citra-qt.exe" ]] ; then
        export portwine_exe="$WINEPREFIX/drive_c/users/steamuser/AppData/Local/Citra/nightly/citra-qt.exe"
    elif [[ -f "$WINEPREFIX/drive_c/users/steamuser/AppData/Local/Citra/canary/citra-qt.exe" ]] ; then
        export portwine_exe="$WINEPREFIX/drive_c/users/steamuser/AppData/Local/Citra/canary/citra-qt.exe"
    else
        export portwine_exe=`find "$WINEPREFIX/drive_c/" -type f -name "citra-qt.exe"`
    fi
castro-fidel's avatar
castro-fidel committed
21
    try_remove_file "${PW_AUTOINSTALL_EXE}"
Mikhail Tergoev's avatar
Mikhail Tergoev committed
22
    try_remove_file "${portwine_exe}.ppdb"
23
    kill_portwine
castro-fidel's avatar
castro-fidel committed
24
    pw_stop_progress_bar
25 26
    portwine_create_shortcut
fi
27

28
stop_portwine