跳到網頁內文區。

:::

如何由最新原始碼編譯 OpenOffice.org ?

唸書準備考試中,臨時寫一寫,有空再補完說明。內容如果有誤或不足,歡迎隨時補充。

版權所有 © 2011 依瑪貓。本文採用創用 CC 姓名標示-相同方式分享 3.0 台灣授權條款授權。

參考資料:Getting the source

完整步驟

# 下載
sudo apt-get install mercurial
mkdir /usr/local/src/openoffice.org
cd /usr/local/src/openoffice.org
wget -N http://hg.services.openoffice.org/bundle/DEV300.hg
hg init
hg unbundle DEV300.hg
hg pull http://hg.services.openoffice.org/DEV300
hg update

# 下載外部輔助程式
mkdir -p external/unowinreg
cd external/unowinreg
wget -N http://tools.openoffice.org/unowinreg_prebuild/680/unowinreg.dll
cd ../..

mkdir -p moz/download
cd moz/download
wget -N http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/2.0.11/source/seamonkey-2.0.11.source.tar.bz2
cd ../..

# 編譯
sudo apt-get install ant bison flex gcj gperf java-gcj-compat-dev \
  junit4 libarchive-zip-perl libcupsys2-dev libgnome-vfsmm-2.6-dev \
  libgstreamer-plugins-base0.10-dev libgtk2.0-dev libpam0g-dev \
  libxaw7-dev openjdk-6-jdk zip
./configure --with-lang=zh-TW
. ./bootstrap
cd instsetoo_native
../solenv/bin/build.pl --all -P2 -- -P2
cd ..

# 安裝
cd instsetoo_native/unxlngx6.pro/OpenOffice/deb/install/zh-TW/DEBS
sudo dpkg -i *.deb desktop-integration/*.deb
cd ../../../../../../..
cd instsetoo_native/unxlngx6.pro/OpenOffice_SDK/deb/install/en-US/DEBS
sudo dpkg -i *.deb
cd ../../../../../../..

注意事項

  1. 硬碟約需 15G( DEV300.hg 1G ,編譯好約 11.4G ),在飛龍四核上編譯約需一小時。
  2. hg 是 OpenOffice.org 用的版本管理系統 Mercurial 的程式。
  3. ./configure 不用設 --prefix ,設了也沒用。安裝目錄寫死固定在 /opt/openoffice.org3/opt/openoffice.org
  4. 不要用 make 。因為歷史因素, OpenOffice.org 用 build.pl 編譯。
  5. 編譯好不用 make install.deb 安裝檔在 instsetoo_native/unxlngx6.pro/OpenOffice/deb/install/zh-TW/DEBS 下, SDKinstsetoo_native/unxlngx6.pro/OpenOffice_SDK/deb/install/en-US/DEBS 下。 unxlngx6.pro 是我的 x86_64 ,不同的 CPU/OS 會用不同字串。如果是 Fedora/openSUSE ,應該會換成 RPM ,待測。
  6. 編譯出來的是最新原始碼的不穩定開發版本,請勿在production環境中使用。
  7. Windows 的編譯法待測。