Skip to main content

在 Ubuntu 20.04 環境下編譯 OxOffice Online v4 社群版

請先安裝 Ubuntu 20.04(可參照 Ubuntu Server 20.04 基本安裝),然後執行系統更新並安裝必要的軟體包

sudo apt update
sudo apt upgrade -y
sudo apt install vim openssh-server net-tools curl git -y
# 如果有重新啟動服務的提示,請選擇 yes 即可
curl http://www.oxoffice.com.tw/deb/OSSII-2022.key | sudo apt-key add
cd /etc/apt/sources.list.d/
sudo wget http://www.oxoffice.com.tw/deb/oxool-community-v4-focal.list
sudo apt update
sudo apt install oxoffice* libpoco-dev libgumbo-dev

安裝更多編譯時需要的軟體包

sudo apt update
sudo apt install -y build-essential libsqlite3-dev libcurl4-openssl-dev libcppunit-dev libcap-dev libtool libpng-dev automake m4 wget curl autoconf pkg-config openssl libgumbo-dev ccache fontconfig libfontconfig1-dev
sudo apt install -y devscripts debhelper dh-systemd dh-exec
sudo apt install -y libodbc1 libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5
sudo apt install -y hunspell
sudo apt install -y python3-polib python3-lxml

安裝並設定 Node.js

cd ~
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt install -y nodejs

將 OxOffice Online v4 社群版的原始碼 clone 下來

cd ~
git clone https://github.com/OSSII/oxool-community.git
cd oxool-community
git switch v4

編譯 OxOffice Online v4 社群版

debuild -b -uc -us

編譯好的 deb 軟體包會放在編譯用目錄的上層

cd ..
ls oxool_4.x.x-1.community_amd64.deb

此處的 DEB 軟體包即可用來安裝。