最權威的社區連接:https://wiki.documentfoundation.org/Development/BuildingOnWindowscss
也許英文好的人直接看wiki上的說明就能很容易的編譯並搭建好LibreOffice。html
編譯過程當中遇到任何問題,歡迎加qq羣:174768656java
1、下載並安裝Cygwinpython
連接:http://www.cygwin.com/ win7(32位)安裝setup-x86.exe, win7(64位) setup-x86_64.exegit
2、使用Cygwin搭建Linux環境apache
打開Windows 命令行,運行如下命令vim
win7(32位):windows
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_vendorruby
win7(64位):markdown
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
3、安裝Windows編譯所須要的工具
1)JDK 安裝 下載連接:http://www.oracle.com/technetwork/java/javase/downloads/index.html
2)Visual Studio安裝
LibreOffice 4.4版本須要Visual Studio 2012以上版本,LibreOffice5.0須要Visual Studio 2013以上版本。
最好安裝的是Visual Studio 2013,2015有的特性不支持。
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\4.3.3.2)
4、編譯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=2013 \
--with-windows-sdk=7.1A \
--enable-pch \
--enable-debug \
--disable-ccache \
--disable-activex \
--disable-atl \
--disable-odk
3)配置成功後會出現如下信息
而後就是運行/opt/lo/bin make進行LibreOffice的編譯。。。接下來是個漫長的等待。
5、編譯LibreOffice成功以後,生成Visual Studio 2012項目,這樣才能方面編輯源碼。
首先須要更改LibreOffice源碼目錄下的Makefile.gbuild
改爲你相對應的目錄。
而後打開Cygwin,進入build目錄(D:\LibreOfficeComplie\build)運行如下命令。
/opt/lo/bin/make -npf ../core/Makefile.gbuild | D:/LibreOfficeComplie/core/bin/gbuild-to-ide –ide vs2013
這樣就生成了Virsual Studio 2013項目工程文件。
轉載:
http://www.chongchonggou.com/g_648604482.html
更多參考資料:
http://www.cnblogs.com/linTracy/p/5167635.html
http://blog.csdn.net/wu554513392/article/details/44834455