commit 3d4859f1b1b7aaa3a1be31699fc9cc9295662848 Author: Tobias Hieta Date: Tue Oct 13 11:05:27 2015 +0200 Initial public commit of Plex Media Player diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..236ef64 --- /dev/null +++ b/.clang-format @@ -0,0 +1,47 @@ +--- +# BasedOnStyle: LLVM +AccessModifierOffset: -2 +ConstructorInitializerIndentWidth: 2 +AlignEscapedNewlinesLeft: false +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AlwaysBreakTemplateDeclarations: false +AlwaysBreakBeforeMultilineStrings: false +BreakBeforeBinaryOperators: false +BreakBeforeTernaryOperators: false +BreakConstructorInitializersBeforeComma: false +BinPackParameters: true +ColumnLimit: 100 +ConstructorInitializerAllOnOneLineOrOnePerLine: true +DerivePointerBinding: false +ExperimentalAutoDetectBinPacking: false +IndentCaseLabels: true +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: All +ObjCSpaceBeforeProtocolList: true +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 60 +PenaltyBreakString: 1000 +PenaltyBreakFirstLessLess: 120 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 1000 +PointerBindsToType: true +SpacesBeforeTrailingComments: 1 +Cpp11BracedListStyle: false +Standard: Cpp03 +IndentWidth: 2 +TabWidth: 2 +UseTab: Never +BreakBeforeBraces: Allman +IndentFunctionDeclarationAfterType: false +SpacesInParentheses: false +SpacesInAngles: false +SpaceInEmptyParentheses: false +SpacesInCStyleCastParentheses: false +SpaceAfterControlStatementKeyword: true +SpaceBeforeAssignmentOperators: true +ContinuationIndentWidth: 0 +... + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e31eefb --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +*.pro.user* +dependencies/* +CMakeLists.txt.user +CMakeLists.txt.user.* +build/* +.idea +.install_pkg +.openelec-unpack +QtCreatorDeployment.txt +vagrant/ubuntu-x86_64/.vagrant +vagrant/windows-x86_64/.vagrant diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e69de29 diff --git a/BuildQT5-windows.md b/BuildQT5-windows.md new file mode 100644 index 0000000..d2e30f5 --- /dev/null +++ b/BuildQT5-windows.md @@ -0,0 +1,41 @@ +# How-To build Qt 5.5.0 on Windows +This procedure was ran on a freshly installed Win7 64 bits. + +This procedure assumes that the build root is `C:\qt\` but it can be changed in the beginning of each `.bat` file + +1. Install Visual Studio 2013 +- Install [Visual Studio 2013 Update 4](http://www.microsoft.com/fr-fr/download/details.aspx?id=44921) +- Install [Windows SDK 8](https://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx) +- Install [ActivePerl](http://www.activestate.com/activeperl/downloads) +- Install [Python 2.7.10](https://www.python.org/downloads/release/python-2710) +- Install the following gnutools: + - [Bison](http://gnuwin32.sourceforge.net/downlinks/bison.php) + - [GPerf](http://gnuwin32.sourceforge.net/downlinks/gperf.php) + - [Flex](http://gnuwin32.sourceforge.net/downlinks/flex.php) +- Grab [ICU sources](http://download.icu-project.org/files/icu4c/55.1/icu4c-55_1-src.zip) and unpack them in `C:\qt\icu` +- Grab [Openssl 1.0.2d](https://www.openssl.org/source/) and unpack them in `C:\qt\openssl` +- Grab [Qt Sources](http://download.qt.io/official_releases/qt/5.5/5.5.0/single/qt-everywhere-opensource-src-5.5.0.zip) and unpack them in `C:\qt\qt5` +- drop the three `.bat` files in the steps below in `C:\qt\` +- Open `C:\qt\icu\source\allionone\allinone.sln` with VS2013, you will be prompted for project conversion. Once the project is converted, just close it. +- run `c:\qt\buildicu.bat` +- run `c:\qt\buildopenssl.bat` +- run `c:\qt\buildqt.bat` + +The qt build will land in `C:\qt\qt5\build` + + +# buildicu.bat +``` +set BUILD_ROOT=C:\qt REM Set up \Microsoft Visual Studio 2013, where is \c amd64, \c x86, etc. CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64 REM set compiler to multicore set CL=/MP REM Build icu cd %BUILD_ROOT%\icu msbuild source\allinone\allinone.sln /m /target:Build /property:Configuration=Release;Platform=x64 msbuild source\allinone\allinone.sln /m /target:Build /property:Configuration=Debug;Platform=x64 +cd .. +``` + +# buildopenssl.bat +``` +set BUILD_ROOT=C:\qt CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64 cd openssl set CL=/MP perl Configure VC-WIN64A --prefix=%BUILD_ROOT%\openssl\build call ms\do_win64a nmake -f ms\ntdll.mak nmake -f ms\ntdll.mak install cd .. +``` + +# buildqt.bat +``` +set BUILD_ROOT=C:\qt REM Set up \Microsoft Visual Studio 2013, where is \c amd64, \c x86, etc. CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64 REM set compiler to multicore set CL=/MP REM Add ICU dirs to the proper path (include, libs , bin) set INCLUDE=%INCLUDE%;%BUILD_ROOT%\icu\include set LIB=%LIB%;%BUILD_ROOT%\icu\lib64 set PATH=%PATH%;%BUILD_ROOT%\icu\bin64 REM Add OpenSSL dirs to the proper path (include, libs , bin) set INCLUDE=%INCLUDE%;%BUILD_ROOT%\openssl\build\include set LIB=%LIB%;%BUILD_ROOT%\openssl\build\lib set PATH=%PATH%;%BUILD_ROOT%\openssl\build\bin REM Add Pyhton dirs to the proper path (include, libs , bin) set PATH=%PATH%;c:\Python27\ REM Add GunWindirs to the proper path (include, libs , bin) set INCLUDE=%INCLUDE%;%BUILD_ROOT%\GnuWin32\include set LIB=%LIB%;%BUILD_ROOT%\GnuWin32\lib set PATH=%PATH%;=%BUILD_ROOT%\GnuWin32\bin SET QT_ROOT=%BUILD_ROOT%\qt5 SET PATH=%QT_ROOT%\qtbase\bin;%PATH% SET QMAKESPEC=win32-msvc2013 cd %QT_ROOT% CALL configure -prefix %QT_ROOT%\build -icu -opengl dynamic -release -nomake examples -opensource -confirm-license -no-gif -qt-libpng -qt-libjpeg -openssl -qt-pcre -no-cups -no-dbus -skip qtwebkit -skip qtconnectivity -skip qtdoc -skip qtgraphicaleffects -skip qtmultimedia -skip qtsensors -skip qtserialport -skip qtwebkit-examples -skip qtquick1 -skip qt3d nmake nmake install cd .. +``` \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..48eba22 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,59 @@ +project(PlexMediaPlayer CXX C) +cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) + +cmake_policy(SET CMP0020 NEW) +if (POLICY CMP0058) +cmake_policy(SET CMP0058 NEW) +endif() +cmake_policy(SET CMP0017 NEW) + +option(OPENELEC "Make an OpenELEC build" OFF) + +if (OPENELEC) + add_definitions(-DKONVERGO_OPENELEC=1) + Message(STATUS "Making an OpenELEC build") +endif(OPENELEC) + +option(BUILD_TARGET "Destination target for the build" "") + +if (BUILD_TARGET STREQUAL "RPI") + add_definitions(-DTARGET_RPI=1) + set(RPI_LIBS bcm_host) + Message(STATUS "Build for Raspberry PI target") +endif(BUILD_TARGET STREQUAL "RPI") + +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/") +set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME Core) + +add_definitions(-DQS_LOG_LINE_NUMBERS -DQHTTPSERVER_EXPORT) + +include(DependencyConfiguration) +include(VersionConfiguration) +include(NameConfiguration) +include(utils) +include(QtConfiguration) +include(PlayerConfiguration) +include(InputConfiguration) +include(FindBreakpad) +include(BreakpadSymbols) + +if(APPLE) + include(AppleConfiguration) +elseif(WIN32) + include(Win32Configuration) +elseif(UNIX AND (NOT APPLE)) + include(LinuxConfiguration) +endif(APPLE) + +if(CMAKE_COMPILER_IS_GNUCC) + include(GCCConfiguration) +endif(CMAKE_COMPILER_IS_GNUCC) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNINGS}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS}") + +add_subdirectory(external) +add_subdirectory(src) + +include(CPackConfiguration) diff --git a/CMakeModules/AppleConfiguration.cmake b/CMakeModules/AppleConfiguration.cmake new file mode 100644 index 0000000..98a6afe --- /dev/null +++ b/CMakeModules/AppleConfiguration.cmake @@ -0,0 +1,21 @@ +find_library(FOUNDATION Foundation) +find_library(APPKIT AppKit) +find_library(IOKIT IOKit) +find_library(COCOA Cocoa) +find_Library(CARBON Carbon) +find_library(SECURITY Security) + +set(OS_LIBS ${FOUNDATION} ${APPKIT} ${IOKIT} ${COCOA} ${SECURITY} ${CARBON} spmediakeytap) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.9") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.9") +set(WARNINGS "-Wall") + +set(HAVE_UPDATER 1) +find_program(UPDATER_PATH updater HINTS ${CMAKE_FIND_ROOT_PATH}/update_installer/ NO_DEFAULT_PATH) +if(${UPDATER_PATH} MATCHES "UPDATER_PATH-NOTFOUND") + set(HAVE_UPDATER 0) + message(STATUS "will build without the updater") +endif(${UPDATER_PATH} MATCHES "UPDATER_PATH-NOTFOUND") + +set(INSTALL_BIN_DIR .) +set(INSTALL_RESOURCE_DIR Contents/Resources) diff --git a/CMakeModules/BreakpadSymbols.cmake b/CMakeModules/BreakpadSymbols.cmake new file mode 100644 index 0000000..68cd9be --- /dev/null +++ b/CMakeModules/BreakpadSymbols.cmake @@ -0,0 +1,35 @@ +OPTION(GENERATE_SYMBOLS "Should we generate symbols for binaries?" ON) +function(dumpsyms target symfile) + find_program(DUMP_SYMS dump_syms HINTS /usr/bin/ ${DEPENDENCY_ROOT}/bin) + if(GENERATE_SYMBOLS AND NOT DUMP_SYMS) + message(STATUS "dump_syms not found") + endif() + if(GENERATE_SYMBOLS AND DUMP_SYMS) + + if(APPLE) + add_custom_command(TARGET ${target} POST_BUILD + COMMAND dsymutil -o ${MAIN_NAME}.dSYM $ + COMMENT Generating ${MAIN_NAME}.dSYM + BYPRODUCTS ${MAIN_NAME}.dSYM/Contents/Resources/DWARF/${target} ${MAIN_NAME}.dSYM/Contents/Info.plist + ) + endif(APPLE) + + unset(COMPRESS) + find_program(COMPRESS_XZ xz) + find_program(COMPRESS_BZ bzip2) + if(COMPRESS_XZ) + set(COMPRESS_EXT xz) + set(COMPRESS ${COMPRESS_XZ}) + elseif(COMPRESS_BZ) + set(COMPRESS_EXT bz2) + set(COMPRESS ${COMPRESS_BZ}) + endif(COMPRESS_XZ) + + add_custom_command( + TARGET ${target} POST_BUILD + BYPRODUCTS ${symfile}.${COMPRESS_EXT} + COMMAND ${CMAKE_SOURCE_DIR}/scripts/dump-syms.sh "${DUMP_SYMS}" "${COMPRESS}" "$" "${symfile}.${COMPRESS_EXT}" + ) + install(FILES ${symfile}.${COMPRESS_EXT} DESTINATION ${CMAKE_BINARY_DIR}) + endif(GENERATE_SYMBOLS AND DUMP_SYMS) +endfunction() diff --git a/CMakeModules/CPackConfiguration.cmake b/CMakeModules/CPackConfiguration.cmake new file mode 100644 index 0000000..8102d87 --- /dev/null +++ b/CMakeModules/CPackConfiguration.cmake @@ -0,0 +1,63 @@ +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Plex Media Player") +set(CPACK_PACKAGE_VENDOR "Plex") +set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) +set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) +set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_NANO}) + +if(APPLE) + set(CPACK_SYSTEM_NAME "macosx-x86_64") +elseif(WIN32) + set(CPACK_SYSTEM_NAME "windows-x86") +else() + set(CPACK_SYSTEM_NAME linux-${CMAKE_HOST_SYSTEM_PROCESSOR}) +endif() +set(CPACK_PACKAGE_FILE_NAME "PlexMediaPlayer-${VERSION_STRING}-${CPACK_SYSTEM_NAME}") +set(CPACK_SOURCE_PACKAGE_FILE_NAME "PlexMediaPlayer-${VERSION_STRING}-src") + +set(CPACK_PACKAGE_INSTALL_DIRECTORY "PlexMediaPlayer") +set(CPACK_STRIP_FILES 1) + +set(CPACK_GENERATOR "ZIP") + +if(WIN32) + list(APPEND CPACK_GENERATOR "IFW") +endif(WIN32) + +# config IFW +set(CPACK_IFW_FRAMEWORK_VERSION 2.0.1) +set(CPACK_IFW_PACKAGE_NAME "Plex Media Player") +set(CPACK_IFW_PACKAGE_START_MENU_DIRECTORY "Plex Media Player") +set(CPACK_IFW_PACKAGE_TITLE "Plex Media Player Installer") +set(CPACK_IFW_PACKAGE_PUBLISHER "Plex") +set(CPACK_IFW_PRODUCT_URL "https://plex.tv") +set(CPACK_IFW_PACKAGE_ICON ${CMAKE_SOURCE_DIR}/bundle/win/Plex.ico) +set(CPACK_IFW_PACKAGE_WINDOW_ICON ${CMAKE_SOURCE_DIR}/resources/images/icon.png) + +if(APPLE) + set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0) +endif(APPLE) + +configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/CPackGeneratedConfig.cmake.in ${CMAKE_BINARY_DIR}/CPackGeneratedConfig.cmake) +set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_BINARY_DIR}/CPackGeneratedConfig.cmake) + +include(CPack) + +cpack_add_component(Core DISPLAY_NAME "Plex Media Player" DESCRIPTION "Plex Media Player (Core Application)" REQUIRED) + +if(WIN32) + FILE(TO_CMAKE_PATH ${DEPENDENCY_ROOT} tmp) + install(FILES ${tmp}/bin/mpv-1.dll DESTINATION .) + install(FILES ${tmp}/lib/SDL2.dll DESTINATION .) + install(FILES ${tmp}/lib/libcec.dll DESTINATION .) + if(IS_DIRECTORY ${CMAKE_BINARY_DIR}/extradlls) + file(GLOB EXTRADLLS ${CMAKE_BINARY_DIR}/extradlls/*.dll) + install(FILES ${EXTRADLLS} DESTINATION .) + endif() + install(FILES ${CMAKE_SOURCE_DIR}/bundle/win/qt.conf DESTINATION .) + install(FILES ${CMAKE_SOURCE_DIR}/bundle/win/PlexMediaPlayer-angle.bat DESTINATION .) + #add_custom_command(TARGET package POST_BUILD COMMAND ${CMAKE_SOURCE_DIR}/scripts/WindowsSign.cmd ${CPACK_PACKAGE_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.exe WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) + # group/component configuration + message(STATUS configure IFW) + include(CPackIFW) + cpack_ifw_configure_component(Core PRIORITY 1 SCRIPT ${CMAKE_SOURCE_DIR}/bundle/win/shortcut.qs) +endif(WIN32) \ No newline at end of file diff --git a/CMakeModules/CPackGeneratedConfig.cmake.in b/CMakeModules/CPackGeneratedConfig.cmake.in new file mode 100644 index 0000000..91d617e --- /dev/null +++ b/CMakeModules/CPackGeneratedConfig.cmake.in @@ -0,0 +1,3 @@ +if(CPACK_GENERATOR MATCHES "IFW") + set(CMAKE_EXECUTABLE_SUFFIX ".exe") +endif() diff --git a/CMakeModules/CompleteBundle.cmake b/CMakeModules/CompleteBundle.cmake new file mode 100644 index 0000000..949577d --- /dev/null +++ b/CMakeModules/CompleteBundle.cmake @@ -0,0 +1,17 @@ +if(APPLE) + set(SCRIPT CompleteBundleOSX) +elseif(WIN32) + set(SCRIPT CompleteBundleWin) +endif(APPLE) + +option(CODE_SIGN "code sign the app" OFF) +if(CODE_SIGN) + set(DO_SIGN 1) +else(CODE_SIGN) + set(DO_SIGN 0) +endif(CODE_SIGN) + +if(SCRIPT) + configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/${SCRIPT}.cmake.in ${SCRIPT}.cmake @ONLY) + install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/${SCRIPT}.cmake) +endif(SCRIPT) diff --git a/CMakeModules/CompleteBundleOSX.cmake.in b/CMakeModules/CompleteBundleOSX.cmake.in new file mode 100644 index 0000000..e9bf052 --- /dev/null +++ b/CMakeModules/CompleteBundleOSX.cmake.in @@ -0,0 +1,69 @@ +set(app "@EXE@") + +list(APPEND BINS "Contents/Resources/updater") +list(APPEND BINS "Contents/Resources/@HELPER_NAME@") + +set(args ${app}) +list(APPEND args "-verbose=2") +list(APPEND args "-qmldir=@SOURCE_ROOT@/src/ui") +foreach(BIN ${BINS}) + list(APPEND args "-executable=${app}/${BIN}") +endforeach(BIN ${BINS}) + +execute_process( + COMMAND @QTROOT@/bin/macdeployqt ${args} + WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX} +) + +#set(ENTITLEMENTS --entitlements @SOURCE_ROOT@/bundle/osx/Konvergo.entitlements) +set(CODESIGN codesign ${ENTITLEMENTS} --force --sign "Developer ID Application: Plex Inc.") + +macro(sign_binary BIN) + message(STATUS "Signing: ${BIN}") + execute_process( + COMMAND ${CODESIGN} "${BIN}" + RESULT_VARIABLE result + ) + if(NOT ${result} EQUAL 0) + message(FATAL_ERROR "Failed to sign ${BIN}") + endif(NOT ${result} EQUAL 0) +endmacro(sign_binary BIN) + +if(@DO_SIGN@) + + # we need to sign the webengine helper before the framework + # add --entitlements @SOURCE_ROOT@/bundle/osx/WebEngine.entitlements when we want to sandbox + set(WEB_PROC "${CMAKE_INSTALL_PREFIX}/${app}/Contents/Frameworks/QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app") + sign_binary(${WEB_PROC}) + + file(GLOB_RECURSE LIBS + FOLLOW_SYMLINKS + "${CMAKE_INSTALL_PREFIX}/${app}/*.dylib" + ) + file(GLOB FRAMEWORKS FOLLOW_SYMLINKS LIST_DIRECTORIES true "${CMAKE_INSTALL_PREFIX}/${app}/Contents/Frameworks/*") + foreach(LIB ${LIBS} ${FRAMEWORKS}) + sign_binary(${LIB}) + endforeach(LIB ${LIBS}) + + foreach(BIN ${BINS}) + sign_binary(${CMAKE_INSTALL_PREFIX}/${app}/${BIN}) + endforeach(BIN ${BINS}) + + sign_binary(${CMAKE_INSTALL_PREFIX}/${app}) + + message("Verifing signature") + execute_process( + COMMAND codesign --verbose=4 --verify "${CMAKE_INSTALL_PREFIX}/@EXE@" + RESULT_VARIABLE result + ) + if(NOT ${result} EQUAL 0) + message(FATAL_ERROR "Failed to verify binary!") + endif(NOT ${result} EQUAL 0) + execute_process( + COMMAND spctl --verbose=4 --assess --type execute "${CMAKE_INSTALL_PREFIX}/@EXE@" + RESULT_VARIABLE result + ) + if(NOT ${result} EQUAL 0) + message(FATAL_ERROR "Failed to verify binary!") + endif(NOT ${result} EQUAL 0) +endif(@DO_SIGN@) \ No newline at end of file diff --git a/CMakeModules/CompleteBundleWin.cmake.in b/CMakeModules/CompleteBundleWin.cmake.in new file mode 100644 index 0000000..8abe8a6 --- /dev/null +++ b/CMakeModules/CompleteBundleWin.cmake.in @@ -0,0 +1,10 @@ +execute_process(COMMAND @QTROOT@/bin/windeployqt.exe --qmldir @SOURCE_ROOT@/src/ui ${CMAKE_INSTALL_PREFIX}/PlexMediaPlayer.exe) + +if(@DO_SIGN@) + file(GLOB_RECURSE EXES ${CMAKE_INSTALL_PREFIX}/*.exe ${CMAKE_INSTALL_PREFIX}/*.dll) + set(ENV{errorlevel} 1) + foreach(e ${EXES}) + message("-- Signing: ${CMAKE_SOURCE_DIR}/scripts/WindowsSign.cmd ${e}") + execute_process(COMMAND ${CMAKE_SOURCE_DIR}/scripts/WindowsSign.cmd "${e}" RESULT_VARIABLE RES) + endforeach() +endif() \ No newline at end of file diff --git a/CMakeModules/DependencyConfiguration.cmake b/CMakeModules/DependencyConfiguration.cmake new file mode 100644 index 0000000..639e4cc --- /dev/null +++ b/CMakeModules/DependencyConfiguration.cmake @@ -0,0 +1,28 @@ +find_package(PkgConfig) +option(DISABLE_BUNDLED_DEPS "Disable the bundled deps on certain platforms" OFF) + +if(APPLE AND NOT DISABLE_BUNDLED_DEPS) + set(DEFAULT_ROOT "${CMAKE_SOURCE_DIR}/dependencies/konvergo-depends-darwin-x86_64-release") + set(DEPENDENCY_ROOT ${DEFAULT_ROOT} CACHE PATH "Path where the deps are located") +endif(APPLE AND NOT DISABLE_BUNDLED_DEPS) + +if(DEPENDENCY_ROOT) + message(STATUS "Going to use bundled deps in directory: ${DEPENDENCY_ROOT}") + set(CMAKE_FIND_ROOT_PATH ${DEPENDENCY_ROOT}) + set(CMAKE_PREFIX_PATH ${DEPENDENCY_ROOT}) + set(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_FIND_ROOT_PATH}/lib/pkgconfig) + set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE) + include_directories(${CMAKE_FIND_ROOT_PATH}/include) +else(DEPENDENCY_ROOT) + message(STATUS "Not using bundled deps") +endif(DEPENDENCY_ROOT) + +find_package(Threads) + +# on windows we need to download the updater binary seperately +if(WIN32) + file(DOWNLOAD https://nightlies.plex.tv/directdl/plex-dependencies/konvergo-qt/updater.exe ${CMAKE_BINARY_DIR}/updater.exe + SHOW_PROGRESS + EXPECTED_HASH SHA1=d3b4f70d6542fa42c8edd2b9b93fd0916bf20f07 + TLS_VERIFY OFF) +endif(WIN32) \ No newline at end of file diff --git a/CMakeModules/FindBreakpad.cmake b/CMakeModules/FindBreakpad.cmake new file mode 100644 index 0000000..a7e0b50 --- /dev/null +++ b/CMakeModules/FindBreakpad.cmake @@ -0,0 +1,69 @@ +############################################################################### +# CMake module to search for the mpv libraries. +# +# WARNING: This module is experimental work in progress. +# +# Based one FindVLC.cmake by: +# Copyright (c) 2011 Michael Jansen +# Modified by Tobias Hieta +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# +############################################################################### + +# +### Global Configuration Section +# +SET(_BREAKPAD_REQUIRED_VARS BREAKPAD_INCLUDE_DIR BREAKPAD_LIBRARY) + +# +### BREAKPAD uses pkgconfig. +# +if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_BREAKPAD QUIET breakpad-client) +endif(PKG_CONFIG_FOUND) + +# +### Look for the include files. +# +find_path( + BREAKPAD_INCLUDE_DIR + NAMES google_breakpad/common/breakpad_types.h + PATH_SUFFIXES breakpad + HINTS + ${PC_BREAKPAD_INCLUDEDIR} + ${PC_BREAKPAD_INCLUDE_DIRS} # Unused for BREAKPAD but anyway + DOC "BREAKPAD include directory" + ) +mark_as_advanced(BREAKPAD_INCLUDE_DIR) +set(BREAKPAD_INCLUDE_DIRS ${BREAKPAD_INCLUDE_DIR}) + +# +### Look for the libraries (BREAKPAD and BREAKPADsore) +# +find_library( + BREAKPAD_LIBRARY + NAMES breakpad_client + HINTS + ${PC_BREAKPAD_LIBDIR} + ${PC_BREAKPAD_LIBRARY_DIRS} # Unused for BREAKPAD but anyway + PATH_SUFFIXES lib${LIB_SUFFIX} + ) +get_filename_component(_BREAKPAD_LIBRARY_DIR ${BREAKPAD_LIBRARY} PATH) +mark_as_advanced(BREAKPAD_LIBRARY) + +set(BREAKPAD_LIBRARY_DIRS _BREAKPAD_CORE_LIBRARY_DIR _BREAKPAD_LIBRARY_DIR) +list(REMOVE_DUPLICATES BREAKPAD_LIBRARY_DIRS) +mark_as_advanced(BREAKPAD_LIBRARY_DIRS) + +# +### Check if everything was found and if the version is sufficient. +# +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + BREAKPAD + REQUIRED_VARS ${_BREAKPAD_REQUIRED_VARS} + VERSION_VAR BREAKPAD_VERSION_STRING + ) + diff --git a/CMakeModules/FindCEC.cmake b/CMakeModules/FindCEC.cmake new file mode 100644 index 0000000..2c71c07 --- /dev/null +++ b/CMakeModules/FindCEC.cmake @@ -0,0 +1,26 @@ +if(CEC_INCLUDE_DIR) + # Already in cache, be silent + set(CEC_FIND_QUIETLY TRUE) +endif(CEC_INCLUDE_DIR) + +if (PKG_CONFIG_FOUND) + pkg_check_modules(_CEC QUIET libcec>=2.0) +endif (PKG_CONFIG_FOUND) + +Find_Path(CEC_INCLUDE_DIR + NAMES cec.h + PATHS /usr/include usr/local/include + PATH_SUFFIXES libcec + HINTS ${_CEC_INCLUDEDIR} +) + +Find_Library(CEC_LIBRARY + NAMES cec + PATHS /usr/lib usr/local/lib + HINTS ${_CEC_LIBDIR} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(CEC DEFAULT_MSG CEC_LIBRARY CEC_INCLUDE_DIR) + + diff --git a/CMakeModules/FindDL.cmake b/CMakeModules/FindDL.cmake new file mode 100644 index 0000000..8d1df7b --- /dev/null +++ b/CMakeModules/FindDL.cmake @@ -0,0 +1,17 @@ +# - find where dlopen and friends are located. +# DL_FOUND - system has dynamic linking interface available +# DL_INCLUDE_DIR - where dlfcn.h is located. +# DL_LIBRARIES - libraries needed to use dlopen + +include(CheckFunctionExists) + +find_path(DL_INCLUDE_DIR NAMES dlfcn.h) +find_library(DL_LIBRARIES NAMES dl) +if(DL_LIBRARIES) + set(DL_FOUND) +else(DL_LIBRARIES) + check_function_exists(dlopen DL_FOUND) + # If dlopen can be found without linking in dl then dlopen is part + # of libc, so don't need to link extra libs. + set(DL_LIBRARIES "") +endif(DL_LIBRARIES) diff --git a/CMakeModules/FindGLES2.cmake b/CMakeModules/FindGLES2.cmake new file mode 100644 index 0000000..d643e8a --- /dev/null +++ b/CMakeModules/FindGLES2.cmake @@ -0,0 +1,73 @@ +# Copyright (c) 2012, Guillermo A. Amaral B. (gamaral) . +# All rights reserved. +# +# This file is part of Marshmallow Game Engine. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# The views and conclusions contained in the software and documentation are +# those of the authors and should not be interpreted as representing official +# policies, either expressed or implied, of the project as a whole. +# +############################################################################### +# Find GLES2 +############################################################################### +# +# GLES2_FOUND +# GLES2_INCLUDE_DIR +# GLES2_LIBRARY +# +############################################################################### + +find_path(GLES2_INCLUDE_DIR GLES2/gl2.h + HINTS $ENV{GLES2DIR} + PATH_SUFFIXES include + PATHS ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /usr/X11R6 + /opt/local + /opt/vc + /opt +) + +find_library(GLES2_LIBRARY + GLESv2 + HINTS $ENV{GLES2DIR} + PATH_SUFFIXES lib64 lib + PATHS ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /usr/X11R6 + /opt/local + /opt/vc + /opt +) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLES2 DEFAULT_MSG GLES2_LIBRARY) + +mark_as_advanced(GLES2_LIBRARY GLES2_INCLUDE_DIR) + +set(OPENGL_FOUND ${GLES2_FOUND}) diff --git a/CMakeModules/FindICU.cmake b/CMakeModules/FindICU.cmake new file mode 100644 index 0000000..c246bb6 --- /dev/null +++ b/CMakeModules/FindICU.cmake @@ -0,0 +1,311 @@ +# This module can find the International Components for Unicode (ICU) Library +# +# Requirements: +# - CMake >= 2.8.3 (for new version of find_package_handle_standard_args) +# +# The following variables will be defined for your use: +# - ICU_FOUND : were all of your specified components found (include dependencies)? +# - ICU_INCLUDE_DIRS : ICU include directory +# - ICU_LIBRARIES : ICU libraries +# - ICU_VERSION : complete version of ICU (x.y.z) +# - ICU_MAJOR_VERSION : major version of ICU +# - ICU_MINOR_VERSION : minor version of ICU +# - ICU_PATCH_VERSION : patch version of ICU +# - ICU__FOUND : were found? (FALSE for non specified component if it is not a dependency) +# +# For windows or non standard installation, define ICU_ROOT variable to point to the root installation of ICU. Two ways: +# - run cmake with -DICU_ROOT= +# - define an environment variable with the same name before running cmake +# With cmake-gui, before pressing "Configure": +# 1) Press "Add Entry" button +# 2) Add a new entry defined as: +# - Name: ICU_ROOT +# - Type: choose PATH in the selection list +# - Press "..." button and select the root installation of ICU +# +# Example Usage: +# +# 1. Copy this file in the root of your project source directory +# 2. Then, tell CMake to search this non-standard module in your project directory by adding to your CMakeLists.txt: +# set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) +# 3. Finally call find_package() once, here are some examples to pick from +# +# Require ICU 4.4 or later +# find_package(ICU 4.4 REQUIRED) +# +# if(ICU_FOUND) +# include_directories(${ICU_INCLUDE_DIRS}) +# add_executable(myapp myapp.c) +# target_link_libraries(myapp ${ICU_LIBRARIES}) +# endif(ICU_FOUND) + +#============================================================================= +# Copyright (c) 2011-2013, julp +# +# Distributed under the OSI-approved BSD License +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +#============================================================================= + +########## Private ########## +if(NOT DEFINED ICU_PUBLIC_VAR_NS) + set(ICU_PUBLIC_VAR_NS "ICU") # Prefix for all ICU relative public variables +endif(NOT DEFINED ICU_PUBLIC_VAR_NS) +if(NOT DEFINED ICU_PRIVATE_VAR_NS) + set(ICU_PRIVATE_VAR_NS "_${ICU_PUBLIC_VAR_NS}") # Prefix for all ICU relative internal variables +endif(NOT DEFINED ICU_PRIVATE_VAR_NS) +if(NOT DEFINED PC_ICU_PRIVATE_VAR_NS) + set(PC_ICU_PRIVATE_VAR_NS "_PC${ICU_PRIVATE_VAR_NS}") # Prefix for all pkg-config relative internal variables +endif(NOT DEFINED PC_ICU_PRIVATE_VAR_NS) + +function(icudebug _VARNAME) + if(${ICU_PUBLIC_VAR_NS}_DEBUG) + if(DEFINED ${ICU_PUBLIC_VAR_NS}_${_VARNAME}) + message("${ICU_PUBLIC_VAR_NS}_${_VARNAME} = ${${ICU_PUBLIC_VAR_NS}_${_VARNAME}}") + else(DEFINED ${ICU_PUBLIC_VAR_NS}_${_VARNAME}) + message("${ICU_PUBLIC_VAR_NS}_${_VARNAME} = ") + endif(DEFINED ${ICU_PUBLIC_VAR_NS}_${_VARNAME}) + endif(${ICU_PUBLIC_VAR_NS}_DEBUG) +endfunction(icudebug) + +set(${ICU_PRIVATE_VAR_NS}_ROOT "") +if(DEFINED ENV{ICU_ROOT}) + set(${ICU_PRIVATE_VAR_NS}_ROOT "$ENV{ICU_ROOT}") +endif(DEFINED ENV{ICU_ROOT}) +if (DEFINED ICU_ROOT) + set(${ICU_PRIVATE_VAR_NS}_ROOT "${ICU_ROOT}") +endif(DEFINED ICU_ROOT) + +set(${ICU_PRIVATE_VAR_NS}_BIN_SUFFIXES ) +set(${ICU_PRIVATE_VAR_NS}_LIB_SUFFIXES ) +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + list(APPEND ${ICU_PRIVATE_VAR_NS}_BIN_SUFFIXES "bin64") + list(APPEND ${ICU_PRIVATE_VAR_NS}_LIB_SUFFIXES "lib64") +endif(CMAKE_SIZEOF_VOID_P EQUAL 8) +list(APPEND ${ICU_PRIVATE_VAR_NS}_BIN_SUFFIXES "bin") +list(APPEND ${ICU_PRIVATE_VAR_NS}_LIB_SUFFIXES "lib") + +set(${ICU_PRIVATE_VAR_NS}_COMPONENTS ) +# ... +macro(icu_declare_component _NAME) + list(APPEND ${ICU_PRIVATE_VAR_NS}_COMPONENTS ${_NAME}) + set("${ICU_PRIVATE_VAR_NS}_COMPONENTS_${_NAME}" ${ARGN}) +endmacro(icu_declare_component) + +icu_declare_component(data icudata) +icu_declare_component(uc icuuc) # Common and Data libraries +icu_declare_component(i18n icui18n icuin) # Internationalization library +icu_declare_component(io icuio ustdio) # Stream and I/O Library +icu_declare_component(le icule) # Layout library +icu_declare_component(lx iculx) # Paragraph Layout library + +########## Public ########## +set(${ICU_PUBLIC_VAR_NS}_FOUND TRUE) +set(${ICU_PUBLIC_VAR_NS}_LIBRARIES ) +set(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS ) +set(${ICU_PUBLIC_VAR_NS}_C_FLAGS "") +set(${ICU_PUBLIC_VAR_NS}_CXX_FLAGS "") +set(${ICU_PUBLIC_VAR_NS}_CPP_FLAGS "") +set(${ICU_PUBLIC_VAR_NS}_C_SHARED_FLAGS "") +set(${ICU_PUBLIC_VAR_NS}_CXX_SHARED_FLAGS "") +set(${ICU_PUBLIC_VAR_NS}_CPP_SHARED_FLAGS "") +foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PRIVATE_VAR_NS}_COMPONENTS}) + string(TOUPPER "${${ICU_PRIVATE_VAR_NS}_COMPONENT}" ${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT) + set("${ICU_PUBLIC_VAR_NS}_${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}_FOUND" FALSE) # may be done in the icu_declare_component macro +endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT) + +# Check components +if(NOT ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) # uc required at least + set(${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS uc) +else(NOT ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) + list(APPEND ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS uc) + list(REMOVE_DUPLICATES ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) + foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS}) + if(NOT DEFINED ${ICU_PRIVATE_VAR_NS}_COMPONENTS_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) + message(FATAL_ERROR "Unknown ICU component: ${${ICU_PRIVATE_VAR_NS}_COMPONENT}") + endif(NOT DEFINED ${ICU_PRIVATE_VAR_NS}_COMPONENTS_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) + endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT) +endif(NOT ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) + +# Includes +find_path( + ${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS + NAMES unicode/utypes.h utypes.h + HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT} + PATH_SUFFIXES "include" + DOC "Include directories for ICU" +) + +if(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS) + ########## ########## + if(EXISTS "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/uvernum.h") # ICU >= 4 + file(READ "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/uvernum.h" ${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS) + elseif(EXISTS "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/uversion.h") # ICU [2;4[ + file(READ "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/uversion.h" ${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS) + elseif(EXISTS "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/utypes.h") # ICU [1.4;2[ + file(READ "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/utypes.h" ${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS) + elseif(EXISTS "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/utypes.h") # ICU 1.3 + file(READ "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/utypes.h" ${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS) + else() + message(FATAL_ERROR "ICU version header not found") + endif() + + if(${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS MATCHES ".*# *define *ICU_VERSION *\"([0-9]+)\".*") # ICU 1.3 + # [1.3;1.4[ as #define ICU_VERSION "3" (no patch version, ie all 1.3.X versions will be detected as 1.3.0) + set(${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION "1") + set(${ICU_PUBLIC_VAR_NS}_MINOR_VERSION "${CMAKE_MATCH_1}") + set(${ICU_PUBLIC_VAR_NS}_PATCH_VERSION "0") + elseif(${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS MATCHES ".*# *define *U_ICU_VERSION_MAJOR_NUM *([0-9]+).*") + # + # Since version 4.9.1, ICU release version numbering was totaly changed, see: + # - http://site.icu-project.org/download/49 + # - http://userguide.icu-project.org/design#TOC-Version-Numbers-in-ICU + # + set(${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION "${CMAKE_MATCH_1}") + string(REGEX REPLACE ".*# *define *U_ICU_VERSION_MINOR_NUM *([0-9]+).*" "\\1" ${ICU_PUBLIC_VAR_NS}_MINOR_VERSION "${${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS}") + string(REGEX REPLACE ".*# *define *U_ICU_VERSION_PATCHLEVEL_NUM *([0-9]+).*" "\\1" ${ICU_PUBLIC_VAR_NS}_PATCH_VERSION "${${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS}") + elseif(${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS MATCHES ".*# *define *U_ICU_VERSION *\"(([0-9]+)(\\.[0-9]+)*)\".*") # ICU [1.4;1.8[ + # [1.4;1.8[ as #define U_ICU_VERSION "1.4.1.2" but it seems that some 1.4.1(?:\.\d)? have releasing error and appears as 1.4.0 + set(${ICU_PRIVATE_VAR_NS}_FULL_VERSION "${CMAKE_MATCH_1}") # copy CMAKE_MATCH_1, no longer valid on the following if + if(${ICU_PRIVATE_VAR_NS}_FULL_VERSION MATCHES "^([0-9]+)\\.([0-9]+)$") + set(${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION "${CMAKE_MATCH_1}") + set(${ICU_PUBLIC_VAR_NS}_MINOR_VERSION "${CMAKE_MATCH_2}") + set(${ICU_PUBLIC_VAR_NS}_PATCH_VERSION "0") + elseif(${ICU_PRIVATE_VAR_NS}_FULL_VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)") + set(${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION "${CMAKE_MATCH_1}") + set(${ICU_PUBLIC_VAR_NS}_MINOR_VERSION "${CMAKE_MATCH_2}") + set(${ICU_PUBLIC_VAR_NS}_PATCH_VERSION "${CMAKE_MATCH_3}") + endif() + else() + message(FATAL_ERROR "failed to detect ICU version") + endif() + set(${ICU_PUBLIC_VAR_NS}_VERSION "${${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION}.${${ICU_PUBLIC_VAR_NS}_MINOR_VERSION}.${${ICU_PUBLIC_VAR_NS}_PATCH_VERSION}") + ########## ########## + + # Check dependencies (implies pkg-config) + if(PKG_CONFIG_FOUND) + set(${ICU_PRIVATE_VAR_NS}_COMPONENTS_DUP ${${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS}) + foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PRIVATE_VAR_NS}_COMPONENTS_DUP}) + pkg_check_modules(PC_ICU_PRIVATE_VAR_NS "icu-${${ICU_PRIVATE_VAR_NS}_COMPONENT}" QUIET) + + if(${PC_ICU_PRIVATE_VAR_NS}_FOUND) + foreach(${PC_ICU_PRIVATE_VAR_NS}_LIBRARY ${PC_ICU_LIBRARIES}) + string(REGEX REPLACE "^icu" "" ${PC_ICU_PRIVATE_VAR_NS}_STRIPPED_LIBRARY ${${PC_ICU_PRIVATE_VAR_NS}_LIBRARY}) + list(APPEND ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS ${${PC_ICU_PRIVATE_VAR_NS}_STRIPPED_LIBRARY}) + endforeach(${PC_ICU_PRIVATE_VAR_NS}_LIBRARY) + endif(${PC_ICU_PRIVATE_VAR_NS}_FOUND) + endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT) + list(REMOVE_DUPLICATES ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) + endif(PKG_CONFIG_FOUND) + + # Check libraries + foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS}) + set(${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES ) + set(${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES ) + foreach(${ICU_PRIVATE_VAR_NS}_BASE_NAME ${${ICU_PRIVATE_VAR_NS}_COMPONENTS_${${ICU_PRIVATE_VAR_NS}_COMPONENT}}) + list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}") + list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}d") + list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}${ICU_MAJOR_VERSION}${ICU_MINOR_VERSION}") + list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}${ICU_MAJOR_VERSION}${ICU_MINOR_VERSION}d") + endforeach(${ICU_PRIVATE_VAR_NS}_BASE_NAME) + + find_library( + ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT} + NAMES ${${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES} + HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT} + PATH_SUFFIXES ${_ICU_LIB_SUFFIXES} + DOC "Release libraries for ICU" + ) + find_library( + ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT} + NAMES ${${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES} + HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT} + PATH_SUFFIXES ${_ICU_LIB_SUFFIXES} + DOC "Debug libraries for ICU" + ) + + string(TOUPPER "${${ICU_PRIVATE_VAR_NS}_COMPONENT}" ${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT) + if(NOT ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT} AND NOT ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) # both not found + set("${ICU_PUBLIC_VAR_NS}_${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}_FOUND" FALSE) + set("${ICU_PUBLIC_VAR_NS}_FOUND" FALSE) + else(NOT ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT} AND NOT ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) # one or both found + set("${ICU_PUBLIC_VAR_NS}_${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}_FOUND" TRUE) + if(NOT ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) # release not found => we are in debug + set(${ICU_PRIVATE_VAR_NS}_LIB_${${ICU_PRIVATE_VAR_NS}_COMPONENT} "${${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}}") + elseif(NOT ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) # debug not found => we are in release + set(${ICU_PRIVATE_VAR_NS}_LIB_${${ICU_PRIVATE_VAR_NS}_COMPONENT} "${${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT}}") + else() # both found + set( + ${ICU_PRIVATE_VAR_NS}_LIB_${${ICU_PRIVATE_VAR_NS}_COMPONENT} + optimized ${${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT}} + debug ${${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}} + ) + endif() + list(APPEND ${ICU_PUBLIC_VAR_NS}_LIBRARIES ${${ICU_PRIVATE_VAR_NS}_LIB_${${ICU_PRIVATE_VAR_NS}_COMPONENT}}) + endif(NOT ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT} AND NOT ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) + endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT) + + # Try to find out compiler flags + find_program(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE icu-config HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT}) + if(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE) + execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_C_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cxxflags OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CXX_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cppflags OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CPP_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) + + execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cflags-dynamic OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_C_SHARED_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cxxflags-dynamic OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CXX_SHARED_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cppflags-dynamic OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CPP_SHARED_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) + endif(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE) + + # Check find_package arguments + include(FindPackageHandleStandardArgs) + if(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) + find_package_handle_standard_args( + ${ICU_PUBLIC_VAR_NS} + REQUIRED_VARS ${ICU_PUBLIC_VAR_NS}_LIBRARIES ${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS + VERSION_VAR ${ICU_PUBLIC_VAR_NS}_VERSION + ) + else(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) + find_package_handle_standard_args(${ICU_PUBLIC_VAR_NS} "ICU not found" ${ICU_PUBLIC_VAR_NS}_LIBRARIES ${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS) + endif(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) +else(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS) + if(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) + message(FATAL_ERROR "Could not find ICU include directory") + endif(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) +endif(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS) + +mark_as_advanced( + ${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS + ${ICU_PUBLIC_VAR_NS}_LIBRARIES +) + +# IN (args) +icudebug("FIND_COMPONENTS") +icudebug("FIND_REQUIRED") +icudebug("FIND_QUIETLY") +icudebug("FIND_VERSION") +# OUT +# Found +icudebug("FOUND") +icudebug("UC_FOUND") +icudebug("I18N_FOUND") +icudebug("IO_FOUND") +icudebug("LE_FOUND") +icudebug("LX_FOUND") +icudebug("DATA_FOUND") +# Flags +icudebug("C_FLAGS") +icudebug("CPP_FLAGS") +icudebug("CXX_FLAGS") +icudebug("C_SHARED_FLAGS") +icudebug("CPP_SHARED_FLAGS") +icudebug("CXX_SHARED_FLAGS") +# Linking +icudebug("INCLUDE_DIRS") +icudebug("LIBRARIES") +# Version +icudebug("MAJOR_VERSION") +icudebug("MINOR_VERSION") +icudebug("PATCH_VERSION") +icudebug("VERSION") diff --git a/CMakeModules/FindIconv.cmake b/CMakeModules/FindIconv.cmake new file mode 100644 index 0000000..24cdae3 --- /dev/null +++ b/CMakeModules/FindIconv.cmake @@ -0,0 +1,57 @@ +# - Try to find Iconv +# Once done this will define +# +# ICONV_FOUND - system has Iconv +# ICONV_INCLUDE_DIR - the Iconv include directory +# ICONV_LIBRARIES - Link these to use Iconv +# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const +# +include(CheckCXXSourceCompiles) + +IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + # Already in cache, be silent + SET(ICONV_FIND_QUIETLY TRUE) +ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +FIND_PATH(ICONV_INCLUDE_DIR iconv.h) + +FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) + +IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + SET(ICONV_FOUND TRUE) +ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) +set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) +IF(ICONV_FOUND) + check_cxx_source_compiles(" + #include + int main(){ + iconv_t conv = 0; + const char* in = 0; + size_t ilen = 0; + char* out = 0; + size_t olen = 0; + iconv(conv, &in, &ilen, &out, &olen); + return 0; + } +" ICONV_SECOND_ARGUMENT_IS_CONST ) +ENDIF(ICONV_FOUND) +set(CMAKE_REQUIRED_INCLUDES) +set(CMAKE_REQUIRED_LIBRARIES) + +IF(ICONV_FOUND) + IF(NOT ICONV_FIND_QUIETLY) + MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") + ENDIF(NOT ICONV_FIND_QUIETLY) +ELSE(ICONV_FOUND) + IF(Iconv_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Iconv") + ENDIF(Iconv_FIND_REQUIRED) +ENDIF(ICONV_FOUND) + +MARK_AS_ADVANCED( + ICONV_INCLUDE_DIR + ICONV_LIBRARIES + ICONV_SECOND_ARGUMENT_IS_CONST +) diff --git a/CMakeModules/FindMPV.cmake b/CMakeModules/FindMPV.cmake new file mode 100644 index 0000000..bea1003 --- /dev/null +++ b/CMakeModules/FindMPV.cmake @@ -0,0 +1,80 @@ +############################################################################### +# CMake module to search for the mpv libraries. +# +# WARNING: This module is experimental work in progress. +# +# Based one FindVLC.cmake by: +# Copyright (c) 2011 Michael Jansen +# Modified by Tobias Hieta +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# +############################################################################### + +# +### Global Configuration Section +# +SET(_MPV_REQUIRED_VARS MPV_INCLUDE_DIR MPV_LIBRARY) + +# +### MPV uses pkgconfig. +# +if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_MPV QUIET mpv) +endif(PKG_CONFIG_FOUND) + +if(PC_MPV_FOUND) + # + ### Look for the include files. + # + find_path( + MPV_INCLUDE_DIR + NAMES mpv/client.h + HINTS + ${PC_MPV_INCLUDEDIR} + ${PC_MPV_INCLUDE_DIRS} # Unused for MPV but anyway + DOC "MPV include directory" + ) + + # + ### Look for the libraries + # + set(_MPV_LIBRARY_NAMES mpv) + if(PC_MPV_LIBRARIES) + set(_MPV_LIBRARY_NAMES ${PC_MPV_LIBRARIES}) + endif(PC_MPV_LIBRARIES) + + foreach(l ${_MPV_LIBRARY_NAMES}) + find_library( + MPV_LIBRARY_${l} + NAMES ${l} + HINTS + ${PC_MPV_LIBDIR} + ${PC_MPV_LIBRARY_DIRS} # Unused for MPV but anyway + PATH_SUFFIXES lib${LIB_SUFFIX} + ) + list(APPEND MPV_LIBRARY ${MPV_LIBRARY_${l}}) + endforeach() + get_filename_component(_MPV_LIBRARY_DIR ${MPV_LIBRARY_mpv} PATH) + mark_as_advanced(MPV_LIBRARY) + + set(MPV_LIBRARY_DIRS _MPV_LIBRARY_DIR) + list(REMOVE_DUPLICATES MPV_LIBRARY_DIRS) + +endif() + +mark_as_advanced(MPV_INCLUDE_DIR) +mark_as_advanced(MPV_LIBRARY_DIRS) +set(MPV_INCLUDE_DIRS ${MPV_INCLUDE_DIR}) + +# +### Check if everything was found and if the version is sufficient. +# +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + MPV + REQUIRED_VARS ${_MPV_REQUIRED_VARS} + VERSION_VAR MPV_VERSION_STRING + ) + diff --git a/CMakeModules/FindSDL2.cmake b/CMakeModules/FindSDL2.cmake new file mode 100644 index 0000000..9c8a3bd --- /dev/null +++ b/CMakeModules/FindSDL2.cmake @@ -0,0 +1,69 @@ +############################################################################### +# CMake module to search for the SDL libraries. +# +# WARNING: This module is experimental work in progress. +# +# Based one FindVLC.cmake by: +# Copyright (c) 2011 Michael Jansen +# Modified by Tobias Hieta +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# +############################################################################### + +# +### Global Configuration Section +# +SET(_SDL2_REQUIRED_VARS SDL2_INCLUDE_DIR SDL2_LIBRARY) + +# +### SDL uses pkgconfig. +# +if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_SDL QUIET sdl2) +endif(PKG_CONFIG_FOUND) + +# +### Look for the include files. +# +find_path( + SDL2_INCLUDE_DIR + NAMES SDL.h + PATH_SUFFIXES SDL2 + HINTS + ${PC_SDL2_INCLUDEDIR} + ${PC_SDL2_INCLUDE_DIRS} # Unused for SDL but anyway + DOC "SDL2 include directory" + ) +mark_as_advanced(SDL2_INCLUDE_DIR) +set(SDL2_INCLUDE_DIRS ${SDL_INCLUDE_DIR}) + +# +### Look for the libraries (SDL and SDLsore) +# +find_library( + SDL2_LIBRARY + NAMES SDL2 + HINTS + ${PC_SDL2_LIBDIR} + ${PC_SDL2_LIBRARY_DIRS} # Unused for SDL but anyway + PATH_SUFFIXES lib${LIB_SUFFIX} + ) +get_filename_component(_SDL2_LIBRARY_DIR "${SDL2_LIBRARY}" PATH) +mark_as_advanced(SDL2_LIBRARY) + +set(SDL2_LIBRARY_DIRS _SDL2_LIBRARY_DIR) +list(REMOVE_DUPLICATES SDL2_LIBRARY_DIRS) +mark_as_advanced(SDL2_LIBRARY_DIRS) + +# +### Check if everything was found and if the version is sufficient. +# +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + SDL2 + REQUIRED_VARS ${_SDL2_REQUIRED_VARS} + VERSION_VAR SDL2_VERSION_STRING + ) + diff --git a/CMakeModules/GCCConfiguration.cmake b/CMakeModules/GCCConfiguration.cmake new file mode 100644 index 0000000..e69de29 diff --git a/CMakeModules/GetDate.cmake b/CMakeModules/GetDate.cmake new file mode 100644 index 0000000..b2f8ade --- /dev/null +++ b/CMakeModules/GetDate.cmake @@ -0,0 +1,13 @@ +MACRO (TODAY RESULT) + IF (WIN32) + #EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT}) + #string(REGEX REPLACE "(..)/(..)/(....).*" "\\3\\2\\1" ${RESULT} ${${RESULT}}) + set(${RESULT}) + ELSEIF(UNIX) + EXECUTE_PROCESS(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE ${RESULT}) + string(REGEX REPLACE "(..)/(..)/(....).*" "\\3\\2\\1" ${RESULT} ${${RESULT}}) + ELSE (WIN32) + MESSAGE(SEND_ERROR "date not implemented") + SET(${RESULT} 000000) + ENDIF (WIN32) +ENDMACRO (TODAY) diff --git a/CMakeModules/GetGitRevisionDescription.cmake b/CMakeModules/GetGitRevisionDescription.cmake new file mode 100644 index 0000000..1bf0230 --- /dev/null +++ b/CMakeModules/GetGitRevisionDescription.cmake @@ -0,0 +1,123 @@ +# - Returns a version string from Git +# +# These functions force a re-configure on each git commit so that you can +# trust the values of the variables in your build system. +# +# get_git_head_revision( [ ...]) +# +# Returns the refspec and sha hash of the current head revision +# +# git_describe( [ ...]) +# +# Returns the results of git describe on the source tree, and adjusting +# the output so that it tests false if an error occurs. +# +# git_get_exact_tag( [ ...]) +# +# Returns the results of git describe --exact-match on the source tree, +# and adjusting the output so that it tests false if there was no exact +# matching tag. +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__get_git_revision_description) + return() +endif() +set(__get_git_revision_description YES) + +# We must run the following at "include" time, not at function call time, +# to find the path to this module rather than the path to a calling list file +get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH) + +function(get_git_head_revision _refspecvar _hashvar) + set(GIT_PARENT_DIR "${CMAKE_SOURCE_DIR}") + set(GIT_DIR "${GIT_PARENT_DIR}/.git") + while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories + set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}") + get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) + if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT) + # We have reached the root directory, we are not in git + set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE) + set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE) + return() + endif() + set(GIT_DIR "${GIT_PARENT_DIR}/.git") + endwhile() + set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data") + if(NOT EXISTS "${GIT_DATA}") + file(MAKE_DIRECTORY "${GIT_DATA}") + endif() + + if(NOT EXISTS "${GIT_DIR}/HEAD") + return() + endif() + set(HEAD_FILE "${GIT_DATA}/HEAD") + configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY) + + configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in" + "${GIT_DATA}/grabRef.cmake" + @ONLY) + include("${GIT_DATA}/grabRef.cmake") + + set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE) + set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE) +endfunction() + +function(git_describe _var) + if(NOT GIT_FOUND) + find_package(Git QUIET) + endif() + get_git_head_revision(refspec hash) + if(NOT GIT_FOUND) + set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) + return() + endif() + if(NOT hash) + set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) + return() + endif() + + # TODO sanitize + #if((${ARGN}" MATCHES "&&") OR + # (ARGN MATCHES "||") OR + # (ARGN MATCHES "\\;")) + # message("Please report the following error to the project!") + # message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}") + #endif() + + #message(STATUS "Arguments to execute_process: ${ARGN}") + + execute_process(COMMAND + "${GIT_EXECUTABLE}" + describe + ${hash} + ${ARGN} + WORKING_DIRECTORY + "${CMAKE_SOURCE_DIR}" + RESULT_VARIABLE + res + OUTPUT_VARIABLE + out + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(NOT res EQUAL 0) + set(out "${out}-${res}-NOTFOUND") + endif() + + set(${_var} "${out}" PARENT_SCOPE) +endfunction() + +function(git_get_exact_tag _var) + git_describe(out --exact-match ${ARGN}) + set(${_var} "${out}" PARENT_SCOPE) +endfunction() diff --git a/CMakeModules/GetGitRevisionDescription.cmake.in b/CMakeModules/GetGitRevisionDescription.cmake.in new file mode 100644 index 0000000..888ce13 --- /dev/null +++ b/CMakeModules/GetGitRevisionDescription.cmake.in @@ -0,0 +1,38 @@ +# +# Internal file for GetGitRevisionDescription.cmake +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(HEAD_HASH) + +file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024) + +string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS) +if(HEAD_CONTENTS MATCHES "ref") + # named branch + string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}") + if(EXISTS "@GIT_DIR@/${HEAD_REF}") + configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) + elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}") + configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) + set(HEAD_HASH "${HEAD_REF}") + endif() +else() + # detached HEAD + configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY) +endif() + +if(NOT HEAD_HASH) + file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024) + string(STRIP "${HEAD_HASH}" HEAD_HASH) +endif() diff --git a/CMakeModules/InputConfiguration.cmake b/CMakeModules/InputConfiguration.cmake new file mode 100644 index 0000000..59cc7db --- /dev/null +++ b/CMakeModules/InputConfiguration.cmake @@ -0,0 +1,71 @@ +OPTION(ENABLE_SDL2 "Enable SDL2 for joystick handling" ON) +if(ENABLE_SDL2) + find_package(SDL2) + if(SDL2_FOUND) + list(APPEND ENABLED_INPUTS SDL2) + + if(NOT WIN32) + find_package(Iconv) + + if(NOT ICONV_FOUND) + unset(SDL2_FOUND) + endif(NOT ICONV_FOUND) + + find_package(DL) + + if(NOT DL_FOUND) + unset(SDL2_FOUND) + endif(NOT DL_FOUND) + + list(APPEND SDL2_LIBRARY ${ICONV_LIBRARIES} ${DL_LIBRARIES}) + endif() + + if(APPLE) + find_package(Iconv) + + if(NOT ICONV_FOUND) + unset(SDL2_FOUND) + endif(NOT ICONV_FOUND) + + list(APPEND SDL2_LIBRARY ${ICONV_LIBRARIES}) + find_library(FORCEFEEDBACK ForceFeedback) + find_library(CARBON Carbon) + list(APPEND SDL2_LIBRARY ${FORCEFEEDBACK} ${CARBON}) + endif(APPLE) + + if(SDL2_FOUND) + add_definitions(-DHAVE_SDL) + include_directories(${SDL2_INCLUDE_DIR}) + set(EXTRA_LIBS ${SDL2_LIBRARY}) + endif(SDL2_FOUND) + + endif(SDL2_FOUND) + +endif(ENABLE_SDL2) + +OPTION(ENABLE_CEC "Enable HDMI/CEC support with libCEC" ON) +if(ENABLE_CEC) + find_package(CEC) + if(CEC_FOUND) + list(APPEND ENABLED_INPUTS CEC) + add_definitions(-DHAVE_CEC) + include_directories(${CEC_INCLUDE_DIR}) + set(EXTRA_LIBS ${EXTRA_LIBS} ${CEC_LIBRARY}) + endif(CEC_FOUND) + +endif(ENABLE_CEC) + +if(UNIX AND NOT APPLE) + OPTION(ENABLE_LIRC "Enable LIRC for Linux IR handling" ON) + if(ENABLE_LIRC) + list(APPEND ENABLED_INPUTS LIRC) + add_definitions(-DHAVE_LIRC) + endif(ENABLE_LIRC) +endif(UNIX AND NOT APPLE) + +if(APPLE) + list(APPEND ENABLED_INPUTS "AppleRemote") +endif(APPLE) + +string(REPLACE ";" " " _STR "${ENABLED_INPUTS}") +message(STATUS "Enabled Inputs: " ${_STR}) diff --git a/CMakeModules/LinuxConfiguration.cmake b/CMakeModules/LinuxConfiguration.cmake new file mode 100644 index 0000000..93bbb19 --- /dev/null +++ b/CMakeModules/LinuxConfiguration.cmake @@ -0,0 +1,14 @@ +find_package(X11) +if(X11_FOUND AND X11_Xrandr_FOUND) + include_directories(X11_X11_INCLUDE_PATH X11_Xrandr_INCLUDE_PATH) + set(X11XRANDR_FOUND 1) + add_definitions(-DUSE_X11XRANDR) +endif() + +if (NOT BUILD_TARGET STREQUAL "RPI") + set(USE_X11POWER ON) + add_definitions(-DUSE_X11POWER) +endif() + +set(INSTALL_BIN_DIR bin) +set(INSTALL_RESOURCE_DIR share) diff --git a/CMakeModules/NameConfiguration.cmake b/CMakeModules/NameConfiguration.cmake new file mode 100644 index 0000000..dda3da1 --- /dev/null +++ b/CMakeModules/NameConfiguration.cmake @@ -0,0 +1,16 @@ +set(HELPER_TARGET PMPHelper) +set(MAIN_TARGET PlexMediaPlayer) + +# Name of the output binary, defaults are only used on Linux +set(HELPER_NAME pmphelper) +set(MAIN_NAME plexmediaplayer) + +if(APPLE) + set(HELPER_NAME "PMP Helper") + set(MAIN_NAME "Plex Media Player") +elseif(WIN32) + set(HELPER_NAME "PMPHelper") + set(MAIN_NAME "PlexMediaPlayer") +endif(APPLE) + +configure_file(src/shared/Names.cpp.in src/shared/Names.cpp @ONLY) \ No newline at end of file diff --git a/CMakeModules/PlayerConfiguration.cmake b/CMakeModules/PlayerConfiguration.cmake new file mode 100644 index 0000000..b01e6e5 --- /dev/null +++ b/CMakeModules/PlayerConfiguration.cmake @@ -0,0 +1,16 @@ +# We want OpenGL or OpenGLES2 +find_package(OpenGL) +if(NOT OPENGL_FOUND) + find_package(GLES2) + if(NOT GLES2_FOUND) + message(FATAL_ERROR "OpenGL or GLES2 is required") + else(NOT GLES2_FOUND) + set(OPENGL_LIBS ${GLES2_LIBRARY}) + endif(NOT GLES2_FOUND) +else(NOT OPENGL_FOUND) + set(OPENGL_LIBS ${OPENGL_gl_LIBRARY}) +endif(NOT OPENGL_FOUND) + +find_package(MPV REQUIRED) + +include_directories(${MPV_INCLUDE_DIR}) diff --git a/CMakeModules/QtConfiguration.cmake b/CMakeModules/QtConfiguration.cmake new file mode 100644 index 0000000..fb752dc --- /dev/null +++ b/CMakeModules/QtConfiguration.cmake @@ -0,0 +1,57 @@ +set(QTROOT "/usr/local/Qt/Qt5.5" CACHE PATH "Root of the QT binaries.") +set(REQUIRED_QT_VERSION "5.5.0") + +set(QTCONFIGROOT ${QTROOT}/lib/cmake/Qt5) +set(components Core Network WebChannel Qml Quick Xml WebEngine) + +if(OPENELEC) + set(components ${components} DBus) +endif(OPENELEC) + +foreach(COMP ${components}) + set(mod Qt5${COMP}) + + # look for the config files in the QtConfigRoot defined above + set(${mod}_DIR ${QTCONFIGROOT}${COMP}) + + # look for the actual package + find_package(${mod} ${REQUIRED_QT_VERSION} REQUIRED) + + include_directories(${${mod}_INCLUDE_DIRS}) + if(OPENELEC) + include_directories(${${mod}_PRIVATE_INCLUDE_DIRS}) + endif(OPENELEC) + + list(APPEND QT5_LIBRARIES ${${mod}_LIBRARIES}) + list(APPEND QT5_CFLAGS ${${mod}_EXECUTABLE_COMPILE_FLAGS}) +endforeach(COMP ${components}) + +list(REMOVE_DUPLICATES QT5_CFLAGS) + +message(STATUS "Qt version: ${Qt5Core_VERSION_STRING}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QT5_CFLAGS}") + +set(CMAKE_REQUIRED_INCLUDES ${Qt5WebEngine_INCLUDE_DIRS};${Qt5WebEngine_PRIVATE_INCLUDE_DIRS}) +set(CMAKE_REQUIRED_LIBRARIES ${QT5_LIBRARIES}) + +OPTION(SKIP_QT_TEST "Skip tests for required Qt features" OFF) + +if(NOT SKIP_QT_TEST) + include(CheckCXXSourceCompiles) + check_cxx_source_compiles(" + #include + #include + int main() + { + QQuickWebEngineView* view = new QQuickWebEngineView(NULL); + view->setBackgroundColor(QColor(\"transparent\")); + } + " WebEngineBackgroundProperty) + + if(NOT WebEngineBackgroundProperty) + message(FATAL_ERROR "QQuickWebEngineView doesn't have the background property." + "This will break video playback. As of Qt 5.5 you need to manually patch and build Qt to get this property." + "With the release of Qt5.6 it will no longer be required. See qt-patches/README for more details.") + endif(NOT WebEngineBackgroundProperty) + +endif(NOT SKIP_QT_TEST) diff --git a/CMakeModules/VersionConfiguration.cmake b/CMakeModules/VersionConfiguration.cmake new file mode 100644 index 0000000..6a9a2df --- /dev/null +++ b/CMakeModules/VersionConfiguration.cmake @@ -0,0 +1,30 @@ +# Get the current date. +include(GetDate) +include(WebClientVariables) +today(CURRENT_DATE) + +# Get git revision version +include(GetGitRevisionDescription) +get_git_head_revision(REFSPEC FULL_GIT_REVISION) +if(FULL_GIT_REVISION STREQUAL "GITDIR-NOTFOUND") + set(GIT_REVISION "git") +else(FULL_GIT_REVISION STREQUAL "GITDIR-NOTFOUND") + string(SUBSTRING ${FULL_GIT_REVISION} 0 8 GIT_REVISION) +endif(FULL_GIT_REVISION STREQUAL "GITDIR-NOTFOUND") + +# Get the build number if available +if(DEFINED ENV{BUILD_NUMBER}) + set(VERSION_BUILD "$ENV{BUILD_NUMBER}") + set(VERSION_BUILD_NR "$ENV{BUILD_NUMBER}") +else() + set(VERSION_BUILD "dev") + set(VERSION_BUILD_NR "0") +endif() + +set(VERSION_MAJOR 1) +set(VERSION_MINOR 0) +set(VERSION_NANO 0) + +set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_NANO}.${VERSION_BUILD}-${GIT_REVISION}") +set(CANONICAL_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_NANO}-${GIT_REVISION}") +configure_file(src/Version.cpp.in src/Version.cpp) \ No newline at end of file diff --git a/CMakeModules/WebClientResources.cmake b/CMakeModules/WebClientResources.cmake new file mode 100644 index 0000000..2a927fe --- /dev/null +++ b/CMakeModules/WebClientResources.cmake @@ -0,0 +1,36 @@ +include(WebClientVariables) + +option(SKIP_WEB_CLIENT "Skip downloading the web client" OFF) + +if(NOT SKIP_WEB_CLIENT) + set(WEB_CLIENT_CPP web-client-${WEB_CLIENT_VERSION}.cpp) + set(WEB_CLIENT_URL https://nightlies.plex.tv/directdl/plex-web-client-plexmediaplayer/master/plex-web-client-konvergo-${WEB_CLIENT_VERSION}.cpp.bz2) + + message(STATUS "web-client version: ${WEB_CLIENT_VERSION}") + + file( + DOWNLOAD ${WEB_CLIENT_URL} ${CMAKE_CURRENT_BINARY_DIR}/${WEB_CLIENT_CPP}.bz2 + EXPECTED_HASH SHA1=${WEB_CLIENT_HASH} + TIMEOUT 100 + SHOW_PROGRESS + TLS_VERIFY ON + ) + + find_program(BUNZIP2 bunzip2${CMAKE_EXECUTABLE_SUFFIX}) + if(${BUNZIP2} MATCHES NOT_FOUND) + message(FATAL_ERROR "Can't fid bunzip2") + endif(${BUNZIP2} MATCHES NOT_FOUND) + + add_custom_command( + OUTPUT ${WEB_CLIENT_CPP} + COMMAND ${BUNZIP2} -k -f ${CMAKE_CURRENT_BINARY_DIR}/${WEB_CLIENT_CPP}.bz2 + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${WEB_CLIENT_CPP}.bz2 + COMMENT "Unpacking: ${WEB_CLIENT_CPP}.bz2" + ) + + add_custom_target(UnpackWebClientResource + DEPENDS ${WEB_CLIENT_CPP} + ) +else(NOT SKIP_WEB_CLIENT) + message(WARNING "Skipping web-client, you will not a functioning end product") +endif(NOT SKIP_WEB_CLIENT) diff --git a/CMakeModules/WebClientVariables.cmake b/CMakeModules/WebClientVariables.cmake new file mode 100644 index 0000000..d9fd3ac --- /dev/null +++ b/CMakeModules/WebClientVariables.cmake @@ -0,0 +1,2 @@ +set(WEB_CLIENT_VERSION a1def70) +set(WEB_CLIENT_HASH 16d2ef0a5b46fb6746aed6d3f3f7234d463f2c36) diff --git a/CMakeModules/Win32Configuration.cmake b/CMakeModules/Win32Configuration.cmake new file mode 100644 index 0000000..d91b113 --- /dev/null +++ b/CMakeModules/Win32Configuration.cmake @@ -0,0 +1,14 @@ +set(INSTALL_BIN_DIR .) +set(INSTALL_RESOURCE_DIR resources) +set(HAVE_UPDATER 1) + + +# Add install rules for required system runtimes such as MSVCRxx.dll +SET (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP ON) +INCLUDE(InstallRequiredSystemLibraries) +IF (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS) + INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} + DESTINATION ${INSTALL_BIN_DIR} + PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ + COMPONENT Runtime) +ENDIF (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS) diff --git a/CMakeModules/utils.cmake b/CMakeModules/utils.cmake new file mode 100644 index 0000000..21c92e8 --- /dev/null +++ b/CMakeModules/utils.cmake @@ -0,0 +1,70 @@ +############################################################# +function(set_bundle_dir) + set(args SOURCES DEST EXCLUDE) + include(CMakeParseArguments) + cmake_parse_arguments(BD "" "" "${args}" ${ARGN}) + + foreach(_BDIR ${BD_SOURCES}) + file(GLOB _DIRCONTENTS ${_BDIR}/*) + foreach(_BDFILE ${_DIRCONTENTS}) + get_filename_component(_BDFILE_NAME ${_BDFILE} NAME) + + set(PROCESS_FILE 1) + foreach(EX_FILE ${BD_EXCLUDE}) + string(REGEX MATCH ${EX_FILE} DID_MATCH ${_BDFILE}) + if(NOT "${DID_MATCH}" STREQUAL "") + set(PROCESS_FILE 0) + endif(NOT "${DID_MATCH}" STREQUAL "") + endforeach(EX_FILE ${BD_EXCLUDE}) + + if(PROCESS_FILE STREQUAL "1") + if(IS_DIRECTORY ${_BDFILE}) + set_bundle_dir(SOURCES ${_BDFILE} DEST ${BD_DEST}/${_BDFILE_NAME} EXCLUDE ${BD_EXCLUDE}) + else(IS_DIRECTORY ${_BDFILE}) + #message("set_bundle_dir : setting package_location ${_BDFILE} = ${BD_DEST}") + set_source_files_properties(${_BDFILE} PROPERTIES MACOSX_PACKAGE_LOCATION ${BD_DEST}) + get_property(BUNDLED_FILES GLOBAL PROPERTY CONFIG_BUNDLED_FILES) + set_property(GLOBAL PROPERTY CONFIG_BUNDLED_FILES ${BUNDLED_FILES} ${_BDFILE}) + + string(REPLACE "/" "\\\\" GNAME ${BD_DEST}) + source_group(${GNAME} FILES ${_BDFILE}) + endif(IS_DIRECTORY ${_BDFILE}) + endif() + endforeach(_BDFILE ${_DIRCONTENTS}) + endforeach(_BDIR ${BD_SOURCES}) +endfunction(set_bundle_dir) + +############################################################# +macro(find_all_sources DIRECTORY VARIABLE) + aux_source_directory(${DIRECTORY} ${VARIABLE}) + file(GLOB headers ${DIRECTORY}/*h) + list(APPEND ${VARIABLE} ${headers}) +endmacro() + +############################################################# +# function to collect all the sources from sub-directories +# into a single list +function(add_sources) + get_property(is_defined GLOBAL PROPERTY SRCS_LIST DEFINED) + if(NOT is_defined) + define_property(GLOBAL PROPERTY SRCS_LIST + BRIEF_DOCS "List of source files" + FULL_DOCS "List of source files to be compiled in one library") + endif() + # make absolute paths + set(SRCS) + foreach(s IN LISTS ARGN) + if(NOT IS_ABSOLUTE "${s}") + get_filename_component(s "${s}" ABSOLUTE) + endif() + list(APPEND SRCS "${s}") + endforeach() + + string(REPLACE ${CMAKE_SOURCE_DIR}/src/ "" SUBDIR ${CMAKE_CURRENT_SOURCE_DIR}) + string(TOLOWER ${SUBDIR} SUBDIR) + string(REPLACE "/" "\\\\" LIBNAME ${SUBDIR}) + source_group(${LIBNAME} FILES ${SRCS}) + + # add it to the global list. + set_property(GLOBAL APPEND PROPERTY SRCS_LIST ${SRCS}) +endfunction(add_sources) diff --git a/README.md b/README.md new file mode 100644 index 0000000..4df57ce --- /dev/null +++ b/README.md @@ -0,0 +1,52 @@ +## Building + +You need: + +* Qt 5.6 alpha +* cmake 3.0 or newer +* ninja is recommended for building + +Special Qt requirements: + +* On Windows, you must apply qt-patches/0003-Always-enable-viewport-stuff.patch for + correct window scaling. Applying the patches in qt-patches/qt-5.6-alpha/ fixes + some stability issues. +* On OSX, you should apply qt-patches/0002-qtbase-Don-t-show-the-menu-bar-at-all-in-lion-style-fullscr.patch + to improve the user experience in fullscreen. +* You can try to use Qt 5.5, but then you also need to apply the following patches: + qt-patches/0001-qtwebengine-Add-a-backgroundColor-property.patch + qt-patches/0004-qtwebengine-transparency-window-creation.patch + Without them, video playback will not work. + +Get dependencies: + +* scripts/fetch-binaries.py -p darwin-x86_64 + +If you're happy just building from the command line then run CMake for the ninja build tool: + +* mkdir build ; cd build +* cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DQTROOT=/path/to/qt -DCMAKE_INSTALL_PREFIX=output .. + +Build (ninja): + +* ninja + +Make a distributable package: + +* ninja install (be patient, it's slow) + +Or if you prefer working in Xcode, run CMake for the xcode build): + +* mkdir build ; cd build +* cmake -GXcode -DQTROOT=/path/to/qt .. + + +### Debugging Web Client + +You can run a locally hosted development version of the web app within the Konvergo application. If the main app window is open you can also run Chrome side by side to debug. + +* Run the `grunt server:konvergo` from the `web-client` submodule. This will run a dev version of the web client +* Update the `starturl` in `~/Library/Application Support/Plex Media Player/Plex Media Player.conf` to point to `http://localhost:3333/app/dev-konvergo.html` +* Run the `Plex Media Player.app` +* Tail the `~/Library/Logs/Plex Media Player/Plex Media Player.log`, optionally grepped with `WebClient` to see `console.log`s +* Open Chrome and point to `http://localhost:3333/app/dev-konvergo.html`. This should open a Qt channel to the main `Plex Media Player.app` and function as normal - but with the ability to add breakpoints and inspect code diff --git a/bundle/osx/Info.plist.in b/bundle/osx/Info.plist.in new file mode 100644 index 0000000..89697f1 --- /dev/null +++ b/bundle/osx/Info.plist.in @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${MACOSX_BUNDLE_EXECUTABLE_NAME} + CFBundleGetInfoString + ${MACOSX_BUNDLE_INFO_STRING} + CFBundleIconFile + ${MACOSX_BUNDLE_ICON_FILE} + CFBundleIdentifier + ${MACOSX_BUNDLE_GUI_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLongVersionString + ${MACOSX_BUNDLE_LONG_VERSION_STRING} + CFBundleName + ${MACOSX_BUNDLE_BUNDLE_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + ${MACOSX_BUNDLE_SHORT_VERSION_STRING} + CFBundleSignature + ???? + CFBundleVersion + ${MACOSX_BUNDLE_BUNDLE_VERSION} + CSResourcesFileMapped + + NSHumanReadableCopyright + ${MACOSX_BUNDLE_COPYRIGHT} + NSPrincipalClass + NSApplication + NSHighResolutionCapable + True + LSMinimumSystemVersion + 10.9 + + diff --git a/bundle/osx/Konvergo.entitlements b/bundle/osx/Konvergo.entitlements new file mode 100644 index 0000000..7a2230d --- /dev/null +++ b/bundle/osx/Konvergo.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.network.client + + com.apple.security.network.server + + + diff --git a/bundle/osx/Plex.icns b/bundle/osx/Plex.icns new file mode 100644 index 0000000..58cc3b3 Binary files /dev/null and b/bundle/osx/Plex.icns differ diff --git a/bundle/osx/WebEngine.entitlements b/bundle/osx/WebEngine.entitlements new file mode 100644 index 0000000..794eada --- /dev/null +++ b/bundle/osx/WebEngine.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.inherit + + + diff --git a/bundle/osx/qt.conf b/bundle/osx/qt.conf new file mode 100644 index 0000000..df50e9d --- /dev/null +++ b/bundle/osx/qt.conf @@ -0,0 +1,4 @@ +[Paths] +Plugins = ../PlugIns +Imports = ../Resources/qml +Qml2Imports = ../Resources/qml diff --git a/bundle/win/Plex.ico b/bundle/win/Plex.ico new file mode 100644 index 0000000..33034c7 Binary files /dev/null and b/bundle/win/Plex.ico differ diff --git a/bundle/win/PlexMediaPlayer-angle.bat b/bundle/win/PlexMediaPlayer-angle.bat new file mode 100644 index 0000000..5f8f7d6 --- /dev/null +++ b/bundle/win/PlexMediaPlayer-angle.bat @@ -0,0 +1,2 @@ +set QT_OPENGL=angle +start PlexMediaPlayer.exe diff --git a/bundle/win/iconres.rc b/bundle/win/iconres.rc new file mode 100644 index 0000000..9872ee2 --- /dev/null +++ b/bundle/win/iconres.rc @@ -0,0 +1 @@ +IDI_ICON ICON Plex.ico \ No newline at end of file diff --git a/bundle/win/qt.conf b/bundle/win/qt.conf new file mode 100644 index 0000000..799e1d8 --- /dev/null +++ b/bundle/win/qt.conf @@ -0,0 +1,7 @@ +[Paths] +Prefix = . +Plugins = . +Binaries = . +Imports = . +Qml2Imports = . +LibraryExecutables = . diff --git a/bundle/win/shortcut.qs b/bundle/win/shortcut.qs new file mode 100644 index 0000000..2b1d81e --- /dev/null +++ b/bundle/win/shortcut.qs @@ -0,0 +1,15 @@ +function Component() +{ + // default constructor +} + +Component.prototype.createOperations = function() +{ + component.createOperations(); + + if (systemInfo.productType === "windows") { + component.addOperation("CreateShortcut", "@TargetDir@/PlexMediaPlayer.exe", "@StartMenuDir@/Plex Media Player.lnk"); + component.addOperation("CreateShortcut", "@TargetDir@/PlexMediaPlayer-angle.bat", "@StartMenuDir@/Plex Media Player (DirectX).lnk"); + component.addOperation("CreateShortcut", "@TargetDir@/maintenancetool.exe", "@StartMenuDir@/Maintain Plex Media Player.lnk"); + } +} \ No newline at end of file diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt new file mode 100644 index 0000000..15d94f5 --- /dev/null +++ b/external/CMakeLists.txt @@ -0,0 +1,7 @@ +add_subdirectory(qhttpserver) +add_subdirectory(qslog) + +if(APPLE) + add_subdirectory(plistparser) + add_subdirectory(SPMediaKeyTap) +endif(APPLE) \ No newline at end of file diff --git a/external/SPMediaKeyTap/CMakeLists.txt b/external/SPMediaKeyTap/CMakeLists.txt new file mode 100644 index 0000000..f076fb1 --- /dev/null +++ b/external/SPMediaKeyTap/CMakeLists.txt @@ -0,0 +1,9 @@ + +# SPMediaKeyTap uses some deprecated methods, no need to fix that right now, so let's supress the warnings. +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations") + +add_library(spmediakeytap STATIC + SPMediaKeyTap.h SPMediaKeyTap.m + SPInvocationGrabbing/NSObject+SPInvocationGrabbing.m + SPInvocationGrabbing/NSObject+SPInvocationGrabbing.h +) \ No newline at end of file diff --git a/external/SPMediaKeyTap/LICENSE b/external/SPMediaKeyTap/LICENSE new file mode 100644 index 0000000..a43e412 --- /dev/null +++ b/external/SPMediaKeyTap/LICENSE @@ -0,0 +1,8 @@ +Copyright (c) 2011, Joachim Bengtsson +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Neither the name of the organization nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/external/SPMediaKeyTap/README.md b/external/SPMediaKeyTap/README.md new file mode 100644 index 0000000..171a604 --- /dev/null +++ b/external/SPMediaKeyTap/README.md @@ -0,0 +1,12 @@ +SPMediaKeyTap +============= + +`SPMediaKeyTap` abstracts a `CGEventHook` and other nastiness in order to give you a relatively simple API to receive media key events (prev/next/playpause, on F7 to F9 on modern MacBook Pros) exclusively, without them reaching other applications like iTunes. `SPMediaKeyTap` is clever enough to resign its exclusive lock on media keys by looking for which application was active most recently: if that application is in `SPMediaKeyTap`'s whitelist, it will resign the keys. This is similar to the behavior of Apple's applications collaborating on media key handling exclusivity, but unfortunately, Apple is not exposing any APIs allowing third-parties to join in on this collaboration. + +For now, the whitelist is just a hardcoded array in `+[SPMediaKeyTap defaultMediaKeyUserBundleIdentifiers]`. If your app starts using `SPMediaKeyTap`, please [mail me](mailto:nevyn@spotify.com) your bundle ID, and I'll include it in the canonical repository. This is a bad solution; a better solution would be to use distributed notifications to collaborate in creating this whitelist at runtime. Hopefully someone'll have the time and energy to write this soon. + +In `Example/SPMediaKeyTapExampleAppDelegate.m` is an example of both how you use `SPMediaKeyTap`, and how you handle the semi-private `NSEvent` subtypes involved in media keys, including on how to fall back to non-event tap handling of these events. + +`SPMediaKeyTap` and other `CGEventHook`s on the event type `NSSystemDefined` is known to interfere with each other and applications doing weird stuff with mouse input, because mouse clicks are also part of the `NSSystemDefined` category. The single issue we have had reported here at Spotify is Adobe Fireworks, in which item selection stops working with `SPMediaKeyTap` is active. + +`SPMediaKeyTap` requires 10.5 to work, and disables itself on 10.4. diff --git a/external/SPMediaKeyTap/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.h b/external/SPMediaKeyTap/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.h new file mode 100644 index 0000000..d30233d --- /dev/null +++ b/external/SPMediaKeyTap/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.h @@ -0,0 +1,30 @@ +#import + +@interface SPInvocationGrabber : NSObject { + id _object; + NSInvocation *_invocation; + int frameCount; + char **frameStrings; + BOOL backgroundAfterForward; + BOOL onMainAfterForward; + BOOL waitUntilDone; +} +-(id)initWithObject:(id)obj; +-(id)initWithObject:(id)obj stacktraceSaving:(BOOL)saveStack; +@property (readonly, retain, nonatomic) id object; +@property (readonly, retain, nonatomic) NSInvocation *invocation; +@property BOOL backgroundAfterForward; +@property BOOL onMainAfterForward; +@property BOOL waitUntilDone; +-(void)invoke; // will release object and invocation +-(void)printBacktrace; +-(void)saveBacktrace; +@end + +@interface NSObject (SPInvocationGrabbing) +-(id)grab; +-(id)invokeAfter:(NSTimeInterval)delta; +-(id)nextRunloop; +-(id)inBackground; +-(id)onMainAsync:(BOOL)async; +@end diff --git a/external/SPMediaKeyTap/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.m b/external/SPMediaKeyTap/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.m new file mode 100644 index 0000000..ce3b9f4 --- /dev/null +++ b/external/SPMediaKeyTap/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.m @@ -0,0 +1,127 @@ +#import "NSObject+SPInvocationGrabbing.h" +#import + +#pragma mark Invocation grabbing +@interface SPInvocationGrabber () +@property (readwrite, retain, nonatomic) id object; +@property (readwrite, retain, nonatomic) NSInvocation *invocation; + +@end + +@implementation SPInvocationGrabber +- (id)initWithObject:(id)obj; +{ + return [self initWithObject:obj stacktraceSaving:YES]; +} + +-(id)initWithObject:(id)obj stacktraceSaving:(BOOL)saveStack; +{ + self.object = obj; + + if(saveStack) + [self saveBacktrace]; + + return self; +} +-(void)dealloc; +{ + free(frameStrings); + self.object = nil; + self.invocation = nil; + [super dealloc]; +} +@synthesize invocation = _invocation, object = _object; + +@synthesize backgroundAfterForward, onMainAfterForward, waitUntilDone; +- (void)runInBackground; +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + @try { + [self invoke]; + } + @finally { + [pool drain]; + } +} + + +- (void)forwardInvocation:(NSInvocation *)anInvocation { + [anInvocation retainArguments]; + anInvocation.target = _object; + self.invocation = anInvocation; + + if(backgroundAfterForward) + [NSThread detachNewThreadSelector:@selector(runInBackground) toTarget:self withObject:nil]; + else if(onMainAfterForward) + [self performSelectorOnMainThread:@selector(invoke) withObject:nil waitUntilDone:waitUntilDone]; +} +- (NSMethodSignature *)methodSignatureForSelector:(SEL)inSelector { + NSMethodSignature *signature = [super methodSignatureForSelector:inSelector]; + if (signature == NULL) + signature = [_object methodSignatureForSelector:inSelector]; + + return signature; +} + +- (void)invoke; +{ + + @try { + [_invocation invoke]; + } + @catch (NSException * e) { + NSLog(@"SPInvocationGrabber's target raised %@:\n\t%@\nInvocation was originally scheduled at:", e.name, e); + [self printBacktrace]; + printf("\n"); + [e raise]; + } + + self.invocation = nil; + self.object = nil; +} + +-(void)saveBacktrace; +{ + void *backtraceFrames[128]; + frameCount = backtrace(&backtraceFrames[0], 128); + frameStrings = backtrace_symbols(&backtraceFrames[0], frameCount); +} +-(void)printBacktrace; +{ + for(int x = 3; x < frameCount; x++) { + if(frameStrings[x] == NULL) { break; } + printf("%s\n", frameStrings[x]); + } +} +@end + +@implementation NSObject (SPInvocationGrabbing) +-(id)grab; +{ + return [[[SPInvocationGrabber alloc] initWithObject:self] autorelease]; +} +-(id)invokeAfter:(NSTimeInterval)delta; +{ + id grabber = [self grab]; + [NSTimer scheduledTimerWithTimeInterval:delta target:grabber selector:@selector(invoke) userInfo:nil repeats:NO]; + return grabber; +} +- (id)nextRunloop; +{ + return [self invokeAfter:0]; +} +-(id)inBackground; +{ + SPInvocationGrabber *grabber = [self grab]; + grabber.backgroundAfterForward = YES; + return grabber; +} +-(id)onMainAsync:(BOOL)async; +{ + SPInvocationGrabber *grabber = [self grab]; + grabber.onMainAfterForward = YES; + grabber.waitUntilDone = !async; + return grabber; +} + +@end diff --git a/external/SPMediaKeyTap/SPMediaKeyTap.h b/external/SPMediaKeyTap/SPMediaKeyTap.h new file mode 100644 index 0000000..aa974d2 --- /dev/null +++ b/external/SPMediaKeyTap/SPMediaKeyTap.h @@ -0,0 +1,43 @@ +#include +#import +#import + +// http://overooped.com/post/2593597587/mediakeys + +#define SPSystemDefinedEventMediaKeys 8 + +@interface SPMediaKeyTap : NSObject { + EventHandlerRef _app_switching_ref; + EventHandlerRef _app_terminating_ref; + CFMachPortRef _eventPort; + CFRunLoopSourceRef _eventPortSource; + CFRunLoopRef _tapThreadRL; + BOOL _shouldInterceptMediaKeyEvents; + id _delegate; + // The app that is frontmost in this list owns media keys + NSMutableArray *_mediaKeyAppList; +} ++ (NSArray*)defaultMediaKeyUserBundleIdentifiers; + +-(id)initWithDelegate:(id)delegate; + ++(BOOL)usesGlobalMediaKeyTap; +-(void)startWatchingMediaKeys; +-(void)stopWatchingMediaKeys; +-(void)handleAndReleaseMediaKeyEvent:(NSEvent *)event; +@end + +@interface NSObject (SPMediaKeyTapDelegate) +-(void)mediaKeyTap:(SPMediaKeyTap*)keyTap receivedMediaKeyEvent:(NSEvent*)event; +@end + +#ifdef __cplusplus +extern "C" { +#endif + +extern NSString *kMediaKeyUsingBundleIdentifiersDefaultsKey; +extern NSString *kIgnoreMediaKeysDefaultsKey; + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/external/SPMediaKeyTap/SPMediaKeyTap.m b/external/SPMediaKeyTap/SPMediaKeyTap.m new file mode 100644 index 0000000..54ae878 --- /dev/null +++ b/external/SPMediaKeyTap/SPMediaKeyTap.m @@ -0,0 +1,346 @@ +// Copyright (c) 2010 Spotify AB +#import "SPMediaKeyTap.h" +#import "SPInvocationGrabbing/NSObject+SPInvocationGrabbing.h" // https://gist.github.com/511181, in submodule + +@interface SPMediaKeyTap () +-(BOOL)shouldInterceptMediaKeyEvents; +-(void)setShouldInterceptMediaKeyEvents:(BOOL)newSetting; +-(void)startWatchingAppSwitching; +-(void)stopWatchingAppSwitching; +-(void)eventTapThread; +@end +static SPMediaKeyTap *singleton = nil; + +static pascal OSStatus appSwitched (EventHandlerCallRef nextHandler, EventRef evt, void* userData); +static pascal OSStatus appTerminated (EventHandlerCallRef nextHandler, EventRef evt, void* userData); +static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *refcon); + + +// Inspired by http://gist.github.com/546311 + +@implementation SPMediaKeyTap + +#pragma mark - +#pragma mark Setup and teardown +-(id)initWithDelegate:(id)delegate; +{ + _delegate = delegate; + [self startWatchingAppSwitching]; + singleton = self; + _mediaKeyAppList = [NSMutableArray new]; + _tapThreadRL=nil; + _eventPort=nil; + _eventPortSource=nil; + return self; +} +-(void)dealloc; +{ + [self stopWatchingMediaKeys]; + [self stopWatchingAppSwitching]; + [_mediaKeyAppList release]; + [super dealloc]; +} + +-(void)startWatchingAppSwitching; +{ + // Listen to "app switched" event, so that we don't intercept media keys if we + // weren't the last "media key listening" app to be active + EventTypeSpec eventType = { kEventClassApplication, kEventAppFrontSwitched }; + OSStatus err = InstallApplicationEventHandler(NewEventHandlerUPP(appSwitched), 1, &eventType, self, &_app_switching_ref); + assert(err == noErr); + + eventType.eventKind = kEventAppTerminated; + err = InstallApplicationEventHandler(NewEventHandlerUPP(appTerminated), 1, &eventType, self, &_app_terminating_ref); + assert(err == noErr); +} +-(void)stopWatchingAppSwitching; +{ + if(!_app_switching_ref) return; + RemoveEventHandler(_app_switching_ref); + _app_switching_ref = NULL; +} + +-(void)startWatchingMediaKeys;{ + // Prevent having multiple mediaKeys threads + [self stopWatchingMediaKeys]; + + [self setShouldInterceptMediaKeyEvents:YES]; + + // Add an event tap to intercept the system defined media key events + _eventPort = CGEventTapCreate(kCGSessionEventTap, + kCGHeadInsertEventTap, + kCGEventTapOptionDefault, + CGEventMaskBit(NX_SYSDEFINED), + tapEventCallback, + self); + assert(_eventPort != NULL); + + _eventPortSource = CFMachPortCreateRunLoopSource(kCFAllocatorSystemDefault, _eventPort, 0); + assert(_eventPortSource != NULL); + + // Let's do this in a separate thread so that a slow app doesn't lag the event tap + [NSThread detachNewThreadSelector:@selector(eventTapThread) toTarget:self withObject:nil]; +} +-(void)stopWatchingMediaKeys; +{ + // TODO: Shut down thread, remove event tap port and source + + if(_tapThreadRL){ + CFRunLoopStop(_tapThreadRL); + _tapThreadRL=nil; + } + + if(_eventPort){ + CFMachPortInvalidate(_eventPort); + CFRelease(_eventPort); + _eventPort=nil; + } + + if(_eventPortSource){ + CFRelease(_eventPortSource); + _eventPortSource=nil; + } +} + +#pragma mark - +#pragma mark Accessors + ++(BOOL)usesGlobalMediaKeyTap +{ +#ifdef _DEBUG + // breaking in gdb with a key tap inserted sometimes locks up all mouse and keyboard input forever, forcing reboot + return NO; +#else + // XXX(nevyn): MediaKey event tap doesn't work on 10.4, feel free to figure out why if you have the energy. + return + ![[NSUserDefaults standardUserDefaults] boolForKey:kIgnoreMediaKeysDefaultsKey] + && floor(NSAppKitVersionNumber) >= 949/*NSAppKitVersionNumber10_5*/; +#endif +} + ++ (NSArray*)defaultMediaKeyUserBundleIdentifiers; +{ + return [NSArray arrayWithObjects: + [[NSBundle mainBundle] bundleIdentifier], // your app + @"com.spotify.client", + @"com.apple.iTunes", + @"com.apple.QuickTimePlayerX", + @"com.apple.quicktimeplayer", + @"com.apple.iWork.Keynote", + @"com.apple.iPhoto", + @"org.videolan.vlc", + @"com.apple.Aperture", + @"com.plexsquared.Plex", + @"com.soundcloud.desktop", + @"org.niltsh.MPlayerX", + @"com.ilabs.PandorasHelper", + @"com.mahasoftware.pandabar", + @"com.bitcartel.pandorajam", + @"org.clementine-player.clementine", + @"fm.last.Last.fm", + @"fm.last.Scrobbler", + @"com.beatport.BeatportPro", + @"com.Timenut.SongKey", + @"com.macromedia.fireworks", // the tap messes up their mouse input + @"at.justp.Theremin", + @"ru.ya.themblsha.YandexMusic", + @"com.jriver.MediaCenter18", + @"com.jriver.MediaCenter19", + @"com.jriver.MediaCenter20", + @"co.rackit.mate", + @"com.ttitt.b-music", + @"com.beardedspice.BeardedSpice", + @"com.plug.Plug", + @"com.plug.Plug2", + @"com.netease.163music", + nil + ]; +} + + +-(BOOL)shouldInterceptMediaKeyEvents; +{ + BOOL shouldIntercept = NO; + @synchronized(self) { + shouldIntercept = _shouldInterceptMediaKeyEvents; + } + return shouldIntercept; +} + +-(void)pauseTapOnTapThread:(BOOL)yeahno; +{ + CGEventTapEnable(self->_eventPort, yeahno); +} +-(void)setShouldInterceptMediaKeyEvents:(BOOL)newSetting; +{ + BOOL oldSetting; + @synchronized(self) { + oldSetting = _shouldInterceptMediaKeyEvents; + _shouldInterceptMediaKeyEvents = newSetting; + } + if(_tapThreadRL && oldSetting != newSetting) { + id grab = [self grab]; + [grab pauseTapOnTapThread:newSetting]; + NSTimer *timer = [NSTimer timerWithTimeInterval:0 invocation:[grab invocation] repeats:NO]; + CFRunLoopAddTimer(_tapThreadRL, (CFRunLoopTimerRef)timer, kCFRunLoopCommonModes); + } +} + +#pragma mark +#pragma mark - +#pragma mark Event tap callbacks + +// Note: method called on background thread + +static CGEventRef tapEventCallback2(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *refcon) +{ + SPMediaKeyTap *self = refcon; + + if(type == kCGEventTapDisabledByTimeout) { + NSLog(@"Media key event tap was disabled by timeout"); + CGEventTapEnable(self->_eventPort, TRUE); + return event; + } else if(type == kCGEventTapDisabledByUserInput) { + // Was disabled manually by -[pauseTapOnTapThread] + return event; + } + NSEvent *nsEvent = nil; + @try { + nsEvent = [NSEvent eventWithCGEvent:event]; + } + @catch (NSException * e) { + NSLog(@"Strange CGEventType: %d: %@", type, e); + assert(0); + return event; + } + + if (type != NX_SYSDEFINED || [nsEvent subtype] != SPSystemDefinedEventMediaKeys) + return event; + + int keyCode = (([nsEvent data1] & 0xFFFF0000) >> 16); + if (keyCode != NX_KEYTYPE_PLAY && keyCode != NX_KEYTYPE_FAST && keyCode != NX_KEYTYPE_REWIND && keyCode != NX_KEYTYPE_PREVIOUS && keyCode != NX_KEYTYPE_NEXT) + return event; + + if (![self shouldInterceptMediaKeyEvents]) + return event; + + [nsEvent retain]; // matched in handleAndReleaseMediaKeyEvent: + [self performSelectorOnMainThread:@selector(handleAndReleaseMediaKeyEvent:) withObject:nsEvent waitUntilDone:NO]; + + return NULL; +} + +static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *refcon) +{ + NSAutoreleasePool *pool = [NSAutoreleasePool new]; + CGEventRef ret = tapEventCallback2(proxy, type, event, refcon); + [pool drain]; + return ret; +} + + +// event will have been retained in the other thread +-(void)handleAndReleaseMediaKeyEvent:(NSEvent *)event { + [event autorelease]; + + [_delegate mediaKeyTap:self receivedMediaKeyEvent:event]; +} + + +-(void)eventTapThread; +{ + _tapThreadRL = CFRunLoopGetCurrent(); + CFRunLoopAddSource(_tapThreadRL, _eventPortSource, kCFRunLoopCommonModes); + CFRunLoopRun(); +} + +#pragma mark Task switching callbacks + +NSString *kMediaKeyUsingBundleIdentifiersDefaultsKey = @"SPApplicationsNeedingMediaKeys"; +NSString *kIgnoreMediaKeysDefaultsKey = @"SPIgnoreMediaKeys"; + + + +-(void)mediaKeyAppListChanged; +{ + if([_mediaKeyAppList count] == 0) return; + + /*NSLog(@"--"); + int i = 0; + for (NSValue *psnv in _mediaKeyAppList) { + ProcessSerialNumber psn; [psnv getValue:&psn]; + NSDictionary *processInfo = [(id)ProcessInformationCopyDictionary( + &psn, + kProcessDictionaryIncludeAllInformationMask + ) autorelease]; + NSString *bundleIdentifier = [processInfo objectForKey:(id)kCFBundleIdentifierKey]; + NSLog(@"%d: %@", i++, bundleIdentifier); + }*/ + + ProcessSerialNumber mySerial, topSerial; + GetCurrentProcess(&mySerial); + [[_mediaKeyAppList objectAtIndex:0] getValue:&topSerial]; + + Boolean same; + OSErr err = SameProcess(&mySerial, &topSerial, &same); + [self setShouldInterceptMediaKeyEvents:(err == noErr && same)]; + +} +-(void)appIsNowFrontmost:(ProcessSerialNumber)psn; +{ + NSValue *psnv = [NSValue valueWithBytes:&psn objCType:@encode(ProcessSerialNumber)]; + + NSDictionary *processInfo = [(id)ProcessInformationCopyDictionary( + &psn, + kProcessDictionaryIncludeAllInformationMask + ) autorelease]; + NSString *bundleIdentifier = [processInfo objectForKey:(id)kCFBundleIdentifierKey]; + + NSArray *whitelistIdentifiers = [[NSUserDefaults standardUserDefaults] arrayForKey:kMediaKeyUsingBundleIdentifiersDefaultsKey]; + if(![whitelistIdentifiers containsObject:bundleIdentifier]) return; + + [_mediaKeyAppList removeObject:psnv]; + [_mediaKeyAppList insertObject:psnv atIndex:0]; + [self mediaKeyAppListChanged]; +} +-(void)appTerminated:(ProcessSerialNumber)psn; +{ + NSValue *psnv = [NSValue valueWithBytes:&psn objCType:@encode(ProcessSerialNumber)]; + [_mediaKeyAppList removeObject:psnv]; + [self mediaKeyAppListChanged]; +} + +static pascal OSStatus appSwitched (EventHandlerCallRef nextHandler, EventRef evt, void* userData) +{ + SPMediaKeyTap *self = (id)userData; + + ProcessSerialNumber newSerial; + GetFrontProcess(&newSerial); + + [self appIsNowFrontmost:newSerial]; + + return CallNextEventHandler(nextHandler, evt); +} + +static pascal OSStatus appTerminated (EventHandlerCallRef nextHandler, EventRef evt, void* userData) +{ + SPMediaKeyTap *self = (id)userData; + + ProcessSerialNumber deadPSN; + + GetEventParameter( + evt, + kEventParamProcessID, + typeProcessSerialNumber, + NULL, + sizeof(deadPSN), + NULL, + &deadPSN + ); + + + [self appTerminated:deadPSN]; + return CallNextEventHandler(nextHandler, evt); +} + +@end diff --git a/external/plistparser/CMakeLists.txt b/external/plistparser/CMakeLists.txt new file mode 100644 index 0000000..f9e06e5 --- /dev/null +++ b/external/plistparser/CMakeLists.txt @@ -0,0 +1,8 @@ +include_directories(.) + +add_library(plistparser STATIC + plistparser.cpp + plistparser.h + plistserializer.cpp + plistserializer.h +) \ No newline at end of file diff --git a/external/plistparser/LICENSE b/external/plistparser/LICENSE new file mode 100644 index 0000000..2e90774 --- /dev/null +++ b/external/plistparser/LICENSE @@ -0,0 +1,22 @@ +Gist: this is an MIT license. Act accordingly (basically, do whatever you want). +It would be nice to get an email from you if you use this, but if not that's also cool. + +Copyright (c) 2010 Reilly Watson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/external/plistparser/plistparser.cpp b/external/plistparser/plistparser.cpp new file mode 100644 index 0000000..76e24c0 --- /dev/null +++ b/external/plistparser/plistparser.cpp @@ -0,0 +1,98 @@ +// Own includes +#include "plistparser.h" + +// Qt includes +#include +#include +#include +#include + +QVariant PListParser::parsePList(QIODevice *device) { + QVariantMap result; + QDomDocument doc; + QString errorMessage; + int errorLine; + int errorColumn; + bool success = doc.setContent(device, false, &errorMessage, &errorLine, &errorColumn); + if (!success) { + qDebug() << "PListParser Warning: Could not parse PList file!"; + qDebug() << "Error message: " << errorMessage; + qDebug() << "Error line: " << errorLine; + qDebug() << "Error column: " << errorColumn; + return result; + } + QDomElement root = doc.documentElement(); + if (root.attribute(QStringLiteral("version"), QStringLiteral("1.0")) != QLatin1String("1.0")) { + qDebug() << "PListParser Warning: plist is using an unknown format version, parsing might fail unexpectedly"; + } + return parseElement(root.firstChild().toElement()); +} + +QVariant PListParser::parseElement(const QDomElement &e) { + QString tagName = e.tagName(); + QVariant result; + if (tagName == QLatin1String("dict")) { + result = parseDictElement(e); + } + else if (tagName == QLatin1String("array")) { + result = parseArrayElement(e); + } + else if (tagName == QLatin1String("string")) { + result = e.text(); + } + else if (tagName == QLatin1String("data")) { + result = QByteArray::fromBase64(e.text().toUtf8()); + } + else if (tagName == QLatin1String("integer")) { + result = e.text().toInt(); + } + else if (tagName == QLatin1String("real")) { + result = e.text().toFloat(); + } + else if (tagName == QLatin1String("true")) { + result = true; + } + else if (tagName == QLatin1String("false")) { + result = false; + } + else if (tagName == QLatin1String("date")) { + result = QDateTime::fromString(e.text(), Qt::ISODate); + } + else { + qDebug() << "PListParser Warning: Invalid tag found: " << e.tagName() << e.text(); + } + return result; +} + +QVariantList PListParser::parseArrayElement(const QDomElement& element) { + QVariantList result; + QDomNodeList children = element.childNodes(); + for (int i = 0; i < children.count(); i++) { + QDomNode child = children.at(i); + QDomElement e = child.toElement(); + if (!e.isNull()) { + result.append(parseElement(e)); + } + } + return result; +} + +QVariantMap PListParser::parseDictElement(const QDomElement& element) { + QVariantMap result; + QDomNodeList children = element.childNodes(); + QString currentKey; + for (int i = 0; i < children.count(); i++) { + QDomNode child = children.at(i); + QDomElement e = child.toElement(); + if (!e.isNull()) { + QString tagName = e.tagName(); + if (tagName == QLatin1String("key")) { + currentKey = e.text(); + } + else if (!currentKey.isEmpty()) { + result[currentKey] = parseElement(e); + } + } + } + return result; +} diff --git a/external/plistparser/plistparser.h b/external/plistparser/plistparser.h new file mode 100644 index 0000000..a1d1982 --- /dev/null +++ b/external/plistparser/plistparser.h @@ -0,0 +1,18 @@ +#pragma once + +// Qt includes +#include +#include +#include +#include +#include + +class PListParser { +public: + static QVariant parsePList(QIODevice *device); +private: + static QVariant parseElement(const QDomElement &e); + static QVariantList parseArrayElement(const QDomElement& node); + static QVariantMap parseDictElement(const QDomElement& element); +}; + diff --git a/external/plistparser/plistserializer.cpp b/external/plistparser/plistserializer.cpp new file mode 100644 index 0000000..6aba024 --- /dev/null +++ b/external/plistparser/plistserializer.cpp @@ -0,0 +1,83 @@ +// Own includes +#include "plistserializer.h" + +// Qt includes +#include +#include +#include +#include + +static QDomElement textElement(QDomDocument& doc, const char *tagName, QString contents) { + QDomElement tag = doc.createElement(QString::fromLatin1(tagName)); + tag.appendChild(doc.createTextNode(contents)); + return tag; +} + +static QDomElement serializePrimitive(QDomDocument &doc, const QVariant &variant) { + QDomElement result; + if (variant.type() == QVariant::Bool) { + result = doc.createElement(variant.toBool() ? QStringLiteral("true") : QStringLiteral("false")); + } + else if (variant.type() == QVariant::Date) { + result = textElement(doc, "date", variant.toDate().toString(Qt::ISODate)); + } + else if (variant.type() == QVariant::DateTime) { + result = textElement(doc, "date", variant.toDateTime().toString(Qt::ISODate)); + } + else if (variant.type() == QVariant::ByteArray) { + result = textElement(doc, "data", QString::fromLatin1(variant.toByteArray().toBase64())); + } + else if (variant.type() == QVariant::String) { + result = textElement(doc, "string", variant.toString()); + } + else if (variant.type() == QVariant::Int) { + result = textElement(doc, "integer", QString::number(variant.toInt())); + } + else if (variant.canConvert(QVariant::Double)) { + QString num; + num.setNum(variant.toDouble()); + result = textElement(doc, "real", num); + } + return result; +} + +QDomElement PListSerializer::serializeElement(QDomDocument &doc, const QVariant &variant) { + if (variant.type() == QVariant::Map) { + return serializeMap(doc, variant.toMap()); + } + else if (variant.type() == QVariant::List) { + return serializeList(doc, variant.toList()); + } + else { + return serializePrimitive(doc, variant); + } +} + +QDomElement PListSerializer::serializeList(QDomDocument &doc, const QVariantList &list) { + QDomElement element = doc.createElement(QStringLiteral("array")); + foreach(QVariant item, list) { + element.appendChild(serializeElement(doc, item)); + } + return element; +} + +QDomElement PListSerializer::serializeMap(QDomDocument &doc, const QVariantMap &map) { + QDomElement element = doc.createElement(QStringLiteral("dict")); + QList keys = map.keys(); + foreach(QString key, keys) { + QDomElement keyElement = textElement(doc, "key", key); + element.appendChild(keyElement); + element.appendChild(serializeElement(doc, map[key])); + } + return element; +} + +QString PListSerializer::toPList(const QVariant &variant) { + QDomDocument document(QStringLiteral("plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"")); + document.appendChild(document.createProcessingInstruction(QStringLiteral("xml"), QStringLiteral("version=\"1.0\" encoding=\"UTF-8\""))); + QDomElement plist = document.createElement(QStringLiteral("plist")); + plist.setAttribute(QStringLiteral("version"), QStringLiteral("1.0")); + document.appendChild(plist); + plist.appendChild(serializeElement(document, variant)); + return document.toString(); +} diff --git a/external/plistparser/plistserializer.h b/external/plistparser/plistserializer.h new file mode 100644 index 0000000..92088b9 --- /dev/null +++ b/external/plistparser/plistserializer.h @@ -0,0 +1,20 @@ +#pragma once + +// Qt includes +#include +#include +#include +#include +#include +#include +#include + +class PListSerializer { +public: + static QString toPList(const QVariant &variant); +private: + static QDomElement serializeElement(QDomDocument &doc, const QVariant &variant); + static QDomElement serializeMap(QDomDocument &doc, const QVariantMap &map); + static QDomElement serializeList(QDomDocument &doc, const QVariantList &list); +}; + diff --git a/external/qhttpserver/.gitignore b/external/qhttpserver/.gitignore new file mode 100755 index 0000000..e7540b8 --- /dev/null +++ b/external/qhttpserver/.gitignore @@ -0,0 +1,30 @@ +# Folders +build +lib + +# Generated +Makefile +*.o +moc_* + +# Docs +docs/html + +# Build folders +*/debug +*/release +*/*/debug +*/*/release + +# Visual studio +*.suo +*.ncb +*.user +*.pdb +*.idb +*.vcproj +*.vcxproj +*.vcxproj.filters +*.lib +*.sln +*.rc diff --git a/external/qhttpserver/CMakeLists.txt b/external/qhttpserver/CMakeLists.txt new file mode 100644 index 0000000..8663bfb --- /dev/null +++ b/external/qhttpserver/CMakeLists.txt @@ -0,0 +1,8 @@ +aux_source_directory(src HTTP_SRC) + +include_directories(http-parser) +add_library(http-parser STATIC http-parser/http_parser.c) + +set(CMAKE_AUTOMOC ON) +add_library(qhttpserver STATIC ${HTTP_SRC} ${PARSER_SRC}) +target_link_libraries(qhttpserver http-parser) \ No newline at end of file diff --git a/external/qhttpserver/LICENSE b/external/qhttpserver/LICENSE new file mode 100755 index 0000000..4cac42a --- /dev/null +++ b/external/qhttpserver/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2011-2014 Nikhil Marathe + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/external/qhttpserver/README.md b/external/qhttpserver/README.md new file mode 100755 index 0000000..97e253c --- /dev/null +++ b/external/qhttpserver/README.md @@ -0,0 +1,72 @@ +QHttpServer +=========== + +A Qt HTTP Server - because hard-core programmers write web-apps in C++ :) + +It uses Joyent's [HTTP Parser](http://github.com/joyent/http-parser) and is asynchronous and does not require any inheritance. + +QHttpServer is available under the MIT License. + +**NOTE: QHttpServer is NOT fully HTTP compliant right now! DO NOT use it for +anything complex** + +Installation +------------ + +Requires Qt 4 or Qt 5. + + qmake && make && su -c 'make install' + +To link to your projects put this in your project's qmake project file + + LIBS += -lqhttpserver + +By default, the installation prefix is /usr/local. To change that to /usr, +for example, run: + + qmake -r PREFIX=/usr + +Usage +----- + +Include the headers + + #include + #include + #include + +Create a server, and connect to the signal for new requests + + QHttpServer *server = new QHttpServer; + connect(server, SIGNAL(newRequest(QHttpRequest*, QHttpResponse*)), + handler, SLOT(handle(QHttpRequest*, QHttpResponse*))); + + // let's go + server->listen(8080); + +In the handler, you may dispatch on routes or do whatever other things +you want. See the API documentation for what information +is provided about the request via the QHttpRequest object. + +To send data back to the browser and end the request: + + void Handler::handle(QHttpRequest *req, QHttpResponse *resp) + { + resp->setHeader("Content-Length", 11); + resp->writeHead(200); // everything is OK + resp->write("Hello World"); + resp->end(); + } + +The server and request/response objects emit various signals +and have guarantees about memory management. See the API documentation for +these. + +Contribute +---------- + +Feel free to file issues, branch and send pull requests. If you plan to work on a major feature (say WebSocket support), please run it by me first by filing an issue! qhttpserver has a narrow scope and API and I'd like to keep it that way, so a thousand line patch that implements the kitchen sink is unlikely to be accepted. + +- Nikhil Marathe (maintainer) + +Everybody who has ever contributed shows up in [Contributors](https://github.com/nikhilm/qhttpserver/graphs/contributors). diff --git a/external/qhttpserver/TODO b/external/qhttpserver/TODO new file mode 100755 index 0000000..d376a28 --- /dev/null +++ b/external/qhttpserver/TODO @@ -0,0 +1,7 @@ +* Expect & Continue stuff +* Chunked encoding support +* Only copy over public headers etc. +* connection object should connect to QHttpResponse::destroyed() +and stop pushing data into it or whatever if the object is destroyed. +* response object should keep track of emitting done() and not accept writes after that +* handle encoding in response write and end diff --git a/external/qhttpserver/docs/Doxyfile b/external/qhttpserver/docs/Doxyfile new file mode 100755 index 0000000..ebc46e7 --- /dev/null +++ b/external/qhttpserver/docs/Doxyfile @@ -0,0 +1,2314 @@ +# Doxyfile 1.8.5 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = QHttpServer + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = 0.1 + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "A Qt based asynchronous Http Server" + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = ./ + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese- +# Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto, Farsi, +# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en, +# Korean, Korean-en, Latvian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, +# Turkish, Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = YES + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = YES + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = NO + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = NO + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. Do not use file names with spaces, bibtex cannot handle them. See +# also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = pages \ + ../src + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = *.cpp \ + *.inl \ + *.h \ + *.dox + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = ui_*.h \ + moc_* + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = ../examples + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more acurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# compiled with the --with-libclang option. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- +# defined cascading style sheet that is included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet file to the output directory. For an example +# see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /