From 5134f7a121f4efe95addfc410244c127d32b6789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=B2=BE=E5=8D=8E?= <842761733@qq.com> Date: Fri, 11 Nov 2022 10:52:08 +0800 Subject: [PATCH] =?UTF-8?q?Linux=E7=8E=AF=E5=A2=83=E4=B8=8B=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=AE=89=E8=A3=85LibreOffice7.3,=20=E6=A3=80=E6=B5=8B?= =?UTF-8?q?Office=E7=BB=84=E4=BB=B6=E6=96=B0=E5=A2=9ELibreOffice=207.3=207?= =?UTF-8?q?.4=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../artofsolving/jodconverter/office/OfficeUtils.java | 2 ++ server/src/main/bin/install.sh | 10 +++++----- server/src/main/bin/startup.sh | 8 ++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeUtils.java b/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeUtils.java index d155a2a1..5d567a57 100644 --- a/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeUtils.java +++ b/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeUtils.java @@ -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" diff --git a/server/src/main/bin/install.sh b/server/src/main/bin/install.sh index 9b35a762..e1dba40f 100644 --- a/server/src/main/bin/install.sh +++ b/server/src/main/bin/install.sh @@ -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 \ No newline at end of file +fi diff --git a/server/src/main/bin/startup.sh b/server/src/main/bin/startup.sh index 94da282e..25d3b49d 100644 --- a/server/src/main/bin/startup.sh +++ b/server/src/main/bin/startup.sh @@ -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) @@ -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