reshade-ffxiv.sh
· 2.2 KiB · Bash
Surowy
#!/bin/bash
set -euo pipefail
if [[ "${*}" == *--steam* ]]; then
steamDir="${HOME}/.var/app/com.valvesoftware.Steam"
xivlauncherDir="${steamDir}/.xlcore"
ffxivDir="${steamDir}/.local/share/Steam/steamapps/common/FINAL FANTASY XIV Online"
else
xivlauncherDir="${HOME}/.xlcore"
ffxivDir="${xivlauncherDir}/ffxiv"
fi
if [[ "${*}" == *--steam* ]]; then
export MAIN_PATH="${steamDir}/.local/share/reshade"
fi
export RESHADE_ADDON_SUPPORT=1
printf \
'\nDownloading reshade-linux.sh...\n'
curl \
-#LOC- \
--output-dir '/tmp' \
'https://github.com/kevinlekiller/reshade-steam-proton/raw/main/reshade-linux.sh'
printf \
'\nDownloading gposingway.zip...\n'
curl \
-#LOC- \
--output-dir '/tmp' \
'https://github.com/gposingway/gposingway/releases/latest/download/gposingway.zip'
printf \
'\nDownloading d3dx9.tar.xz...\n'
curl \
-#LOC- \
--output-dir '/tmp' \
'https://proxy.usebottles.com/redistributable/dependencies/d3dx9.tar.xz'
printf \
"\nFFXIV game path:\n${ffxivDir}/game\n\nPress [Enter] to continue\n\n"
read -r
bash \
'/tmp/reshade-linux.sh'
if [[ -e "${ffxivDir}/game/ReShade.ini" ]] && [[ ! -e "${ffxivDir}/game/ReShade.ini.bak" ]]; then
mv \
"${ffxivDir}/game/ReShade.ini" \
"${ffxivDir}/game/ReShade.ini.bak"
printf \
'\nRenamed ReShade.ini to ReShade.ini.bak\n'
fi
printf '\nExtracting gposingway.zip...\n'
7z \
x \
-aos \
-o"${ffxivDir}/game" \
'/tmp/gposingway.zip' \
&> /dev/null
if [[ -e "${xivlauncherDir}/wineprefix/drive_c/windows/system32/d3dcompiler_47.dll" ]] && [[ ! -e "${xivlauncherDir}/wineprefix/drive_c/windows/system32/d3dcompiler_47.dll.bak" ]]; then
mv \
"${xivlauncherDir}/wineprefix/drive_c/windows/system32/d3dcompiler_47.dll" \
"${xivlauncherDir}/wineprefix/drive_c/windows/system32/d3dcompiler_47.dll.bak"
printf \
'\nRenamed d3dcompiler_47.dll to d3dcompiler_47.dll.bak\n'
tar \
--directory "${xivlauncherDir}/wineprefix/drive_c/windows/system32/" \
--extract \
--skip-old-files \
--strip-components 2 \
--file '/tmp/d3dx9.tar.xz' \
'd3dx9/win32/d3dcompiler_47.dll'
printf \
'\nExtracted d3dcompiler_47.dll\n'
fi
rm \
'/tmp/reshade-linux.sh'
rm \
'/tmp/gposingway.zip'
rm \
'/tmp/d3dx9.tar.xz'
printf '\nReShade & GPosingWay have been installed\n\n'
| 1 | #!/bin/bash |
| 2 | set -euo pipefail |
| 3 | |
| 4 | |
| 5 | if [[ "${*}" == *--steam* ]]; then |
| 6 | steamDir="${HOME}/.var/app/com.valvesoftware.Steam" |
| 7 | xivlauncherDir="${steamDir}/.xlcore" |
| 8 | ffxivDir="${steamDir}/.local/share/Steam/steamapps/common/FINAL FANTASY XIV Online" |
| 9 | else |
| 10 | xivlauncherDir="${HOME}/.xlcore" |
| 11 | ffxivDir="${xivlauncherDir}/ffxiv" |
| 12 | fi |
| 13 | |
| 14 | |
| 15 | if [[ "${*}" == *--steam* ]]; then |
| 16 | export MAIN_PATH="${steamDir}/.local/share/reshade" |
| 17 | fi |
| 18 | |
| 19 | export RESHADE_ADDON_SUPPORT=1 |
| 20 | |
| 21 | printf \ |
| 22 | '\nDownloading reshade-linux.sh...\n' |
| 23 | |
| 24 | curl \ |
| 25 | -#LOC- \ |
| 26 | --output-dir '/tmp' \ |
| 27 | 'https://github.com/kevinlekiller/reshade-steam-proton/raw/main/reshade-linux.sh' |
| 28 | |
| 29 | printf \ |
| 30 | '\nDownloading gposingway.zip...\n' |
| 31 | |
| 32 | curl \ |
| 33 | -#LOC- \ |
| 34 | --output-dir '/tmp' \ |
| 35 | 'https://github.com/gposingway/gposingway/releases/latest/download/gposingway.zip' |
| 36 | |
| 37 | printf \ |
| 38 | '\nDownloading d3dx9.tar.xz...\n' |
| 39 | |
| 40 | curl \ |
| 41 | -#LOC- \ |
| 42 | --output-dir '/tmp' \ |
| 43 | 'https://proxy.usebottles.com/redistributable/dependencies/d3dx9.tar.xz' |
| 44 | |
| 45 | printf \ |
| 46 | "\nFFXIV game path:\n${ffxivDir}/game\n\nPress [Enter] to continue\n\n" |
| 47 | |
| 48 | read -r |
| 49 | |
| 50 | bash \ |
| 51 | '/tmp/reshade-linux.sh' |
| 52 | |
| 53 | if [[ -e "${ffxivDir}/game/ReShade.ini" ]] && [[ ! -e "${ffxivDir}/game/ReShade.ini.bak" ]]; then |
| 54 | mv \ |
| 55 | "${ffxivDir}/game/ReShade.ini" \ |
| 56 | "${ffxivDir}/game/ReShade.ini.bak" |
| 57 | |
| 58 | printf \ |
| 59 | '\nRenamed ReShade.ini to ReShade.ini.bak\n' |
| 60 | fi |
| 61 | |
| 62 | printf '\nExtracting gposingway.zip...\n' |
| 63 | |
| 64 | 7z \ |
| 65 | x \ |
| 66 | -aos \ |
| 67 | -o"${ffxivDir}/game" \ |
| 68 | '/tmp/gposingway.zip' \ |
| 69 | &> /dev/null |
| 70 | |
| 71 | if [[ -e "${xivlauncherDir}/wineprefix/drive_c/windows/system32/d3dcompiler_47.dll" ]] && [[ ! -e "${xivlauncherDir}/wineprefix/drive_c/windows/system32/d3dcompiler_47.dll.bak" ]]; then |
| 72 | mv \ |
| 73 | "${xivlauncherDir}/wineprefix/drive_c/windows/system32/d3dcompiler_47.dll" \ |
| 74 | "${xivlauncherDir}/wineprefix/drive_c/windows/system32/d3dcompiler_47.dll.bak" |
| 75 | |
| 76 | printf \ |
| 77 | '\nRenamed d3dcompiler_47.dll to d3dcompiler_47.dll.bak\n' |
| 78 | |
| 79 | tar \ |
| 80 | --directory "${xivlauncherDir}/wineprefix/drive_c/windows/system32/" \ |
| 81 | --extract \ |
| 82 | --skip-old-files \ |
| 83 | --strip-components 2 \ |
| 84 | --file '/tmp/d3dx9.tar.xz' \ |
| 85 | 'd3dx9/win32/d3dcompiler_47.dll' |
| 86 | |
| 87 | printf \ |
| 88 | '\nExtracted d3dcompiler_47.dll\n' |
| 89 | fi |
| 90 | |
| 91 | rm \ |
| 92 | '/tmp/reshade-linux.sh' |
| 93 | |
| 94 | rm \ |
| 95 | '/tmp/gposingway.zip' |
| 96 | |
| 97 | rm \ |
| 98 | '/tmp/d3dx9.tar.xz' |
| 99 | |
| 100 | printf '\nReShade & GPosingWay have been installed\n\n' |