|
|
@ -2,6 +2,8 @@
|
|
|
|
architecture=$(uname -m)
|
|
|
|
architecture=$(uname -m)
|
|
|
|
version=$(uname -s | tr '[:upper:]' '[:lower:]')
|
|
|
|
version=$(uname -s | tr '[:upper:]' '[:lower:]')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
|
|
|
|
|
|
|
|
|
|
|
# Define the supported architectures and corresponding bin directories
|
|
|
|
# Define the supported architectures and corresponding bin directories
|
|
|
|
declare -A supported_architectures=(
|
|
|
|
declare -A supported_architectures=(
|
|
|
|
["linux-amd64"]="_output/bin/platforms/linux/amd64"
|
|
|
|
["linux-amd64"]="_output/bin/platforms/linux/amd64"
|
|
|
@ -18,40 +20,43 @@ declare -A supported_architectures=(
|
|
|
|
|
|
|
|
|
|
|
|
# Check if the architecture and version are supported
|
|
|
|
# Check if the architecture and version are supported
|
|
|
|
if [[ -z ${supported_architectures["$version-$architecture"]} ]]; then
|
|
|
|
if [[ -z ${supported_architectures["$version-$architecture"]} ]]; then
|
|
|
|
echo "Unsupported architecture: $architecture or version: $version"
|
|
|
|
echo "================> Unsupported architecture: $architecture or version: $version"
|
|
|
|
exit 1
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "================> Architecture: $architecture"
|
|
|
|
|
|
|
|
|
|
|
|
# Set the BIN_DIR based on the architecture and version
|
|
|
|
# Set the BIN_DIR based on the architecture and version
|
|
|
|
BIN_DIR=${supported_architectures["$version-$architecture"]}
|
|
|
|
BIN_DIR=${supported_architectures["$version-$architecture"]}
|
|
|
|
|
|
|
|
|
|
|
|
echo "BIN_DIR: $BIN_DIR"
|
|
|
|
echo "================> BIN_DIR: $OPENIM_ROOT/$BIN_DIR"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Don't put the space between "="
|
|
|
|
# Don't put the space between "="
|
|
|
|
msg_gateway_name="openim-msggateway"
|
|
|
|
openim_msggateway="openim-msggateway"
|
|
|
|
msg_gateway_binary_root= $BIN_DIR
|
|
|
|
msg_gateway_binary_root= $OPENIM_ROOT/$BIN_DIR/
|
|
|
|
msg_gateway_source_root="../cmd/msggateway/"
|
|
|
|
msg_gateway_source_root="../cmd/msggateway/"
|
|
|
|
|
|
|
|
|
|
|
|
msg_name="openim_msg"
|
|
|
|
msg_name="openim-rpc-msg"
|
|
|
|
msg_binary_root=$BIN_DIR
|
|
|
|
msg_binary_root=$OPENIM_ROOT/$BIN_DIR
|
|
|
|
msg_source_root="../cmd/rpc/msg/"
|
|
|
|
msg_source_root="../cmd/rpc/msg/"
|
|
|
|
|
|
|
|
|
|
|
|
push_name="openim-push"
|
|
|
|
push_name="openim-push"
|
|
|
|
push_binary_root=$BIN_DIR
|
|
|
|
push_binary_root=$OPENIM_ROOT/$BIN_DIR
|
|
|
|
push_source_root="../cmd/push/"
|
|
|
|
push_source_root="../cmd/push/"
|
|
|
|
|
|
|
|
|
|
|
|
msg_transfer_name="openim_msg_transfer"
|
|
|
|
openim_msgtransfer="openim-rpc-msg_transfer"
|
|
|
|
msg_transfer_binary_root=$BIN_DIR
|
|
|
|
msg_transfer_binary_root=$OPENIM_ROOT/$BIN_DIR
|
|
|
|
msg_transfer_source_root="../cmd/msgtransfer/"
|
|
|
|
msg_transfer_source_root="../cmd/msgtransfer/"
|
|
|
|
msg_transfer_service_num=4
|
|
|
|
msg_transfer_service_num=4
|
|
|
|
|
|
|
|
|
|
|
|
cron_task_name="openim_cron_task"
|
|
|
|
cron_task_name="openim-crontask"
|
|
|
|
cron_task_binary_root=$BIN_DIR
|
|
|
|
cron_task_binary_root=$OPENIM_ROOT/$BIN_DIR
|
|
|
|
cron_task_source_root="../cmd/crontask/"
|
|
|
|
cron_task_source_root="../cmd/crontask/"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cmd_utils_name="openim_cmd_utils"
|
|
|
|
cmd_utils_name="openim_cmd_utils"
|
|
|
|
cmd_utils_binary_root=$BIN_DIR
|
|
|
|
cmd_utils_binary_root=$OPENIM_ROOT/$BIN_DIR
|
|
|
|
cmd_utils_source_root="../cmd/cmduitls/"
|
|
|
|
cmd_utils_source_root="../cmd/cmduitls/"
|
|
|
|
|
|
|
|
|
|
|
|
# Global configuration file default dir
|
|
|
|
# Global configuration file default dir
|
|
|
@ -81,15 +86,15 @@ service_names=(
|
|
|
|
# api service filename
|
|
|
|
# api service filename
|
|
|
|
"openim-api"
|
|
|
|
"openim-api"
|
|
|
|
# rpc service filename
|
|
|
|
# rpc service filename
|
|
|
|
"openim_user"
|
|
|
|
"openim-rpc-user"
|
|
|
|
"openim_friend"
|
|
|
|
"openim-rpc-friend"
|
|
|
|
"openim_group"
|
|
|
|
"openim-rpc-group"
|
|
|
|
"openim_auth"
|
|
|
|
"openim-rpc-auth"
|
|
|
|
"openim_conversation"
|
|
|
|
"openim-rpc-conversation"
|
|
|
|
"openim_third"
|
|
|
|
"openim-rpc-third"
|
|
|
|
"openim_cron_task"
|
|
|
|
"openim-crontask"
|
|
|
|
"${msg_gateway_name}"
|
|
|
|
"${openim_msggateway}"
|
|
|
|
"${msg_transfer_name}"
|
|
|
|
"${openim_msgtransfer}"
|
|
|
|
"${msg_name}"
|
|
|
|
"${msg_name}"
|
|
|
|
"${push_name}"
|
|
|
|
"${push_name}"
|
|
|
|
# "${sdk_server_name}"
|
|
|
|
# "${sdk_server_name}"
|
|
|
|