summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2019-04-29 12:22:05 +0200
committermanuel <manuel@mausz.at>2019-04-29 12:22:05 +0200
commite317daf081a1048904fdf0b548946fa3ba6593a7 (patch)
tree285a58fe8c6b4a95c9a6020afbe7bcc9cb913ea7
parent483c0b88bfc1b798396c31a4dd2f5239399ce59e (diff)
downloadkodi-pvr-build-e317daf081a1048904fdf0b548946fa3ba6593a7.tar.gz
kodi-pvr-build-e317daf081a1048904fdf0b548946fa3ba6593a7.tar.bz2
kodi-pvr-build-e317daf081a1048904fdf0b548946fa3ba6593a7.zip
sync with upstream
-rw-r--r--cmake/KodiConfig.cmake.in3
-rw-r--r--cmake/addons/bootstrap/repositories/binary-addons.txt2
-rw-r--r--cmake/cpack/CPackConfigDEB.cmake2
-rw-r--r--cmake/cpack/deb/packages/kodi-eventclients-kodi-send.txt.in (renamed from cmake/cpack/deb/packages/kodi-eventclients-xbmc-send.txt.in)10
-rw-r--r--cmake/cpack/deb/packages/kodi.txt.in2
-rw-r--r--cmake/installdata/common/addons.txt2
-rw-r--r--cmake/installdata/test-reference-data.txt1
-rw-r--r--cmake/installdata/windows/addons.txt1
-rw-r--r--cmake/installdata/windows/dlls.txt1
-rw-r--r--cmake/installdata/windowsstore/addons.txt3
-rw-r--r--cmake/installdata/windowsstore/dlls.txt1
-rw-r--r--cmake/modules/FindCCache.cmake11
-rw-r--r--cmake/modules/FindCXX11.cmake18
-rw-r--r--cmake/modules/FindCurl.cmake19
-rw-r--r--cmake/modules/FindFmt.cmake1
-rw-r--r--cmake/modules/FindFreeType.cmake3
-rw-r--r--cmake/modules/FindJsonSchemaBuilder.cmake38
-rw-r--r--cmake/modules/FindLibDRM.cmake2
-rw-r--r--cmake/modules/FindMariaDBClient.cmake18
-rw-r--r--cmake/modules/FindMicroHttpd.cmake10
-rw-r--r--cmake/modules/FindYajl.cmake62
-rw-r--r--cmake/platform/android/android.cmake1
-rw-r--r--cmake/platform/freebsd/x11.cmake1
-rw-r--r--cmake/platform/ios/ios.cmake1
-rw-r--r--cmake/platform/osx/osx.cmake1
-rw-r--r--cmake/platform/windows/windows.cmake3
-rw-r--r--cmake/platform/windowsstore/windowsstore.cmake3
-rw-r--r--cmake/scripts/common/AddonHelpers.cmake11
-rw-r--r--cmake/scripts/common/ArchSetup.cmake4
-rw-r--r--cmake/scripts/common/GenerateVersionedFiles.cmake2
-rw-r--r--cmake/scripts/common/HandleDepends.cmake24
-rw-r--r--cmake/scripts/common/Macros.cmake31
-rw-r--r--cmake/scripts/common/PrepareEnv.cmake8
-rw-r--r--cmake/scripts/ios/ArchSetup.cmake2
-rw-r--r--cmake/scripts/ios/Install.cmake38
-rw-r--r--cmake/scripts/linux/ArchSetup.cmake1
-rw-r--r--cmake/scripts/linux/Install.cmake5
-rw-r--r--cmake/scripts/osx/ArchSetup.cmake2
-rw-r--r--cmake/scripts/windows/ArchSetup.cmake13
-rw-r--r--cmake/scripts/windowsstore/ArchSetup.cmake10
-rw-r--r--cmake/treedata/android/subdirs.txt37
-rw-r--r--cmake/treedata/common/drm.txt1
-rw-r--r--cmake/treedata/common/filesystem.txt2
-rw-r--r--cmake/treedata/common/media.txt2
-rw-r--r--cmake/treedata/common/subdirs.txt2
-rw-r--r--cmake/treedata/common/tests.txt5
-rw-r--r--cmake/treedata/common/videoplayer.txt2
-rw-r--r--cmake/treedata/freebsd/subdirs.txt14
-rw-r--r--cmake/treedata/ios/subdirs.txt22
-rw-r--r--cmake/treedata/linux/subdirs.txt14
-rw-r--r--cmake/treedata/optional/common/X.txt2
-rw-r--r--cmake/treedata/optional/common/aml.txt1
-rw-r--r--cmake/treedata/optional/common/gbm.txt2
-rw-r--r--cmake/treedata/optional/common/wayland.txt4
-rw-r--r--cmake/treedata/osx/subdirs.txt18
-rw-r--r--cmake/treedata/windows/subdirs.txt14
-rw-r--r--cmake/treedata/windowsstore/subdirs.txt8
-rw-r--r--version.txt9
-rw-r--r--xbmc/addons/AddonBindings.cmake2
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h55
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h34
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h2
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h1
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h28
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h21
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h18
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/CMakeLists.txt3
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/Time.h91
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h12
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h5
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h1
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h14
-rw-r--r--xbmc/cores/VideoPlayer/Interface/Addon/DemuxPacket.h2
-rw-r--r--xbmc/filesystem/IFileTypes.h2
-rw-r--r--xbmc/input/actions/ActionIDs.h312
-rw-r--r--xbmc/interfaces/json-rpc/schema/version.txt2
77 files changed, 818 insertions, 340 deletions
diff --git a/cmake/KodiConfig.cmake.in b/cmake/KodiConfig.cmake.in
index 560374d..9ec1215 100644
--- a/cmake/KodiConfig.cmake.in
+++ b/cmake/KodiConfig.cmake.in
@@ -28,5 +28,8 @@ add_definitions(${ARCH_DEFINES} -DBUILD_KODI_ADDON)
28set(CORE_SYSTEM_NAME @CORE_SYSTEM_NAME@) 28set(CORE_SYSTEM_NAME @CORE_SYSTEM_NAME@)
29set(PLATFORM @CORE_SYSTEM_NAME@) 29set(PLATFORM @CORE_SYSTEM_NAME@)
30set(PLATFORM_TAG @PLATFORM_TAG@) 30set(PLATFORM_TAG @PLATFORM_TAG@)
31set(CMAKE_CXX_STANDARD @CMAKE_CXX_STANDARD@)
32set(CMAKE_CXX_STANDARD_REQUIRED @CMAKE_CXX_STANDARD_REQUIRED@)
33set(CMAKE_CXX_EXTENSIONS @CMAKE_CXX_EXTENSIONS@)
31 34
32include(AddonHelpers) 35include(AddonHelpers)
diff --git a/cmake/addons/bootstrap/repositories/binary-addons.txt b/cmake/addons/bootstrap/repositories/binary-addons.txt
index 8674f06..7e471ff 100644
--- a/cmake/addons/bootstrap/repositories/binary-addons.txt
+++ b/cmake/addons/bootstrap/repositories/binary-addons.txt
@@ -1 +1 @@
binary-addons https://github.com/xbmc/repo-binary-addons.git master \ No newline at end of file binary-addons https://github.com/xbmc/repo-binary-addons.git Matrix
diff --git a/cmake/cpack/CPackConfigDEB.cmake b/cmake/cpack/CPackConfigDEB.cmake
index 800daa5..9aa687d 100644
--- a/cmake/cpack/CPackConfigDEB.cmake
+++ b/cmake/cpack/CPackConfigDEB.cmake
@@ -182,7 +182,7 @@ install(FILES ${CPACK_PACKAGE_DIRECTORY}/deb/kodi-ps3remote.1.gz
182 COMPONENT kodi-eventclients-ps3) 182 COMPONENT kodi-eventclients-ps3)
183install(FILES ${CPACK_PACKAGE_DIRECTORY}/deb/kodi-send.1.gz 183install(FILES ${CPACK_PACKAGE_DIRECTORY}/deb/kodi-send.1.gz
184 DESTINATION share/man/man1 184 DESTINATION share/man/man1
185 COMPONENT kodi-eventclients-xbmc-send) 185 COMPONENT kodi-eventclients-kodi-send)
186install(FILES ${CPACK_PACKAGE_DIRECTORY}/deb/kodi-wiiremote.1.gz 186install(FILES ${CPACK_PACKAGE_DIRECTORY}/deb/kodi-wiiremote.1.gz
187 DESTINATION share/man/man1 187 DESTINATION share/man/man1
188 COMPONENT kodi-eventclients-wiiremote) 188 COMPONENT kodi-eventclients-wiiremote)
diff --git a/cmake/cpack/deb/packages/kodi-eventclients-xbmc-send.txt.in b/cmake/cpack/deb/packages/kodi-eventclients-kodi-send.txt.in
index 36a54a2..b5292de 100644
--- a/cmake/cpack/deb/packages/kodi-eventclients-xbmc-send.txt.in
+++ b/cmake/cpack/deb/packages/kodi-eventclients-kodi-send.txt.in
@@ -1,4 +1,4 @@
1# kodi-eventclients-xbmc-send debian package metadata 1# kodi-eventclients-kodi-send debian package metadata
2# 2#
3# Setting PACKAGE_SHLIBDEPS to 'ON' will cause CPack to use dpkg-shlibdeps to 3# Setting PACKAGE_SHLIBDEPS to 'ON' will cause CPack to use dpkg-shlibdeps to
4# automatically generate the package dependency list and append its output to 4# automatically generate the package dependency list and append its output to
@@ -10,7 +10,7 @@
10# 10#
11# Remaining settings are (hopefully) self-explanatory. 11# Remaining settings are (hopefully) self-explanatory.
12 12
13PACKAGE_NAME @APP_NAME_LC@-eventclients-xbmc-send 13PACKAGE_NAME @APP_NAME_LC@-eventclients-kodi-send
14PACKAGE_ARCHITECTURE all 14PACKAGE_ARCHITECTURE all
15PACKAGE_SECTION video 15PACKAGE_SECTION video
16PACKAGE_PRIORITY optional 16PACKAGE_PRIORITY optional
@@ -18,8 +18,8 @@ PACKAGE_SHLIBDEPS
18PACKAGE_DEPENDS @APP_NAME_LC@-eventclients-common (= @CPACK_DEBIAN_PACKAGE_VERSION@) 18PACKAGE_DEPENDS @APP_NAME_LC@-eventclients-common (= @CPACK_DEBIAN_PACKAGE_VERSION@)
19PACKAGE_RECOMMENDS 19PACKAGE_RECOMMENDS
20PACKAGE_SUGGESTS 20PACKAGE_SUGGESTS
21PACKAGE_BREAKS 21PACKAGE_BREAKS kodi-eventclients-xbmc-send
22PACKAGE_REPLACES 22PACKAGE_REPLACES kodi-eventclients-xbmc-send
23PACKAGE_PROVIDES xbmc-eventclients-xbmc-send 23PACKAGE_PROVIDES kodi-eventclients-kodi-send
24PACKAGE_DESCRIPTION_HEADER @APP_NAME@ Media Center (@APP_NAME@-send event client package) 24PACKAGE_DESCRIPTION_HEADER @APP_NAME@ Media Center (@APP_NAME@-send event client package)
25PACKAGE_DESCRIPTION_FOOTER This is the Kodi-SEND package for @APP_NAME@'s event client. 25PACKAGE_DESCRIPTION_FOOTER This is the Kodi-SEND package for @APP_NAME@'s event client.
diff --git a/cmake/cpack/deb/packages/kodi.txt.in b/cmake/cpack/deb/packages/kodi.txt.in
index 5ab8905..4776622 100644
--- a/cmake/cpack/deb/packages/kodi.txt.in
+++ b/cmake/cpack/deb/packages/kodi.txt.in
@@ -15,7 +15,7 @@ PACKAGE_ARCHITECTURE all
15PACKAGE_SECTION video 15PACKAGE_SECTION video
16PACKAGE_PRIORITY optional 16PACKAGE_PRIORITY optional
17PACKAGE_SHLIBDEPS 17PACKAGE_SHLIBDEPS
18PACKAGE_DEPENDS @APP_NAME_LC@-bin (>= @CPACK_DEBIAN_PACKAGE_VERSION@), @APP_NAME_LC@-bin (<< @CPACK_DEBIAN_PACKAGE_VERSION@.1~), curl, libcurl4 | libcurl3, mesa-utils, x11-utils, fonts-liberation | ttf-liberation, fonts-dejavu-core | ttf-dejavu-core, python-bluez | python-lightblue, python-imaging | python-pil, python-simplejson, libass9 | libass5 | libass4, libgif5 | libgif7, libnfs8 | libnfs4 | libnfs1, libbluray1 | libbluray2, libshairplay0, libvorbisfile3, libaacs0, libcec4, libgnutls30 | libgnutls-deb0-28 | libgnutls28 | libgnutls26, libxslt1.1, libyajl2 18PACKAGE_DEPENDS @APP_NAME_LC@-bin (>= @CPACK_DEBIAN_PACKAGE_VERSION@), @APP_NAME_LC@-bin (<< @CPACK_DEBIAN_PACKAGE_VERSION@.1~), curl, libcurl4 | libcurl3, mesa-utils, x11-utils, fonts-liberation | ttf-liberation, fonts-dejavu-core | ttf-dejavu-core, python-bluez | python-lightblue, python-imaging | python-pil, python-simplejson, libass9 | libass5 | libass4, libgif5 | libgif7, libnfs8 | libnfs4 | libnfs1, libbluray1 | libbluray2, libshairplay0, libvorbisfile3, libaacs0, libcec4, libgnutls30 | libgnutls-deb0-28 | libgnutls28 | libgnutls26, libxslt1.1
19PACKAGE_RECOMMENDS libvdpau1, libva-intel-vaapi-driver, libva1 19PACKAGE_RECOMMENDS libvdpau1, libva-intel-vaapi-driver, libva1
20PACKAGE_SUGGESTS @APP_NAME_LC@-pvr-mythtv, @APP_NAME_LC@-pvr-vuplus, @APP_NAME_LC@-pvr-vdr-vnsi, @APP_NAME_LC@-pvr-njoy, @APP_NAME_LC@-pvr-nextpvr, @APP_NAME_LC@-pvr-mediaportal-tvserver, @APP_NAME_LC@-pvr-tvheadend-hts, @APP_NAME_LC@-pvr-dvbviewer, @APP_NAME_LC@-pvr-argustv, @APP_NAME_LC@-pvr-iptvsimple, @APP_NAME_LC@-audioencoder-vorbis, @APP_NAME_LC@-audioencoder-flac, @APP_NAME_LC@-audioencoder-lame 20PACKAGE_SUGGESTS @APP_NAME_LC@-pvr-mythtv, @APP_NAME_LC@-pvr-vuplus, @APP_NAME_LC@-pvr-vdr-vnsi, @APP_NAME_LC@-pvr-njoy, @APP_NAME_LC@-pvr-nextpvr, @APP_NAME_LC@-pvr-mediaportal-tvserver, @APP_NAME_LC@-pvr-tvheadend-hts, @APP_NAME_LC@-pvr-dvbviewer, @APP_NAME_LC@-pvr-argustv, @APP_NAME_LC@-pvr-iptvsimple, @APP_NAME_LC@-audioencoder-vorbis, @APP_NAME_LC@-audioencoder-flac, @APP_NAME_LC@-audioencoder-lame
21PACKAGE_BREAKS xbmc (<< 2:14.0~git20141019), xbmc-data, xbmc-standalone 21PACKAGE_BREAKS xbmc (<< 2:14.0~git20141019), xbmc-data, xbmc-standalone
diff --git a/cmake/installdata/common/addons.txt b/cmake/installdata/common/addons.txt
index c0ffb72..13dbab3 100644
--- a/cmake/installdata/common/addons.txt
+++ b/cmake/installdata/common/addons.txt
@@ -40,5 +40,5 @@ addons/metadata.common.musicbrainz.org/*
40addons/metadata.common.theaudiodb.com/* 40addons/metadata.common.theaudiodb.com/*
41addons/metadata.common.themoviedb.org/* 41addons/metadata.common.themoviedb.org/*
42addons/metadata.themoviedb.org/* 42addons/metadata.themoviedb.org/*
43addons/metadata.tvdb.com/* 43addons/metadata.tvshows.themoviedb.org/*
44addons/kodi.vfs/* 44addons/kodi.vfs/*
diff --git a/cmake/installdata/test-reference-data.txt b/cmake/installdata/test-reference-data.txt
index 895079a..b6c94a7 100644
--- a/cmake/installdata/test-reference-data.txt
+++ b/cmake/installdata/test-reference-data.txt
@@ -8,3 +8,4 @@ xbmc/filesystem/test/refRARstored.rar
8xbmc/network/test/data/test.html 8xbmc/network/test/data/test.html
9xbmc/network/test/data/test.png 9xbmc/network/test/data/test.png
10xbmc/network/test/data/test-ranges.txt 10xbmc/network/test/data/test-ranges.txt
11xbmc/playlists/test/test.xspf
diff --git a/cmake/installdata/windows/addons.txt b/cmake/installdata/windows/addons.txt
index a3bdd44..66b583a 100644
--- a/cmake/installdata/windows/addons.txt
+++ b/cmake/installdata/windows/addons.txt
@@ -1,3 +1,2 @@
1addons/repository.pvr-win32.xbmc.org/*
2project/BuildDependencies/${ARCH}/addons/script.module.pil KEEP_DIR_STRUCTURE addons 1project/BuildDependencies/${ARCH}/addons/script.module.pil KEEP_DIR_STRUCTURE addons
3project/BuildDependencies/${ARCH}/addons/script.module.pycryptodome KEEP_DIR_STRUCTURE addons 2project/BuildDependencies/${ARCH}/addons/script.module.pycryptodome KEEP_DIR_STRUCTURE addons
diff --git a/cmake/installdata/windows/dlls.txt b/cmake/installdata/windows/dlls.txt
index c17bd76..a4bfb79 100644
--- a/cmake/installdata/windows/dlls.txt
+++ b/cmake/installdata/windows/dlls.txt
@@ -1,3 +1,2 @@
1project/BuildDependencies/${ARCH}/bin/libbluray*.jar . 1project/BuildDependencies/${ARCH}/bin/libbluray*.jar .
2project/BuildDependencies/${ARCH}/bin/*.dll . 2project/BuildDependencies/${ARCH}/bin/*.dll .
3project/BuildDependencies/mingwlibs/${ARCH}/bin/*.dll .
diff --git a/cmake/installdata/windowsstore/addons.txt b/cmake/installdata/windowsstore/addons.txt
index 4b8678b..3b4d9a9 100644
--- a/cmake/installdata/windowsstore/addons.txt
+++ b/cmake/installdata/windowsstore/addons.txt
@@ -1,3 +1,2 @@
1addons/repository.pvr-win32.xbmc.org/*
2project/BuildDependencies/win10-${ARCH}/addons/* 1project/BuildDependencies/win10-${ARCH}/addons/*
3system/addon-manifest-uwp.xml \ No newline at end of file 2system/addon-manifest-uwp.xml
diff --git a/cmake/installdata/windowsstore/dlls.txt b/cmake/installdata/windowsstore/dlls.txt
index a927b3d..8b45449 100644
--- a/cmake/installdata/windowsstore/dlls.txt
+++ b/cmake/installdata/windowsstore/dlls.txt
@@ -1,2 +1 @@
1project/BuildDependencies/win10-${ARCH}/bin/*.dll dlls project/BuildDependencies/win10-${ARCH}/bin/*.dll dlls
2project/BuildDependencies/mingwlibs/win10-${ARCH}/bin/*.dll dlls
diff --git a/cmake/modules/FindCCache.cmake b/cmake/modules/FindCCache.cmake
index 956dee2..a18d4e0 100644
--- a/cmake/modules/FindCCache.cmake
+++ b/cmake/modules/FindCCache.cmake
@@ -12,7 +12,16 @@ include(FindPackageHandleStandardArgs)
12find_package_handle_standard_args(CCache REQUIRED_VARS CCACHE_PROGRAM) 12find_package_handle_standard_args(CCache REQUIRED_VARS CCACHE_PROGRAM)
13 13
14if(CCACHE_FOUND) 14if(CCACHE_FOUND)
15 # Supports Unix Makefiles and Ninja 15 # Supports Unix Makefiles, Ninja and Xcode
16 set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") 16 set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
17 set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_PROGRAM}") 17 set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_PROGRAM}")
18
19 file(WRITE "${CMAKE_BINARY_DIR}/launch-c" "exec \"${CCACHE_PROGRAM}\" \"${CMAKE_C_COMPILER}\" \"$@\"\n")
20 file(WRITE "${CMAKE_BINARY_DIR}/launch-cxx" "exec \"${CCACHE_PROGRAM}\" \"${CMAKE_CXX_COMPILER}\" \"$@\"\n")
21 execute_process(COMMAND chmod +x "${CMAKE_BINARY_DIR}/launch-c" "${CMAKE_BINARY_DIR}/launch-cxx")
22
23 set(CMAKE_XCODE_ATTRIBUTE_CC "${CMAKE_BINARY_DIR}/launch-c" PARENT_SCOPE)
24 set(CMAKE_XCODE_ATTRIBUTE_CXX "${CMAKE_BINARY_DIR}/launch-cxx" PARENT_SCOPE)
25 set(CMAKE_XCODE_ATTRIBUTE_LD "${CMAKE_BINARY_DIR}/launch-c" PARENT_SCOPE)
26 set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "${CMAKE_BINARY_DIR}/launch-cxx" PARENT_SCOPE)
18endif() 27endif()
diff --git a/cmake/modules/FindCXX11.cmake b/cmake/modules/FindCXX11.cmake
deleted file mode 100644
index c0b9a52..0000000
--- a/cmake/modules/FindCXX11.cmake
+++ /dev/null
@@ -1,18 +0,0 @@
1include(TestCXXAcceptsFlag)
2
3# try to use compiler flag -std=c++11
4check_cxx_accepts_flag("-std=c++11" CXX_FLAG_CXX11)
5if(CXX_FLAG_CXX11)
6 add_options (CXX ALL_BUILDS "-std=c++11")
7 set(CXX_STD11_FLAGS "-std=c++11")
8else()
9 # try to use compiler flag -std=c++0x for older compilers
10 check_cxx_accepts_flag("-std=c++0x" CXX_FLAG_CXX0X)
11 if(CXX_FLAG_CXX0X)
12 add_options (CXX ALL_BUILDS "-std=c++0x")
13 set(CXX_STD11_FLAGS "-std=c++0x")
14 endif()
15endif()
16
17include(FindPackageHandleStandardArgs)
18find_package_handle_standard_args(CXX11 DEFAULT_MSG CXX_STD11_FLAGS)
diff --git a/cmake/modules/FindCurl.cmake b/cmake/modules/FindCurl.cmake
index 6ccf44a..6411a92 100644
--- a/cmake/modules/FindCurl.cmake
+++ b/cmake/modules/FindCurl.cmake
@@ -25,6 +25,19 @@ find_library(CURL_LIBRARY NAMES curl libcurl libcurl_imp
25 25
26set(CURL_VERSION ${PC_CURL_VERSION}) 26set(CURL_VERSION ${PC_CURL_VERSION})
27 27
28set(CURL_LIB_TYPE SHARED)
29set(CURL_LDFLAGS ${PC_CURL_LDFLAGS})
30
31# check if curl is statically linked
32if(${CURL_LIBRARY} MATCHES ".+\.a$" AND PC_CURL_STATIC_LDFLAGS)
33 set(CURL_LIB_TYPE STATIC)
34 set(CURL_LDFLAGS ${PC_CURL_STATIC_LDFLAGS})
35
36 pkg_check_modules(PC_NGHTTP2 libnghttp2 QUIET)
37 find_library(NGHTTP2_LIBRARY NAMES libnghttp2 nghttp2
38 PATHS ${PC_NGHTTP2_LIBDIR})
39endif()
40
28include(FindPackageHandleStandardArgs) 41include(FindPackageHandleStandardArgs)
29find_package_handle_standard_args(Curl 42find_package_handle_standard_args(Curl
30 REQUIRED_VARS CURL_LIBRARY CURL_INCLUDE_DIR 43 REQUIRED_VARS CURL_LIBRARY CURL_INCLUDE_DIR
@@ -32,10 +45,10 @@ find_package_handle_standard_args(Curl
32 45
33if(CURL_FOUND) 46if(CURL_FOUND)
34 set(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR}) 47 set(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
35 set(CURL_LIBRARIES ${CURL_LIBRARY}) 48 set(CURL_LIBRARIES ${CURL_LIBRARY} ${NGHTTP2_LIBRARY})
36 49
37 if(NOT TARGET Curl::Curl) 50 if(NOT TARGET Curl::Curl)
38 add_library(Curl::Curl UNKNOWN IMPORTED) 51 add_library(Curl::Curl ${CURL_LIB_TYPE} IMPORTED)
39 set_target_properties(Curl::Curl PROPERTIES 52 set_target_properties(Curl::Curl PROPERTIES
40 IMPORTED_LOCATION "${CURL_LIBRARY}" 53 IMPORTED_LOCATION "${CURL_LIBRARY}"
41 INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIR}") 54 INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIR}")
@@ -46,4 +59,4 @@ if(CURL_FOUND)
46 endif() 59 endif()
47endif() 60endif()
48 61
49mark_as_advanced(CURL_INCLUDE_DIR CURL_LIBRARY) 62mark_as_advanced(CURL_INCLUDE_DIR CURL_LIBRARY CURL_LDFLAGS)
diff --git a/cmake/modules/FindFmt.cmake b/cmake/modules/FindFmt.cmake
index df18d85..47cf8be 100644
--- a/cmake/modules/FindFmt.cmake
+++ b/cmake/modules/FindFmt.cmake
@@ -40,6 +40,7 @@ if(ENABLE_INTERNAL_FMT)
40 PREFIX ${CORE_BUILD_DIR}/fmt 40 PREFIX ${CORE_BUILD_DIR}/fmt
41 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} 41 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}
42 -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} 42 -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
43 -DCMAKE_INSTALL_LIBDIR=lib
43 -DFMT_DOC=OFF 44 -DFMT_DOC=OFF
44 -DFMT_TEST=OFF 45 -DFMT_TEST=OFF
45 "${EXTRA_ARGS}" 46 "${EXTRA_ARGS}"
diff --git a/cmake/modules/FindFreeType.cmake b/cmake/modules/FindFreeType.cmake
index 8a39555..771819e 100644
--- a/cmake/modules/FindFreeType.cmake
+++ b/cmake/modules/FindFreeType.cmake
@@ -19,7 +19,8 @@ endif()
19 19
20find_path(FREETYPE_INCLUDE_DIR NAMES freetype/freetype.h freetype.h 20find_path(FREETYPE_INCLUDE_DIR NAMES freetype/freetype.h freetype.h
21 PATHS ${PC_FREETYPE_INCLUDEDIR} 21 PATHS ${PC_FREETYPE_INCLUDEDIR}
22 ${PC_FREETYPE_INCLUDE_DIRS}) 22 ${PC_FREETYPE_INCLUDE_DIRS}
23 PATH_SUFFIXES freetype2)
23find_library(FREETYPE_LIBRARY NAMES freetype freetype246MT 24find_library(FREETYPE_LIBRARY NAMES freetype freetype246MT
24 PATHS ${PC_FREETYPE_LIBDIR}) 25 PATHS ${PC_FREETYPE_LIBDIR})
25 26
diff --git a/cmake/modules/FindJsonSchemaBuilder.cmake b/cmake/modules/FindJsonSchemaBuilder.cmake
index 14aa2f5..094c2fa 100644
--- a/cmake/modules/FindJsonSchemaBuilder.cmake
+++ b/cmake/modules/FindJsonSchemaBuilder.cmake
@@ -3,24 +3,40 @@
3# --------------------- 3# ---------------------
4# Finds the JsonSchemaBuilder 4# Finds the JsonSchemaBuilder
5# 5#
6# If WITH_JSONSCHEMABUILDER is defined and points to a directory,
7# this path will be used to search for the JsonSchemaBuilder binary
8#
9#
6# This will define the following (imported) targets:: 10# This will define the following (imported) targets::
7# 11#
8# JsonSchemaBuilder::JsonSchemaBuilder - The JsonSchemaBuilder executable 12# JsonSchemaBuilder::JsonSchemaBuilder - The JsonSchemaBuilder executable
9 13
10if(NOT TARGET JsonSchemaBuilder::JsonSchemaBuilder) 14if(NOT TARGET JsonSchemaBuilder::JsonSchemaBuilder)
11 if(KODI_DEPENDSBUILD OR CMAKE_CROSSCOMPILING) 15 if(KODI_DEPENDSBUILD)
16 add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL)
17 set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES
18 IMPORTED_LOCATION "${NATIVEPREFIX}/bin/JsonSchemaBuilder")
19 elseif(CORE_SYSTEM_NAME STREQUAL windowsstore)
12 add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL) 20 add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL)
13 if(CORE_SYSTEM_NAME STREQUAL windows OR CORE_SYSTEM_NAME STREQUAL windowsstore) 21 set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES
14 set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES 22 IMPORTED_LOCATION "${DEPENDENCIES_DIR}/bin/json-rpc/JsonSchemaBuilder")
15 IMPORTED_LOCATION "${DEPENDENCIES_DIR}/bin/json-rpc/JsonSchemaBuilder") 23 else()
24 if(WITH_JSONSCHEMABUILDER)
25 get_filename_component(_jsbpath ${WITH_JSONSCHEMABUILDER} ABSOLUTE)
26 find_program(JSONSCHEMABUILDER_EXECUTABLE JsonSchemaBuilder PATHS ${_jsbpath})
27
28 include(FindPackageHandleStandardArgs)
29 find_package_handle_standard_args(JsonSchemaBuilder DEFAULT_MSG JSONSCHEMABUILDER_EXECUTABLE)
30 if(JSONSCHEMABUILDER_FOUND)
31 add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL)
32 set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES
33 IMPORTED_LOCATION "${JSONSCHEMABUILDER_EXECUTABLE}")
34 endif()
35 mark_as_advanced(JSONSCHEMABUILDER)
16 else() 36 else()
17 set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES 37 add_subdirectory(${CMAKE_SOURCE_DIR}/tools/depends/native/JsonSchemaBuilder build/jsonschemabuilder)
18 IMPORTED_LOCATION "${NATIVEPREFIX}/bin/JsonSchemaBuilder") 38 add_executable(JsonSchemaBuilder::JsonSchemaBuilder ALIAS JsonSchemaBuilder)
39 set_target_properties(JsonSchemaBuilder PROPERTIES FOLDER Tools)
19 endif() 40 endif()
20 set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES FOLDER Tools)
21 else()
22 add_subdirectory(${CMAKE_SOURCE_DIR}/tools/depends/native/JsonSchemaBuilder build/jsonschemabuilder)
23 add_executable(JsonSchemaBuilder::JsonSchemaBuilder ALIAS JsonSchemaBuilder)
24 set_target_properties(JsonSchemaBuilder PROPERTIES FOLDER Tools)
25 endif() 41 endif()
26endif() 42endif()
diff --git a/cmake/modules/FindLibDRM.cmake b/cmake/modules/FindLibDRM.cmake
index ec30920..4b39de3 100644
--- a/cmake/modules/FindLibDRM.cmake
+++ b/cmake/modules/FindLibDRM.cmake
@@ -14,7 +14,7 @@
14# LibDRM::LibDRM - The LibDRM library 14# LibDRM::LibDRM - The LibDRM library
15 15
16if(PKG_CONFIG_FOUND) 16if(PKG_CONFIG_FOUND)
17 pkg_check_modules(PC_LIBDRM libdrm>=2.4.71 QUIET) 17 pkg_check_modules(PC_LIBDRM libdrm>=2.4.82 QUIET)
18endif() 18endif()
19 19
20find_path(LIBDRM_INCLUDE_DIR NAMES drm.h 20find_path(LIBDRM_INCLUDE_DIR NAMES drm.h
diff --git a/cmake/modules/FindMariaDBClient.cmake b/cmake/modules/FindMariaDBClient.cmake
index 8a28670..7530ab5 100644
--- a/cmake/modules/FindMariaDBClient.cmake
+++ b/cmake/modules/FindMariaDBClient.cmake
@@ -21,15 +21,25 @@ else()
21 set(EXTRA_FIND_ARGS) 21 set(EXTRA_FIND_ARGS)
22endif() 22endif()
23 23
24find_path(MARIADBCLIENT_INCLUDE_DIR NAMES mariadb/mysql.h mariadb/server/mysql.h) 24if(PKG_CONFIG_FOUND)
25find_library(MARIADBCLIENT_LIBRARY_RELEASE NAMES mariadbclient libmariadb 25 pkg_check_modules(PC_MARIADBCLIENT mariadb QUIET)
26endif()
27
28
29find_path(MARIADBCLIENT_INCLUDE_DIR NAMES mariadb/mysql.h mariadb/server/mysql.h
30 PATHS ${PC_MARIADBCLIENT_INCLUDEDIR})
31find_library(MARIADBCLIENT_LIBRARY_RELEASE NAMES mariadbclient mariadb
32 PATHS ${PC_MARIADBCLIENT_LIBDIR}
26 PATH_SUFFIXES mariadb 33 PATH_SUFFIXES mariadb
27 ${EXTRA_FIND_ARGS}) 34 ${EXTRA_FIND_ARGS})
28find_library(MARIADBCLIENT_LIBRARY_DEBUG NAMES mariadbclient libmariadb 35find_library(MARIADBCLIENT_LIBRARY_DEBUG NAMES mariadbclient mariadb
36 PATHS ${PC_MARIADBCLIENT_LIBDIR}
29 PATH_SUFFIXES mariadb 37 PATH_SUFFIXES mariadb
30 ${EXTRA_FIND_ARGS}) 38 ${EXTRA_FIND_ARGS})
31 39
32if(MARIADBCLIENT_INCLUDE_DIR AND EXISTS "${MARIADBCLIENT_INCLUDE_DIR}/mariadb/mariadb_version.h") 40if(PC_MARIADBCLIENT_VERSION)
41 set(MARIADBCLIENT_VERSION_STRING ${PC_MARIADBCLIENT_VERSION})
42elseif(MARIADBCLIENT_INCLUDE_DIR AND EXISTS "${MARIADBCLIENT_INCLUDE_DIR}/mariadb/mariadb_version.h")
33 file(STRINGS "${MARIADBCLIENT_INCLUDE_DIR}/mariadb/mariadb_version.h" mariadb_version_str REGEX "^#define[\t ]+MARIADB_CLIENT_VERSION_STR[\t ]+\".*\".*") 43 file(STRINGS "${MARIADBCLIENT_INCLUDE_DIR}/mariadb/mariadb_version.h" mariadb_version_str REGEX "^#define[\t ]+MARIADB_CLIENT_VERSION_STR[\t ]+\".*\".*")
34 string(REGEX REPLACE "^#define[\t ]+MARIADB_CLIENT_VERSION_STR[\t ]+\"([^\"]+)\".*" "\\1" MARIADBCLIENT_VERSION_STRING "${mariadb_version_str}") 44 string(REGEX REPLACE "^#define[\t ]+MARIADB_CLIENT_VERSION_STR[\t ]+\"([^\"]+)\".*" "\\1" MARIADBCLIENT_VERSION_STRING "${mariadb_version_str}")
35 unset(mariadb_version_str) 45 unset(mariadb_version_str)
diff --git a/cmake/modules/FindMicroHttpd.cmake b/cmake/modules/FindMicroHttpd.cmake
index e6127f3..a0b91a0 100644
--- a/cmake/modules/FindMicroHttpd.cmake
+++ b/cmake/modules/FindMicroHttpd.cmake
@@ -35,15 +35,7 @@ if(MICROHTTPD_FOUND)
35 set(MICROHTTPD_INCLUDE_DIRS ${MICROHTTPD_INCLUDE_DIR}) 35 set(MICROHTTPD_INCLUDE_DIRS ${MICROHTTPD_INCLUDE_DIR})
36 set(MICROHTTPD_DEFINITIONS -DHAS_WEB_SERVER=1 -DHAS_WEB_INTERFACE=1) 36 set(MICROHTTPD_DEFINITIONS -DHAS_WEB_SERVER=1 -DHAS_WEB_INTERFACE=1)
37 37
38 if(KODI_DEPENDSBUILD AND NOT WIN32) 38 if(${MICROHTTPD_LIBRARY} MATCHES ".+\.a$" AND PC_MICROHTTPD_STATIC_LIBRARIES)
39 find_library(GCRYPT_LIBRARY gcrypt)
40 find_library(GPGERROR_LIBRARY gpg-error)
41 list(APPEND MICROHTTPD_LIBRARIES ${GCRYPT_LIBRARY} ${GPGERROR_LIBRARY})
42 mark_as_advanced(GCRYPT_LIBRARY GPGERROR_LIBRARY)
43 if(NOT APPLE AND NOT CORE_SYSTEM_NAME STREQUAL android)
44 list(APPEND MICROHTTPD_LIBRARIES rt)
45 endif()
46 else()
47 list(APPEND MICROHTTPD_LIBRARIES ${PC_MICROHTTPD_STATIC_LIBRARIES}) 39 list(APPEND MICROHTTPD_LIBRARIES ${PC_MICROHTTPD_STATIC_LIBRARIES})
48 endif() 40 endif()
49endif() 41endif()
diff --git a/cmake/modules/FindYajl.cmake b/cmake/modules/FindYajl.cmake
deleted file mode 100644
index d8793e6..0000000
--- a/cmake/modules/FindYajl.cmake
+++ /dev/null
@@ -1,62 +0,0 @@
1#.rst:
2# FindYajl
3# --------
4# Finds the Yajl library
5#
6# This will define the following variables::
7#
8# YAJL_FOUND - system has Yajl
9# YAJL_INCLUDE_DIRS - Yajl include directory
10# YAJL_LIBRARIES - the Yajl libraries
11#
12# and the following imported targets::
13#
14# Yajl::Yajl - The Yajl library
15
16if(NOT Yajl_FIND_VERSION)
17 set(Yajl_FIND_VERSION 2.0.0)
18endif()
19
20if(PKG_CONFIG_FOUND)
21 pkg_check_modules(PC_YAJL yajl>=${Yajl_FIND_VERSION} QUIET)
22endif()
23
24find_path(YAJL_INCLUDE_DIR NAMES yajl/yajl_common.h
25 PATHS ${PC_YAJL_INCLUDEDIR})
26find_library(YAJL_LIBRARY NAMES yajl
27 PATHS ${PC_YAJL_LIBDIR})
28
29if(PC_YAJL_VERSION)
30 set(YAJL_VERSION_STRING ${PC_YAJL_VERSION})
31elseif(YAJL_INCLUDE_DIR AND EXISTS "${YAJL_INCLUDE_DIR}/yajl/yajl_version.h")
32 file(STRINGS "${YAJL_INCLUDE_DIR}/yajl/yajl_version.h" yajl_version_str REGEX "^[ \t]*#define[ \t]+YAJL_(MAJOR|MINOR|MICRO)")
33 string(REGEX REPLACE "YAJL_MAJOR ([0-9]+)" "\\1" YAJL_VERSION_MAJOR "${YAJL_VERSION_MAJOR}")
34
35 string(REGEX REPLACE ".*YAJL_MAJOR ([0-9]+).*" "\\1" yajl_major "${yajl_version_str}")
36 string(REGEX REPLACE ".*YAJL_MINOR ([0-9]+).*" "\\1" yajl_minor "${yajl_version_str}")
37 string(REGEX REPLACE ".*YAJL_MICRO ([0-9]+).*" "\\1" yajl_micro "${yajl_version_str}")
38 set(YAJL_VERSION_STRING "${yajl_major}.${yajl_minor}.${yajl_micro}")
39 unset(yajl_version_str)
40 unset(yajl_major)
41 unset(yajl_minor)
42 unset(yajl_micro)
43endif()
44
45include(FindPackageHandleStandardArgs)
46find_package_handle_standard_args(Yajl
47 REQUIRED_VARS YAJL_LIBRARY YAJL_INCLUDE_DIR
48 VERSION_VAR YAJL_VERSION_STRING)
49
50if(YAJL_FOUND)
51 set(YAJL_INCLUDE_DIRS ${YAJL_INCLUDE_DIR})
52 set(YAJL_LIBRARIES ${YAJL_LIBRARY})
53
54 if(NOT TARGET Yajl::Yajl)
55 add_library(Yajl::Yajl UNKNOWN IMPORTED)
56 set_target_properties(Yajl::Yajl PROPERTIES
57 IMPORTED_LOCATION "${YAJL_LIBRARY}"
58 INTERFACE_INCLUDE_DIRECTORIES "${YAJL_INCLUDE_DIR}")
59 endif()
60endif()
61
62mark_as_advanced(YAJL_INCLUDE_DIR YAJL_LIBRARY)
diff --git a/cmake/platform/android/android.cmake b/cmake/platform/android/android.cmake
index c857cba..1450d28 100644
--- a/cmake/platform/android/android.cmake
+++ b/cmake/platform/android/android.cmake
@@ -1 +1,2 @@
1set(PLATFORM_REQUIRED_DEPS OpenGLES EGL Zip) 1set(PLATFORM_REQUIRED_DEPS OpenGLES EGL Zip)
2set(APP_RENDER_SYSTEM gles)
diff --git a/cmake/platform/freebsd/x11.cmake b/cmake/platform/freebsd/x11.cmake
index 656fd66..09cebde 100644
--- a/cmake/platform/freebsd/x11.cmake
+++ b/cmake/platform/freebsd/x11.cmake
@@ -1,2 +1,3 @@
1set(PLATFORM_REQUIRED_DEPS OpenGl EGL X XRandR LibDRM) 1set(PLATFORM_REQUIRED_DEPS OpenGl EGL X XRandR LibDRM)
2set(PLATFORM_OPTIONAL_DEPS VAAPI VDPAU GLX) 2set(PLATFORM_OPTIONAL_DEPS VAAPI VDPAU GLX)
3set(APP_RENDER_SYSTEM gl)
diff --git a/cmake/platform/ios/ios.cmake b/cmake/platform/ios/ios.cmake
index ab0f361..75c9b7b 100644
--- a/cmake/platform/ios/ios.cmake
+++ b/cmake/platform/ios/ios.cmake
@@ -1 +1,2 @@
1set(PLATFORM_REQUIRED_DEPS OpenGLES) 1set(PLATFORM_REQUIRED_DEPS OpenGLES)
2set(APP_RENDER_SYSTEM gles)
diff --git a/cmake/platform/osx/osx.cmake b/cmake/platform/osx/osx.cmake
index e81703c..fbe8d96 100644
--- a/cmake/platform/osx/osx.cmake
+++ b/cmake/platform/osx/osx.cmake
@@ -1 +1,2 @@
1set(PLATFORM_REQUIRED_DEPS OpenGl Sdl) 1set(PLATFORM_REQUIRED_DEPS OpenGl Sdl)
2set(APP_RENDER_SYSTEM gl)
diff --git a/cmake/platform/windows/windows.cmake b/cmake/platform/windows/windows.cmake
index dbe9417..b0c2992 100644
--- a/cmake/platform/windows/windows.cmake
+++ b/cmake/platform/windows/windows.cmake
@@ -1 +1,2 @@
1# File intentionally left empty 1set(PLATFORM_REQUIRED_DEPS D3DX11Effects)
2set(APP_RENDER_SYSTEM dx11)
diff --git a/cmake/platform/windowsstore/windowsstore.cmake b/cmake/platform/windowsstore/windowsstore.cmake
index 266fb3e..b0c2992 100644
--- a/cmake/platform/windowsstore/windowsstore.cmake
+++ b/cmake/platform/windowsstore/windowsstore.cmake
@@ -1 +1,2 @@
1set(PLATFORM_REQUIRED_DEPS zlib) 1set(PLATFORM_REQUIRED_DEPS D3DX11Effects)
2set(APP_RENDER_SYSTEM dx11)
diff --git a/cmake/scripts/common/AddonHelpers.cmake b/cmake/scripts/common/AddonHelpers.cmake
index a91e366..2f3f302 100644
--- a/cmake/scripts/common/AddonHelpers.cmake
+++ b/cmake/scripts/common/AddonHelpers.cmake
@@ -199,7 +199,7 @@ macro (build_addon target prefix libs)
199 endif() 199 endif()
200 200
201 # TODO: remove this hack after v18 201 # TODO: remove this hack after v18
202 string(REPLACE "<platform>\@PLATFORM\@</platform>" "<platform>@PLATFORM_TAG@</platform>" addon_file "${addon_file}") 202 string(REPLACE "<platform>\@PLATFORM\@</platform>" "<platform>\@PLATFORM_TAG\@</platform>" addon_file "${addon_file}")
203 203
204 string(CONFIGURE "${addon_file}" addon_file_conf @ONLY) 204 string(CONFIGURE "${addon_file}" addon_file_conf @ONLY)
205 file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${target}/addon.xml CONTENT "${addon_file_conf}") 205 file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${target}/addon.xml CONTENT "${addon_file_conf}")
@@ -289,10 +289,12 @@ macro (build_addon target prefix libs)
289 COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) 289 COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG})
290 endif() 290 endif()
291 if(${prefix}_CUSTOM_DATA) 291 if(${prefix}_CUSTOM_DATA)
292 install(DIRECTORY ${${prefix}_CUSTOM_DATA} DESTINATION ${target}/resources) 292 install(DIRECTORY ${${prefix}_CUSTOM_DATA} DESTINATION ${target}/resources
293 COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG})
293 endif() 294 endif()
294 if(${prefix}_ADDITIONAL_BINARY) 295 if(${prefix}_ADDITIONAL_BINARY)
295 install(FILES ${${prefix}_ADDITIONAL_BINARY} DESTINATION ${target}) 296 install(FILES ${${prefix}_ADDITIONAL_BINARY} DESTINATION ${target}
297 COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG})
296 endif() 298 endif()
297 endif() 299 endif()
298 add_cpack_workaround(${target} ${${prefix}_VERSION} ${ext}) 300 add_cpack_workaround(${target} ${${prefix}_VERSION} ${ext})
@@ -341,10 +343,11 @@ macro (build_addon target prefix libs)
341 if(${APP_NAME_UC}_BUILD_DIR) 343 if(${APP_NAME_UC}_BUILD_DIR)
342 file(GLOB_RECURSE files ${CMAKE_CURRENT_SOURCE_DIR}/${target}/*) 344 file(GLOB_RECURSE files ${CMAKE_CURRENT_SOURCE_DIR}/${target}/*)
343 if(${prefix}_CUSTOM_DATA) 345 if(${prefix}_CUSTOM_DATA)
346 get_filename_component(dname ${${prefix}_CUSTOM_DATA} NAME)
344 add_custom_command(TARGET ${target} POST_BUILD 347 add_custom_command(TARGET ${target} POST_BUILD
345 COMMAND ${CMAKE_COMMAND} -E copy_directory 348 COMMAND ${CMAKE_COMMAND} -E copy_directory
346 ${${prefix}_CUSTOM_DATA} 349 ${${prefix}_CUSTOM_DATA}
347 ${${APP_NAME_UC}_BUILD_DIR}/addons/${target}/resources) 350 ${${APP_NAME_UC}_BUILD_DIR}/addons/${target}/resources/${dname})
348 endif() 351 endif()
349 foreach(file ${files}) 352 foreach(file ${files})
350 string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/${target}/" "" name "${file}") 353 string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/${target}/" "" name "${file}")
diff --git a/cmake/scripts/common/ArchSetup.cmake b/cmake/scripts/common/ArchSetup.cmake
index 4704193..07ce6d4 100644
--- a/cmake/scripts/common/ArchSetup.cmake
+++ b/cmake/scripts/common/ArchSetup.cmake
@@ -122,6 +122,10 @@ check_function_exists(localtime_r HAVE_LOCALTIME_R)
122if(HAVE_LOCALTIME_R) 122if(HAVE_LOCALTIME_R)
123 list(APPEND SYSTEM_DEFINES -DHAVE_LOCALTIME_R=1) 123 list(APPEND SYSTEM_DEFINES -DHAVE_LOCALTIME_R=1)
124endif() 124endif()
125check_function_exists(gmtime_r HAVE_GMTIME_R)
126if(HAVE_GMTIME_R)
127list(APPEND SYSTEM_DEFINES -DHAVE_GMTIME_R=1)
128endif()
125if(HAVE_INTTYPES_H) 129if(HAVE_INTTYPES_H)
126 list(APPEND SYSTEM_DEFINES -DHAVE_INTTYPES_H=1) 130 list(APPEND SYSTEM_DEFINES -DHAVE_INTTYPES_H=1)
127endif() 131endif()
diff --git a/cmake/scripts/common/GenerateVersionedFiles.cmake b/cmake/scripts/common/GenerateVersionedFiles.cmake
index 011f495..1d324db 100644
--- a/cmake/scripts/common/GenerateVersionedFiles.cmake
+++ b/cmake/scripts/common/GenerateVersionedFiles.cmake
@@ -15,7 +15,7 @@ endfunction()
15file(GLOB ADDON_XML_IN_FILE ${CORE_SOURCE_DIR}/addons/*/addon.xml.in) 15file(GLOB ADDON_XML_IN_FILE ${CORE_SOURCE_DIR}/addons/*/addon.xml.in)
16 16
17# remove 'xbmc.json', will be created from 'xbmc/interfaces/json-rpc/schema/CMakeLists.txt' 17# remove 'xbmc.json', will be created from 'xbmc/interfaces/json-rpc/schema/CMakeLists.txt'
18list(REMOVE_ITEM ADDON_XML_IN_FILE xbmc.json) 18list(REMOVE_ITEM ADDON_XML_IN_FILE ${CORE_SOURCE_DIR}/addons/xbmc.json/addon.xml.in)
19 19
20foreach(loop_var ${ADDON_XML_IN_FILE}) 20foreach(loop_var ${ADDON_XML_IN_FILE})
21 list(GET loop_var 0 xml_name) 21 list(GET loop_var 0 xml_name)
diff --git a/cmake/scripts/common/HandleDepends.cmake b/cmake/scripts/common/HandleDepends.cmake
index 47f7d9b..40e382b 100644
--- a/cmake/scripts/common/HandleDepends.cmake
+++ b/cmake/scripts/common/HandleDepends.cmake
@@ -88,16 +88,12 @@ function(add_addon_depends addon searchpath)
88 message(${BUILD_ARGS}) 88 message(${BUILD_ARGS})
89 endif() 89 endif()
90 90
91 # prepare patchfile. ensure we have a clean file after reconfiguring 91 set(PATCH_COMMAND)
92 set(PATCH_FILE ${BUILD_DIR}/${id}/tmp/patch.cmake)
93 file(REMOVE ${PATCH_FILE})
94 92
95 # if there's a CMakeLists.txt use it to prepare the build 93 # if there's a CMakeLists.txt use it to prepare the build
96 if(EXISTS ${dir}/CMakeLists.txt) 94 if(EXISTS ${dir}/CMakeLists.txt)
97 set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/CMakeLists.txt) 95 set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/CMakeLists.txt)
98 file(APPEND ${PATCH_FILE} 96 list(APPEND PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_if_different ${dir}/CMakeLists.txt ${BUILD_DIR}/${id}/src/${id})
99 "file(COPY ${dir}/CMakeLists.txt
100 DESTINATION ${BUILD_DIR}/${id}/src/${id})\n")
101 endif() 97 endif()
102 98
103 # check if we have patches to apply 99 # check if we have patches to apply
@@ -124,14 +120,13 @@ function(add_addon_depends addon searchpath)
124 file(READ ${patch} patch_content_hex HEX) 120 file(READ ${patch} patch_content_hex HEX)
125 # Force handle LF-only line endings 121 # Force handle LF-only line endings
126 if(NOT patch_content_hex MATCHES "0d0a") 122 if(NOT patch_content_hex MATCHES "0d0a")
127 set(PATCH_PROGRAM "\"${PATCH_PROGRAM}\" --binary") 123 list(APPEND PATCH_PROGRAM --binary)
128 endif() 124 endif()
129 endif() 125 endif()
130 endif() 126 endif()
131 127
132 set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${patch}) 128 set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${patch})
133 file(APPEND ${PATCH_FILE} 129 list(APPEND PATCH_COMMAND COMMAND ${PATCH_PROGRAM} -p1 -i ${patch})
134 "execute_process(COMMAND ${PATCH_PROGRAM} -p1 -i \"${patch}\")\n")
135 endforeach() 130 endforeach()
136 131
137 132
@@ -168,18 +163,11 @@ function(add_addon_depends addon searchpath)
168 if(CROSS_AUTOCONF AND AUTOCONF_FILES) 163 if(CROSS_AUTOCONF AND AUTOCONF_FILES)
169 foreach(afile ${AUTOCONF_FILES}) 164 foreach(afile ${AUTOCONF_FILES})
170 set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${afile}) 165 set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${afile})
171 file(APPEND ${PATCH_FILE} 166 list(APPEND PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E echo "AUTOCONF: copying ${afile} to ${BUILD_DIR}/${id}/src/${id}")
172 "message(STATUS \"AUTOCONF: copying ${afile} to ${BUILD_DIR}/${id}/src/${id}\")\n 167 list(APPEND PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_if_different ${afile} ${BUILD_DIR}/${id}/src/${id})
173 file(COPY ${afile} DESTINATION ${BUILD_DIR}/${id}/src/${id})\n")
174 endforeach() 168 endforeach()
175 endif() 169 endif()
176 170
177 # if the patch file exists we need to set the PATCH_COMMAND
178 set(PATCH_COMMAND "")
179 if(EXISTS ${PATCH_FILE})
180 set(PATCH_COMMAND ${CMAKE_COMMAND} -P ${PATCH_FILE})
181 endif()
182
183 # prepare the setup of the call to externalproject_add() 171 # prepare the setup of the call to externalproject_add()
184 set(EXTERNALPROJECT_SETUP PREFIX ${BUILD_DIR}/${id} 172 set(EXTERNALPROJECT_SETUP PREFIX ${BUILD_DIR}/${id}
185 CMAKE_ARGS ${extraflags} ${BUILD_ARGS} 173 CMAKE_ARGS ${extraflags} ${BUILD_ARGS}
diff --git a/cmake/scripts/common/Macros.cmake b/cmake/scripts/common/Macros.cmake
index 0d89dd3..eefd7c8 100644
--- a/cmake/scripts/common/Macros.cmake
+++ b/cmake/scripts/common/Macros.cmake
@@ -72,11 +72,7 @@ function(core_add_library name)
72 add_library(${name} STATIC ${SOURCES} ${HEADERS} ${OTHERS}) 72 add_library(${name} STATIC ${SOURCES} ${HEADERS} ${OTHERS})
73 set_target_properties(${name} PROPERTIES PREFIX "") 73 set_target_properties(${name} PROPERTIES PREFIX "")
74 set(core_DEPENDS ${name} ${core_DEPENDS} CACHE STRING "" FORCE) 74 set(core_DEPENDS ${name} ${core_DEPENDS} CACHE STRING "" FORCE)
75 set(lib_DEPS libcpluff ffmpeg crossguid ${PLATFORM_GLOBAL_TARGET_DEPS}) 75 add_dependencies(${name} ${GLOBAL_TARGET_DEPS})
76 if(NOT CORE_SYSTEM_NAME STREQUAL windowsstore)
77 list(APPEND lib_DEPS dvdnav)
78 endif()
79 add_dependencies(${name} ${lib_DEPS})
80 set(CORE_LIBRARY ${name} PARENT_SCOPE) 76 set(CORE_LIBRARY ${name} PARENT_SCOPE)
81 77
82 # Add precompiled headers to Kodi main libraries 78 # Add precompiled headers to Kodi main libraries
@@ -106,11 +102,7 @@ function(core_add_test_library name)
106 set_target_properties(${name} PROPERTIES PREFIX "" 102 set_target_properties(${name} PROPERTIES PREFIX ""
107 EXCLUDE_FROM_ALL 1 103 EXCLUDE_FROM_ALL 1
108 FOLDER "Build Utilities/tests") 104 FOLDER "Build Utilities/tests")
109 set(lib_DEPS libcpluff ffmpeg crossguid ${PLATFORM_GLOBAL_TARGET_DEPS}) 105 add_dependencies(${name} ${GLOBAL_TARGET_DEPS})
110 if(NOT CORE_SYSTEM_NAME STREQUAL windowsstore)
111 list(APPEND lib_DEPS dvdnav)
112 endif()
113 add_dependencies(${name} ${lib_DEPS})
114 set(test_archives ${test_archives} ${name} CACHE STRING "" FORCE) 106 set(test_archives ${test_archives} ${name} CACHE STRING "" FORCE)
115 endif() 107 endif()
116 foreach(src IN LISTS SOURCES SUPPORTED_SOURCES HEADERS OTHERS) 108 foreach(src IN LISTS SOURCES SUPPORTED_SOURCES HEADERS OTHERS)
@@ -631,6 +623,8 @@ function(core_find_git_rev stamp)
631 # allow manual setting GIT_VERSION 623 # allow manual setting GIT_VERSION
632 if(GIT_VERSION) 624 if(GIT_VERSION)
633 set(${stamp} ${GIT_VERSION} PARENT_SCOPE) 625 set(${stamp} ${GIT_VERSION} PARENT_SCOPE)
626 string(TIMESTAMP APP_BUILD_DATE "%Y%m%d" UTC)
627 set(APP_BUILD_DATE ${APP_BUILD_DATE} PARENT_SCOPE)
634 else() 628 else()
635 find_package(Git) 629 find_package(Git)
636 if(GIT_FOUND AND EXISTS ${CMAKE_SOURCE_DIR}/.git) 630 if(GIT_FOUND AND EXISTS ${CMAKE_SOURCE_DIR}/.git)
@@ -661,12 +655,18 @@ function(core_find_git_rev stamp)
661 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) 655 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
662 string(REPLACE "\"" "" DATE ${DATE}) 656 string(REPLACE "\"" "" DATE ${DATE})
663 string(REPLACE "-" "" DATE ${DATE}) 657 string(REPLACE "-" "" DATE ${DATE})
658
659 # build date
660 string(TIMESTAMP APP_BUILD_DATE "%Y%m%d" UTC)
661 set(APP_BUILD_DATE ${APP_BUILD_DATE} PARENT_SCOPE)
664 else() 662 else()
665 if(EXISTS ${CMAKE_SOURCE_DIR}/BUILDDATE) 663 if(EXISTS ${CMAKE_SOURCE_DIR}/BUILDDATE)
666 file(STRINGS ${CMAKE_SOURCE_DIR}/BUILDDATE DATE LIMIT_INPUT 8) 664 file(STRINGS ${CMAKE_SOURCE_DIR}/BUILDDATE DATE LIMIT_INPUT 8)
667 else() 665 else()
668 string(TIMESTAMP DATE "%Y%m%d" UTC) 666 string(TIMESTAMP DATE "%Y%m%d" UTC)
669 endif() 667 endif()
668 set(APP_BUILD_DATE ${DATE} PARENT_SCOPE)
669
670 if(EXISTS ${CMAKE_SOURCE_DIR}/VERSION) 670 if(EXISTS ${CMAKE_SOURCE_DIR}/VERSION)
671 file(STRINGS ${CMAKE_SOURCE_DIR}/VERSION HASH LIMIT_INPUT 16) 671 file(STRINGS ${CMAKE_SOURCE_DIR}/VERSION HASH LIMIT_INPUT 16)
672 else() 672 else()
@@ -721,6 +721,7 @@ macro(core_find_versions)
721 APP_NAME 721 APP_NAME
722 APP_PACKAGE 722 APP_PACKAGE
723 COMPANY_NAME 723 COMPANY_NAME
724 COPYRIGHT_YEARS
724 JSONRPC_VERSION 725 JSONRPC_VERSION
725 PACKAGE_DESCRIPTION 726 PACKAGE_DESCRIPTION
726 PACKAGE_IDENTITY 727 PACKAGE_IDENTITY
@@ -784,6 +785,12 @@ endmacro()
784# find all folders containing addon.xml.in and used to define 785# find all folders containing addon.xml.in and used to define
785# ADDON_XML_OUTPUTS, ADDON_XML_DEPENDS and ADDON_INSTALL_DATA 786# ADDON_XML_OUTPUTS, ADDON_XML_DEPENDS and ADDON_INSTALL_DATA
786macro(find_addon_xml_in_files) 787macro(find_addon_xml_in_files)
788 set(filter ${ARGV0})
789
790 if(filter AND VERBOSE)
791 message(STATUS "find_addon_xml_in_files: filtering ${filter}")
792 endif()
793
787 file(GLOB ADDON_XML_IN_FILE ${CMAKE_SOURCE_DIR}/addons/*/addon.xml.in) 794 file(GLOB ADDON_XML_IN_FILE ${CMAKE_SOURCE_DIR}/addons/*/addon.xml.in)
788 foreach(loop_var ${ADDON_XML_IN_FILE}) 795 foreach(loop_var ${ADDON_XML_IN_FILE})
789 list(GET loop_var 0 xml_name) 796 list(GET loop_var 0 xml_name)
@@ -792,7 +799,9 @@ macro(find_addon_xml_in_files)
792 string(REPLACE "${CORE_SOURCE_DIR}/" "" xml_name ${xml_name}) 799 string(REPLACE "${CORE_SOURCE_DIR}/" "" xml_name ${xml_name})
793 800
794 list(APPEND ADDON_XML_DEPENDS "${CORE_SOURCE_DIR}/${xml_name}/addon.xml.in") 801 list(APPEND ADDON_XML_DEPENDS "${CORE_SOURCE_DIR}/${xml_name}/addon.xml.in")
795 list(APPEND ADDON_XML_OUTPUTS "${CMAKE_BINARY_DIR}/${xml_name}/addon.xml") 802 if(filter AND NOT xml_name MATCHES ${filter})
803 list(APPEND ADDON_XML_OUTPUTS "${CMAKE_BINARY_DIR}/${xml_name}/addon.xml")
804 endif()
796 805
797 # Read content of add-on folder to have on install 806 # Read content of add-on folder to have on install
798 file(GLOB ADDON_FILES "${CORE_SOURCE_DIR}/${xml_name}/*") 807 file(GLOB ADDON_FILES "${CORE_SOURCE_DIR}/${xml_name}/*")
diff --git a/cmake/scripts/common/PrepareEnv.cmake b/cmake/scripts/common/PrepareEnv.cmake
index 20dbaf6..753dca1 100644
--- a/cmake/scripts/common/PrepareEnv.cmake
+++ b/cmake/scripts/common/PrepareEnv.cmake
@@ -24,14 +24,6 @@ if(NOT EXISTS "${APP_INCLUDE_DIR}/")
24 file(MAKE_DIRECTORY ${APP_INCLUDE_DIR}) 24 file(MAKE_DIRECTORY ${APP_INCLUDE_DIR})
25endif() 25endif()
26 26
27# make sure C++11 is always set
28if(NOT WIN32)
29 string(REGEX MATCH "-std=(gnu|c)\\+\\+11" cxx11flag "${CMAKE_CXX_FLAGS}")
30 if(NOT cxx11flag)
31 set(CXX11_SWITCH "-std=c++11")
32 endif()
33endif()
34
35if(NOT CORE_SYSTEM_NAME) 27if(NOT CORE_SYSTEM_NAME)
36 if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") 28 if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
37 set(CORE_SYSTEM_NAME "osx") 29 set(CORE_SYSTEM_NAME "osx")
diff --git a/cmake/scripts/ios/ArchSetup.cmake b/cmake/scripts/ios/ArchSetup.cmake
index 6b053dc..b6c626f 100644
--- a/cmake/scripts/ios/ArchSetup.cmake
+++ b/cmake/scripts/ios/ArchSetup.cmake
@@ -28,8 +28,6 @@ endif()
28# Additional SYSTEM_DEFINES 28# Additional SYSTEM_DEFINES
29list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK -DHAS_ZEROCONF) 29list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK -DHAS_ZEROCONF)
30 30
31find_package(CXX11 REQUIRED)
32
33list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX}) 31list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX})
34 32
35list(APPEND DEPLIBS "-framework CoreFoundation" "-framework CoreVideo" 33list(APPEND DEPLIBS "-framework CoreFoundation" "-framework CoreVideo"
diff --git a/cmake/scripts/ios/Install.cmake b/cmake/scripts/ios/Install.cmake
index 7b6c3de..7668e7c 100644
--- a/cmake/scripts/ios/Install.cmake
+++ b/cmake/scripts/ios/Install.cmake
@@ -1,11 +1,26 @@
1# IOS packaging 1# IOS packaging
2 2
3set(BUNDLE_RESOURCES ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-568h@2x.png 3set(BUNDLE_RESOURCES ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1100-Landscape-2436h@3x.png
4 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-667h@2x.png 4 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1100-Portrait-2436h@3x.png
5 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-736h@3x.png 5 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-1792h@2x.png
6 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-Landscape-736h@3x.png 6 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-2224h@2x.png
7 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-812h@3x.png 7 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-2224h@2x.png
8 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-Landscape-812h@3x.png 8 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-2388h@2x.png
9 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-2388h@2x.png
10 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-2688h@3x.png
11 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-1792h@2x.png
12 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-2688h@3x.png
13 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-568h@2x.png
14 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700-568h@2x.png
15 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700-Landscape@2x~ipad.png
16 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700-Portrait@2x~ipad.png
17 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700@2x.png
18 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-800-667h@2x.png
19 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-800-Landscape-736h@3x.png
20 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-800-Portrait-736h@3x.png
21 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-Landscape@2x~ipad.png
22 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-Portrait@2x~ipad.png
23 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage@2x.png
9 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png 24 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png
10 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png 25 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png
11 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png 26 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png
@@ -21,19 +36,13 @@ set(BUNDLE_RESOURCES ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-568h@2
21 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png 36 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png
22 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png) 37 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png)
23 38
24if(CMAKE_GENERATOR STREQUAL Xcode)
25 set(RESOURCE_LOCATION ${APP_NAME}.app)
26else()
27 set(RESOURCE_LOCATION ".")
28endif()
29
30target_sources(${APP_NAME_LC} PRIVATE ${BUNDLE_RESOURCES}) 39target_sources(${APP_NAME_LC} PRIVATE ${BUNDLE_RESOURCES})
31foreach(file IN LISTS BUNDLE_RESOURCES) 40foreach(file IN LISTS BUNDLE_RESOURCES)
32 set_source_files_properties(${file} PROPERTIES MACOSX_PACKAGE_LOCATION ${RESOURCE_LOCATION}) 41 set_source_files_properties(${file} PROPERTIES MACOSX_PACKAGE_LOCATION .)
33endforeach() 42endforeach()
34 43
35target_sources(${APP_NAME_LC} PRIVATE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings) 44target_sources(${APP_NAME_LC} PRIVATE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings)
36set_source_files_properties(${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings PROPERTIES MACOSX_PACKAGE_LOCATION "${RESOURCE_LOCATION}/English.lproj") 45set_source_files_properties(${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings PROPERTIES MACOSX_PACKAGE_LOCATION "./English.lproj")
37 46
38# Options for code signing propagated as env vars to Codesign.command via Xcode 47# Options for code signing propagated as env vars to Codesign.command via Xcode
39set(IOS_CODE_SIGN_IDENTITY "" CACHE STRING "Code Sign Identity") 48set(IOS_CODE_SIGN_IDENTITY "" CACHE STRING "Code Sign Identity")
@@ -73,6 +82,7 @@ add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD
73 "BUILT_PRODUCTS_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." 82 "BUILT_PRODUCTS_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.."
74 "WRAPPER_NAME=${APP_NAME}.app" 83 "WRAPPER_NAME=${APP_NAME}.app"
75 "APP_NAME=${APP_NAME}" 84 "APP_NAME=${APP_NAME}"
85 "CURRENT_ARCH=${ARCH}"
76 ${CMAKE_SOURCE_DIR}/tools/darwin/Support/Codesign.command 86 ${CMAKE_SOURCE_DIR}/tools/darwin/Support/Codesign.command
77) 87)
78 88
diff --git a/cmake/scripts/linux/ArchSetup.cmake b/cmake/scripts/linux/ArchSetup.cmake
index 624edf6..602ef3d 100644
--- a/cmake/scripts/linux/ArchSetup.cmake
+++ b/cmake/scripts/linux/ArchSetup.cmake
@@ -81,7 +81,6 @@ if(KODI_DEPENDSBUILD)
81 set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) 81 set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
82endif() 82endif()
83 83
84find_package(CXX11 REQUIRED)
85include(LDGOLD) 84include(LDGOLD)
86 85
87include(CheckIncludeFiles) 86include(CheckIncludeFiles)
diff --git a/cmake/scripts/linux/Install.cmake b/cmake/scripts/linux/Install.cmake
index d64b98a..36c0299 100644
--- a/cmake/scripts/linux/Install.cmake
+++ b/cmake/scripts/linux/Install.cmake
@@ -20,7 +20,6 @@ set(APP_PREFIX ${prefix})
20set(APP_LIB_DIR ${libdir}/${APP_NAME_LC}) 20set(APP_LIB_DIR ${libdir}/${APP_NAME_LC})
21set(APP_DATA_DIR ${datarootdir}/${APP_NAME_LC}) 21set(APP_DATA_DIR ${datarootdir}/${APP_NAME_LC})
22set(APP_INCLUDE_DIR ${includedir}/${APP_NAME_LC}) 22set(APP_INCLUDE_DIR ${includedir}/${APP_NAME_LC})
23set(CXX11_SWITCH "-std=c++11")
24 23
25# Set XBMC_STANDALONE_SH_PULSE so we can insert PulseAudio block into kodi-standalone 24# Set XBMC_STANDALONE_SH_PULSE so we can insert PulseAudio block into kodi-standalone
26if(EXISTS ${CMAKE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.pulse) 25if(EXISTS ${CMAKE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.pulse)
@@ -264,11 +263,11 @@ if(ENABLE_EVENTCLIENTS)
264 COMPONENT kodi-eventclients-wiiremote) 263 COMPONENT kodi-eventclients-wiiremote)
265 endif() 264 endif()
266 265
267 # Install kodi-eventclients-xbmc-send 266 # Install kodi-eventclients-kodi-send
268 install(PROGRAMS ${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/KodiSend/kodi-send.py 267 install(PROGRAMS ${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/KodiSend/kodi-send.py
269 RENAME ${APP_NAME_LC}-send 268 RENAME ${APP_NAME_LC}-send
270 DESTINATION ${bindir} 269 DESTINATION ${bindir}
271 COMPONENT kodi-eventclients-xbmc-send) 270 COMPONENT kodi-eventclients-kodi-send)
272endif() 271endif()
273 272
274# Install XBT skin files 273# Install XBT skin files
diff --git a/cmake/scripts/osx/ArchSetup.cmake b/cmake/scripts/osx/ArchSetup.cmake
index 9ba0596..74f2ed4 100644
--- a/cmake/scripts/osx/ArchSetup.cmake
+++ b/cmake/scripts/osx/ArchSetup.cmake
@@ -25,8 +25,6 @@ endif()
25# Additional SYSTEM_DEFINES 25# Additional SYSTEM_DEFINES
26list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK -DHAS_SDL -DHAS_ZEROCONF) 26list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK -DHAS_SDL -DHAS_ZEROCONF)
27 27
28find_package(CXX11 REQUIRED)
29
30list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX}) 28list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX})
31 29
32list(APPEND DEPLIBS "-framework DiskArbitration" "-framework IOKit" 30list(APPEND DEPLIBS "-framework DiskArbitration" "-framework IOKit"
diff --git a/cmake/scripts/windows/ArchSetup.cmake b/cmake/scripts/windows/ArchSetup.cmake
index b94842f..032632c 100644
--- a/cmake/scripts/windows/ArchSetup.cmake
+++ b/cmake/scripts/windows/ArchSetup.cmake
@@ -32,9 +32,9 @@ set(DEPS_FOLDER_RELATIVE project/BuildDependencies)
32set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/${ARCH}) 32set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/${ARCH})
33set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/${ARCH}) 33set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/${ARCH})
34 34
35list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${MINGW_LIBS_DIR}) 35list(APPEND CMAKE_PREFIX_PATH ${MINGW_LIBS_DIR})
36list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin) 36list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
37list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${DEPENDENCIES_DIR}) 37list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR})
38set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python) 38set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python)
39 39
40# -------- Compiler options --------- 40# -------- Compiler options ---------
@@ -73,8 +73,8 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
73link_directories(${DEPENDENCIES_DIR}/lib) 73link_directories(${DEPENDENCIES_DIR}/lib)
74 74
75# Additional libraries 75# Additional libraries
76list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib WS2_32.lib 76list(APPEND DEPLIBS bcrypt.lib d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib WS2_32.lib
77 PowrProf.lib setupapi.lib dwmapi.lib dxguid.lib DelayImp.lib) 77 PowrProf.lib setupapi.lib Shlwapi.lib dwmapi.lib dxguid.lib DelayImp.lib)
78 78
79# NODEFAULTLIB option 79# NODEFAULTLIB option
80set(_nodefaultlibs_RELEASE libcmt) 80set(_nodefaultlibs_RELEASE libcmt)
@@ -88,8 +88,7 @@ endforeach()
88 88
89# DELAYLOAD option 89# DELAYLOAD option
90set(_delayloadlibs zlib.dll libmysql.dll libxslt.dll dnssd.dll dwmapi.dll sqlite3.dll 90set(_delayloadlibs zlib.dll libmysql.dll libxslt.dll dnssd.dll dwmapi.dll sqlite3.dll
91 avcodec-58.dll avfilter-7.dll avformat-58.dll avutil-56.dll 91 d3dcompiler_47.dll)
92 postproc-55.dll swresample-3.dll swscale-5.dll d3dcompiler_47.dll)
93foreach(_lib ${_delayloadlibs}) 92foreach(_lib ${_delayloadlibs})
94 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:\"${_lib}\"") 93 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:\"${_lib}\"")
95endforeach() 94endforeach()
diff --git a/cmake/scripts/windowsstore/ArchSetup.cmake b/cmake/scripts/windowsstore/ArchSetup.cmake
index e3e46e7..2e6d7cb 100644
--- a/cmake/scripts/windowsstore/ArchSetup.cmake
+++ b/cmake/scripts/windowsstore/ArchSetup.cmake
@@ -1,5 +1,5 @@
1# Minimum SDK version we support 1# Minimum SDK version we support
2set(VS_MINIMUM_SDK_VERSION 10.0.16299.0) 2set(VS_MINIMUM_SDK_VERSION 10.0.17763.0)
3 3
4if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION VERSION_LESS VS_MINIMUM_SDK_VERSION) 4if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION VERSION_LESS VS_MINIMUM_SDK_VERSION)
5 message(FATAL_ERROR "Detected Windows SDK version is ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}.\n" 5 message(FATAL_ERROR "Detected Windows SDK version is ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}.\n"
@@ -49,10 +49,10 @@ set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/win10-${ARCH})
49set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/win10-${ARCH}) 49set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/win10-${ARCH})
50 50
51# mingw libs 51# mingw libs
52list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${MINGW_LIBS_DIR}) 52list(APPEND CMAKE_PREFIX_PATH ${MINGW_LIBS_DIR})
53list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin) 53list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
54# dependencies 54# dependencies
55list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${DEPENDENCIES_DIR}) 55list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR})
56# for python 56# for python
57set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python) 57set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python)
58 58
@@ -91,7 +91,7 @@ set(gtest_force_shared_crt ON CACHE STRING "" FORCE)
91link_directories(${MINGW_LIBS_DIR}/lib 91link_directories(${MINGW_LIBS_DIR}/lib
92 ${DEPENDENCIES_DIR}/lib) 92 ${DEPENDENCIES_DIR}/lib)
93 93
94list(APPEND DEPLIBS d3d11.lib WS2_32.lib dxguid.lib dloadhelper.lib WindowsApp.lib) 94list(APPEND DEPLIBS bcrypt.lib d3d11.lib WS2_32.lib dxguid.lib dloadhelper.lib WindowsApp.lib)
95 95
96set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /WINMD:NO") 96set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /WINMD:NO")
97set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:msvcrt /DEBUG:FASTLINK /OPT:NOREF /OPT:NOICF") 97set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:msvcrt /DEBUG:FASTLINK /OPT:NOREF /OPT:NOICF")
diff --git a/cmake/treedata/android/subdirs.txt b/cmake/treedata/android/subdirs.txt
index 036fd24..335c331 100644
--- a/cmake/treedata/android/subdirs.txt
+++ b/cmake/treedata/android/subdirs.txt
@@ -1,17 +1,20 @@
1xbmc/cores/RetroPlayer/process/android cores/RetroPlayer/process/android 1xbmc/cores/RetroPlayer/process/android cores/RetroPlayer/process/android
2xbmc/input/touch input/touch 2xbmc/cores/VideoPlayer/Process/android cores/VideoPlayer/Process/android
3xbmc/input/touch/generic input/touch/generic 3xbmc/input/touch input/touch
4xbmc/windowing/android windowing/android 4xbmc/input/touch/generic input/touch/generic
5xbmc/platform/posix platform/posix 5xbmc/media/decoderfilter media/decoderfilter
6xbmc/platform/posix/filesystem platform/posix/filesystem 6xbmc/platform/android/activity platform/android/activity
7xbmc/platform/posix/utils platform/posix/utils 7xbmc/platform/android/bionic_supplement platform/android/bionicsupplement
8xbmc/platform/linux platform/linux 8xbmc/platform/android/filesystem platform/android/filesystem
9xbmc/platform/linux/peripherals platform/linux/peripherals 9xbmc/platform/android/media/decoderfilter platform/android/media/decoderfilter
10xbmc/platform/android/activity platform/android/activity 10xbmc/platform/android/media/drm platform/android/media/drm
11xbmc/platform/android/bionic_supplement platform/android/bionicsupplement 11xbmc/platform/android/network platform/android/network
12xbmc/platform/android/drm platform/android/drm 12xbmc/platform/android/peripherals platform/android/peripherals
13xbmc/platform/android/filesystem platform/android/filesystem 13xbmc/platform/android/powermanagement platform/android/powermanagement
14xbmc/platform/android/network platform/android/network 14xbmc/platform/android/storage platform/android/storage
15xbmc/platform/android/peripherals platform/android/peripherals 15xbmc/platform/linux platform/linux
16xbmc/platform/android/powermanagement platform/android/powermanagement 16xbmc/platform/linux/peripherals platform/linux/peripherals
17xbmc/platform/android/storage platform/android/storage 17xbmc/platform/posix platform/posix
18xbmc/platform/posix/filesystem platform/posix/filesystem
19xbmc/platform/posix/utils platform/posix/utils
20xbmc/windowing/android windowing/android
diff --git a/cmake/treedata/common/drm.txt b/cmake/treedata/common/drm.txt
deleted file mode 100644
index fbcc906..0000000
--- a/cmake/treedata/common/drm.txt
+++ /dev/null
@@ -1 +0,0 @@
1xbmc/drm drm
diff --git a/cmake/treedata/common/filesystem.txt b/cmake/treedata/common/filesystem.txt
index 1c49a74..37a2536 100644
--- a/cmake/treedata/common/filesystem.txt
+++ b/cmake/treedata/common/filesystem.txt
@@ -1,3 +1,3 @@
1xbmc/filesystem filesystem 1xbmc/filesystem filesystem
2xbmc/filesystem/VideoDatabaseDirectory filesystem/videodatabase
3xbmc/filesystem/MusicDatabaseDirectory filesystem/musicdatabase 2xbmc/filesystem/MusicDatabaseDirectory filesystem/musicdatabase
3xbmc/filesystem/VideoDatabaseDirectory filesystem/videodatabase
diff --git a/cmake/treedata/common/media.txt b/cmake/treedata/common/media.txt
new file mode 100644
index 0000000..519fece
--- /dev/null
+++ b/cmake/treedata/common/media.txt
@@ -0,0 +1,2 @@
1xbmc/media media
2xbmc/media/drm drm
diff --git a/cmake/treedata/common/subdirs.txt b/cmake/treedata/common/subdirs.txt
index 368f473..083e8ef 100644
--- a/cmake/treedata/common/subdirs.txt
+++ b/cmake/treedata/common/subdirs.txt
@@ -20,6 +20,7 @@ xbmc/favourites favourites
20xbmc/guilib guilib 20xbmc/guilib guilib
21xbmc/guilib/guiinfo guilib_guiinfo 21xbmc/guilib/guiinfo guilib_guiinfo
22xbmc/input input 22xbmc/input input
23xbmc/input/actions input/actions
23xbmc/input/joysticks input/joysticks 24xbmc/input/joysticks input/joysticks
24xbmc/input/joysticks/dialogs input/joysticks/dialogs 25xbmc/input/joysticks/dialogs input/joysticks/dialogs
25xbmc/input/joysticks/generic input/joysticks/generic 26xbmc/input/joysticks/generic input/joysticks/generic
@@ -29,7 +30,6 @@ xbmc/input/keyboard/generic input/keyboard/generic
29xbmc/input/mouse input/mouse 30xbmc/input/mouse input/mouse
30xbmc/input/mouse/generic input/mouse/generic 31xbmc/input/mouse/generic input/mouse/generic
31xbmc/listproviders listproviders 32xbmc/listproviders listproviders
32xbmc/media media
33xbmc/messaging messaging 33xbmc/messaging messaging
34xbmc/messaging/helpers messagingHelpers 34xbmc/messaging/helpers messagingHelpers
35xbmc/pictures pictures 35xbmc/pictures pictures
diff --git a/cmake/treedata/common/tests.txt b/cmake/treedata/common/tests.txt
index 358bc4d..415eae6 100644
--- a/cmake/treedata/common/tests.txt
+++ b/cmake/treedata/common/tests.txt
@@ -1,10 +1,11 @@
1xbmc/test test
2xbmc/addons/test test/addons 1xbmc/addons/test test/addons
2xbmc/cores/AudioEngine/Sinks/test test/audioengine_sinks
3xbmc/filesystem/test test/filesystem 3xbmc/filesystem/test test/filesystem
4xbmc/interfaces/python/test test/python 4xbmc/interfaces/python/test test/python
5xbmc/music/tags/test test/music_tags 5xbmc/music/tags/test test/music_tags
6xbmc/network/test test/network 6xbmc/network/test test/network
7xbmc/playlists/test test/playlists
8xbmc/test test
7xbmc/threads/test test/threads 9xbmc/threads/test test/threads
8xbmc/utils/test test/utils 10xbmc/utils/test test/utils
9xbmc/video/test test/video 11xbmc/video/test test/video
10xbmc/cores/AudioEngine/Sinks/test test/audioengine_sinks
diff --git a/cmake/treedata/common/videoplayer.txt b/cmake/treedata/common/videoplayer.txt
index 8c8d45d..ce6a757 100644
--- a/cmake/treedata/common/videoplayer.txt
+++ b/cmake/treedata/common/videoplayer.txt
@@ -8,5 +8,5 @@ xbmc/cores/VideoPlayer/DVDInputStreams cores/VideoPlayer/inputstream
8xbmc/cores/VideoPlayer/DVDSubtitles cores/VideoPlayer/subtitles 8xbmc/cores/VideoPlayer/DVDSubtitles cores/VideoPlayer/subtitles
9xbmc/cores/VideoPlayer/Process cores/VideoPlayer/process 9xbmc/cores/VideoPlayer/Process cores/VideoPlayer/process
10xbmc/cores/VideoPlayer/VideoRenderers cores/VideoPlayer/videorenderers 10xbmc/cores/VideoPlayer/VideoRenderers cores/VideoPlayer/videorenderers
11xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders cores/VideoPlayer/videorenderers/shaders
12xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender cores/VideoPlayer/videorenderers/hwdec 11xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender cores/VideoPlayer/videorenderers/hwdec
12xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders cores/VideoPlayer/videorenderers/shaders
diff --git a/cmake/treedata/freebsd/subdirs.txt b/cmake/treedata/freebsd/subdirs.txt
index e4edf23..fd8ed5f 100644
--- a/cmake/treedata/freebsd/subdirs.txt
+++ b/cmake/treedata/freebsd/subdirs.txt
@@ -1,6 +1,7 @@
1xbmc/platform/posix platform/posix 1xbmc/cores/RetroPlayer/process/rbpi cores/RetroPlayer/process/rbpi
2xbmc/platform/posix/filesystem platform/posix/filesystem 2xbmc/cores/VideoPlayer/Process/rbpi cores/VideoPlayer/Process/rbpi
3xbmc/platform/posix/utils platform/posix/utils 3xbmc/input/touch input/touch
4xbmc/input/touch/generic input/touch/generic
4xbmc/platform/freebsd platform/freebsd 5xbmc/platform/freebsd platform/freebsd
5xbmc/platform/linux platform/linux 6xbmc/platform/linux platform/linux
6xbmc/platform/linux/input platform/linux/input 7xbmc/platform/linux/input platform/linux/input
@@ -8,8 +9,7 @@ xbmc/platform/linux/network platform/linux/network
8xbmc/platform/linux/peripherals platform/linux/peripherals 9xbmc/platform/linux/peripherals platform/linux/peripherals
9xbmc/platform/linux/powermanagement platform/linux/powermanagement 10xbmc/platform/linux/powermanagement platform/linux/powermanagement
10xbmc/platform/linux/storage platform/linux/storage 11xbmc/platform/linux/storage platform/linux/storage
11xbmc/input/touch input/touch 12xbmc/platform/posix platform/posix
12xbmc/input/touch/generic input/touch/generic 13xbmc/platform/posix/filesystem platform/posix/filesystem
13xbmc/cores/RetroPlayer/process/rbpi cores/RetroPlayer/process/rbpi 14xbmc/platform/posix/utils platform/posix/utils
14xbmc/cores/VideoPlayer/Process/rbpi cores/VideoPlayer/Process/rbpi
15xbmc/windowing/linux windowing/linux 15xbmc/windowing/linux windowing/linux
diff --git a/cmake/treedata/ios/subdirs.txt b/cmake/treedata/ios/subdirs.txt
index a287418..a3a03be 100644
--- a/cmake/treedata/ios/subdirs.txt
+++ b/cmake/treedata/ios/subdirs.txt
@@ -1,17 +1,15 @@
1xbmc/platform/linux platform/linux 1xbmc/cores/RetroPlayer/process/ios cores/RetroPlayer/process/ios
2xbmc/platform/linux/network platform/linux/network 2xbmc/cores/VideoPlayer/Process/ios cores/VideoPlayer/Process/ios
3xbmc/input/touch input/touch 3xbmc/input/touch input/touch
4xbmc/input/touch/generic input/touch/generic 4xbmc/input/touch/generic input/touch/generic
5xbmc/platform/posix posix
6xbmc/platform/posix/filesystem platform/posix/filesystem
7xbmc/platform/posix/utils platform/posix/utils
8xbmc/platform/darwin platform/darwin 5xbmc/platform/darwin platform/darwin
9xbmc/platform/darwin/ios platform/ios 6xbmc/platform/darwin/ios platform/ios
10xbmc/platform/darwin/ios-common platform/ios-common 7xbmc/platform/darwin/ios-common platform/ios-common
11xbmc/platform/darwin/osx/network platform/osx/network 8xbmc/platform/darwin/network platform/darwin/network
12xbmc/platform/darwin/osx/peripherals platform/osx/peripherals 9xbmc/platform/darwin/storage platform/storage
13xbmc/platform/darwin/osx/powermanagement platform/darwin/osx/powermanagement 10xbmc/platform/linux platform/linux
14xbmc/platform/darwin/osx/storage platform/osx/storage 11xbmc/platform/linux/network platform/linux/network
15xbmc/windowing/osx windowing/osx 12xbmc/platform/posix posix
16xbmc/cores/RetroPlayer/process/ios cores/RetroPlayer/process/ios 13xbmc/platform/posix/filesystem platform/posix/filesystem
17xbmc/cores/VideoPlayer/Process/ios cores/VideoPlayer/Process/ios 14xbmc/platform/posix/utils platform/posix/utils
15xbmc/windowing/ios windowing/ios
diff --git a/cmake/treedata/linux/subdirs.txt b/cmake/treedata/linux/subdirs.txt
index 6e1d013..7619e2e 100644
--- a/cmake/treedata/linux/subdirs.txt
+++ b/cmake/treedata/linux/subdirs.txt
@@ -1,14 +1,14 @@
1xbmc/platform/posix platform/posix 1xbmc/cores/RetroPlayer/process/rbpi cores/RetroPlayer/process/rbpi
2xbmc/platform/posix/filesystem platform/posix/filesystem 2xbmc/cores/VideoPlayer/Process/rbpi cores/VideoPlayer/Process/rbpi
3xbmc/platform/posix/utils platform/posix/utils 3xbmc/input/touch input/touch
4xbmc/input/touch/generic input/touch/generic
4xbmc/platform/linux platform/linux 5xbmc/platform/linux platform/linux
5xbmc/platform/linux/input platform/linux/input 6xbmc/platform/linux/input platform/linux/input
6xbmc/platform/linux/network platform/linux/network 7xbmc/platform/linux/network platform/linux/network
7xbmc/platform/linux/peripherals platform/linux/peripherals 8xbmc/platform/linux/peripherals platform/linux/peripherals
8xbmc/platform/linux/powermanagement platform/linux/powermanagement 9xbmc/platform/linux/powermanagement platform/linux/powermanagement
9xbmc/platform/linux/storage platform/linux/storage 10xbmc/platform/linux/storage platform/linux/storage
10xbmc/input/touch input/touch 11xbmc/platform/posix platform/posix
11xbmc/input/touch/generic input/touch/generic 12xbmc/platform/posix/filesystem platform/posix/filesystem
12xbmc/cores/RetroPlayer/process/rbpi cores/RetroPlayer/process/rbpi 13xbmc/platform/posix/utils platform/posix/utils
13xbmc/cores/VideoPlayer/Process/rbpi cores/VideoPlayer/Process/rbpi
14xbmc/windowing/linux windowing/linux 14xbmc/windowing/linux windowing/linux
diff --git a/cmake/treedata/optional/common/X.txt b/cmake/treedata/optional/common/X.txt
index e66ad80..a250537 100644
--- a/cmake/treedata/optional/common/X.txt
+++ b/cmake/treedata/optional/common/X.txt
@@ -1,3 +1,3 @@
1xbmc/windowing/X11 windowing/X11 # X
2xbmc/cores/RetroPlayer/process/X11 cores/RetroPlayer/process/X11 # X 1xbmc/cores/RetroPlayer/process/X11 cores/RetroPlayer/process/X11 # X
3xbmc/cores/VideoPlayer/Process/X11 cores/VideoPlayer/Process/X11 # X 2xbmc/cores/VideoPlayer/Process/X11 cores/VideoPlayer/Process/X11 # X
3xbmc/windowing/X11 windowing/X11 # X
diff --git a/cmake/treedata/optional/common/aml.txt b/cmake/treedata/optional/common/aml.txt
index 3d412d0..09bf2db 100644
--- a/cmake/treedata/optional/common/aml.txt
+++ b/cmake/treedata/optional/common/aml.txt
@@ -1,3 +1,2 @@
1xbmc/cores/RetroPlayer/process/amlogic cores/RetroPlayer/process/amlogic # AML 1xbmc/cores/RetroPlayer/process/amlogic cores/RetroPlayer/process/amlogic # AML
2xbmc/windowing/amlogic windowing/amlogic # AML 2xbmc/windowing/amlogic windowing/amlogic # AML
3
diff --git a/cmake/treedata/optional/common/gbm.txt b/cmake/treedata/optional/common/gbm.txt
index 196b323..5d898d4 100644
--- a/cmake/treedata/optional/common/gbm.txt
+++ b/cmake/treedata/optional/common/gbm.txt
@@ -1,2 +1,2 @@
1xbmc/cores/RetroPlayer/process/gbm cores/RetroPlayer/process/gbm # GBM 1xbmc/cores/RetroPlayer/process/gbm cores/RetroPlayer/process/gbm # GBM
2xbmc/windowing/gbm windowing/gbm # GBM \ No newline at end of file 2xbmc/windowing/gbm windowing/gbm # GBM
diff --git a/cmake/treedata/optional/common/wayland.txt b/cmake/treedata/optional/common/wayland.txt
index 4664b35..f8f77a6 100644
--- a/cmake/treedata/optional/common/wayland.txt
+++ b/cmake/treedata/optional/common/wayland.txt
@@ -1,3 +1,3 @@
1xbmc/windowing/wayland windowing/wayland # WAYLANDPP
2xbmc/cores/RetroPlayer/process/wayland cores/RetroPlayer/process/wayland # WAYLANDPP 1xbmc/cores/RetroPlayer/process/wayland cores/RetroPlayer/process/wayland # WAYLANDPP
3xbmc/cores/VideoPlayer/Process/wayland cores/VideoPlayer/Process/wayland # WAYLANDPP \ No newline at end of file 2xbmc/cores/VideoPlayer/Process/wayland cores/VideoPlayer/Process/wayland # WAYLANDPP
3xbmc/windowing/wayland windowing/wayland # WAYLANDPP
diff --git a/cmake/treedata/osx/subdirs.txt b/cmake/treedata/osx/subdirs.txt
index 166a966..943c366 100644
--- a/cmake/treedata/osx/subdirs.txt
+++ b/cmake/treedata/osx/subdirs.txt
@@ -1,14 +1,14 @@
1xbmc/platform/posix posix 1xbmc/cores/RetroPlayer/process/osx cores/RetroPlayer/process/osx
2xbmc/platform/posix/filesystem platform/posix/filesystem 2xbmc/cores/VideoPlayer/Process/osx cores/VideoPlayer/Process/osx
3xbmc/platform/posix/utils platform/posix/utils
4xbmc/platform/linux platform/linux
5xbmc/platform/linux/network platform/linux/network
6xbmc/platform/darwin platform/darwin 3xbmc/platform/darwin platform/darwin
4xbmc/platform/darwin/network platform/darwin/network
7xbmc/platform/darwin/osx platform/osx 5xbmc/platform/darwin/osx platform/osx
8xbmc/platform/darwin/osx/network platform/osx/network
9xbmc/platform/darwin/osx/peripherals platform/osx/peripherals 6xbmc/platform/darwin/osx/peripherals platform/osx/peripherals
10xbmc/platform/darwin/osx/powermanagement platform/darwin/osx/powermanagement 7xbmc/platform/darwin/osx/powermanagement platform/darwin/osx/powermanagement
11xbmc/platform/darwin/osx/storage platform/osx/storage 8xbmc/platform/darwin/storage platform/storage
9xbmc/platform/linux platform/linux
10xbmc/platform/linux/network platform/linux/network
11xbmc/platform/posix posix
12xbmc/platform/posix/filesystem platform/posix/filesystem
13xbmc/platform/posix/utils platform/posix/utils
12xbmc/windowing/osx windowing/osx 14xbmc/windowing/osx windowing/osx
13xbmc/cores/RetroPlayer/process/osx cores/RetroPlayer/process/osx
14xbmc/cores/VideoPlayer/Process/osx cores/VideoPlayer/Process/osx
diff --git a/cmake/treedata/windows/subdirs.txt b/cmake/treedata/windows/subdirs.txt
index a2c8c29..0078758 100644
--- a/cmake/treedata/windows/subdirs.txt
+++ b/cmake/treedata/windows/subdirs.txt
@@ -1,17 +1,17 @@
1xbmc/cores/RetroPlayer/process/windows cores/RetroPlayer/process/windows
2xbmc/cores/RetroPlayer/rendering/VideoShaders/windows cores/RetroPlayer/rendering/VideoShaders/windows
3xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows
4xbmc/input/touch input/touch
5xbmc/input/touch/generic input/touch/generic
6xbmc/network/mdns network/mdns
1xbmc/platform/win32 platform/win32 7xbmc/platform/win32 platform/win32
2xbmc/platform/win32/input platform/win32/input
3xbmc/platform/win32/filesystem platform/win32/filesystem 8xbmc/platform/win32/filesystem platform/win32/filesystem
9xbmc/platform/win32/input platform/win32/input
4xbmc/platform/win32/network platform/win32/network 10xbmc/platform/win32/network platform/win32/network
5xbmc/platform/win32/peripherals platform/win32/peripherals 11xbmc/platform/win32/peripherals platform/win32/peripherals
6xbmc/platform/win32/powermanagement platform/win32/powermanagement 12xbmc/platform/win32/powermanagement platform/win32/powermanagement
7xbmc/platform/win32/storage platform/win32/storage 13xbmc/platform/win32/storage platform/win32/storage
8xbmc/platform/win32/utils platform/win32/utils 14xbmc/platform/win32/utils platform/win32/utils
9xbmc/input/touch input/touch
10xbmc/input/touch/generic input/touch/generic
11xbmc/network/mdns network/mdns
12xbmc/rendering/dx rendering/dx 15xbmc/rendering/dx rendering/dx
13xbmc/threads/platform/win threads/win 16xbmc/threads/platform/win threads/win
14xbmc/windowing/windows windowing/windows 17xbmc/windowing/windows windowing/windows
15xbmc/cores/RetroPlayer/process/windows cores/RetroPlayer/process/windows
16xbmc/cores/RetroPlayer/rendering/VideoShaders/windows cores/RetroPlayer/rendering/VideoShaders/windows
17xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows
diff --git a/cmake/treedata/windowsstore/subdirs.txt b/cmake/treedata/windowsstore/subdirs.txt
index 604be08..0644fd2 100644
--- a/cmake/treedata/windowsstore/subdirs.txt
+++ b/cmake/treedata/windowsstore/subdirs.txt
@@ -1,3 +1,7 @@
1xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows
2xbmc/input/touch input/touch
3xbmc/input/touch/generic input/touch/generic
4xbmc/network/mdns network/mdns
1xbmc/platform/win10 platform/win10 5xbmc/platform/win10 platform/win10
2xbmc/platform/win10/filesystem platform/win10/filesystem 6xbmc/platform/win10/filesystem platform/win10/filesystem
3xbmc/platform/win10/network platform/win10/network 7xbmc/platform/win10/network platform/win10/network
@@ -6,10 +10,6 @@ xbmc/platform/win10/powermanagement platfrom/win10/powermanagement
6xbmc/platform/win10/storage platfrom/win10/storage 10xbmc/platform/win10/storage platfrom/win10/storage
7xbmc/platform/win32/filesystem platform/win32/filesystem 11xbmc/platform/win32/filesystem platform/win32/filesystem
8xbmc/platform/win32/utils platform/win32/utils 12xbmc/platform/win32/utils platform/win32/utils
9xbmc/input/touch input/touch
10xbmc/input/touch/generic input/touch/generic
11xbmc/network/mdns network/mdns
12xbmc/rendering/dx rendering/dx 13xbmc/rendering/dx rendering/dx
13xbmc/threads/platform/win threads/win 14xbmc/threads/platform/win threads/win
14xbmc/windowing/win10 windowing/win10 15xbmc/windowing/win10 windowing/win10
15xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows
diff --git a/version.txt b/version.txt
index c27a42c..80f3277 100644
--- a/version.txt
+++ b/version.txt
@@ -1,11 +1,12 @@
1APP_NAME Kodi 1APP_NAME Kodi
2COMPANY_NAME XBMC Foundation 2COMPANY_NAME XBMC Foundation
3COPYRIGHT_YEARS 2005-2018
3WEBSITE http://kodi.tv 4WEBSITE http://kodi.tv
4VERSION_MAJOR 18 5VERSION_MAJOR 19
5VERSION_MINOR 0 6VERSION_MINOR 0
6VERSION_TAG BETA4 7VERSION_TAG ALPHA1
7VERSION_CODE 17.99.804 8VERSION_CODE 18.9.701
8ADDON_API 17.9.804 9ADDON_API 18.9.701
9APP_PACKAGE org.xbmc.kodi 10APP_PACKAGE org.xbmc.kodi
10PACKAGE_IDENTITY XBMCFoundation.Kodi 11PACKAGE_IDENTITY XBMCFoundation.Kodi
11PACKAGE_PUBLISHER C62BD90A-CDD8-477F-96C3-B25992247B97 12PACKAGE_PUBLISHER C62BD90A-CDD8-477F-96C3-B25992247B97
diff --git a/xbmc/addons/AddonBindings.cmake b/xbmc/addons/AddonBindings.cmake
index 213b3e2..53a9801 100644
--- a/xbmc/addons/AddonBindings.cmake
+++ b/xbmc/addons/AddonBindings.cmake
@@ -6,7 +6,7 @@
6set(CORE_ADDON_BINDINGS_FILES 6set(CORE_ADDON_BINDINGS_FILES
7 ${CORE_SOURCE_DIR}/xbmc/cores/AudioEngine/Utils/AEChannelData.h 7 ${CORE_SOURCE_DIR}/xbmc/cores/AudioEngine/Utils/AEChannelData.h
8 ${CORE_SOURCE_DIR}/xbmc/filesystem/IFileTypes.h 8 ${CORE_SOURCE_DIR}/xbmc/filesystem/IFileTypes.h
9 ${CORE_SOURCE_DIR}/xbmc/input/ActionIDs.h 9 ${CORE_SOURCE_DIR}/xbmc/input/actions/ActionIDs.h
10 ${CORE_SOURCE_DIR}/xbmc/input/XBMC_vkeys.h 10 ${CORE_SOURCE_DIR}/xbmc/input/XBMC_vkeys.h
11) 11)
12 12
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h
index 42ce2e7..db39f86 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h
@@ -43,6 +43,20 @@
43 #define ATTRIBUTE_HIDDEN 43 #define ATTRIBUTE_HIDDEN
44#endif 44#endif
45 45
46#ifdef _MSC_VER
47 #define ATTRIBUTE_FORCEINLINE __forceinline
48#elif defined(__GNUC__)
49 #define ATTRIBUTE_FORCEINLINE inline __attribute__((__always_inline__))
50#elif defined(__CLANG__)
51 #if __has_attribute(__always_inline__)
52 #define ATTRIBUTE_FORCEINLINE inline __attribute__((__always_inline__))
53 #else
54 #define ATTRIBUTE_FORCEINLINE inline
55 #endif
56#else
57 #define ATTRIBUTE_FORCEINLINE inline
58#endif
59
46#include "versions.h" 60#include "versions.h"
47 61
48namespace kodi { namespace addon { class CAddonBase; }} 62namespace kodi { namespace addon { class CAddonBase; }}
@@ -179,6 +193,7 @@ typedef struct KodiToAddonFuncTable_Addon
179 ADDON_STATUS (*create_instance)(int instanceType, const char* instanceID, KODI_HANDLE instance, KODI_HANDLE* addonInstance, KODI_HANDLE parent); 193 ADDON_STATUS (*create_instance)(int instanceType, const char* instanceID, KODI_HANDLE instance, KODI_HANDLE* addonInstance, KODI_HANDLE parent);
180 void (*destroy_instance)(int instanceType, KODI_HANDLE instance); 194 void (*destroy_instance)(int instanceType, KODI_HANDLE instance);
181 ADDON_STATUS (*set_setting)(const char *settingName, const void *settingValue); 195 ADDON_STATUS (*set_setting)(const char *settingName, const void *settingValue);
196 ADDON_STATUS(*create_instance_ex)(int instanceType, const char* instanceID, KODI_HANDLE instance, KODI_HANDLE* addonInstance, KODI_HANDLE parent, const char* version);
182} KodiToAddonFuncTable_Addon; 197} KodiToAddonFuncTable_Addon;
183 198
184/* 199/*
@@ -237,6 +252,11 @@ public:
237 return ADDON_STATUS_NOT_IMPLEMENTED; 252 return ADDON_STATUS_NOT_IMPLEMENTED;
238 } 253 }
239 254
255 virtual ADDON_STATUS CreateInstanceEx(int instanceType, std::string instanceID, KODI_HANDLE instance, KODI_HANDLE& addonInstance, const std::string &version)
256 {
257 return CreateInstance(instanceType, instanceID, instance, addonInstance);
258 }
259
240 const ADDON_TYPE m_type; 260 const ADDON_TYPE m_type;
241}; 261};
242} /* namespace addon */ 262} /* namespace addon */
@@ -278,6 +298,9 @@ public:
278 CAddonBase::m_interface->toAddon->create_instance = ADDONBASE_CreateInstance; 298 CAddonBase::m_interface->toAddon->create_instance = ADDONBASE_CreateInstance;
279 CAddonBase::m_interface->toAddon->destroy_instance = ADDONBASE_DestroyInstance; 299 CAddonBase::m_interface->toAddon->destroy_instance = ADDONBASE_DestroyInstance;
280 CAddonBase::m_interface->toAddon->set_setting = ADDONBASE_SetSetting; 300 CAddonBase::m_interface->toAddon->set_setting = ADDONBASE_SetSetting;
301 // If version is present, we know that kodi has create_instance_ex implemented
302 if (!CAddonBase::m_strGlobalApiVersion.empty())
303 CAddonBase::m_interface->toAddon->create_instance_ex = ADDONBASE_CreateInstanceEx;
281 } 304 }
282 305
283 virtual ~CAddonBase() = default; 306 virtual ~CAddonBase() = default;
@@ -306,8 +329,14 @@ public:
306 return ADDON_STATUS_UNKNOWN; 329 return ADDON_STATUS_UNKNOWN;
307 } 330 }
308 331
332 virtual ADDON_STATUS CreateInstanceEx(int instanceType, std::string instanceID, KODI_HANDLE instance, KODI_HANDLE& addonInstance, const std::string &version)
333 {
334 return CreateInstance(instanceType, instanceID, instance, addonInstance);
335 }
336
309 /* Global variables of class */ 337 /* Global variables of class */
310 static AddonGlobalInterface* m_interface; // Interface function table to hold addresses on add-on and from kodi 338 static AddonGlobalInterface* m_interface; // Interface function table to hold addresses on add-on and from kodi
339 static std::string m_strGlobalApiVersion;
311 340
312/*private:*/ /* Needed public as long the old call functions becomes used! */ 341/*private:*/ /* Needed public as long the old call functions becomes used! */
313 static inline void ADDONBASE_Destroy() 342 static inline void ADDONBASE_Destroy()
@@ -325,16 +354,21 @@ public:
325 354
326 static inline ADDON_STATUS ADDONBASE_CreateInstance(int instanceType, const char* instanceID, KODI_HANDLE instance, KODI_HANDLE* addonInstance, KODI_HANDLE parent) 355 static inline ADDON_STATUS ADDONBASE_CreateInstance(int instanceType, const char* instanceID, KODI_HANDLE instance, KODI_HANDLE* addonInstance, KODI_HANDLE parent)
327 { 356 {
357 return ADDONBASE_CreateInstanceEx(instanceType, instanceID, instance, addonInstance, parent, "");
358 }
359
360 static inline ADDON_STATUS ADDONBASE_CreateInstanceEx(int instanceType, const char* instanceID, KODI_HANDLE instance, KODI_HANDLE* addonInstance, KODI_HANDLE parent, const char* version)
361 {
328 ADDON_STATUS status = ADDON_STATUS_NOT_IMPLEMENTED; 362 ADDON_STATUS status = ADDON_STATUS_NOT_IMPLEMENTED;
329 if (parent != nullptr) 363 if (parent != nullptr)
330 status = static_cast<IAddonInstance*>(parent)->CreateInstance(instanceType, instanceID, instance, *addonInstance); 364 status = static_cast<IAddonInstance*>(parent)->CreateInstanceEx(instanceType, instanceID, instance, *addonInstance, version);
331 if (status == ADDON_STATUS_NOT_IMPLEMENTED) 365 if (status == ADDON_STATUS_NOT_IMPLEMENTED)
332 status = CAddonBase::m_interface->addonBase->CreateInstance(instanceType, instanceID, instance, *addonInstance); 366 status = CAddonBase::m_interface->addonBase->CreateInstanceEx(instanceType, instanceID, instance, *addonInstance, version);
333 if (*addonInstance == nullptr) 367 if (*addonInstance == nullptr)
334 throw std::logic_error("kodi::addon::CAddonBase CreateInstance returns a empty instance pointer!"); 368 throw std::logic_error("kodi::addon::CAddonBase CreateInstanceEx returns a empty instance pointer!");
335 369
336 if (static_cast<::kodi::addon::IAddonInstance*>(*addonInstance)->m_type != instanceType) 370 if (static_cast<::kodi::addon::IAddonInstance*>(*addonInstance)->m_type != instanceType)
337 throw std::logic_error("kodi::addon::CAddonBase CreateInstance with difference on given and returned instance type!"); 371 throw std::logic_error("kodi::addon::CAddonBase CreateInstanceEx with difference on given and returned instance type!");
338 372
339 return status; 373 return status;
340 } 374 }
@@ -636,6 +670,11 @@ inline void* GetInterface(const std::string &name, const std::string &version)
636 kodi::addon::CAddonBase::m_interface->addonBase = new AddonClass; \ 670 kodi::addon::CAddonBase::m_interface->addonBase = new AddonClass; \
637 return kodi::addon::CAddonBase::m_interface->addonBase->Create(); \ 671 return kodi::addon::CAddonBase::m_interface->addonBase->Create(); \
638 } \ 672 } \
673 extern "C" __declspec(dllexport) ADDON_STATUS ADDON_CreateEx(KODI_HANDLE addonInterface, const char* globalApiVersion, void *unused) \
674 { \
675 kodi::addon::CAddonBase::m_strGlobalApiVersion = globalApiVersion; \
676 return ADDON_Create(addonInterface, unused); \
677 } \
639 extern "C" __declspec(dllexport) void ADDON_Destroy() \ 678 extern "C" __declspec(dllexport) void ADDON_Destroy() \
640 { \ 679 { \
641 kodi::addon::CAddonBase::ADDONBASE_Destroy(); \ 680 kodi::addon::CAddonBase::ADDONBASE_Destroy(); \
@@ -652,4 +691,10 @@ inline void* GetInterface(const std::string &name, const std::string &version)
652 { \ 691 { \
653 return kodi::addon::GetTypeVersion(type); \ 692 return kodi::addon::GetTypeVersion(type); \
654 } \ 693 } \
655 AddonGlobalInterface* kodi::addon::CAddonBase::m_interface = nullptr; 694 extern "C" __declspec(dllexport) const char* ADDON_GetTypeMinVersion(int type) \
695 { \
696 return kodi::addon::GetTypeMinVersion(type); \
697 } \
698 AddonGlobalInterface* kodi::addon::CAddonBase::m_interface = nullptr; \
699 std::string kodi::addon::CAddonBase::m_strGlobalApiVersion;
700
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h
index 30b6d89..a3b8bcb 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h
@@ -106,7 +106,7 @@ namespace gui
106 /// **Example:** 106 /// **Example:**
107 /// ~~~~~~~~~~~~~{.cpp} 107 /// ~~~~~~~~~~~~~{.cpp}
108 /// .. 108 /// ..
109 /// int wid = kodi::gui::GetCurrentWindowDialogId() 109 /// int wid = kodi::gui::GetCurrentWindowDialogId();
110 /// .. 110 /// ..
111 /// ~~~~~~~~~~~~~ 111 /// ~~~~~~~~~~~~~
112 /// 112 ///
@@ -130,7 +130,7 @@ namespace gui
130 /// **Example:** 130 /// **Example:**
131 /// ~~~~~~~~~~~~~{.cpp} 131 /// ~~~~~~~~~~~~~{.cpp}
132 /// .. 132 /// ..
133 /// int wid = kodi::gui::GetCurrentWindowId() 133 /// int wid = kodi::gui::GetCurrentWindowId();
134 /// .. 134 /// ..
135 /// ~~~~~~~~~~~~~ 135 /// ~~~~~~~~~~~~~
136 /// 136 ///
@@ -141,5 +141,35 @@ namespace gui
141 } 141 }
142 //-------------------------------------------------------------------------- 142 //--------------------------------------------------------------------------
143 143
144 //==========================================================================
145 ///
146 /// \ingroup cpp_kodi_gui
147 /// \brief To get hardware specific device context interface
148 ///
149 /// \return The currently active device context
150 ///
151 /// \warning This function is only be supported under Windows, on all other
152 /// OS it return `nullptr`!
153 ///
154 /// \note Returned Windows class pointer is `ID3D11DeviceContext1`.
155 ///
156 ///
157 ///-------------------------------------------------------------------------
158 ///
159 /// **Example:**
160 /// ~~~~~~~~~~~~~{.cpp}
161 /// #include <d3d11_1.h>
162 /// ..
163 /// ID3D11DeviceContext1* context = static_cast<ID3D11DeviceContext1*>(kodi::gui::GetHWContext());
164 /// ..
165 /// ~~~~~~~~~~~~~
166 ///
167 inline void* GetHWContext()
168 {
169 using namespace ::kodi::addon;
170 return CAddonBase::m_interface->toKodi->kodi_gui->general->get_hw_context(CAddonBase::m_interface->toKodi->kodiBase);
171 }
172 //--------------------------------------------------------------------------
173
144} /* namespace gui */ 174} /* namespace gui */
145} /* namespace kodi */ 175} /* namespace kodi */
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h
index f188f34..e7a8a05 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h
@@ -14,7 +14,7 @@
14#ifdef BUILD_KODI_ADDON 14#ifdef BUILD_KODI_ADDON
15#include "../ActionIDs.h" 15#include "../ActionIDs.h"
16#else 16#else
17#include "input/ActionIDs.h" 17#include "input/actions/ActionIDs.h"
18#endif 18#endif
19 19
20namespace kodi 20namespace kodi
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h
index 770a416..b8b4cbf 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h
@@ -26,6 +26,7 @@ typedef struct AddonToKodiFuncTable_kodi_gui_general
26 int (*get_video_resolution)(void* kodiBase); 26 int (*get_video_resolution)(void* kodiBase);
27 int (*get_current_window_dialog_id)(void* kodiBase); 27 int (*get_current_window_dialog_id)(void* kodiBase);
28 int (*get_current_window_id)(void* kodiBase); 28 int (*get_current_window_id)(void* kodiBase);
29 void* (*get_hw_context)(void* kodiBase);
29} AddonToKodiFuncTable_kodi_gui_general; 30} AddonToKodiFuncTable_kodi_gui_general;
30 31
31typedef struct AddonToKodiFuncTable_kodi_gui_control_button 32typedef struct AddonToKodiFuncTable_kodi_gui_control_button
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h
index 478f81b..4338606 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h
@@ -153,31 +153,42 @@ game_input_topology* GetTopology();
153void FreeTopology(game_input_topology* topology); 153void FreeTopology(game_input_topology* topology);
154 154
155/*! 155/*!
156 * \brief Set the layouts for known controllers
157 *
158 * \param controllers The controller layouts
159 * \param controller_count The number of items in the array
160 *
161 * After loading the input topology, the frontend will call this with
162 * controller layouts for all controllers discovered in the topology.
163 */
164void SetControllerLayouts(const game_controller_layout* controllers, unsigned int controller_count);
165
166/*!
156 * \brief Enable/disable keyboard input using the specified controller 167 * \brief Enable/disable keyboard input using the specified controller
157 * 168 *
158 * \param enable True to enable input, false otherwise 169 * \param enable True to enable input, false otherwise
159 * \param controller The controller info if enabling, or unused if disabling 170 * \param controller_id The controller ID if enabling, or unused if disabling
160 * 171 *
161 * \return True if keyboard input was enabled, false otherwise 172 * \return True if keyboard input was enabled, false otherwise
162 */ 173 */
163bool EnableKeyboard(bool enable, const game_controller* controller); 174bool EnableKeyboard(bool enable, const char* controller_id);
164 175
165/*! 176/*!
166 * \brief Enable/disable mouse input using the specified controller 177 * \brief Enable/disable mouse input using the specified controller
167 * 178 *
168 * \param enable True to enable input, false otherwise 179 * \param enable True to enable input, false otherwise
169 * \param controller The controller info if enabling, or unused if disabling 180 * \param controller_id The controller ID if enabling, or unused if disabling
170 * 181 *
171 * \return True if mouse input was enabled, false otherwise 182 * \return True if mouse input was enabled, false otherwise
172 */ 183 */
173bool EnableMouse(bool enable, const game_controller* controller); 184bool EnableMouse(bool enable, const char* controller_id);
174 185
175/*! 186/*!
176 * \brief Connect/disconnect a controller to a port on the virtual game console 187 * \brief Connect/disconnect a controller to a port on the virtual game console
177 * 188 *
178 * \param connect True to connect a controller, false to disconnect 189 * \param connect True to connect a controller, false to disconnect
179 * \param port_address The address of the port 190 * \param port_address The address of the port
180 * \param controller The controller info if connecting, or unused if disconnecting 191 * \param controller_id The controller ID if connecting, or unused if disconnecting
181 * \return True if the \p controller was (dis-)connected to the port, false otherwise 192 * \return True if the \p controller was (dis-)connected to the port, false otherwise
182 * 193 *
183 * The address is a string that allows traversal of the controller topology. 194 * The address is a string that allows traversal of the controller topology.
@@ -203,17 +214,17 @@ bool EnableMouse(bool enable, const game_controller* controller);
203 * To connect a multitap to the console's first port, the multitap's controller 214 * To connect a multitap to the console's first port, the multitap's controller
204 * info is set using the port address: 215 * info is set using the port address:
205 * 216 *
206 * 1 217 * /1
207 * 218 *
208 * To connect a SNES controller to the second port of the multitap, the 219 * To connect a SNES controller to the second port of the multitap, the
209 * controller info is next set using the address: 220 * controller info is next set using the address:
210 * 221 *
211 * 1/game.controller.multitap/2 222 * /1/game.controller.multitap/2
212 * 223 *
213 * Any attempts to connect a controller to a port on a disconnected multitap 224 * Any attempts to connect a controller to a port on a disconnected multitap
214 * will return false. 225 * will return false.
215 */ 226 */
216bool ConnectController(bool connect, const char* port_address, const game_controller* controller); 227bool ConnectController(bool connect, const char* port_address, const char* controller_id);
217 228
218/*! 229/*!
219 * \brief Notify the add-on of an input event 230 * \brief Notify the add-on of an input event
@@ -310,6 +321,7 @@ void __declspec(dllexport) get_addon(void* ptr)
310 pClient->toAddon.HasFeature = HasFeature; 321 pClient->toAddon.HasFeature = HasFeature;
311 pClient->toAddon.GetTopology = GetTopology; 322 pClient->toAddon.GetTopology = GetTopology;
312 pClient->toAddon.FreeTopology = FreeTopology; 323 pClient->toAddon.FreeTopology = FreeTopology;
324 pClient->toAddon.SetControllerLayouts = SetControllerLayouts;
313 pClient->toAddon.EnableKeyboard = EnableKeyboard; 325 pClient->toAddon.EnableKeyboard = EnableKeyboard;
314 pClient->toAddon.EnableMouse = EnableMouse; 326 pClient->toAddon.EnableMouse = EnableMouse;
315 pClient->toAddon.ConnectController = ConnectController; 327 pClient->toAddon.ConnectController = ConnectController;
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h
index e3187d2..ec9d472 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h
@@ -446,19 +446,27 @@ typedef enum GAME_PORT_TYPE
446 GAME_PORT_CONTROLLER, 446 GAME_PORT_CONTROLLER,
447} GAME_PORT_TYPE; 447} GAME_PORT_TYPE;
448 448
449typedef struct game_controller 449typedef struct game_controller_layout
450{ 450{
451 const char* controller_id; 451 char* controller_id;
452 bool provides_input; // False for multitaps 452 bool provides_input; // False for multitaps
453 char** digital_buttons;
453 unsigned int digital_button_count; 454 unsigned int digital_button_count;
455 char** analog_buttons;
454 unsigned int analog_button_count; 456 unsigned int analog_button_count;
457 char** analog_sticks;
455 unsigned int analog_stick_count; 458 unsigned int analog_stick_count;
459 char** accelerometers;
456 unsigned int accelerometer_count; 460 unsigned int accelerometer_count;
461 char** keys;
457 unsigned int key_count; 462 unsigned int key_count;
463 char** rel_pointers;
458 unsigned int rel_pointer_count; 464 unsigned int rel_pointer_count;
465 char** abs_pointers;
459 unsigned int abs_pointer_count; 466 unsigned int abs_pointer_count;
467 char** motors;
460 unsigned int motor_count; 468 unsigned int motor_count;
461} ATTRIBUTE_PACKED game_controller; 469} ATTRIBUTE_PACKED game_controller_layout;
462 470
463struct game_input_port; 471struct game_input_port;
464 472
@@ -680,9 +688,10 @@ typedef struct KodiToAddonFuncTable_Game
680 bool (__cdecl* HasFeature)(const char*, const char*); 688 bool (__cdecl* HasFeature)(const char*, const char*);
681 game_input_topology* (__cdecl* GetTopology)(); 689 game_input_topology* (__cdecl* GetTopology)();
682 void (__cdecl* FreeTopology)(game_input_topology*); 690 void (__cdecl* FreeTopology)(game_input_topology*);
683 bool (__cdecl* EnableKeyboard)(bool, const game_controller*); 691 void (__cdecl* SetControllerLayouts)(const game_controller_layout*, unsigned int);
684 bool (__cdecl* EnableMouse)(bool, const game_controller*); 692 bool (__cdecl* EnableKeyboard)(bool, const char*);
685 bool (__cdecl* ConnectController)(bool, const char*, const game_controller*); 693 bool (__cdecl* EnableMouse)(bool, const char*);
694 bool (__cdecl* ConnectController)(bool, const char*, const char*);
686 bool (__cdecl* InputEvent)(const game_input_event*); 695 bool (__cdecl* InputEvent)(const game_input_event*);
687 size_t (__cdecl* SerializeSize)(void); 696 size_t (__cdecl* SerializeSize)(void);
688 GAME_ERROR (__cdecl* Serialize)(uint8_t*, size_t); 697 GAME_ERROR (__cdecl* Serialize)(uint8_t*, size_t);
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h
index b518c28..2e6459b 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h
@@ -135,15 +135,15 @@ public:
135 // --- Input callbacks ------------------------------------------------------- 135 // --- Input callbacks -------------------------------------------------------
136 136
137 /*! 137 /*!
138 * \brief Notify the port of an input event 138 * \brief Notify the port of an input event
139 * 139 *
140 * \param event The input event 140 * \param event The input event
141 * 141 *
142 * Input events can arrive for the following sources: 142 * Input events can arrive for the following sources:
143 * - GAME_INPUT_EVENT_MOTOR 143 * - GAME_INPUT_EVENT_MOTOR
144 * 144 *
145 * \return true if the event was handled, false otherwise 145 * \return true if the event was handled, false otherwise
146 */ 146 */
147 bool InputEvent(const game_input_event& event) 147 bool InputEvent(const game_input_event& event)
148 { 148 {
149 return m_callbacks->toKodi.InputEvent(m_callbacks->toKodi.kodiInstance, &event); 149 return m_callbacks->toKodi.InputEvent(m_callbacks->toKodi.kodiInstance, &event);
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/CMakeLists.txt b/xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/CMakeLists.txt
index 939585c..ef2fa25 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/CMakeLists.txt
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/CMakeLists.txt
@@ -1,4 +1,5 @@
1set(HEADERS DllHelper.h ) 1set(HEADERS DllHelper.h
2 Time.h)
2 3
3if(NOT ENABLE_STATIC_LIBS) 4if(NOT ENABLE_STATIC_LIBS)
4 core_add_library(addons_kodi-addon-dev-kit_include_kodi_tools) 5 core_add_library(addons_kodi-addon-dev-kit_include_kodi_tools)
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/Time.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/Time.h
new file mode 100644
index 0000000..31c29fd
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/Time.h
@@ -0,0 +1,91 @@
1#pragma once
2/*
3 * Copyright (C) 2005-2019 Team Kodi
4 * Copyright (C) 2011-2012 Pulse-Eight Limited.
5 * This file is part of Kodi - https://kodi.tv
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 * See LICENSES/README.md for more information.
9 */
10
11#if defined(TARGET_DARWIN)
12#include <mach/mach_time.h>
13#include <CoreVideo/CVHostTime.h>
14#elif defined(TARGET_WINDOWS)
15#include <Windows.h>
16#include <time.h>
17#else
18#include <time.h>
19#endif
20
21namespace kodi
22{
23namespace time
24{
25
26//===============================================================================
27/// @brief Function to get current time in milliseconds
28///
29/// @return Current time in milliseconds as a double value
30///
31///
32/// -----------------------------------------------------------------------------
33///
34/// **Example:**
35/// ~~~~~~~~~~~~~{.cpp}
36///
37/// #include <kodi/tools/Time.h>
38///
39/// ...
40/// double time = kodi::time::GetTimeMs();
41/// ...
42/// ~~~~~~~~~~~~~
43///
44inline double GetTimeMs()
45{
46#if defined(TARGET_DARWIN)
47 return static_cast<double>(CVGetCurrentHostTime() / static_cast<double>(CVGetHostClockFrequency() * 0.001));
48#elif defined(TARGET_WINDOWS)
49 LARGE_INTEGER tickPerSecond;
50 LARGE_INTEGER tick;
51 if (QueryPerformanceFrequency(&tickPerSecond))
52 {
53 QueryPerformanceCounter(&tick);
54 return static_cast<double>(tick.QuadPart) / (tickPerSecond.QuadPart / 1000.0);
55 }
56 return 0.0;
57#else
58 timespec time;
59 clock_gettime(CLOCK_MONOTONIC, &time);
60 return static_cast<double>(time.tv_sec) * 1000.0 + time.tv_nsec / 1000000.0;
61#endif
62}
63//-------------------------------------------------------------------------------
64
65//===============================================================================
66/// @brief Function to get current time in seconds
67///
68/// @return Current time in seconds with the value type defined in the template
69///
70///
71/// -----------------------------------------------------------------------------
72///
73/// **Example:**
74/// ~~~~~~~~~~~~~{.cpp}
75///
76/// #include <kodi/tools/Time.h>
77///
78/// ...
79/// double time = kodi::time::GetTimeSec<double>();
80/// ...
81/// ~~~~~~~~~~~~~
82///
83template <class T>
84inline T GetTimeSec()
85{
86 return static_cast<T>(GetTimeMs()) / static_cast<T>(1000.0);
87}
88//-------------------------------------------------------------------------------
89
90} /* namespace time */
91} /* namespace kodi */
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h
index 5127f7e..a9f1798 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h
@@ -30,7 +30,7 @@
30 * overview. 30 * overview.
31 */ 31 */
32 32
33#define ADDON_GLOBAL_VERSION_MAIN "1.0.13" 33#define ADDON_GLOBAL_VERSION_MAIN "1.0.14"
34#define ADDON_GLOBAL_VERSION_MAIN_MIN "1.0.12" 34#define ADDON_GLOBAL_VERSION_MAIN_MIN "1.0.12"
35#define ADDON_GLOBAL_VERSION_MAIN_XML_ID "kodi.binary.global.main" 35#define ADDON_GLOBAL_VERSION_MAIN_XML_ID "kodi.binary.global.main"
36#define ADDON_GLOBAL_VERSION_MAIN_DEPENDS "AddonBase.h" \ 36#define ADDON_GLOBAL_VERSION_MAIN_DEPENDS "AddonBase.h" \
@@ -44,7 +44,7 @@
44#define ADDON_GLOBAL_VERSION_GENERAL_XML_ID "kodi.binary.global.general" 44#define ADDON_GLOBAL_VERSION_GENERAL_XML_ID "kodi.binary.global.general"
45#define ADDON_GLOBAL_VERSION_GENERAL_DEPENDS "General.h" 45#define ADDON_GLOBAL_VERSION_GENERAL_DEPENDS "General.h"
46 46
47#define ADDON_GLOBAL_VERSION_GUI "5.12.0" 47#define ADDON_GLOBAL_VERSION_GUI "5.12.1"
48#define ADDON_GLOBAL_VERSION_GUI_MIN "5.10.0" 48#define ADDON_GLOBAL_VERSION_GUI_MIN "5.10.0"
49#define ADDON_GLOBAL_VERSION_GUI_XML_ID "kodi.binary.global.gui" 49#define ADDON_GLOBAL_VERSION_GUI_XML_ID "kodi.binary.global.gui"
50#define ADDON_GLOBAL_VERSION_GUI_DEPENDS "libKODI_guilib.h" \ 50#define ADDON_GLOBAL_VERSION_GUI_DEPENDS "libKODI_guilib.h" \
@@ -75,8 +75,8 @@
75#define ADDON_INSTANCE_VERSION_AUDIOENCODER_XML_ID "kodi.binary.instance.audioencoder" 75#define ADDON_INSTANCE_VERSION_AUDIOENCODER_XML_ID "kodi.binary.instance.audioencoder"
76#define ADDON_INSTANCE_VERSION_AUDIOENCODER_DEPENDS "addon-instance/AudioEncoder.h" 76#define ADDON_INSTANCE_VERSION_AUDIOENCODER_DEPENDS "addon-instance/AudioEncoder.h"
77 77
78#define ADDON_INSTANCE_VERSION_GAME "1.0.38" 78#define ADDON_INSTANCE_VERSION_GAME "1.1.0"
79#define ADDON_INSTANCE_VERSION_GAME_MIN "1.0.38" 79#define ADDON_INSTANCE_VERSION_GAME_MIN "1.1.0"
80#define ADDON_INSTANCE_VERSION_GAME_XML_ID "kodi.binary.instance.game" 80#define ADDON_INSTANCE_VERSION_GAME_XML_ID "kodi.binary.instance.game"
81#define ADDON_INSTANCE_VERSION_GAME_DEPENDS "kodi_game_dll.h" \ 81#define ADDON_INSTANCE_VERSION_GAME_DEPENDS "kodi_game_dll.h" \
82 "kodi_game_types.h" \ 82 "kodi_game_types.h" \
@@ -98,8 +98,8 @@
98#define ADDON_INSTANCE_VERSION_PERIPHERAL_DEPENDS "addon-instance/Peripheral.h" \ 98#define ADDON_INSTANCE_VERSION_PERIPHERAL_DEPENDS "addon-instance/Peripheral.h" \
99 "addon-instance/PeripheralUtils.h" 99 "addon-instance/PeripheralUtils.h"
100 100
101#define ADDON_INSTANCE_VERSION_PVR "5.10.3" 101#define ADDON_INSTANCE_VERSION_PVR "6.0.0"
102#define ADDON_INSTANCE_VERSION_PVR_MIN "5.10.0" 102#define ADDON_INSTANCE_VERSION_PVR_MIN "6.0.0"
103#define ADDON_INSTANCE_VERSION_PVR_XML_ID "kodi.binary.instance.pvr" 103#define ADDON_INSTANCE_VERSION_PVR_XML_ID "kodi.binary.instance.pvr"
104#define ADDON_INSTANCE_VERSION_PVR_DEPENDS "xbmc_pvr_dll.h" \ 104#define ADDON_INSTANCE_VERSION_PVR_DEPENDS "xbmc_pvr_dll.h" \
105 "xbmc_pvr_types.h" \ 105 "xbmc_pvr_types.h" \
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h
index e9e7d9a..ce2bc98 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h
@@ -15,6 +15,7 @@ extern "C" {
15#endif 15#endif
16 16
17 ADDON_STATUS __declspec(dllexport) ADDON_Create(void *callbacks, void* props); 17 ADDON_STATUS __declspec(dllexport) ADDON_Create(void *callbacks, void* props);
18 ADDON_STATUS __declspec(dllexport) ADDON_CreateEx(void *callbacks, const char* globalApiVersion, void* props);
18 void __declspec(dllexport) ADDON_Destroy(); 19 void __declspec(dllexport) ADDON_Destroy();
19 ADDON_STATUS __declspec(dllexport) ADDON_GetStatus(); 20 ADDON_STATUS __declspec(dllexport) ADDON_GetStatus();
20 ADDON_STATUS __declspec(dllexport) ADDON_SetSetting(const char *settingName, const void *settingValue); 21 ADDON_STATUS __declspec(dllexport) ADDON_SetSetting(const char *settingName, const void *settingValue);
@@ -22,6 +23,10 @@ extern "C" {
22 { 23 {
23 return kodi::addon::GetTypeVersion(type); 24 return kodi::addon::GetTypeVersion(type);
24 } 25 }
26 __declspec(dllexport) const char* ADDON_GetTypeMinVersion(int type)
27 {
28 return kodi::addon::GetTypeMinVersion(type);
29 }
25 30
26#ifdef __cplusplus 31#ifdef __cplusplus
27}; 32};
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h
index 7b11ed8..30503d5 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h
@@ -100,7 +100,6 @@ extern "C" {
100 time_t firstAired; /*!< @brief (optional) first aired in UTC */ 100 time_t firstAired; /*!< @brief (optional) first aired in UTC */
101 int iParentalRating; /*!< @brief (optional) parental rating */ 101 int iParentalRating; /*!< @brief (optional) parental rating */
102 int iStarRating; /*!< @brief (optional) star rating */ 102 int iStarRating; /*!< @brief (optional) star rating */
103 bool bNotify; /*!< @brief (optional) notify the user when this event starts */
104 int iSeriesNumber; /*!< @brief (optional) series number */ 103 int iSeriesNumber; /*!< @brief (optional) series number */
105 int iEpisodeNumber; /*!< @brief (optional) episode number */ 104 int iEpisodeNumber; /*!< @brief (optional) episode number */
106 int iEpisodePartNumber; /*!< @brief (optional) episode part number */ 105 int iEpisodePartNumber; /*!< @brief (optional) episode part number */
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h
index 27fa800..26e9099 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h
@@ -78,14 +78,14 @@ extern "C"
78 * Request the EPG for a channel from the backend. 78 * Request the EPG for a channel from the backend.
79 * EPG entries are added to Kodi by calling TransferEpgEntry() on the callback. 79 * EPG entries are added to Kodi by calling TransferEpgEntry() on the callback.
80 * @param handle Handle to pass to the callback method. 80 * @param handle Handle to pass to the callback method.
81 * @param channel The channel to get the EPG table for. 81 * @param iChannelUid The UID of the channel to get the EPG table for.
82 * @param iStart Get events after this time (UTC). 82 * @param iStart Get events after this time (UTC).
83 * @param iEnd Get events before this time (UTC). 83 * @param iEnd Get events before this time (UTC).
84 * @return PVR_ERROR_NO_ERROR if the table has been fetched successfully. 84 * @return PVR_ERROR_NO_ERROR if the table has been fetched successfully.
85 * @remarks Required if bSupportsEPG is set to true. 85 * @remarks Required if bSupportsEPG is set to true.
86 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 86 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
87 */ 87 */
88 PVR_ERROR GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL& channel, time_t iStart, time_t iEnd); 88 PVR_ERROR GetEPGForChannel(ADDON_HANDLE handle, int iChannelUid, time_t iStart, time_t iEnd);
89 89
90 /* 90 /*
91 * Check if the given EPG tag can be recorded. 91 * Check if the given EPG tag can be recorded.
@@ -413,6 +413,7 @@ extern "C"
413 * @param channel The channel to stream. 413 * @param channel The channel to stream.
414 * @return True if the stream has been opened successfully, false otherwise. 414 * @return True if the stream has been opened successfully, false otherwise.
415 * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true. 415 * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true.
416 * CloseLiveStream() will always be called by Kodi prior to calling this function.
416 * Return false if this add-on won't provide this function. 417 * Return false if this add-on won't provide this function.
417 */ 418 */
418 bool OpenLiveStream(const PVR_CHANNEL& channel); 419 bool OpenLiveStream(const PVR_CHANNEL& channel);
@@ -497,7 +498,7 @@ extern "C"
497 * Get the stream properties of the stream that's currently being read. 498 * Get the stream properties of the stream that's currently being read.
498 * @param pProperties The properties of the currently playing stream. 499 * @param pProperties The properties of the currently playing stream.
499 * @return PVR_ERROR_NO_ERROR if the properties have been fetched successfully. 500 * @return PVR_ERROR_NO_ERROR if the properties have been fetched successfully.
500 * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true. 501 * @remarks Required if bHandlesDemuxing is set to true.
501 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 502 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
502 */ 503 */
503 PVR_ERROR GetStreamProperties(PVR_STREAM_PROPERTIES* pProperties); 504 PVR_ERROR GetStreamProperties(PVR_STREAM_PROPERTIES* pProperties);
@@ -523,6 +524,7 @@ extern "C"
523 * @param recording The recording to open. 524 * @param recording The recording to open.
524 * @return True if the stream has been opened successfully, false otherwise. 525 * @return True if the stream has been opened successfully, false otherwise.
525 * @remarks Optional, and only used if bSupportsRecordings is set to true. 526 * @remarks Optional, and only used if bSupportsRecordings is set to true.
527 * CloseRecordedStream() will always be called by Kodi prior to calling this function.
526 * Return false if this add-on won't provide this function. 528 * Return false if this add-on won't provide this function.
527 */ 529 */
528 bool OpenRecordedStream(const PVR_RECORDING& recording); 530 bool OpenRecordedStream(const PVR_RECORDING& recording);
@@ -639,16 +641,17 @@ extern "C"
639 void SetSpeed(int speed); 641 void SetSpeed(int speed);
640 642
641 /*! 643 /*!
642 * Get the hostname of the pvr backend server 644 * Notify the pvr addon/demuxer that Kodi wishes to fill demux queue
643 * @return hostname as ip address or alias. If backend does not utilize a server, return empty string. 645 * @param mode The requested filling mode
646 * @remarks Optional, and only used if addon has its own demuxer.
644 */ 647 */
645 const char* GetBackendHostname(); 648 void FillBuffer(bool mode);
646 649
647 /*! 650 /*!
648 * Check if timeshift is active 651 * Get the hostname of the pvr backend server
649 * @return true if timeshift is active 652 * @return hostname as ip address or alias. If backend does not utilize a server, return empty string.
650 */ 653 */
651 bool IsTimeshifting(); 654 const char* GetBackendHostname();
652 655
653 /*! 656 /*!
654 * Check for real-time streaming 657 * Check for real-time streaming
@@ -751,6 +754,7 @@ extern "C"
751 pClient->toAddon.CanSeekStream = CanSeekStream; 754 pClient->toAddon.CanSeekStream = CanSeekStream;
752 pClient->toAddon.SeekTime = SeekTime; 755 pClient->toAddon.SeekTime = SeekTime;
753 pClient->toAddon.SetSpeed = SetSpeed; 756 pClient->toAddon.SetSpeed = SetSpeed;
757 pClient->toAddon.FillBuffer = FillBuffer;
754 758
755 pClient->toAddon.OpenRecordedStream = OpenRecordedStream; 759 pClient->toAddon.OpenRecordedStream = OpenRecordedStream;
756 pClient->toAddon.CloseRecordedStream = CloseRecordedStream; 760 pClient->toAddon.CloseRecordedStream = CloseRecordedStream;
@@ -765,7 +769,6 @@ extern "C"
765 769
766 pClient->toAddon.GetBackendHostname = GetBackendHostname; 770 pClient->toAddon.GetBackendHostname = GetBackendHostname;
767 771
768 pClient->toAddon.IsTimeshifting = IsTimeshifting;
769 pClient->toAddon.IsRealTimeStream = IsRealTimeStream; 772 pClient->toAddon.IsRealTimeStream = IsRealTimeStream;
770 773
771 pClient->toAddon.SetEPGTimeFrame = SetEPGTimeFrame; 774 pClient->toAddon.SetEPGTimeFrame = SetEPGTimeFrame;
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h
index f1562b6..999d3b3 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h
@@ -55,8 +55,8 @@ struct DemuxPacket;
55#define PVR_ADDON_TIMERTYPE_ARRAY_SIZE 32 55#define PVR_ADDON_TIMERTYPE_ARRAY_SIZE 32
56#define PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE 512 56#define PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE 512
57#define PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE_SMALL 128 57#define PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE_SMALL 128
58#define PVR_ADDON_TIMERTYPE_STRING_LENGTH 64 58#define PVR_ADDON_TIMERTYPE_STRING_LENGTH 128
59#define PVR_ADDON_ATTRIBUTE_DESC_LENGTH 64 59#define PVR_ADDON_ATTRIBUTE_DESC_LENGTH 128
60#define PVR_ADDON_ATTRIBUTE_VALUES_ARRAY_SIZE 512 60#define PVR_ADDON_ATTRIBUTE_VALUES_ARRAY_SIZE 512
61#define PVR_ADDON_DESCRAMBLE_INFO_STRING_LENGTH 64 61#define PVR_ADDON_DESCRAMBLE_INFO_STRING_LENGTH 64
62 62
@@ -154,6 +154,7 @@ extern "C" {
154 const unsigned int PVR_TIMER_TYPE_SUPPORTS_ANY_CHANNEL = 0x01000000; /*!< @brief this type supports 'any channel', for example when defining a timer rule that should match any channel instaed of a particular channel */ 154 const unsigned int PVR_TIMER_TYPE_SUPPORTS_ANY_CHANNEL = 0x01000000; /*!< @brief this type supports 'any channel', for example when defining a timer rule that should match any channel instaed of a particular channel */
155 const unsigned int PVR_TIMER_TYPE_REQUIRES_EPG_SERIESLINK_ON_CREATE = 0x02000000; /*!< @brief this type should not appear on any create menus which don't provide an associated EPG tag with a series link */ 155 const unsigned int PVR_TIMER_TYPE_REQUIRES_EPG_SERIESLINK_ON_CREATE = 0x02000000; /*!< @brief this type should not appear on any create menus which don't provide an associated EPG tag with a series link */
156 const unsigned int PVR_TIMER_TYPE_SUPPORTS_READONLY_DELETE = 0x04000000; /*!< @brief this type allows deletion of an otherwise read-only timer */ 156 const unsigned int PVR_TIMER_TYPE_SUPPORTS_READONLY_DELETE = 0x04000000; /*!< @brief this type allows deletion of an otherwise read-only timer */
157 const unsigned int PVR_TIMER_TYPE_IS_REMINDER = 0x08000000; /*!< @brief timers of this type do trigger a reminder if time is up by calling the Kodi callback 'ReminderNotification'. */
157 158
158 /*! 159 /*!
159 * @brief PVR timer weekdays (PVR_TIMER.iWeekdays values) 160 * @brief PVR timer weekdays (PVR_TIMER.iWeekdays values)
@@ -310,12 +311,10 @@ extern "C" {
310 bool bSupportsRecordingsRename; /*!< @brief true if the backend supports renaming recordings. */ 311 bool bSupportsRecordingsRename; /*!< @brief true if the backend supports renaming recordings. */
311 bool bSupportsRecordingsLifetimeChange; /*!< @brief true if the backend supports changing lifetime for recordings. */ 312 bool bSupportsRecordingsLifetimeChange; /*!< @brief true if the backend supports changing lifetime for recordings. */
312 bool bSupportsDescrambleInfo; /*!< @brief true if the backend supports descramble information for playing channels. */ 313 bool bSupportsDescrambleInfo; /*!< @brief true if the backend supports descramble information for playing channels. */
314 bool bSupportsAsyncEPGTransfer; /*!< @brief true if this addon-on supports asynchronous transfer of epg events to Kodi using the callback function EpgEventStateChange. */
313 315
314 unsigned int iRecordingsLifetimesSize; /*!< @brief (required) Count of possible values for PVR_RECORDING.iLifetime. 0 means lifetime is not supported for recordings or no own value definition wanted, but to use Kodi defaults of 1..365. */ 316 unsigned int iRecordingsLifetimesSize; /*!< @brief (required) Count of possible values for PVR_RECORDING.iLifetime. 0 means lifetime is not supported for recordings or no own value definition wanted, but to use Kodi defaults of 1..365. */
315 PVR_ATTRIBUTE_INT_VALUE recordingsLifetimeValues[PVR_ADDON_ATTRIBUTE_VALUES_ARRAY_SIZE]; /*!< @brief (optional) Array containing the possible values for PVR_RECORDING.iLifetime. Must be filled if iLifetimesSize > 0 */ 317 PVR_ATTRIBUTE_INT_VALUE recordingsLifetimeValues[PVR_ADDON_ATTRIBUTE_VALUES_ARRAY_SIZE]; /*!< @brief (optional) Array containing the possible values for PVR_RECORDING.iLifetime. Must be filled if iLifetimesSize > 0 */
316
317 // TODO: cleanup: move this member up after the other bools with the next incompatible pvr addon api change.
318 bool bSupportsAsyncEPGTransfer; /*!< @brief true if this addon-on supports asynchronous transfer of epg events to Kodi using the callback function EpgEventStateChange. */
319 } ATTRIBUTE_PACKED PVR_ADDON_CAPABILITIES; 318 } ATTRIBUTE_PACKED PVR_ADDON_CAPABILITIES;
320 319
321 /*! 320 /*!
@@ -402,6 +401,7 @@ extern "C" {
402 unsigned int iEncryptionSystem; /*!< @brief (optional) the encryption ID or CaID of this channel */ 401 unsigned int iEncryptionSystem; /*!< @brief (optional) the encryption ID or CaID of this channel */
403 char strIconPath[PVR_ADDON_URL_STRING_LENGTH]; /*!< @brief (optional) path to the channel icon (if present) */ 402 char strIconPath[PVR_ADDON_URL_STRING_LENGTH]; /*!< @brief (optional) path to the channel icon (if present) */
404 bool bIsHidden; /*!< @brief (optional) true if this channel is marked as hidden */ 403 bool bIsHidden; /*!< @brief (optional) true if this channel is marked as hidden */
404 bool bHasArchive; /*!< @brief (optional) true if this channel has a server-side back buffer */
405 } ATTRIBUTE_PACKED PVR_CHANNEL; 405 } ATTRIBUTE_PACKED PVR_CHANNEL;
406 406
407 typedef struct PVR_CHANNEL_GROUP 407 typedef struct PVR_CHANNEL_GROUP
@@ -634,7 +634,7 @@ extern "C" {
634 const char* (__cdecl* GetConnectionString)(void); 634 const char* (__cdecl* GetConnectionString)(void);
635 PVR_ERROR (__cdecl* GetDriveSpace)(long long*, long long*); 635 PVR_ERROR (__cdecl* GetDriveSpace)(long long*, long long*);
636 PVR_ERROR (__cdecl* MenuHook)(const PVR_MENUHOOK&, const PVR_MENUHOOK_DATA&); 636 PVR_ERROR (__cdecl* MenuHook)(const PVR_MENUHOOK&, const PVR_MENUHOOK_DATA&);
637 PVR_ERROR (__cdecl* GetEPGForChannel)(ADDON_HANDLE, const PVR_CHANNEL&, time_t, time_t); 637 PVR_ERROR (__cdecl* GetEPGForChannel)(ADDON_HANDLE, int, time_t, time_t);
638 PVR_ERROR (__cdecl* IsEPGTagRecordable)(const EPG_TAG*, bool*); 638 PVR_ERROR (__cdecl* IsEPGTagRecordable)(const EPG_TAG*, bool*);
639 PVR_ERROR (__cdecl* IsEPGTagPlayable)(const EPG_TAG*, bool*); 639 PVR_ERROR (__cdecl* IsEPGTagPlayable)(const EPG_TAG*, bool*);
640 PVR_ERROR (__cdecl* GetEPGTagEdl)(const EPG_TAG*, PVR_EDL_ENTRY[], int*); 640 PVR_ERROR (__cdecl* GetEPGTagEdl)(const EPG_TAG*, PVR_EDL_ENTRY[], int*);
@@ -690,8 +690,8 @@ extern "C" {
690 bool (__cdecl* CanSeekStream)(void); 690 bool (__cdecl* CanSeekStream)(void);
691 bool (__cdecl* SeekTime)(double, bool, double*); 691 bool (__cdecl* SeekTime)(double, bool, double*);
692 void (__cdecl* SetSpeed)(int); 692 void (__cdecl* SetSpeed)(int);
693 void (__cdecl* FillBuffer)(bool);
693 const char* (__cdecl* GetBackendHostname)(void); 694 const char* (__cdecl* GetBackendHostname)(void);
694 bool (__cdecl* IsTimeshifting)(void);
695 bool (__cdecl* IsRealTimeStream)(void); 695 bool (__cdecl* IsRealTimeStream)(void);
696 PVR_ERROR (__cdecl* SetEPGTimeFrame)(int); 696 PVR_ERROR (__cdecl* SetEPGTimeFrame)(int);
697 void (__cdecl* OnSystemSleep)(void); 697 void (__cdecl* OnSystemSleep)(void);
diff --git a/xbmc/cores/VideoPlayer/Interface/Addon/DemuxPacket.h b/xbmc/cores/VideoPlayer/Interface/Addon/DemuxPacket.h
index 5aed400..f8ceab2 100644
--- a/xbmc/cores/VideoPlayer/Interface/Addon/DemuxPacket.h
+++ b/xbmc/cores/VideoPlayer/Interface/Addon/DemuxPacket.h
@@ -24,7 +24,7 @@ typedef struct DemuxPacket
24 uint8_t *pData = nullptr; 24 uint8_t *pData = nullptr;
25 int iSize = 0; 25 int iSize = 0;
26 int iStreamId = -1; 26 int iStreamId = -1;
27 int64_t demuxerId; // id of the demuxer that created the packet 27 int64_t demuxerId = -1; // id of the demuxer that created the packet
28 int iGroupId = -1; // the group this data belongs to, used to group data from different streams together 28 int iGroupId = -1; // the group this data belongs to, used to group data from different streams together
29 29
30 void *pSideData = nullptr; 30 void *pSideData = nullptr;
diff --git a/xbmc/filesystem/IFileTypes.h b/xbmc/filesystem/IFileTypes.h
index 7470b15..6817752 100644
--- a/xbmc/filesystem/IFileTypes.h
+++ b/xbmc/filesystem/IFileTypes.h
@@ -51,7 +51,7 @@ struct SCacheStatus
51 uint64_t forward; /**< number of bytes cached forward of current position */ 51 uint64_t forward; /**< number of bytes cached forward of current position */
52 unsigned maxrate; /**< maximum number of bytes per second cache is allowed to fill */ 52 unsigned maxrate; /**< maximum number of bytes per second cache is allowed to fill */
53 unsigned currate; /**< average read rate from source file since last position change */ 53 unsigned currate; /**< average read rate from source file since last position change */
54 float level; /**< cache level (0.0 - 1.0) */ 54 bool lowspeed; /**< cache low speed condition detected? */
55}; 55};
56 56
57typedef enum { 57typedef enum {
diff --git a/xbmc/input/actions/ActionIDs.h b/xbmc/input/actions/ActionIDs.h
new file mode 100644
index 0000000..9fd9d80
--- /dev/null
+++ b/xbmc/input/actions/ActionIDs.h
@@ -0,0 +1,312 @@
1/*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#pragma once
10
11/**
12 * \defgroup kodi_key_action_ids Action Id's
13 * \ingroup python_xbmcgui_window_cb
14 * \ingroup python_xbmcgui_action
15 * @{
16 * @brief Actions that we have defined.
17 */
18#define ACTION_NONE 0
19#define ACTION_MOVE_LEFT 1
20#define ACTION_MOVE_RIGHT 2
21#define ACTION_MOVE_UP 3
22#define ACTION_MOVE_DOWN 4
23#define ACTION_PAGE_UP 5
24#define ACTION_PAGE_DOWN 6
25#define ACTION_SELECT_ITEM 7
26#define ACTION_HIGHLIGHT_ITEM 8
27#define ACTION_PARENT_DIR 9
28#define ACTION_PREVIOUS_MENU 10
29#define ACTION_SHOW_INFO 11
30
31#define ACTION_PAUSE 12
32#define ACTION_STOP 13
33#define ACTION_NEXT_ITEM 14
34#define ACTION_PREV_ITEM 15
35#define ACTION_FORWARD 16 //!< Can be used to specify specific action in a window, Playback control is handled in ACTION_PLAYER_*
36#define ACTION_REWIND 17 //!< Can be used to specify specific action in a window, Playback control is handled in ACTION_PLAYER_*
37
38#define ACTION_SHOW_GUI 18 //!< toggle between GUI and movie or GUI and visualisation.
39#define ACTION_ASPECT_RATIO 19 //!< toggle quick-access zoom modes. Can b used in videoFullScreen.zml window id=2005
40#define ACTION_STEP_FORWARD 20 //!< seek +1% in the movie. Can b used in videoFullScreen.xml window id=2005
41#define ACTION_STEP_BACK 21 //!< seek -1% in the movie. Can b used in videoFullScreen.xml window id=2005
42#define ACTION_BIG_STEP_FORWARD 22 //!< seek +10% in the movie. Can b used in videoFullScreen.xml window id=2005
43#define ACTION_BIG_STEP_BACK 23 //!< seek -10% in the movie. Can b used in videoFullScreen.xml window id=2005
44#define ACTION_SHOW_OSD 24 //!< show/hide OSD. Can b used in videoFullScreen.xml window id=2005
45#define ACTION_SHOW_SUBTITLES 25 //!< turn subtitles on/off. Can b used in videoFullScreen.xml window id=2005
46#define ACTION_NEXT_SUBTITLE 26 //!< switch to next subtitle of movie. Can b used in videoFullScreen.xml window id=2005
47#define ACTION_BROWSE_SUBTITLE 247 //!< Browse for subtitle. Can be used in videofullscreen
48#define ACTION_PLAYER_DEBUG 27 //!< show debug info for VideoPlayer
49#define ACTION_NEXT_PICTURE 28 //!< show next picture of slideshow. Can b used in slideshow.xml window id=2007
50#define ACTION_PREV_PICTURE 29 //!< show previous picture of slideshow. Can b used in slideshow.xml window id=2007
51#define ACTION_ZOOM_OUT 30 //!< zoom in picture during slideshow. Can b used in slideshow.xml window id=2007
52#define ACTION_ZOOM_IN 31 //!< zoom out picture during slideshow. Can b used in slideshow.xml window id=2007
53#define ACTION_TOGGLE_SOURCE_DEST 32 //!< used to toggle between source view and destination view. Can be used in myfiles.xml window id=3
54#define ACTION_SHOW_PLAYLIST 33 //!< used to toggle between current view and playlist view. Can b used in all mymusic xml files
55#define ACTION_QUEUE_ITEM 34 //!< used to queue a item to the playlist. Can b used in all mymusic xml files
56#define ACTION_REMOVE_ITEM 35 //!< not used anymore
57#define ACTION_SHOW_FULLSCREEN 36 //!< not used anymore
58#define ACTION_ZOOM_LEVEL_NORMAL 37 //!< zoom 1x picture during slideshow. Can b used in slideshow.xml window id=2007
59#define ACTION_ZOOM_LEVEL_1 38 //!< zoom 2x picture during slideshow. Can b used in slideshow.xml window id=2007
60#define ACTION_ZOOM_LEVEL_2 39 //!< zoom 3x picture during slideshow. Can b used in slideshow.xml window id=2007
61#define ACTION_ZOOM_LEVEL_3 40 //!< zoom 4x picture during slideshow. Can b used in slideshow.xml window id=2007
62#define ACTION_ZOOM_LEVEL_4 41 //!< zoom 5x picture during slideshow. Can b used in slideshow.xml window id=2007
63#define ACTION_ZOOM_LEVEL_5 42 //!< zoom 6x picture during slideshow. Can b used in slideshow.xml window id=2007
64#define ACTION_ZOOM_LEVEL_6 43 //!< zoom 7x picture during slideshow. Can b used in slideshow.xml window id=2007
65#define ACTION_ZOOM_LEVEL_7 44 //!< zoom 8x picture during slideshow. Can b used in slideshow.xml window id=2007
66#define ACTION_ZOOM_LEVEL_8 45 //!< zoom 9x picture during slideshow. Can b used in slideshow.xml window id=2007
67#define ACTION_ZOOM_LEVEL_9 46 //!< zoom 10x picture during slideshow. Can b used in slideshow.xml window id=2007
68
69#define ACTION_CALIBRATE_SWAP_ARROWS 47 //!< select next arrow. Can b used in: settingsScreenCalibration.xml windowid=11
70#define ACTION_CALIBRATE_RESET 48 //!< reset calibration to defaults. Can b used in: `settingsScreenCalibration.xml` windowid=11/settingsUICalibration.xml windowid=10
71#define ACTION_ANALOG_MOVE 49 //!< analog thumbstick move. Can b used in: `slideshow.xml` windowid=2007/settingsScreenCalibration.xml windowid=11/settingsUICalibration.xml windowid=10
72 //!< @note see also ACTION_ANALOG_MOVE_X_LEFT, ACTION_ANALOG_MOVE_X_RIGHT, ACTION_ANALOG_MOVE_Y_UP, ACTION_ANALOG_MOVE_Y_DOWN
73#define ACTION_ROTATE_PICTURE_CW 50 //!< rotate current picture clockwise during slideshow. Can be used in slideshow.xml window id=2007
74#define ACTION_ROTATE_PICTURE_CCW 51 //!< rotate current picture counterclockwise during slideshow. Can be used in slideshow.xml window id=2007
75
76#define ACTION_SUBTITLE_DELAY_MIN 52 //!< Decrease subtitle/movie Delay. Can b used in videoFullScreen.xml window id=2005
77#define ACTION_SUBTITLE_DELAY_PLUS 53 //!< Increase subtitle/movie Delay. Can b used in videoFullScreen.xml window id=2005
78#define ACTION_AUDIO_DELAY_MIN 54 //!< Increase avsync delay. Can b used in videoFullScreen.xml window id=2005
79#define ACTION_AUDIO_DELAY_PLUS 55 //!< Decrease avsync delay. Can b used in videoFullScreen.xml window id=2005
80#define ACTION_AUDIO_NEXT_LANGUAGE 56 //!< Select next language in movie. Can b used in videoFullScreen.xml window id=2005
81#define ACTION_CHANGE_RESOLUTION 57 //!< switch 2 next resolution. Can b used during screen calibration settingsScreenCalibration.xml windowid=11
82
83#define REMOTE_0 58 //!< remote keys 0-9. are used by multiple windows
84#define REMOTE_1 59 //!< for example in videoFullScreen.xml window id=2005 you can
85#define REMOTE_2 60 //!< enter time (mmss) to jump to particular point in the movie
86#define REMOTE_3 61
87#define REMOTE_4 62 //!< with spincontrols you can enter 3digit number to quickly set
88#define REMOTE_5 63 //!< spincontrol to desired value
89#define REMOTE_6 64
90#define REMOTE_7 65
91#define REMOTE_8 66
92#define REMOTE_9 67
93
94#define ACTION_PLAYER_PROCESS_INFO 69 //!< show player process info (video decoder, pixel format, pvr signal strength and the like
95#define ACTION_PLAYER_PROGRAM_SELECT 70
96#define ACTION_PLAYER_RESOLUTION_SELECT 71
97#define ACTION_SMALL_STEP_BACK 76 //!< jumps a few seconds back during playback of movie. Can b used in videoFullScreen.xml window id=2005
98
99#define ACTION_PLAYER_FORWARD 77 //!< FF in current file played. global action, can be used anywhere
100#define ACTION_PLAYER_REWIND 78 //!< RW in current file played. global action, can be used anywhere
101#define ACTION_PLAYER_PLAY 79 //!< Play current song. Unpauses song and sets playspeed to 1x. global action, can be used anywhere
102
103#define ACTION_DELETE_ITEM 80 //!< delete current selected item. Can be used in myfiles.xml window id=3 and in myvideoTitle.xml window id=25
104#define ACTION_COPY_ITEM 81 //!< copy current selected item. Can be used in myfiles.xml window id=3
105#define ACTION_MOVE_ITEM 82 //!< move current selected item. Can be used in myfiles.xml window id=3
106#define ACTION_TAKE_SCREENSHOT 85 //!< take a screenshot
107#define ACTION_RENAME_ITEM 87 //!< rename item
108
109#define ACTION_VOLUME_UP 88
110#define ACTION_VOLUME_DOWN 89
111#define ACTION_VOLAMP 90
112#define ACTION_MUTE 91
113#define ACTION_NAV_BACK 92
114#define ACTION_VOLAMP_UP 93
115#define ACTION_VOLAMP_DOWN 94
116
117#define ACTION_CREATE_EPISODE_BOOKMARK 95 //!< Creates an episode bookmark on the currently playing video file containing more than one episode
118#define ACTION_CREATE_BOOKMARK 96 //!< Creates a bookmark of the currently playing video file
119
120#define ACTION_CHAPTER_OR_BIG_STEP_FORWARD 97 //!< Goto the next chapter, if not available perform a big step forward
121#define ACTION_CHAPTER_OR_BIG_STEP_BACK 98 //!< Goto the previous chapter, if not available perform a big step back
122
123#define ACTION_CYCLE_SUBTITLE 99 //!< switch to next subtitle of movie, but will not enable/disable the subtitles. Can be used in videoFullScreen.xml window id=2005
124
125#define ACTION_MOUSE_START 100
126#define ACTION_MOUSE_LEFT_CLICK 100
127#define ACTION_MOUSE_RIGHT_CLICK 101
128#define ACTION_MOUSE_MIDDLE_CLICK 102
129#define ACTION_MOUSE_DOUBLE_CLICK 103
130#define ACTION_MOUSE_WHEEL_UP 104
131#define ACTION_MOUSE_WHEEL_DOWN 105
132#define ACTION_MOUSE_DRAG 106
133#define ACTION_MOUSE_MOVE 107
134#define ACTION_MOUSE_LONG_CLICK 108
135#define ACTION_MOUSE_END 109
136
137#define ACTION_BACKSPACE 110
138#define ACTION_SCROLL_UP 111
139#define ACTION_SCROLL_DOWN 112
140#define ACTION_ANALOG_FORWARD 113
141#define ACTION_ANALOG_REWIND 114
142
143#define ACTION_MOVE_ITEM_UP 115 //!< move item up in playlist
144#define ACTION_MOVE_ITEM_DOWN 116 //!< move item down in playlist
145#define ACTION_CONTEXT_MENU 117 //!< pops up the context menu
146
147// stuff for virtual keyboard shortcuts
148#define ACTION_SHIFT 118 //!< stuff for virtual keyboard shortcuts
149#define ACTION_SYMBOLS 119 //!< stuff for virtual keyboard shortcuts
150#define ACTION_CURSOR_LEFT 120 //!< stuff for virtual keyboard shortcuts
151#define ACTION_CURSOR_RIGHT 121 //!< stuff for virtual keyboard shortcuts
152
153#define ACTION_BUILT_IN_FUNCTION 122
154
155#define ACTION_SHOW_OSD_TIME 123 //!< displays current time, can be used in videoFullScreen.xml window id=2005
156#define ACTION_ANALOG_SEEK_FORWARD 124 //!< seeks forward, and displays the seek bar.
157#define ACTION_ANALOG_SEEK_BACK 125 //!< seeks backward, and displays the seek bar.
158
159#define ACTION_VIS_PRESET_SHOW 126
160#define ACTION_VIS_PRESET_NEXT 128
161#define ACTION_VIS_PRESET_PREV 129
162#define ACTION_VIS_PRESET_LOCK 130
163#define ACTION_VIS_PRESET_RANDOM 131
164#define ACTION_VIS_RATE_PRESET_PLUS 132
165#define ACTION_VIS_RATE_PRESET_MINUS 133
166
167#define ACTION_SHOW_VIDEOMENU 134
168#define ACTION_ENTER 135
169
170#define ACTION_INCREASE_RATING 136
171#define ACTION_DECREASE_RATING 137
172
173#define ACTION_NEXT_SCENE 138 //!< switch to next scene/cutpoint in movie
174#define ACTION_PREV_SCENE 139 //!< switch to previous scene/cutpoint in movie
175
176#define ACTION_NEXT_LETTER 140 //!< jump through a list or container by letter
177#define ACTION_PREV_LETTER 141
178
179#define ACTION_JUMP_SMS2 142 //!< jump direct to a particular letter using SMS-style input
180#define ACTION_JUMP_SMS3 143
181#define ACTION_JUMP_SMS4 144
182#define ACTION_JUMP_SMS5 145
183#define ACTION_JUMP_SMS6 146
184#define ACTION_JUMP_SMS7 147
185#define ACTION_JUMP_SMS8 148
186#define ACTION_JUMP_SMS9 149
187
188#define ACTION_FILTER_CLEAR 150
189#define ACTION_FILTER_SMS2 151
190#define ACTION_FILTER_SMS3 152
191#define ACTION_FILTER_SMS4 153
192#define ACTION_FILTER_SMS5 154
193#define ACTION_FILTER_SMS6 155
194#define ACTION_FILTER_SMS7 156
195#define ACTION_FILTER_SMS8 157
196#define ACTION_FILTER_SMS9 158
197
198#define ACTION_FIRST_PAGE 159
199#define ACTION_LAST_PAGE 160
200
201#define ACTION_AUDIO_DELAY 161
202#define ACTION_SUBTITLE_DELAY 162
203#define ACTION_MENU 163
204
205#define ACTION_SET_RATING 164
206
207#define ACTION_RECORD 170
208
209#define ACTION_PASTE 180
210#define ACTION_NEXT_CONTROL 181
211#define ACTION_PREV_CONTROL 182
212#define ACTION_CHANNEL_SWITCH 183
213#define ACTION_CHANNEL_UP 184
214#define ACTION_CHANNEL_DOWN 185
215#define ACTION_NEXT_CHANNELGROUP 186
216#define ACTION_PREVIOUS_CHANNELGROUP 187
217#define ACTION_PVR_PLAY 188
218#define ACTION_PVR_PLAY_TV 189
219#define ACTION_PVR_PLAY_RADIO 190
220#define ACTION_PVR_SHOW_TIMER_RULE 191
221#define ACTION_CHANNEL_NUMBER_SEP 192
222#define ACTION_PVR_ANNOUNCE_REMINDERS 193
223
224#define ACTION_TOGGLE_FULLSCREEN 199 //!< switch 2 desktop resolution
225#define ACTION_TOGGLE_WATCHED 200 //!< Toggle watched status (videos)
226#define ACTION_SCAN_ITEM 201 //!< scan item
227#define ACTION_TOGGLE_DIGITAL_ANALOG 202 //!< switch digital <-> analog
228#define ACTION_RELOAD_KEYMAPS 203 //!< reloads CButtonTranslator's keymaps
229#define ACTION_GUIPROFILE_BEGIN 204 //!< start the GUIControlProfiler running
230
231#define ACTION_TELETEXT_RED 215 //!< Teletext Color button <b>Red</b> to control TopText
232#define ACTION_TELETEXT_GREEN 216 //!< Teletext Color button <b>Green</b> to control TopText
233#define ACTION_TELETEXT_YELLOW 217 //!< Teletext Color button <b>Yellow</b> to control TopText
234#define ACTION_TELETEXT_BLUE 218 //!< Teletext Color button <b>Blue</b> to control TopText
235
236#define ACTION_INCREASE_PAR 219
237#define ACTION_DECREASE_PAR 220
238
239#define ACTION_VSHIFT_UP 227 //!< shift up video image in VideoPlayer
240#define ACTION_VSHIFT_DOWN 228 //!< shift down video image in VideoPlayer
241
242#define ACTION_PLAYER_PLAYPAUSE 229 //!< Play/pause. If playing it pauses, if paused it plays.
243
244#define ACTION_SUBTITLE_VSHIFT_UP 230 //!< shift up subtitles in VideoPlayer
245#define ACTION_SUBTITLE_VSHIFT_DOWN 231 //!< shift down subtitles in VideoPlayer
246#define ACTION_SUBTITLE_ALIGN 232 //!< toggle vertical alignment of subtitles
247
248#define ACTION_FILTER 233
249
250#define ACTION_SWITCH_PLAYER 234
251
252#define ACTION_STEREOMODE_NEXT 235
253#define ACTION_STEREOMODE_PREVIOUS 236
254#define ACTION_STEREOMODE_TOGGLE 237 //!< turns 3d mode on/off
255#define ACTION_STEREOMODE_SELECT 238
256#define ACTION_STEREOMODE_TOMONO 239
257#define ACTION_STEREOMODE_SET 240
258
259#define ACTION_SETTINGS_RESET 241
260#define ACTION_SETTINGS_LEVEL_CHANGE 242
261
262#define ACTION_TRIGGER_OSD 243 //!< show autoclosing OSD. Can b used in videoFullScreen.xml window id=2005
263#define ACTION_INPUT_TEXT 244
264#define ACTION_VOLUME_SET 245
265#define ACTION_TOGGLE_COMMSKIP 246
266
267#define ACTION_PLAYER_RESET 248 //!< Send a reset command to the active game
268
269#define ACTION_TOGGLE_FONT 249 //!< Toggle font. Used in TextViewer dialog
270
271#define ACTION_VIDEO_NEXT_STREAM 250 //!< Cycle video streams. Used in videofullscreen.
272#define ACTION_QUEUE_ITEM_NEXT 251 //!< used to queue an item to the next position in the playlist
273
274// Voice actions
275#define ACTION_VOICE_RECOGNIZE 300
276
277// Touch actions
278#define ACTION_TOUCH_TAP 401 //!< touch actions
279#define ACTION_TOUCH_TAP_TEN 410 //!< touch actions
280#define ACTION_TOUCH_LONGPRESS 411 //!< touch actions
281#define ACTION_TOUCH_LONGPRESS_TEN 420 //!< touch actions
282
283#define ACTION_GESTURE_NOTIFY 500
284#define ACTION_GESTURE_BEGIN 501
285#define ACTION_GESTURE_ZOOM 502 //!< sendaction with point and currentPinchScale (fingers together < 1.0 -> fingers apart > 1.0)
286#define ACTION_GESTURE_ROTATE 503
287#define ACTION_GESTURE_PAN 504
288#define ACTION_GESTURE_ABORT 505 //!< gesture was interrupted in unspecified state
289
290#define ACTION_GESTURE_SWIPE_LEFT 511
291#define ACTION_GESTURE_SWIPE_LEFT_TEN 520
292#define ACTION_GESTURE_SWIPE_RIGHT 521
293#define ACTION_GESTURE_SWIPE_RIGHT_TEN 530
294#define ACTION_GESTURE_SWIPE_UP 531
295#define ACTION_GESTURE_SWIPE_UP_TEN 540
296#define ACTION_GESTURE_SWIPE_DOWN 541
297#define ACTION_GESTURE_SWIPE_DOWN_TEN 550
298// 5xx is reserved for additional gesture actions
299#define ACTION_GESTURE_END 599
300
301// other, non-gesture actions
302#define ACTION_ANALOG_MOVE_X_LEFT 601 //!< analog thumbstick move, horizontal axis, left; see ACTION_ANALOG_MOVE
303#define ACTION_ANALOG_MOVE_X_RIGHT 602 //!< analog thumbstick move, horizontal axis, right; see ACTION_ANALOG_MOVE
304#define ACTION_ANALOG_MOVE_Y_UP 603 //!< analog thumbstick move, vertical axis, up; see ACTION_ANALOG_MOVE
305#define ACTION_ANALOG_MOVE_Y_DOWN 604 //!< analog thumbstick move, vertical axis, down; see ACTION_ANALOG_MOVE
306//@}
307
308// The NOOP action can be specified to disable an input event. This is
309// useful in user keyboard.xml etc to disable actions specified in the
310// system mappings. ERROR action is used to play an error sound
311#define ACTION_ERROR 998
312#define ACTION_NOOP 999
diff --git a/xbmc/interfaces/json-rpc/schema/version.txt b/xbmc/interfaces/json-rpc/schema/version.txt
index e32fb7a..a028c7d 100644
--- a/xbmc/interfaces/json-rpc/schema/version.txt
+++ b/xbmc/interfaces/json-rpc/schema/version.txt
@@ -1 +1 @@
JSONRPC_VERSION 9.6.1 JSONRPC_VERSION 10.5.0