#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
TITLE=
"LibreOffice"
VCRUNTIME=
false
LO_FRESH_VER=
"5.0.4"
MD5_LO_FRESH=
"741eec1061aca21ee3305f9e8f1594e7"
LO_STILL_VER=
"4.4.7"
MD5_LO_STILL=
"8239967f4181dffff11bfd5631e6e219"
TITLE_LO_FRESH=
"LibreOffice $LO_FRESH_VER"
PREFIX_LO_FRESH=
"LibreOffice_$LO_FRESH_VER"
TITLE_LO_STILL=
"LibreOffice $LO_STILL_VER"
PREFIX_LO_STILL=
"LibreOffice_$LO_STILL_VER"
WINEDLLOVERRIDES=
"mscoree=d"
export
WINEDLLOVERRIDES
POL_SetupWindow_Init
POL_System_TmpCreate
"$TITLE"
POL_SetupWindow_InstallMethod
"LOCAL,DOWNLOAD"
if
[
"$INSTALL_METHOD"
=
"LOCAL"
]
then
cd
"$HOME"
POL_SetupWindow_browse
"$(eval_gettext 'Please select the setup file to run.')"
"$TITLE"
""
"Windows Msi (*.msi)|*.msi;*.MSI"
if
[
"$(echo $APP_ANSWER | grep -o "
LibreOffice_4
")"
!=
""
]
then
VCRUNTIME=
true
fi
INSTALLER=
"$APP_ANSWER"
PREFIX=
"$TITLE"
elif
[
"$INSTALL_METHOD"
=
"DOWNLOAD"
]
then
cd
"$POL_System_TmpDir"
POL_SetupWindow_menu_list
"$(eval_gettext 'Which version')"
"$TITLE"
"$TITLE_LO_FRESH|$TITLE_LO_STILL"
"|"
if
[
"$APP_ANSWER"
=
"$TITLE_LO_FRESH"
]
then
POL_Download
"$URL_LO_FRESH"
"$MD5_LO_FRESH"
INSTALLER=
"$POL_System_TmpDir/$(basename "
$URL_LO_FRESH
")"
PREFIX=
"$PREFIX_LO_FRESH"
elif
[
"$APP_ANSWER"
=
"$TITLE_LO_STILL"
]
then
POL_Download
"$URL_LO_STILL"
"$MD5_LO_STILL"
INSTALLER=
"$POL_System_TmpDir/$(basename "
$URL_LO_STILL
")"
PREFIX=
"$PREFIX_LO_STILL"
VCRUNTIME=
true
fi
fi
POL_Wine_SelectPrefix
"$PREFIX"
POL_Wine_PrefixCreate
POL_Wine_WaitBefore
"$TITLE"
POL_Wine
msiexec
/i
"$INSTALLER"
if
[
"$VCRUNTIME"
=
true
]
then
POL_Call
POL_Install_vcrun2012
fi
POL_System_TmpDelete
POL_Shortcut
"soffice.exe"
"$TITLE"
POL_SetupWindow_Close
exit