mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	Merge pull request #554 from redPanther/hyperion_version_id
Hyperion version number Former-commit-id: 6cb6a03e737012f44b08b1ccbc749c9fbe6228f1
This commit is contained in:
		@@ -43,6 +43,9 @@ message(STATUS "ENABLE_X11 = " ${ENABLE_X11})
 | 
				
			|||||||
option(ENABLE_QT5 "Enable QT5" OFF)
 | 
					option(ENABLE_QT5 "Enable QT5" OFF)
 | 
				
			||||||
message(STATUS "ENABLE_QT5 = " ${ENABLE_QT5})
 | 
					message(STATUS "ENABLE_QT5 = " ${ENABLE_QT5})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					option(ENABLE_TESTS "Compile additional test applications" OFF)
 | 
				
			||||||
 | 
					message(STATUS "ENABLE_TESTS = " ${ENABLE_TESTS})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if(ENABLE_V4L2 AND NOT ENABLE_PROTOBUF)
 | 
					if(ENABLE_V4L2 AND NOT ENABLE_PROTOBUF)
 | 
				
			||||||
	message(FATAL_ERROR "V4L2 grabber requires PROTOBUF. Disable V4L2 or enable PROTOBUF")
 | 
						message(FATAL_ERROR "V4L2 grabber requires PROTOBUF. Disable V4L2 or enable PROTOBUF")
 | 
				
			||||||
endif(ENABLE_V4L2 AND NOT ENABLE_PROTOBUF)
 | 
					endif(ENABLE_V4L2 AND NOT ENABLE_PROTOBUF)
 | 
				
			||||||
@@ -59,19 +62,26 @@ if(ENABLE_OSX AND ENABLE_DISPMANX)
 | 
				
			|||||||
	message(FATAL_ERROR "dispmanx grabber and osx grabber cannot be used at the same time")
 | 
						message(FATAL_ERROR "dispmanx grabber and osx grabber cannot be used at the same time")
 | 
				
			||||||
endif(ENABLE_OSX AND ENABLE_DISPMANX)
 | 
					endif(ENABLE_OSX AND ENABLE_DISPMANX)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SET ( PROTOBUF_INSTALL_BIN_DIR ${CMAKE_BINARY_DIR}/proto )
 | 
				
			||||||
 | 
					SET ( PROTOBUF_INSTALL_LIB_DIR ${CMAKE_BINARY_DIR}/proto )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if(ENABLE_QT5)
 | 
					#if(ENABLE_QT5)
 | 
				
			||||||
# TODO vs ENABLE_QT4?
 | 
					# TODO vs ENABLE_QT4?
 | 
				
			||||||
#endif(ENABLE_QT5)
 | 
					#endif(ENABLE_QT5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Createt the configuration file
 | 
					# Createt the configuration file
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Add project specific cmake modules (find, etc)
 | 
				
			||||||
 | 
					set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					find_package(GitVersion)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# configure a header file to pass some of the CMake settings
 | 
					# configure a header file to pass some of the CMake settings
 | 
				
			||||||
# to the source code
 | 
					# to the source code
 | 
				
			||||||
configure_file("${PROJECT_SOURCE_DIR}/HyperionConfig.h.in" "${PROJECT_BINARY_DIR}/HyperionConfig.h")
 | 
					configure_file("${PROJECT_SOURCE_DIR}/HyperionConfig.h.in" "${PROJECT_BINARY_DIR}/HyperionConfig.h")
 | 
				
			||||||
include_directories("${PROJECT_BINARY_DIR}")
 | 
					include_directories("${PROJECT_BINARY_DIR}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Add project specific cmake modules (find, etc)
 | 
					 | 
				
			||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if(ENABLE_QT5)
 | 
					if(ENABLE_QT5)
 | 
				
			||||||
	ADD_DEFINITIONS ( -DENABLE_QT5 )
 | 
						ADD_DEFINITIONS ( -DENABLE_QT5 )
 | 
				
			||||||
	#find_package(Qt5Widgets)
 | 
						#find_package(Qt5Widgets)
 | 
				
			||||||
@@ -136,7 +146,10 @@ configure_file(config/hyperion_x86.config.json ${LIBRARY_OUTPUT_PATH} @ONLY)
 | 
				
			|||||||
add_subdirectory(dependencies)
 | 
					add_subdirectory(dependencies)
 | 
				
			||||||
add_subdirectory(libsrc)
 | 
					add_subdirectory(libsrc)
 | 
				
			||||||
add_subdirectory(src)
 | 
					add_subdirectory(src)
 | 
				
			||||||
add_subdirectory(test)
 | 
					if (ENABLE_TESTS)
 | 
				
			||||||
 | 
						add_subdirectory(test)
 | 
				
			||||||
 | 
					endif (ENABLE_TESTS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Add the doxygen generation directory
 | 
					# Add the doxygen generation directory
 | 
				
			||||||
add_subdirectory(doc)
 | 
					add_subdirectory(doc)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,3 +30,4 @@
 | 
				
			|||||||
// Define to enable the osx grabber
 | 
					// Define to enable the osx grabber
 | 
				
			||||||
#cmakedefine ENABLE_OSX
 | 
					#cmakedefine ENABLE_OSX
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define HYPERION_VERSION_ID "${HYPERION_VERSION_ID}"
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										9
									
								
								cmake/FindGitVersion.cmake
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								cmake/FindGitVersion.cmake
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					execute_process( COMMAND git log -1 --format=%cn-%t/%h-%ct WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE BUILD_ID ERROR_QUIET )
 | 
				
			||||||
 | 
					execute_process( COMMAND sh -c "git branch | grep '^*' | sed 's;^*;;g' " WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE VERSION_ID ERROR_QUIET )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					STRING ( STRIP "${BUILD_ID}" BUILD_ID )
 | 
				
			||||||
 | 
					STRING ( STRIP "${VERSION_ID}" VERSION_ID )
 | 
				
			||||||
 | 
					SET ( HYPERION_VERSION_ID "${VERSION_ID} (${BUILD_ID}" )
 | 
				
			||||||
 | 
					message ( STATUS "Current Version: ${HYPERION_VERSION_ID})" )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -50,8 +50,15 @@ target_link_libraries(${PROJECT_NAME}
 | 
				
			|||||||
	pthread
 | 
						pthread
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					qt4_use_modules(${PROJECT_NAME}
 | 
				
			||||||
 | 
						Core
 | 
				
			||||||
 | 
						Gui
 | 
				
			||||||
 | 
						Network)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if(ENABLE_QT5)
 | 
					if(ENABLE_QT5)
 | 
				
			||||||
	qt5_use_modules(${PROJECT_NAME} Widgets Core Gui Network)
 | 
						qt5_use_modules(${PROJECT_NAME} Widgets Core Gui Network)
 | 
				
			||||||
else(ENABLE_QT5)
 | 
					else(ENABLE_QT5)
 | 
				
			||||||
	qt4_use_modules(${PROJECT_NAME} Core Gui Network )
 | 
						qt4_use_modules(${PROJECT_NAME} Core Gui Network )
 | 
				
			||||||
endif(ENABLE_QT5)
 | 
					endif(ENABLE_QT5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					install ( TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_SOURCE_DIR}/deploy/bin" )
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,6 +10,9 @@
 | 
				
			|||||||
#include <protoserver/ProtoConnectionWrapper.h>
 | 
					#include <protoserver/ProtoConnectionWrapper.h>
 | 
				
			||||||
#include "AmlogicWrapper.h"
 | 
					#include "AmlogicWrapper.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "HyperionConfig.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using namespace vlofgren;
 | 
					using namespace vlofgren;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// save the image as screenshot
 | 
					// save the image as screenshot
 | 
				
			||||||
@@ -22,6 +25,11 @@ void saveScreenshot(const char * filename, const Image<ColorRgb> & image)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int main(int argc, char ** argv)
 | 
					int main(int argc, char ** argv)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						std::cout
 | 
				
			||||||
 | 
							<< "hyperion-aml:" << std::endl
 | 
				
			||||||
 | 
							<< "\tversion   : " << HYPERION_VERSION_ID << std::endl
 | 
				
			||||||
 | 
							<< "\tbuild time: " << __DATE__ << " " << __TIME__ << std::endl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	QCoreApplication app(argc, argv);
 | 
						QCoreApplication app(argc, argv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	try
 | 
						try
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -59,3 +59,6 @@ if(ENABLE_QT5)
 | 
				
			|||||||
else(ENABLE_QT5)
 | 
					else(ENABLE_QT5)
 | 
				
			||||||
	qt4_use_modules(${PROJECT_NAME} Core Gui Network )
 | 
						qt4_use_modules(${PROJECT_NAME} Core Gui Network )
 | 
				
			||||||
endif(ENABLE_QT5)
 | 
					endif(ENABLE_QT5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					install ( TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_SOURCE_DIR}/deploy/bin" )
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,6 +9,8 @@
 | 
				
			|||||||
#include <protoserver/ProtoConnectionWrapper.h>
 | 
					#include <protoserver/ProtoConnectionWrapper.h>
 | 
				
			||||||
#include "DispmanxWrapper.h"
 | 
					#include "DispmanxWrapper.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "HyperionConfig.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using namespace vlofgren;
 | 
					using namespace vlofgren;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// save the image as screenshot
 | 
					// save the image as screenshot
 | 
				
			||||||
@@ -21,6 +23,11 @@ void saveScreenshot(const char * filename, const Image<ColorRgb> & image)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int main(int argc, char ** argv)
 | 
					int main(int argc, char ** argv)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						std::cout
 | 
				
			||||||
 | 
							<< "hyperion-dispmanx:" << std::endl
 | 
				
			||||||
 | 
							<< "\tversion   : " << HYPERION_VERSION_ID << std::endl
 | 
				
			||||||
 | 
							<< "\tbuild time: " << __DATE__ << " " << __TIME__ << std::endl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	QCoreApplication app(argc, argv);
 | 
						QCoreApplication app(argc, argv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	try
 | 
						try
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -41,3 +41,6 @@ if(ENABLE_QT5)
 | 
				
			|||||||
else(ENABLE_QT5)
 | 
					else(ENABLE_QT5)
 | 
				
			||||||
	qt4_use_modules(${PROJECT_NAME} Core Gui Network )
 | 
						qt4_use_modules(${PROJECT_NAME} Core Gui Network )
 | 
				
			||||||
endif(ENABLE_QT5)
 | 
					endif(ENABLE_QT5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					install ( TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_SOURCE_DIR}/deploy/bin" )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,6 +13,9 @@
 | 
				
			|||||||
#include "CustomParameter.h"
 | 
					#include "CustomParameter.h"
 | 
				
			||||||
#include "JsonConnection.h"
 | 
					#include "JsonConnection.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "HyperionConfig.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using namespace vlofgren;
 | 
					using namespace vlofgren;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Count the number of true values in a list of booleans
 | 
					/// Count the number of true values in a list of booleans
 | 
				
			||||||
@@ -28,6 +31,11 @@ int count(std::initializer_list<bool> values)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int main(int argc, char * argv[])
 | 
					int main(int argc, char * argv[])
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						std::cout
 | 
				
			||||||
 | 
							<< "hyperion-remote:" << std::endl
 | 
				
			||||||
 | 
							<< "\tversion   : " << HYPERION_VERSION_ID << std::endl
 | 
				
			||||||
 | 
							<< "\tbuild time: " << __DATE__ << " " << __TIME__ << std::endl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	QCoreApplication app(argc, argv);
 | 
						QCoreApplication app(argc, argv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// force the locale
 | 
						// force the locale
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -59,3 +59,6 @@ if(ENABLE_QT5)
 | 
				
			|||||||
else(ENABLE_QT5)
 | 
					else(ENABLE_QT5)
 | 
				
			||||||
	qt4_use_modules(${PROJECT_NAME} Core Gui Network )
 | 
						qt4_use_modules(${PROJECT_NAME} Core Gui Network )
 | 
				
			||||||
endif(ENABLE_QT5)
 | 
					endif(ENABLE_QT5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					install ( TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_SOURCE_DIR}/deploy/bin" )
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,6 +24,8 @@
 | 
				
			|||||||
#include "PixelFormatParameter.h"
 | 
					#include "PixelFormatParameter.h"
 | 
				
			||||||
#include "ScreenshotHandler.h"
 | 
					#include "ScreenshotHandler.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "HyperionConfig.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using namespace vlofgren;
 | 
					using namespace vlofgren;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// save the image as screenshot
 | 
					// save the image as screenshot
 | 
				
			||||||
@@ -36,6 +38,11 @@ void saveScreenshot(void *, const Image<ColorRgb> & image)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int main(int argc, char** argv)
 | 
					int main(int argc, char** argv)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					  std::cout
 | 
				
			||||||
 | 
					    << "hyperion-v4l2:" << std::endl
 | 
				
			||||||
 | 
					    << "\tversion   : " << HYPERION_VERSION_ID << std::endl
 | 
				
			||||||
 | 
					    << "\tbuild time: " << __DATE__ << " " << __TIME__ << std::endl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    QCoreApplication app(argc, argv);
 | 
					    QCoreApplication app(argc, argv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // force the locale
 | 
					    // force the locale
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -60,3 +60,5 @@ if(ENABLE_QT5)
 | 
				
			|||||||
else(ENABLE_QT5)
 | 
					else(ENABLE_QT5)
 | 
				
			||||||
	qt4_use_modules(${PROJECT_NAME} Core Gui Network )
 | 
						qt4_use_modules(${PROJECT_NAME} Core Gui Network )
 | 
				
			||||||
endif(ENABLE_QT5)
 | 
					endif(ENABLE_QT5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					install ( TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_SOURCE_DIR}/deploy/bin" )
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,6 +8,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "protoserver/ProtoConnectionWrapper.h"
 | 
					#include "protoserver/ProtoConnectionWrapper.h"
 | 
				
			||||||
#include "X11Wrapper.h"
 | 
					#include "X11Wrapper.h"
 | 
				
			||||||
 | 
					#include "HyperionConfig.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using namespace vlofgren;
 | 
					using namespace vlofgren;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -21,6 +22,11 @@ void saveScreenshot(const char * filename, const Image<ColorRgb> & image)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int main(int argc, char ** argv)
 | 
					int main(int argc, char ** argv)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					  std::cout
 | 
				
			||||||
 | 
					    << "hyperion-x11:" << std::endl
 | 
				
			||||||
 | 
					    << "\tversion   : " << HYPERION_VERSION_ID << std::endl
 | 
				
			||||||
 | 
					    << "\tbuild time: " << __DATE__ << " " << __TIME__ << std::endl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    QCoreApplication app(argc, argv);
 | 
					    QCoreApplication app(argc, argv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    try
 | 
					    try
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -33,3 +33,5 @@ endif (ENABLE_AMLOGIC)
 | 
				
			|||||||
if (ENABLE_PROTOBUF)
 | 
					if (ENABLE_PROTOBUF)
 | 
				
			||||||
	target_link_libraries(hyperiond protoserver)
 | 
						target_link_libraries(hyperiond protoserver)
 | 
				
			||||||
endif (ENABLE_PROTOBUF)
 | 
					endif (ENABLE_PROTOBUF)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					install ( TARGETS hyperiond DESTINATION "${CMAKE_SOURCE_DIR}/deploy/bin" )
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -92,11 +92,13 @@ Json::Value loadConfig(const std::string & configFile)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int main(int argc, char** argv)
 | 
					int main(int argc, char** argv)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	std::cout << "Application build time: " << __DATE__ << " " << __TIME__ << std::endl;
 | 
						std::cout
 | 
				
			||||||
 | 
							<< "Hyperiond:" << std::endl
 | 
				
			||||||
 | 
							<< "\tversion   : " << HYPERION_VERSION_ID << std::endl
 | 
				
			||||||
 | 
							<< "\tbuild time: " << __DATE__ << " " << __TIME__ << std::endl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Initialising QCoreApplication
 | 
						// Initialising QCoreApplication
 | 
				
			||||||
	QCoreApplication app(argc, argv);
 | 
						QCoreApplication app(argc, argv);
 | 
				
			||||||
	std::cout << "QCoreApplication initialised" << std::endl;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	signal(SIGINT,  signal_handler);
 | 
						signal(SIGINT,  signal_handler);
 | 
				
			||||||
	signal(SIGTERM, signal_handler);
 | 
						signal(SIGTERM, signal_handler);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user