也许英文好的人直接看wiki上的说明就能很容易的编译并搭建好LibreOffice。
一、下载并安装Cygwin
链接:http://www.cygwin.com/ win7(32位)安装setup-x86.exe, win7(64位) setup-x86_64.exe
 
二、使用Cygwin搭建Linux环境
打开Windows 命令行,运行以下命令
win7(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

win7(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编译所需要的工具
2)Visual Studio安装
    LibreOffice 4.4版本需要Visual Studio 2012以上版本,LibreOffice5.0需要Visual Studio 2013以上版本。
    我编译的LibreOffice版本是4.3.3.2,所以我安装的是Visual Studio 2012.
      下载完make-85047eb-msvc.exe并将其命名为make,放在Cygwin安装目录的\opt\lo\bin\路径下(我的完整路径:D:\cygwin\opt\lo\bin\make)。
     并将其放在相应目录下(我的完整路径: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版本为4.3.3.2,LibreOffice主版本号已经是5.0以上了,LibreOffice完整路径:D:\LibreOfficeComplie\4.3.3.2)
 
四、编译LibreOffice
1)在LibreOffice源码同级目录下建立一个build目录,存放编译产生文件(D:\LibreOfficeComplie\build)
2)运行Cygwin,进入上一步新建的build目录,运行以下命令
../4.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=2012 \
--with-windows-sdk=7.1A \
--enable-pch \
--enable-debug \
--disable-ccache \
--disable-activex \
--disable-atl \
--disable-odk
3)配置成功后会出现以下信息
然后就是运行/opt/lo/bin make进行LibreOffice的编译。。。接下来是个漫长的等待。
 
五、编译LibreOffice成功之后,生成Visual Studio 2012项目,这样才能方面编辑源码。
    首先需要更改LibreOffice源码目录下的Makefile.gbuild
   
改成你相对应的目录。
然后打开Cygwin,进入build目录(D:\LibreOfficeComplie\build)运行以下命令。
/opt/lo/bin/make -npf ../4.3.3.2/Makefile.gbuild | D:/LibreOfficeComplie/4.3.3.2/bin/gbuild-to-ide --ide vs2012
这样就生成了Virsual Studio 2012项目工程文件。
 
六、接下来开始你的LibreOffice源码之旅吧。

LibreOffice源码编译以及生成VS项目的更多相关文章

  1. Spark1.0.0 源码编译和部署包生成

    问题导读:1.如何对Spark1.0.0源码编译?2.如何生成Spark1.0的部署包?3.如何获取包资源? Spark1.0.0的源码编译和部署包生成,其本质只有两种:Maven和SBT,只不过针对 ...

  2. World Wind .NET源码编译问题处理

    World  Wind  .NET源码编译问题处理 下载了World_Wind_1.4.0_Source源码(http://worldwindcentral.com/wiki/NASA_World_W ...

  3. Apache Spark源码走读之9 -- Spark源码编译

    欢迎转载,转载请注明出处,徽沪一郎. 概要 本来源码编译没有什么可说的,对于java项目来说,只要会点maven或ant的简单命令,依葫芦画瓢,一下子就ok了.但到了Spark上面,事情似乎不这么简单 ...

  4. Hadoop,HBase,Zookeeper源码编译并导入eclipse

    基本理念:尽可能的参考官方英文文档 Hadoop:  http://wiki.apache.org/hadoop/FrontPage HBase:  http://hbase.apache.org/b ...

  5. wso2esb源码编译总结

    最近花了两周的空闲时间帮朋友把wso2esb的4.0.3.4.6.0.4.7.0三个版本从源码编译出来了.以下是大概的一些体会. wso2esb是基于carbon的.carbon是个基于eclipse ...

  6. mpusher 源码编译 for windows X64

    mpusher 源码编译 for windows X64 对于java我是小白,通过一步步的摸索,将经验总结下来,给更多码友提供入门的帮助.一个人的摸索是很困难的,本教程感谢 [MPush开源消息推送 ...

  7. win10 vs2015源码编译opencv、opencv_contrib、Tesseract

    1.软件包准备 opencv源码包地址:                官网  github opencv_contrib源码包地址:   github Tesseract源码包地址:        ...

  8. Android 源码编译之旅

    目录 前言 背景 安装软件 正文 Mac 分区 移动硬盘分区 Repo 下载源码 编译 源码导入 Android Studio 查看 碰到的问题 Could not find a supported ...

  9. Cas Server源码编译现场实例

    最近公司有项目需要做单点登录,根据要求就写下这篇从github上下载的包到项目编译通过,再到修改原代码实现自己的特殊逻辑. 前提: java环境 tomcat环境 maven环境 MyEclipse开 ...

随机推荐

  1. php反射机制获取未知类的详细信息

    使用ReflectionClass就可以获取未知类的详细信息 demo: require("hello.php"); $class = new ReflectionClass(&q ...

  2. android学习笔记30——AndroidMainfest.xml

    Manifest.xml文件的职责:指定APP的包名.声明四大组件, 以及启动方式.指定APP运行的进程名称.指定APP权限.指定最小API版本.指定需要连接的库. Manifest.xml的格式:& ...

  3. i标签和em标签的区别

    很多人以为i标签和em标签都只是HTML用于斜体的标签,并不知道他们有什么区别. 其实对于熟悉SEO的人来说,他们的区别挺大的(普通用户略过). i标签的作用:仅仅是为了让字体显示斜体,对于SEO没什 ...

  4. iphone dev 入门实例4:CoreData入门

    The iPhone Core Data Example Application The application developed in this chapter will take the for ...

  5. Apriori 关联算法学习

    1. 挖掘关联规则 1.1   什么是关联规则 一言蔽之,关联规则是形如X→Y的蕴涵式,表示通过X可以推导“得到”Y,其中X和Y分别称为关联规则的先导(antecedent或left-hand-sid ...

  6. codeforces 336D. Vasily the Bear and Beautiful Strings 组合数学 dp

    题意: 给出n,m,g,求好串的个数 0 <= n,m <= 10^5,n + m >= 1,0 <= g <= 1 好串的定义: 1.只由0,1组成,并且恰好有n个0, ...

  7. 8.4c#递归

    一.概念conception: 函数体内调用本函数自身,直到符合某一条件不再继续调用. 二.应满足条件factor: (1)有反复执行的过程(调用自身): (2)有跳出反复执行过程的条件(函数出口) ...

  8. oProfile 学习

    oProfile工具可以分析CPU的负载量 只要对目标程序加上 -g 后重新编译,即可用oProfile进行分析 例如在测试apache的性能时, 增加 -g 编译选项[crifan@localhos ...

  9. 你应该知道的jQuery技巧

    帮助提高你jQuery应用的简单小技巧. 回到顶部按钮 图片预加载 判断图片是否加载完 自动修补破损图像 Hover切换class类 禁用输入 停止正在加载的链接 toggle fade/slide ...

  10. Linux防火墙设置(转载)

    From:http://www.lupaworld.com/article-219400-1.html (1) 重启后永久性生效: 开启:chkconfig iptables on 关闭:chkcon ...