在build 之前,仔细阅读源码根目录中的 BUILDING.txt 文件
其中 Building on Windows部分有详细说明。
1.依赖软件
- Windows System (windows 7)
- JDK 1.7+ (jdk-8u65-windows-x64.exe)
- Maven 3.0 or later (apache-maven-3.3.9-bin)
- Findbugs (Findbugs 1.3.9)
- ProtocolBuffer 2.5.0 (protobuf-2.5.0.zip、protoc-2.5.0-win32.zip)
- CMake 2.6 or newer (cmake-3.7.1-win64-x64.msi)
- Windows SDK or Visual Studio 2010 Professional (vs2015.3.pro_chs.iso)
- zlib headers (if building native code bindings for zlib)( zlib128.zip)
- 首次编译需要联网 (下载所有maven依赖)
- 可以在win平台使用linux命令: sh, mkdir, rm, cp, tar, gzip. These tools must be present on your PATH (Git-2.14.1-64-bit.exe)
2.配置编译环境
JDK
1.安装JDK
2.新建系统变量JAVA_HOME= D:\Program Files\Java\jdk1.8.0_65
3.配置环境变量PATH,追加路径%JAVA_HOME%\bin
maven
1.解压maven到D:\maven
2.新建系统变量M2_HOME=D:\maven\
3.配置环境变量PATH,追加路