#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
TITLE=
"Age of Conan: Unchained"
EDITOR=
"Funcom"
AUTHOR=
"Skjeggape"
SHORTCUT_FILENAME=
"ConanPatcher.exe"
SOFTWARE_CATEGORIES=
"Game;RolePlaying;MMORPG"
DOCUMENT_FILE=
"$WINEPREFIX/drive_c/Program Files/Funcom/Age of Conan/manual.pdf"
PREFIX=
"Age-of-Conan-Unchained"
WINEVERSION=
"8.1-staging"
OSVERSION=
"win10"
SYSTEM_ARC=
"auto"
POL_SetupWindow_Init
POL_Debug_Init
POL_SetupWindow_presentation
"$TITLE"
"$EDITOR"
"$GAME_URL"
"$AUTHOR"
"$PREFIX"
POL_RequiredVersion
"4.4.3"
|| POL_Debug_Fatal
"$APPLICATION_TITLE $VERSION is required to install $TITLE"
POL_Wine_SelectPrefix
"$PREFIX"
POL_System_SetArch
"$SYSTEM_ARC"
POL_Wine_PrefixCreate
"$WINEVERSION"
Set_OS
"$OSVERSION"
POL_System_TmpCreate
"$PREFIX"
POL_Call
POL_Install_d3dx9_41
POL_Call
POL_Install_d3dx9_43
POL_Call
POL_Install_d3dcompiler_43
POL_SetupWindow_message
"Warning: DXVK software can not work without Vulkan driver (on your OS), we can not automate this."
"$TITLE"
DXVK_VERSION=
"2.4.1"
MD5SUM=
"f2bb1a1a24b432c507304c77bce9f69d"
POL_SetupWindow_wait_next_signal
"$(eval_gettext 'Installing DXVK files...')"
"$TITLE"
cd
"$WINEPREFIX/drive_c/windows/temp"
tar
-xvzf
"$POL_USER_ROOT/ressources/dxvk-$DXVK_VERSION.tar.gz"
if
[
"$POL_ARCH"
==
"amd64"
];
then
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d8.dll"
"$WINEPREFIX/drive_c/windows/syswow64"
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d9.dll"
"$WINEPREFIX/drive_c/windows/syswow64"
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d10core.dll"
"$WINEPREFIX/drive_c/windows/syswow64"
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d11.dll"
"$WINEPREFIX/drive_c/windows/syswow64"
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/dxgi.dll"
"$WINEPREFIX/drive_c/windows/syswow64"
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x64/d3d8.dll"
"$WINEPREFIX/drive_c/windows/system32"
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x64/d3d9.dll"
"$WINEPREFIX/drive_c/windows/system32"
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x64/d3d10core.dll"
"$WINEPREFIX/drive_c/windows/system32"
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x64/d3d11.dll"
"$WINEPREFIX/drive_c/windows/system32"
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x64/dxgi.dll"
"$WINEPREFIX/drive_c/windows/system32"
else
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d8.dll"
"$WINEPREFIX/drive_c/windows/system32"
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d9.dll"
"$WINEPREFIX/drive_c/windows/system32"
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d10core.dll"
"$WINEPREFIX/drive_c/windows/system32"
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d11.dll"
"$WINEPREFIX/drive_c/windows/system32"
cp
-f
"$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/dxgi.dll"
"$WINEPREFIX/drive_c/windows/system32"
fi
POL_Debug_Message
"Overriding DXVK-DirectX DLL's"
POL_Call
POL_Function_OverrideDLL
"native"
"d3d8"
POL_Call
POL_Function_OverrideDLL
"native"
"d3d9"
POL_Call
POL_Function_OverrideDLL
"native"
"d3d10core"
POL_Call
POL_Function_OverrideDLL
"native"
"d3d11"
POL_Call
POL_Function_OverrideDLL
"native"
"dxgi"
POL_SetupWindow_InstallMethod
"LOCAL,DOWNLOAD"
POL_SetupWindow_message
"Warning: do not install DirectX. DirectX 10 dosn't work."
"$TITLE"
if
[
"$INSTALL_METHOD"
==
"DOWNLOAD"
];
then
cd
"$WINEPREFIX/drive_c"
POL_Wine
"ageofconan-en.exe"
POL_Wine_WaitBefore
"$TITLE"
cd
"$WINEPREFIX/drive_c"
rm
ageofconan-en.exe
POL_Shortcut
"$SHORTCUT_FILENAME"
"$TITLE"
""
""
"$SOFTWARE_CATEGORIES"
POL_Shortcut_QuietDebug
"$TITLE"
POL_Shortcut_Document
"$TITLE"
"$DOCUMENT_FILE"
elif
[
"$INSTALL_METHOD"
==
"LOCAL"
];
then
cd
"$HOME"
POL_SetupWindow_browse
"$(eval_gettext 'Please select the installation file (.EXE)')"
"$TITLE"
SETUP_EXE=
"$APP_ANSWER"
POL_Wine
start
/unix
"$SETUP_EXE"
POL_Wine_WaitExit
"$TITLE"
POL_Shortcut
"$SHORTCUT_FILENAME"
"$TITLE"
""
""
"$SOFTWARE_CATEGORIES"
POL_Shortcut_QuietDebug
"$TITLE"
POL_Shortcut_Document
"$TITLE"
"$DOCUMENT_FILE"
fi
POL_SetupWindow_message
"$(eval_gettext 'Installation is finished.')"
"$TITLE"
POL_System_TmpDelete
POL_SetupWindow_Close
exit
0