Shipping libnice on board
This commit is contained in:
parent
7cf8f6c2c3
commit
84c1f94f30
@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
#project(TeamSpeak)
|
||||
project(TeaSpeak-Parent)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
|
||||
@ -48,6 +48,12 @@ resolve_library(LIBRARY_PATH_JSON OFF "${LIBRARY_PATH}/jsoncpp/bui
|
||||
resolve_library(LIBRARY_PATH_ED255 OFF "${LIBRARY_PATH}/ed25519/build/libed25519.a")
|
||||
resolve_library(LIBRARY_PATH_DATA_PIPES OFF "${LIBRARY_PATH}/DataPipes/build/libDataPipes.so" "${LIBRARY_PATH}/DataPipes/cmake-build-release/libDataPipes.so" "${LIBRARY_PATH}/DataPipes/cmake-build-debug/libDataPipes.so")
|
||||
resolve_library(LIBRARY_PATH_OPUS OFF "${LIBRARY_PATH}/opus/build/.libs/libopus.a")
|
||||
resolve_library(LIBRARY_PATH_NICE OFF "${LIBRARY_PATH}/libnice/linux_${BUILD_OS_ARCH}/lib/libnice.so.10")
|
||||
include_directories(${LIBRARY_PATH}/libnice/linux_${BUILD_OS_ARCH}/include)
|
||||
include_directories(${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/include)
|
||||
include_directories(${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/include/glib-2.0)
|
||||
include_directories(${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/x86_64-linux-gnu/glib-2.0/include/)
|
||||
include_directories(${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/i386-linux-gnu/glib-2.0/include/)
|
||||
|
||||
add_definitions(-DINET -DINET6)
|
||||
add_subdirectory(shared/)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit b3b187527e4d0ed2ec5ed7ab964decb9fb6da762
|
||||
Subproject commit f8d7f5737d21b4bea2a11807d61a07b0943c7590
|
@ -229,7 +229,7 @@ target_link_libraries(PermMapHelper
|
||||
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR "4")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "2")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "3")
|
||||
if(BUILD_TYPE_NAME EQUAL OFF)
|
||||
SET(CPACK_PACKAGE_VERSION_DATA "beta")
|
||||
elseif(BUILD_TYPE_NAME STREQUAL "")
|
||||
@ -268,6 +268,7 @@ target_link_libraries(TeaSpeakServer
|
||||
|
||||
${LIBRARY_PATH_BREAKPAD}
|
||||
${LIBRARY_PATH_PROTOBUF}
|
||||
${LIBRARY_PATH_NICE}
|
||||
|
||||
#${LIBWEBRTC_LIBRARIES} #ATTENTIAN! WebRTC does not work with crypto! (Already contains a crypto version)
|
||||
${LIBRARY_TOM_CRYPT}
|
||||
@ -280,10 +281,8 @@ target_link_libraries(TeaSpeakServer
|
||||
)
|
||||
|
||||
if(${COMPILE_WEB_CLIENT})
|
||||
find_package(LibNice REQUIRED)
|
||||
find_package(UsrSCTP REQUIRED)
|
||||
target_link_libraries(TeaSpeakServer
|
||||
LibNice::LibNice
|
||||
${LIBRARY_PATH_DATA_PIPES}
|
||||
)
|
||||
endif()
|
||||
|
@ -8,8 +8,14 @@ BUILD_FILENAME=${BUILD_INFO[3]}
|
||||
|
||||
echo "Creating TeaSpeak ${BUILD_NAME} Build index ${BUILD_VERSION}"
|
||||
|
||||
if [[ -d finalenv ]]; then
|
||||
rm -r finalenv
|
||||
fi
|
||||
cp -r env finalenv
|
||||
cd finalenv
|
||||
cd finalenv || {
|
||||
echo "failed to enter dir"
|
||||
exit 1
|
||||
}
|
||||
echo -e "# Version: ${BUILD_FULL_NAME}
|
||||
# TeaSpeak version: ${BUILD_NAME}
|
||||
# Build version: ${BUILD_VERSION}
|
||||
@ -21,10 +27,20 @@ cp TeaSpeakServer TeaSpeakServerTmp
|
||||
rm TeaSpeakServer
|
||||
mv TeaSpeakServerTmp TeaSpeakServer
|
||||
|
||||
#Copy libnice into place
|
||||
if [[ -z ${build_os_type} || -z ${build_os_arch} ]]; then
|
||||
echo "Missing build_os_type or build_os_arch."
|
||||
exit 1
|
||||
fi
|
||||
cp "../../../../libraries/libnice/${build_os_type}_${build_os_arch}/lib/libnice.so.10" ./libs/ || {
|
||||
echo "failed to copy libnice"
|
||||
exit 1
|
||||
}
|
||||
|
||||
strip -s -p -v TeaSpeakServer
|
||||
tar --dereference -czvf "../${BUILD_FILENAME}" *
|
||||
cd ..
|
||||
rm -r finalenv
|
||||
./make_symbol.sh
|
||||
#rm -r finalenv
|
||||
#./make_symbol.sh
|
||||
|
||||
echo "Package created (${BUILD_FILENAME})"
|
||||
|
@ -701,10 +701,13 @@ void ConnectedClient::sendChannelDescription(const std::shared_ptr<BasicChannel>
|
||||
|
||||
if(!this->channels->channel_visible(channel)) return;
|
||||
|
||||
auto limit = this->getType() == CLIENT_TEAMSPEAK ? 8192 : 131130;
|
||||
|
||||
auto description = channel->properties()[property::CHANNEL_DESCRIPTION].as<std::string>();
|
||||
Command cmd("notifychanneledited");
|
||||
cmd["cid"] = channel->channelId();
|
||||
cmd["reasonid"] = 9;
|
||||
cmd["channel_description"] = channel->properties()[property::CHANNEL_DESCRIPTION].as<std::string>();
|
||||
cmd["channel_description"] = description.size() > limit ? description.substr(0, limit) : description;
|
||||
this->sendCommand(cmd, true);
|
||||
}
|
||||
|
||||
|
@ -649,7 +649,7 @@ bool ConnectedClient::notifyChannelEdited(
|
||||
const std::shared_ptr<BasicChannel> &channel,
|
||||
const std::vector<property::ChannelProperties> &properties,
|
||||
const std::shared_ptr<ConnectedClient> &invoker,
|
||||
bool send_description) {
|
||||
bool) {
|
||||
auto v_channel = this->channels->find_channel(channel->channelId());
|
||||
if(!v_channel) return false; //Not visible? Important do not remove!
|
||||
|
||||
@ -657,11 +657,11 @@ bool ConnectedClient::notifyChannelEdited(
|
||||
|
||||
Command notify("notifychanneledited");
|
||||
for(auto prop : properties) {
|
||||
auto prop_info = property::impl::info(prop);
|
||||
const auto& prop_info = property::impl::info(prop);
|
||||
|
||||
if(prop == property::CHANNEL_ORDER)
|
||||
notify[prop_info->name] = v_channel->previous_channel;
|
||||
else if(prop == property::CHANNEL_DESCRIPTION && !send_description) {
|
||||
else if(prop == property::CHANNEL_DESCRIPTION) {
|
||||
send_description_change = true;
|
||||
} else {
|
||||
notify[prop_info->name] = channel->properties()[prop].as<string>();
|
||||
|
@ -483,7 +483,7 @@ CommandResult SpeakingClient::handleCommandClientInit(Command& cmd) {
|
||||
size_t clones_hwid = 0;
|
||||
|
||||
auto _own_hwid = this->getHardwareId();
|
||||
this->server->forEachClient([&](shared_ptr<ConnectedClient> client) {
|
||||
this->server->forEachClient([&](const shared_ptr<ConnectedClient>& client) {
|
||||
if(client->getExternalType() != CLIENT_TEAMSPEAK) return;
|
||||
if(client->getUid() == this->getUid())
|
||||
clones_uid++;
|
||||
@ -566,7 +566,7 @@ CommandResult SpeakingClient::handleCommandClientInit(Command& cmd) {
|
||||
size_t count = 0;
|
||||
{
|
||||
for(const auto &cl : this->server->getClients())
|
||||
if((cl->getType() == CLIENT_TEAMSPEAK || cl->getType() == CLIENT_WEB || cl->getType() == CLIENT_TEASPEAK))
|
||||
if((cl->getType() == CLIENT_TEAMSPEAK || cl->getType() == CLIENT_WEB || cl->getType() == CLIENT_TEASPEAK || cl->getType() == CLIENT_MUSIC))
|
||||
if(cl->connectionState() <= ConnectionState::CONNECTED && cl->connectionState() >= ConnectionState::INIT_HIGH)
|
||||
count++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user