在windows下编译openOffice

准备工作:

1、首先请参照这两个链接,下载源码和相关的工具和库
2、因为用的是vs2008的编译器,如果不太方便的话,建议搭建一个虚拟机环境,这样容易成功些

运行相关的配置文件

1、运行cygwin,进入到你通过svn或下载压缩代码的方式获取到的openOffice源代码目录,cd   /path/to/openOffice/code,然后进入main目录
2、autoconf或autoconf*,看你当时安装cygwin的选择
3、./configure --help,查看相关的配置选项,我使用的是:
./configure --with-frame-home=/cygdrive/c/Program\ Files/Microsoft\ SDKs/Windows/v7.0 --with-psdk-home=/cygdrive/c/Program\ Files/Microsoft\ SDKs/Windows/v7.0 --with-midl-path=/cygdrive/c/Program\ Files/Microsoft\ SDKs/Windows/v7.0/Bin --with-directx-home=/cygdrive/c/Program\ Files/Microsoft\ DirectX\ SDK\ \(June\ 2010\) --with-atl-include-dir=/cygdrive/c/WinDDK/7600.16385.1/inc/atl71 --with-atl-lib-dir=/cygdrive/c/WinDDK/7600.16385.1/lib/ATL/i386/ --with-mfc-include-dir=/cygdrive/c/WinDDK/7600.16385.1/inc/mfc42 --with-mfc-lib-dir=/cygdrive/c/WinDDK/7600.16385.1/lib/Mfc/i386 --enable-pch --enable-dbgutil --with-dmake-url=http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2 --with-epm-url=http://www.msweet.org/files/project2/epm-3.7-source.tar.gz --with-nsis-path=/cygdrive/c/Program\ Files/NSIS/Unicode --with-junit=/cygdrive/c/Program\ Files/Java/jdk1.7.0_60/lib/junit-4.10.jar --with-lang="zh-CN" --enable-bundled-dictionaries --disable-unit-tests 
--disable-unit-tests:是因为google-test的测试框架代码下不来,采用的权益之计

 具体的配置按照个人当时的安装路径会有些不同 
 

4、./bootstrap,下载相关的第三方工具代码。
5、运行命令:source winenv.set.sh
6、cd instsetoo_native
7、运行 命令:build --all

猜你喜欢

转载自blog.csdn.net/flyonok/article/details/28862985