首页 > 代码库 > 安装Battery Historian 2.0

安装Battery Historian 2.0

需要:安装Git,安装GO语言环境,安装python语言环境

  • 获取go的一些依赖如:proto,protoc-gen-go 以及 Battery Historian,命令如下

    go get -u github.com/golang/protobuf/protogo get -u github.com/golang/protobuf/protoc-gen-gogo get -u github.com/google/battery-historian
  • 进入 %GOPATH%\src\github.com\google\battery-historian 新建两个目录:third_party 以及compiled. 下载 Closure compiler 并解压到 third_party\closure-compiler。结果如下:

    技术分享

  • Clone closure library 到 third_party\closure-library目录下 
    git clone https://github.com/google/closure-library third_party/closure-library

  • 现在已经完成了整个安装步骤了,通过下面的命令即可运行Battery Historian了。

    set GOPATH=E:\\GoProjectcd %GOPATH%\src\github.com\google\battery-historianE:go run cmd\battery-historian\battery-historian.gopause

安装Battery Historian 2.0