From ceb381c696c824996421e544dde39b887de14c56 Mon Sep 17 00:00:00 2001 From: Raphael Dumusc Date: Wed, 7 Dec 2016 13:47:06 +0100 Subject: [PATCH] Release 0.12.0 preparations, removed Servus dependency --- .gitexternals | 2 +- .gitsubprojects | 2 -- CMake/GitExternal.cmake | 44 ++++------------------------- CMakeLists.txt | 1 - README.md | 16 +++++------ apps/DesktopStreamer/CMakeLists.txt | 4 --- apps/DesktopStreamer/MainWindow.h | 4 --- deflect/CMakeLists.txt | 4 --- deflect/NetworkProtocol.h | 1 - deflect/Server.cpp | 17 ----------- deflect/Server.h | 3 -- doc/Changelog.md | 10 ++++--- 12 files changed, 21 insertions(+), 87 deletions(-) delete mode 100644 .gitsubprojects diff --git a/.gitexternals b/.gitexternals index 16fad18..7476bdf 100644 --- a/.gitexternals +++ b/.gitexternals @@ -1,2 +1,2 @@ # -*- mode: cmake -*- -# CMake/common https://github.com/Eyescale/CMake.git 11ee9c1 +# CMake/common https://github.com/Eyescale/CMake.git 3d5d284 diff --git a/.gitsubprojects b/.gitsubprojects deleted file mode 100644 index 15e5d29..0000000 --- a/.gitsubprojects +++ /dev/null @@ -1,2 +0,0 @@ -# -*- mode: cmake -*- -git_subproject(Servus https://github.com/HBPVIS/Servus 62873a5) diff --git a/CMake/GitExternal.cmake b/CMake/GitExternal.cmake index 8630673..1063610 100644 --- a/CMake/GitExternal.cmake +++ b/CMake/GitExternal.cmake @@ -8,7 +8,7 @@ # update target to bump the tag to the master revision by # recreating .gitexternals. # * Provides function -# git_external( [VERBOSE,SHALLOW] +# git_external( [VERBOSE] # [RESET ]) # which will check out directory in CMAKE_SOURCE_DIR (if relative) # or in the given absolute path using the given repository and tag @@ -18,11 +18,6 @@ # VERBOSE, when present, this option tells the function to output # information about what operations are being performed by git on # the repo. -# SHALLOW, when present, causes a shallow clone of depth 1 to be made -# of the specified repo. This may save considerable memory/bandwidth -# when only a specific branch of a repo is required and the full history -# is not required. Note that the SHALLOW option will only work for a branch -# or tag and cannot be used for an arbitrary SHA. # OPTIONAL, when present, this option makes this operation optional. # The function will output a warning and return if the repo could not be # cloned. @@ -69,15 +64,8 @@ macro(GIT_EXTERNAL_MESSAGE msg) endif() endmacro() -# utility function for printing a list with custom separator -function(JOIN VALUES GLUE OUTPUT) - string (REGEX REPLACE "([^\\]|^);" "\\1${GLUE}" _TMP_STR "${VALUES}") - string (REGEX REPLACE "[\\](.)" "\\1" _TMP_STR "${_TMP_STR}") #fixes escaping - set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE) -endfunction() - function(GIT_EXTERNAL DIR REPO tag) - cmake_parse_arguments(GIT_EXTERNAL_LOCAL "VERBOSE;SHALLOW;OPTIONAL" "" "RESET" ${ARGN}) + cmake_parse_arguments(GIT_EXTERNAL_LOCAL "VERBOSE;OPTIONAL" "" "RESET" ${ARGN}) set(TAG ${tag}) if(GIT_EXTERNAL_TAG AND "${tag}" MATCHES "^[0-9a-f]+$") set(TAG ${GIT_EXTERNAL_TAG}) @@ -105,16 +93,9 @@ function(GIT_EXTERNAL DIR REPO tag) if(NOT EXISTS "${DIR}") # clone - set(_clone_options --recursive) - if(GIT_EXTERNAL_LOCAL_SHALLOW) - list(APPEND _clone_options --depth 1 --branch ${TAG}) - else() - set(_msg_tag "[${TAG}]") - endif() - JOIN("${_clone_options}" " " _msg_text) - message(STATUS "git clone ${_msg_text} ${REPO} ${DIR} ${_msg_tag}") + message(STATUS "git clone --recursive ${REPO} ${DIR} [${TAG}]") execute_process( - COMMAND "${GIT_EXECUTABLE}" clone ${_clone_options} ${REPO} ${DIR} + COMMAND "${GIT_EXECUTABLE}" clone --recursive ${REPO} ${DIR} RESULT_VARIABLE nok ERROR_VARIABLE error WORKING_DIRECTORY "${GIT_EXTERNAL_DIR}") if(nok) @@ -127,21 +108,8 @@ function(GIT_EXTERNAL DIR REPO tag) endif() # checkout requested tag - if(NOT GIT_EXTERNAL_LOCAL_SHALLOW) - execute_process( - COMMAND "${GIT_EXECUTABLE}" checkout -q "${TAG}" - RESULT_VARIABLE nok ERROR_VARIABLE error - WORKING_DIRECTORY "${DIR}") - if(nok) - message(FATAL_ERROR "git checkout ${TAG} in ${DIR} failed: ${error}\n") - endif() - endif() - - # checkout requested tag - execute_process( - COMMAND "${GIT_EXECUTABLE}" checkout -q "${TAG}" - RESULT_VARIABLE nok ERROR_VARIABLE error - WORKING_DIRECTORY "${DIR}") + execute_process(COMMAND "${GIT_EXECUTABLE}" checkout -q "${TAG}" + RESULT_VARIABLE nok ERROR_VARIABLE error WORKING_DIRECTORY "${DIR}") if(nok) message(FATAL_ERROR "git checkout ${TAG} in ${DIR} failed: ${error}\n") endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index 8de99d7..07a260b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,6 @@ common_find_package(Qt5Network REQUIRED) common_find_package(Qt5Qml) common_find_package(Qt5Quick) common_find_package(Qt5Widgets REQUIRED) -common_find_package(Servus) common_find_package_post() if(NOT Qt5Quick_VERSION VERSION_LESS 5.5) diff --git a/README.md b/README.md index 050af28..0e37538 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # Deflect Welcome to Deflect, a C++ library for streaming pixels to other Deflect-based -applications, for example -[Tide](https://github.com/BlueBrain/Tide). -Deflect offers a stable API marked with version 1.0 (for the client part). +applications, for example [Tide](https://github.com/BlueBrain/Tide). +Deflect offers a stable API marked with version 1.5 (for the client part). ## Features @@ -11,6 +10,7 @@ Deflect provides the following functionality: * Stream pixels to a remote Server from one or multiple sources * Register for receiving events from the Server +* Receive keyboard, mouse and multi-point touch gestures from the Server * Compressed or uncompressed streaming * Fast multi-threaded JPEG compression (using libjpeg-turbo) @@ -32,8 +32,8 @@ The following applications are provided which make use of the streaming API: git clone https://github.com/BlueBrain/Deflect.git mkdir Deflect/build cd Deflect/build - cmake .. - make + cmake -GNinja .. + ninja ~~~ ## ChangeLog @@ -47,8 +47,8 @@ system, including all Unix variants. Deflect uses CMake to create a platform-specific build environment. The following platforms and build environments are tested: -* Linux: Ubuntu 14.04 and RHEL 6 (Makefile, x64) -* Mac OS X: 10.7 - 10.10 (Makefile, x86_64) +* Linux: Ubuntu 16.04 and RHEL 6 (Makefile, Ninja; x64) +* Mac OS X: 10.7 - 10.10 (Makefile, Ninja; x86_64) -The [latest API documentation](http://bluebrain.github.io/Deflect-0.10/index.html) +The [latest API documentation](http://bluebrain.github.io/Deflect-0.12/index.html) can be found on [bluebrain.github.io](http://bluebrain.github.io). diff --git a/apps/DesktopStreamer/CMakeLists.txt b/apps/DesktopStreamer/CMakeLists.txt index 69dd6d9..701b21c 100644 --- a/apps/DesktopStreamer/CMakeLists.txt +++ b/apps/DesktopStreamer/CMakeLists.txt @@ -35,10 +35,6 @@ set_source_files_properties(MainWindow.cpp PROPERTIES COMPILE_DEFINITIONS _HOSTS=${DEFLECT_DESKTOPSTREAMER_HOSTS} ) -if(DEFLECT_USE_SERVUS) - list(APPEND DESKTOPSTREAMER_LINK_LIBRARIES Servus) -endif() - set(DESKTOPSTREAMER_APP_NAME desktopstreamer) if(APPLE) diff --git a/apps/DesktopStreamer/MainWindow.h b/apps/DesktopStreamer/MainWindow.h index 901be75..fd2c8e6 100644 --- a/apps/DesktopStreamer/MainWindow.h +++ b/apps/DesktopStreamer/MainWindow.h @@ -47,10 +47,6 @@ # include #endif -#ifdef DEFLECT_USE_SERVUS -# include -#endif - #include #include #include diff --git a/deflect/CMakeLists.txt b/deflect/CMakeLists.txt index 07fa173..b8661be 100644 --- a/deflect/CMakeLists.txt +++ b/deflect/CMakeLists.txt @@ -70,10 +70,6 @@ if(DEFLECT_USE_LIBJPEGTURBO) list(APPEND DEFLECT_LINK_LIBRARIES ${LibJpegTurbo_LIBRARIES}) endif() -if(DEFLECT_USE_SERVUS) - list(APPEND DEFLECT_LINK_LIBRARIES Servus) -endif() - common_library(Deflect) if(Qt5Qml_FOUND AND Qt5Quick_FOUND AND NOT Qt5Quick_VERSION VERSION_LESS 5.4) diff --git a/deflect/NetworkProtocol.h b/deflect/NetworkProtocol.h index 3cb0fbc..2d5e35f 100644 --- a/deflect/NetworkProtocol.h +++ b/deflect/NetworkProtocol.h @@ -41,6 +41,5 @@ #define NETWORK_PROTOCOL_VERSION 8 #define DEFAULT_PORT_NUMBER 1701 -#define SERVUS_SERVICE_NAME "_displaycluster._tcp" #endif diff --git a/deflect/Server.cpp b/deflect/Server.cpp index 4ad9085..6dca945 100644 --- a/deflect/Server.cpp +++ b/deflect/Server.cpp @@ -44,31 +44,17 @@ #include "NetworkProtocol.h" #include "ServerWorker.h" -#ifdef DEFLECT_USE_SERVUS -# include -#endif - #include #include namespace deflect { const int Server::defaultPortNumber = DEFAULT_PORT_NUMBER; -const std::string Server::serviceName = SERVUS_SERVICE_NAME; class Server::Impl { public: - Impl() -#ifdef DEFLECT_USE_SERVUS - : servus( Server::serviceName ) -#endif - {} - FrameDispatcher pixelStreamDispatcher; -#ifdef DEFLECT_USE_SERVUS - servus::Servus servus; -#endif }; Server::Server( const int port ) @@ -79,9 +65,6 @@ Server::Server( const int port ) const auto err = QString( "could not listen on port: %1" ).arg( port ); throw std::runtime_error( err.toStdString( )); } -#ifdef DEFLECT_USE_SERVUS - _impl->servus.announce( serverPort(), "" ); -#endif } Server::~Server() diff --git a/deflect/Server.h b/deflect/Server.h index 40590e5..6b901bc 100644 --- a/deflect/Server.h +++ b/deflect/Server.h @@ -61,9 +61,6 @@ class DEFLECT_API Server : public QTcpServer /** The default port number used for Stream connections. */ static const int defaultPortNumber; - /** The zeroconf service name for announcing stream connections. */ - static const std::string serviceName; - /** * Create a new server listening for Stream connections. * @param port The port to listen on. Must be available. diff --git a/doc/Changelog.md b/doc/Changelog.md index 64c5300..8c43a34 100644 --- a/doc/Changelog.md +++ b/doc/Changelog.md @@ -3,16 +3,18 @@ Changelog {#Changelog} ## Deflect 0.12 -### 0.12.0 (git master) +### 0.12.0 (09-12-2016) +* [143](https://github.com/BlueBrain/Deflect/pull/143): + The non-functional Servus dependency has been removed. * [142](https://github.com/BlueBrain/Deflect/pull/142): The DesktopStreamer app uses the full user name as the default stream name. * [139](https://github.com/BlueBrain/Deflect/pull/139): OSX: AppNap is now disabled for all QmlStreamers. The AppNapSuspender class - is now available in Deflect library for use in external applications. + is also available in Deflect library for use in external applications. * [137](https://github.com/BlueBrain/Deflect/pull/137): - Deflect Qt: the offscreen Qml view used by the Qml streamer is now available - as a separate class. + Deflect Qt: the offscreen Qml view used by the Qml streamer is available as a + separate class. * [133](https://github.com/BlueBrain/Deflect/pull/133): QmlStreamer: Use asynchronous rendering, add deflect::qt::QmlStreamer::useAsyncSend() to enable asynchronous image streaming