| 71 | exit(1) |
| 72 | |
| 73 | def CheckProtobufVersion(): |
| 74 | protobuf_bin_path = base_dir + "/third_party/protobuf/bin" |
| 75 | if( not os.path.exists( protobuf_bin_path ) ): |
| 76 | print "please make sure protobuf 3.0+ has been installed on the third party directory" |
| 77 | print "and %s/protoc can be detected" % protobuf_bin_path |
| 78 | exit(1) |
| 79 | |
| 80 | cmd = "%s/protoc --version | grep libprotoc.3" % protobuf_bin_path |
| 81 | cmd_res = os.popen( cmd, 'r' ) |
| 82 | res=cmd_res.read() |
| 83 | cmd_res.close() |
| 84 | if( res == '' ): |
| 85 | print "protobuf %s has beed found",res |
| 86 | print "please make sure protobuf 3.0+ has been installed on the third party directory" |
| 87 | exit(1) |
| 88 | |
| 89 | if(__name__ == '__main__'): |
| 90 | base_dir=sys.argv[1] |