Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,419 additions
and
1,542 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/sh | ||
# Copyright (c) 2018 Zilliqa | ||
# This source code is being disclosed to you solely for the purpose of your | ||
# participation in testing Zilliqa. You may view, compile and run the code for | ||
# that purpose and pursuant to the protocols and algorithms that are programmed | ||
# into, and intended by, the code. You may not do anything else with the code | ||
# without express permission from Zilliqa Research Pte. Ltd., including | ||
# modifying or publishing the code (or any part of it), and developing or | ||
# forming another public or private blockchain network. This source code is | ||
# provided 'as is' and no warranties are given as to title or non-infringement, | ||
# merchantability or fitness for purpose and, to the extent permitted by law, | ||
# all liability for your use of the code is disclaimed. Some programs in this | ||
# code are governed by the GNU General Public License v3.0 (available at | ||
# https://www.gnu.org/licenses/gpl-3.0.en.html) ('GPLv3'). The programs that | ||
# are governed by GPLv3.0 are those programs that are located in the folders | ||
# src/depends and tests/depends and which include a reference to GPLv3 in their | ||
# program files. | ||
# | ||
|
||
PROTOC_REQUIRED_VERSION="3.6.1" | ||
PROTOC_DOWNLOAD_URL="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_REQUIRED_VERSION}/protobuf-cpp-${PROTOC_REQUIRED_VERSION}.tar.gz" | ||
|
||
# detect ubuntu 16.04 lts version | ||
OS_VERSION=`lsb_release -rs` | ||
if [ -z "$OS_VERSION" ] || [ "$OS_VERSION" != "16.04" ]; then | ||
echo "Not Ubuntu 16.04 LTS version" | ||
exit 1 | ||
fi | ||
|
||
# detect current protoc version | ||
PROTOC_BIN=`which protoc` | ||
if [ ! -z "$PROTOC_BIN" ]; then | ||
PROTOC_VERSION=`${PROTOC_BIN} --version | cut -d ' ' -f 2` | ||
|
||
# check if required version already exists. | ||
if [ "$PROTOC_VERSION" = "$PROTOC_REQUIRED_VERSION" ]; then | ||
echo "Protoc ${PROTOC_REQUIRED_VERSION} already installed. Nothing else to do" | ||
exit 0 | ||
else | ||
echo "Required protoc version: ${PROTOC_REQUIRED_VERSION}" | ||
echo "Existing protoc version: ${PROTOC_VERSION}" | ||
echo "Please delete existing version..." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
# download proto3 | ||
mkdir -p /tmp/protoc | ||
wget -qO- ${PROTOC_DOWNLOAD_URL} | tar xvz -C /tmp/protoc | ||
cd /tmp/protoc/protobuf-${PROTOC_REQUIRED_VERSION} | ||
./configure && make && sudo make install && sudo ldconfig | ||
|
||
sudo ln -s /usr/local/bin/protoc /usr/bin/ | ||
sudo ln -s /usr/local/lib/libprotobuf.so /usr/lib/x86_64-linux-gnu/ |
Submodule grpc
deleted from
d2c7d4
Submodule protobuf
deleted from
48cb18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
set(PROTOBUF_IMPORT_DIRS ${PROTOBUF_IMPORT_DIRS} ${PROJECT_SOURCE_DIR}/src/libMessage) | ||
protobuf_generate_cpp(PROTO_SRC PROTO_HEADER ServerRequest.proto ServerResponse.proto ServerMessages.proto Server.proto) | ||
grpc_generate_cpp(GRPC_SRCS GRPC_HDRS Server.proto) | ||
add_library(ProtoServer ${PROTO_HEADER} ${PROTO_SRC} ${GRPC_SRCS} ${GRPC_HDRS} ServerInterface.cpp) | ||
protobuf_generate_cpp(PROTO_SRC PROTO_HEADER ServerRequest.proto ServerResponse.proto ServerMessages.proto) | ||
add_library(ProtoServer ${PROTO_HEADER} ${PROTO_SRC} Server.cpp) | ||
target_compile_options(ProtoServer PRIVATE "-Wno-unused-parameter") | ||
target_include_directories(ProtoServer PUBLIC ${PROJECT_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src/libProtoServer ${CMAKE_BINARY_DIR}/src/libMessage ${CMAKE_BINARY_DIR}/include) | ||
target_link_libraries(ProtoServer PUBLIC ${PROTOBUF_LIBRARY} ${GRPC_LIBRARIES} AccountData Messenger) | ||
target_include_directories(ProtoServer PUBLIC ${PROJECT_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src/libProtoServer ${CMAKE_BINARY_DIR}/src/libMessage) | ||
target_link_libraries (ProtoServer PUBLIC ${PROTOBUF_LIBRARY} AccountData Messenger) |
Oops, something went wrong.