window 下编译LibreOffice源码

最权威的社区链接https://wiki.documentfoundation.org/Development/BuildingOnWindows

也许英文好的人直接看wiki上的说明就能很容易的编译并搭建好LibreOffice。

 

编译过程中遇到任何问题,欢迎加qq群:174768656

 

一、下载Cygwin

链接:http://www.cygwin.com/  win(32位)下载 setup-x86.exe, win(64位)下载 setup-x86_64.exe

 

二、使用Cygwin搭建环境

打开Windows 命令行,切换到cygwin下载目录,运行以下命令:

win(32位):

setup-x86.exe -P autoconf -P automake -P bison -P cabextract -P doxygen -P flex -P gcc-g++ -P git -P gnupg -P gperf -P make -P mintty -P nasm -P openssh -P openssl -P patch -P perl -P python -P python3 -P pkg-config -P rsync -P unzip -P vim -P wget -P zip -P perl_vendor

win(64位):

setup-x86_64.exe -P autoconf -P automake -P bison -P cabextract -P doxygen -P flex -P gcc-g++ -P git -P gnupg -P gperf -P make -P mintty -P nasm -P openssh -P openssl -P patch -P perl -P python -P python3 -P pkg-config -P rsync -P unzip -P vim -P wget -P zip -P perl-Archive-Zip

 

三、安装Windows编译所需要的工具

1)JDK 安装 下载链接:http://www.oracle.com/technetwork/java/javase/downloads/index.html

2)Visual Studio安装

    LibreOffice 4.4版本需要Visual Studio 2012以上版本,LibreOffice 5.0需要Visual Studio 2013以上版本。LibreOffice 5.4需要Visual Studio 2015以上版本。LibreOffice 6.2需要Visual Studio 2017以上版本。

    最新版的代码需要Visual Studio 2017以上版本

3)GUN make 下载链接:http://dev-www.libreoffice.org/bin/cygwin/make-85047eb-msvc.exe

      下载完make-85047eb-msvc.exe并将其命名为make,放在Cygwin安装目录的/opt/lo/bin\路径下(我的完整路径:D:\cygwin\opt\lo\bin\make)。

4)apache-ant-1.9.4,下载链接:https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.5-bin.tar.bz2

      junit-4.10.jar,下载链接:http://downloads.sourceforge.net/project/junit/junit/4.10/junit-4.10.jar

     并将其放在相应目录下(ant解压后放,junit则不需要解压,我的完整路径:D:\LibreOfficeComplie\apache-ant-1.9.4 ,D:\LibreOfficeComplie\Junit\junit-4.10.jar)

5)使用git下载LibreOffice源码 git命令:git clone git://gerrit.libreoffice.org/core libo-core

   (LibreOffice完整路径:D:\LibreOfficeComplie\5.3.3.2)

 

四、编译LibreOffice

1)在LibreOffice源码同级目录下建立一个build目录,存放编译产生文件(D:\LibreOfficeComplie\build)

2)运行Cygwin,进入上一步新建的build目录,运行以下命令

../5.3.3.2/autogen.sh \

--with-external-tar=/cygdrive/d/LibreOfficeComplie/lo-externalsrc \

--with-junit=/cygdrive/d/LibreOfficeComplie/Junit/junit-4.10.jar \

--with-ant-home=/cygdrive/d/LibreOfficeComplie/apache-ant-1.9.4 \

--with-visual-studio=2015 \

--with-windows-sdk=7.1A \

--enable-pch \

--enable-debug \

--disable-ccache \

--disable-activex \

--disable-atl \

--disable-odk

3)配置成功后会出现以下信息

然后就是运行/opt/lo/bin make进行LibreOffice的编译。接下来是个漫长的等待。

 

五、终端输入./instir/program/soffice便可以启动LibreOffice了

 

六、使用visual studio调试LibreOffice。

此图是点击write 字符对话框OK按钮时的断点。

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值