#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
TITLE=
"Final Fantasy XIV - A Realm Reborn"
PREFIX=
"FFXIV"
WORKINGWINEVERSION=
"1.9.10"
POL_SetupWindow_Init
POL_SetupWindow_SetID 1999
POL_Debug_Init
POL_SetupWindow_InstallMethod
"DOWNLOAD"
POL_Wine_SelectPrefix
"$PREFIX"
POL_Wine_PrefixCreate
"$WORKINGWINEVERSION"
Set_OS win7
if
[
"$INSTALL_METHOD"
==
"DOWNLOAD"
];
then
POL_SetupWindow_message
"$(eval_gettext 'The launcher will now be installed (After you press next).\nPlease install DirectX when asked to.\nAfter the installation the launcher will automatically start.\nPlease login when it does to let the game be downloaded and installed.\nWhen the game has finished please start the game once and then close it to continue the setup.\n\nPlease be patient as the installation may take some time.\n\n==Known issues==\n* The game will sometimes hang with a black screen when starting. Simply try again.\n* A rogue icon called ffxivsetup will sometimes be created in the POL menu during install. Simply remove it after the installation.\n* If sound is lagging then configure wine to use different sound settings via Wine Configuration. PulseAudio 5.1 Surround works for me.')"
"$TITLE"
POL_Wine_WaitBefore
"$TITLE"
POL_Wine
start
"ffxivsetup.exe"
POL_Wine_WaitExit
"$TITLE"
cd
"$WINEPREFIX/drive_c/$PROGRAMFILES/SquareEnix/FINAL FANTASY XIV - A Realm Reborn/boot/"
POL_Wine
start
"ffxivboot.exe"
sleep
5
killall ffxivboot.exe
cd
"$WINEPREFIX/drive_c/users/$USER/My Documents/My Games/FINAL FANTASY XIV - A Realm Reborn/"
sed
-i
's/BrowserType 0/BrowserType 2/g'
FFXIV_BOOT.cfg
cd
"$WINEPREFIX/drive_c/$PROGRAMFILES/SquareEnix/FINAL FANTASY XIV - A Realm Reborn/boot/"
POL_Wine
start
"ffxivboot.exe"
POL_SetupWindow_message
"$(eval_gettext 'The launcher will now start, login and let the game download.\nAfter that please start the game once and then turn it off together with the launcher, then press next to finish the installation.\n\nThe reason for this is that some changes need to be made to files that do not exist until after the game has started the first time.')"
"$TITLE"
cd
"$WINEPREFIX/drive_c/users/$USER/My Documents/My Games/FINAL FANTASY XIV - A Realm Reborn/"
sed
-i
's/CutsceneMovieOpening 0/CutsceneMovieOpening 1/g'
FFXIV.cfg
sed
-i
's/TextureAnisotropicQuality 0/TextureAnisotropicQuality 2/g'
FFXIV.cfg
sed
-i
's/SSAO 1/SSAO 2/g'
FFXIV.cfg
sed
-i
's/GrassQuality 2/GrassQuality 3/g'
FFXIV.cfg
sed
-i
's/TranslucentQuality 0/TranslucentQuality 1/g'
FFXIV.cfg
sed
-i
's/ShadowTextureSizeType 1/ShadowTextureSizeType 2/g'
FFXIV.cfg
sed
-i
's/StreamingType 0/StreamingType 1/g'
FFXIV.cfg
sed
-i
's/GeneralQuality 1/GeneralQuality 0/g'
FFXIV.cfg
sed
-i
's/OcclusionCulling 1/OcclusionCulling 0/g'
FFXIV.cfg
sed
-i
's/ReflectionType 0/ReflectionType 2/g'
FFXIV.cfg
else
POL_Call
POL_Install_steam
fi
POL_Shortcut
"ffxivboot.exe"
"$TITLE"
POL_SetupWindow_message
"$(eval_gettext 'Installation finished\n\nYou can mess around with the graphical settings in the game, although the most optimal ones has been set. You are advised to leave HDR and Occlusion Culling settings alone.')"
"$TITLE"
POL_SetupWindow_Close
exit
0