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

This commit is contained in:
陈精华
2022-11-11 10:52:08 +08:00
parent b366d0b464
commit 5134f7a121
3 changed files with 11 additions and 9 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -9,7 +9,7 @@
# Description: v1.1修改进程启动机制为pid形式
#############################
#
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)
@@ -42,7 +42,7 @@ else
fi
done
if [ ! -n "${FLAG}" ]; then
echo "Installing OpenOffice"
echo "Installing LibreOffice"
sh ./install.sh
else
echo "Detected office component has been installed in $OFFICE_HOME"