也许英文好的人直接看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. bzoj3905: Square

    Description Nothing is more beautiful than square! So, given a grid of cells, each cell being black ...

  2. bzoj2537: [neerc2007]Language Recognition

    Description DFA(确定性有限状态自动机)是一个有向图,顶点称为状态,边称为转移.每个转移用一个字母标记.对于每个状态s和每个转移l,至多有一个转移从s出发且标记为l.DFA有一个初始状态 ...

  3. hi35183e增加exfat文件系统的支持

    64G-128G的tf卡文件系统格式为exfat,而hi3518e默认只支持fat32格式的tf卡.为了挂载64G以上的tf卡,只能将sd卡先格式化成FAT32.鉴于exfat性能比FAT32强,因此 ...

  4. 【MySQL】数据行长度的一些限制

    今天开发在导入数据的时候报一个错误: Row size too large. The maximum row size for the used table type, not counting BL ...

  5. 我的Android最佳实践之—— Android更新UI的两种方法:handler与runOnUiThread()

    在Android开发过程中,常需要更新界面的UI.而更新UI是要主线程来更新的,即UI线程更新.如果在主线线程之外的线程中直接更新页面 显示常会报错.抛出异常:android.view.ViewRoo ...

  6. 黄聪:jquery mobile使用form进行post提交表单没有反应,显示空白页解决方案

    jquery mobile这货会自动用Ajax方式. 所以需要在表单form标签添加data-ajax="false"这个元素. <form method="pos ...

  7. mysql创建表与索引

    -- ---------------------------- -- 商品属性表 -- AUTO_INCREMENT=1为设置了自增长的字段设置起点,1为起点 -- ENGINE选择:MyISAM类型 ...

  8. DG_Oracle DataGuard作用和概念(概念)

    2014-06-03 Created By BaoXinjian  

  9. 张恭庆编《泛函分析讲义》第二章第4节 $Hahn$-$Banach$ 定理习题解答

    1.次线性泛函的性质 设 $p$ 是实线性空间 $\scrX$ 上的次线性泛函, 求证: (1)$p(0)=0$; (2)$p(-x)\geq -p(x)$; (3)任意给定 $x_0\in \scr ...

  10. purple-class2-默认选项切换

    ylbtech-class:purple-class2 A, 返回顶部 1,默认选项切换 #region 默认选项切换 public delegate IList<SelectListItemI ...