跳到网页内文区。

:::

如何由最新原始码编译 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 的编译法待测。