Linux环境下默认安装LibreOffice7.3, 检测Office组件新增LibreOffice 7.3 7.4 版本

pull/56/head
陈精华 2 years ago
parent b366d0b464
commit 5134f7a121

@ -112,6 +112,8 @@ public class OfficeUtils {
"/opt/libreoffice7.0",
"/opt/libreoffice7.1",
"/opt/libreoffice7.2",
"/opt/libreoffice7.3",
"/opt/libreoffice7.4",
"/opt/openoffice4",
"/usr/lib/openoffice",
"/usr/lib/libreoffice"

@ -2,12 +2,12 @@
cd /tmp
install_redhat() {
wget https://kkfileview.keking.cn/LibreOffice_7.1.4_Linux_x86-64_rpm.tar.gz -cO LibreOffice_7_rpm.tar.gz && tar -zxf /tmp/LibreOffice_7_rpm.tar.gz && cd /tmp/LibreOffice_7.1.4.2_Linux_x86-64_rpm/RPMS
wget https://kkfileview.keking.cn/LibreOffice_7.3.7_Linux_x86-64_rpm.tar.gz -cO LibreOffice_7_rpm.tar.gz && tar -zxf /tmp/LibreOffice_7_rpm.tar.gz && cd /tmp/LibreOffice_7.3.7.2_Linux_x86-64_rpm/RPMS
echo $?
if [ $? -eq 0 ];then
yum install -y libXext.x86_64
yum install -y libSM.x86_64 libXrender.x86_64 libXext.x86_64
yum groupinstall -y "X Window System"
yum localinstall *.rpm
yum localinstall -y *.rpm
echo 'install finshed...'
else
echo 'download package error...'
@ -15,7 +15,7 @@ install_redhat() {
}
install_ubuntu() {
wget https://kkfileview.keking.cn/LibreOffice_7.1.4_Linux_x86-64_deb.tar.gz -cO LibreOffice_7_deb.tar.gz && tar -zxf /tmp/LibreOffice_7_deb.tar.gz && cd /tmp/LibreOffice_7.1.4.2_Linux_x86-64_deb/DEBS
wget https://kkfileview.keking.cn/LibreOffice_7.3.7_Linux_x86-64_deb.tar.gz -cO LibreOffice_7_deb.tar.gz && tar -zxf /tmp/LibreOffice_7_deb.tar.gz && cd /tmp/LibreOffice_7.3.7.2_Linux_x86-64_deb/DEBS
echo $?
if [ $? -eq 0 ];then
apt-get install -y libxinerama1 libcairo2 libcups2 libx11-xcb1
@ -33,4 +33,4 @@ if [ -f "/etc/redhat-release" ]; then
else
apt-get install -y wget
install_ubuntu
fi
fi

@ -9,7 +9,7 @@
# Description: v1.1pid
#############################
#
DIR_HOME=("/opt/openoffice.org3" "/opt/libreoffice" "/opt/libreoffice6.1" "/opt/libreoffice7.0" "/opt/libreoffice7.1" "/opt/openoffice4" "/usr/lib/openoffice" "/usr/lib/libreoffice")
DIR_HOME=("/opt/openoffice.org3" "/opt/libreoffice" "/opt/libreoffice6.1" "/opt/libreoffice7.0" "/opt/libreoffice7.1" "/opt/libreoffice7.2" "/opt/libreoffice7.3" "/opt/libreoffice7.4" "/opt/openoffice4" "/usr/lib/openoffice" "/usr/lib/libreoffice")
FLAG=
OFFICE_HOME=
KKFILEVIEW_BIN_FOLDER=$(cd "$(dirname "$0")" || exit 1 ;pwd)
@ -32,7 +32,7 @@ else
grep 'office\.home' ../config/application.properties | grep '!^#'
if [ $? -eq 0 ]; then
echo "Using customized office.home"
else
else
for i in ${DIR_HOME[@]}
do
if [ -f "$i/program/soffice.bin" ]; then
@ -42,9 +42,9 @@ else
fi
done
if [ ! -n "${FLAG}" ]; then
echo "Installing OpenOffice"
echo "Installing LibreOffice"
sh ./install.sh
else
else
echo "Detected office component has been installed in $OFFICE_HOME"
fi
fi

Loading…
Cancel
Save