Skip to content

Commit

Permalink
Merge branch 'xbmc:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
heitbaum authored Dec 28, 2023
2 parents 43a9ffe + f07a9a8 commit 1886103
Show file tree
Hide file tree
Showing 1,443 changed files with 31,955 additions and 20,454 deletions.
3 changes: 3 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Checks: "\
modernize-make-shared,\
modernize-make-unique,\
modernize-use-default-member-init,\
modernize-use-emplace,\
performance-faster-string-find,\
performance-for-range-copy,\
performance-implicit-conversion-in-loop,\
Expand Down
143 changes: 114 additions & 29 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,26 @@ if(DEPENDS_DIR)
list(APPEND CMAKE_PREFIX_PATH ${DEPENDS_DIR})
endif()

# Variable to indicate if the project is targeting a Multi Config Generator (VS/Xcode primarily)
get_property(_multiconfig_generator GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_multiconfig_generator)
# Target to encompass an optional way to build all internal dependencies
# Must set EXCLUDE_FROM_ALL property so the ALL target doesnt include this, and therefore
# build all internal dependencies
add_custom_target(build_internal_depends)
set_target_properties(build_internal_depends PROPERTIES EXCLUDE_FROM_ALL TRUE)
endif()

# Set CORE_BUILD_DIR
set(CORE_BUILD_DIR build)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# set KODI_MIRROR to the default if not already set
if(NOT DEFINED KODI_MIRROR)
set(KODI_MIRROR "http://mirrors.kodi.tv")
endif()

message(STATUS "Mirror download location: ${KODI_MIRROR}")
message(STATUS "Source directory: ${CMAKE_SOURCE_DIR}")
message(STATUS "Build directory: ${CMAKE_BINARY_DIR}")
if(CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
Expand Down Expand Up @@ -67,18 +83,28 @@ option(ENABLE_TESTING "Enable testing support?" ON)

# These are required enabled for all CI platforms, and recommended for all builds
option(ENABLE_INTERNAL_CROSSGUID "Enable internal crossguid?" ON)
option(ENABLE_INTERNAL_RapidJSON "Enable internal rapidjson?" ON)

# use ffmpeg from depends or system
option(ENABLE_INTERNAL_FFMPEG "Enable internal ffmpeg?" OFF)

# These are built for all platforms not using system libs or disabled by user
dependent_option(ENABLE_INTERNAL_CEC "Enable internal libcec?")
dependent_option(ENABLE_INTERNAL_FLATBUFFERS "Enable internal flatbuffers?")
dependent_option(ENABLE_INTERNAL_FMT "Enable internal fmt?")
dependent_option(ENABLE_INTERNAL_NFS "Enable internal libnfs?")
dependent_option(ENABLE_INTERNAL_PCRE "Enable internal pcre?")
dependent_option(ENABLE_INTERNAL_SPDLOG "Enable internal spdlog?")
dependent_option(ENABLE_INTERNAL_RapidJSON "Enable internal rapidjson?")

# If ENABLE_INTERNAL_FMT is ON, we force ENABLE_INTERNAL_SPDLOG ON as it has a hard
# dependency on fmt
if(ENABLE_INTERNAL_FMT)
option(ENABLE_INTERNAL_SPDLOG "Enable internal spdlog Forced" ON)
else()
dependent_option(ENABLE_INTERNAL_SPDLOG "Enable internal spdlog?")
endif()

dependent_option(ENABLE_INTERNAL_TAGLIB "Enable internal taglib?")

if(KODI_DEPENDSBUILD OR WIN32 OR WINDOWS_STORE)
dependent_option(ENABLE_INTERNAL_TINYXML2 "Enable internal TinyXML2?")
endif()
Expand Down Expand Up @@ -116,6 +142,7 @@ endif()
core_find_git_rev(APP_SCMID FULL)

set(AUDIO_BACKENDS_LIST "" CACHE STRING "Available audio backends")
set(GL_INTERFACES_LIST "" CACHE STRING "Available GL interfaces")

# Dynamically loaded libraries built with the project
add_custom_target(${APP_NAME_LC}-libraries)
Expand All @@ -139,6 +166,9 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED QUIET)
list(APPEND DEPLIBS ${CMAKE_THREAD_LIBS_INIT})

# Clean any existing generated build dir cmake files
file(REMOVE ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ExportFiles.cmake)
file(REMOVE ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/GeneratedPackSkins.cmake)

foreach(depspec ${PLATFORM_REQUIRED_DEPS})
# We need to specify ENABLE_${PLATFORM_REQUIRED_DEPS} in order for the
Expand Down Expand Up @@ -169,7 +199,7 @@ core_optional_dep(${optional_buildtools})
core_require_dep(${required_buildtools})

# Required dependencies. Keep in alphabetical order please
set(required_deps ASS
set(required_deps ASS>=0.15.0
Cdio
CrossGUID
Curl
Expand All @@ -186,10 +216,10 @@ set(required_deps ASS
Lzo2
OpenSSL>=1.1.0
PCRE
RapidJSON
RapidJSON>=1.0.2
Spdlog
Sqlite3
TagLib
TagLib>=1.9.0
TinyXML
TinyXML2
ZLIB
Expand All @@ -201,7 +231,7 @@ set(optional_deps Alsa
Bluetooth
Bluray
CAP
CEC
CEC>=4.0.0
Dav1d
DBus
Iso9660pp
Expand All @@ -221,6 +251,11 @@ set(optional_deps Alsa
XSLT
${PLATFORM_OPTIONAL_DEPS})

# Remove excluded platform specific optional_deps
foreach(excludedep ${PLATFORM_OPTIONAL_DEPS_EXCLUDE})
list(FILTER optional_deps EXCLUDE REGEX ${excludedep})
endforeach()

# Check optional deps first, since their availability can influence required ones, e.g. ffmpeg
core_optional_dep(${optional_deps})
core_require_dep(${required_deps})
Expand All @@ -232,11 +267,11 @@ elseif(ENABLE_MYSQLCLIENT AND NOT ENABLE_MYSQLCLIENT STREQUAL AUTO)
endif()

core_optional_dep(MariaDBClient)
if(NOT MARIADBCLIENT_FOUND)
if(NOT TARGET MariaDBClient::MariaDBClient)
core_optional_dep(MySqlClient)
endif()

if(NOT UDEV_FOUND)
if(NOT TARGET UDEV::UDEV)
core_optional_dep(LibUSB)
endif()

Expand All @@ -250,7 +285,7 @@ endif()

if(ENABLE_AIRTUNES)
find_package(Shairplay)
if(SHAIRPLAY_FOUND)
if(TARGET Shairplay::Shairplay)
core_require_dep(Shairplay)
endif()
endif()
Expand All @@ -261,17 +296,17 @@ endif()
set(outputFilterRegex "addons/xbmc.json")
find_addon_xml_in_files(${outputFilterRegex})

if(ALSA_FOUND AND PULSEAUDIO_FOUND)
if(TARGET ALSA::ALSA AND TARGET PulseAudio::PulseAudio)
list(APPEND AUDIO_BACKENDS_LIST "alsa+pulseaudio")
endif()

# Compile Info
add_custom_command(OUTPUT ${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp
${ADDON_XML_OUTPUTS}
COMMAND ${CMAKE_COMMAND} -DCORE_SOURCE_DIR=${CMAKE_SOURCE_DIR}
-DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME}
-DCORE_PLATFORM_NAME_LC="${CORE_PLATFORM_NAME_LC}"
-DAUDIO_BACKENDS="${AUDIO_BACKENDS_LIST}"
-DGL_INTERFACES="${GL_INTERFACES_LIST}"
-DCORE_BUILD_DIR=${CORE_BUILD_DIR}
-DCMAKE_BINARY_DIR=${CMAKE_BINARY_DIR}
-DARCH_DEFINES="${ARCH_DEFINES}"
Expand All @@ -282,10 +317,8 @@ add_custom_command(OUTPUT ${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp
-DPYTHON_VERSION=${PYTHON_VERSION}
-Dprefix=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}
-DKODI_WEBSERVER_EXTRA_WHITELIST="${KODI_WEBSERVER_EXTRA_WHITELIST}"
-P ${CMAKE_SOURCE_DIR}/cmake/scripts/common/GenerateVersionedFiles.cmake
-P ${CMAKE_SOURCE_DIR}/cmake/scripts/common/GenerateCompileInfo.cmake
DEPENDS ${CMAKE_SOURCE_DIR}/version.txt
export-files
${ADDON_XML_DEPENDS}
${CMAKE_SOURCE_DIR}/xbmc/CompileInfo.cpp.in)
list(APPEND install_data ${ADDON_INSTALL_DATA})
add_library(compileinfo OBJECT ${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp)
Expand Down Expand Up @@ -327,18 +360,9 @@ copy_files_from_filelist_to_buildtree(${CMAKE_SOURCE_DIR}/cmake/installdata/comm
list(APPEND SKINS "${CMAKE_SOURCE_DIR}/addons/skin.estuary\;${CMAKE_SOURCE_DIR}")
list(APPEND SKINS "${CMAKE_SOURCE_DIR}/addons/skin.estouchy\;${CMAKE_SOURCE_DIR}")

# These are skins that are copied into place from the source tree
foreach(skin ${SKINS})
list(GET skin 0 dir)
list(GET skin 1 relative)
copy_skin_to_buildtree(${dir} ${relative})
endforeach()

add_custom_target(pack-skins ALL
DEPENDS TexturePacker::TexturePacker::Executable export-files ${XBT_FILES})
set_target_properties(pack-skins PROPERTIES FOLDER "Build Utilities")

file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/system/players/VideoPlayer)
if(NOT ${CORE_SYSTEM_NAME} MATCHES "windows")
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/system/players/VideoPlayer)
endif()

set(LIBCEC_SONAME "${CEC_SONAME}")
if(NOT CORE_SYSTEM_NAME STREQUAL windows AND NOT CORE_SYSTEM_NAME STREQUAL android AND NOT CORE_SYSTEM_NAME STREQUAL windowsstore)
Expand Down Expand Up @@ -385,7 +409,7 @@ core_add_subdirs_from_filelist(${CMAKE_SOURCE_DIR}/cmake/treedata/common/*.txt
core_add_optional_subdirs_from_filelist(${CMAKE_SOURCE_DIR}/cmake/treedata/optional/common/*.txt
${CMAKE_SOURCE_DIR}/cmake/treedata/optional/${CORE_SYSTEM_NAME}/*.txt)

target_link_libraries(lib${APP_NAME_LC} PUBLIC ${core_DEPENDS} ${SYSTEM_LDFLAGS} ${DEPLIBS} ${CMAKE_DL_LIBS})
target_link_libraries(lib${APP_NAME_LC} PUBLIC ${core_DEPENDS} ${SYSTEM_LDFLAGS} ${DEPLIBS} ${CMAKE_DL_LIBS} ${GLOBAL_TARGET_DEPS})
set_target_properties(lib${APP_NAME_LC} PROPERTIES PROJECT_LABEL "xbmc")
source_group_by_folder(lib${APP_NAME_LC} RELATIVE ${CMAKE_SOURCE_DIR}/xbmc)
if(WIN32)
Expand All @@ -408,11 +432,72 @@ else()
# Related to https://stackoverflow.com/questions/46307266/including-objects-to-a-shared-library-from-a-c-archive-a
set_target_properties(${APP_NAME_LC} PROPERTIES LINK_FLAGS "-Wl,-Bsymbolic")
endif()
add_dependencies(${APP_NAME_LC} ${APP_NAME_LC}-libraries export-files pack-skins)
add_dependencies(${APP_NAME_LC} ${APP_NAME_LC}-libraries)

whole_archive(_MAIN_LIBRARIES ${FSTRCMP_LIBRARY} ${core_DEPENDS})
target_link_libraries(${APP_NAME_LC} ${_MAIN_LIBRARIES} lib${APP_NAME_LC} ${DEPLIBS})
unset(_MAIN_LIBRARIES)

if(${CORE_SYSTEM_NAME} MATCHES "windows")
set(_bundle_dir $<TARGET_FILE_DIR:${APP_NAME_LC}>)
else()
set(_bundle_dir ${CMAKE_BINARY_DIR})
endif()

# These are skins that are copied into place from the source tree
set(XBT_SOURCE_FILELIST "")
foreach(skin ${SKINS})
list(GET skin 0 dir)
list(GET skin 1 relative)
copy_skin_to_buildtree(${dir} ${relative})
endforeach()

# Generate system addons
add_custom_target(gen_system_addons
COMMAND ${CMAKE_COMMAND} -DCORE_SOURCE_DIR=${CMAKE_SOURCE_DIR}
-DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME}
-DCORE_PLATFORM_NAME_LC="${CORE_PLATFORM_NAME_LC}"
-DCORE_BUILD_DIR=${CORE_BUILD_DIR}
-DCMAKE_BINARY_DIR=${CMAKE_BINARY_DIR}
-DBUNDLEDIR=${_bundle_dir}
-P ${CMAKE_SOURCE_DIR}/cmake/scripts/common/GenerateSystemAddons.cmake
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})

if(_multiconfig_generator)
# Generator expressions in add_custom_command(OUTPUT) are only available in cmake 3.20+
# we dont really need config aware locations for a single config generator, so we only
# set this for multi config generators who all use newer cmake
set(CONFIG_VAR $<CONFIG>)
endif()

# Pack skins and copy to correct build dir (MultiConfig Generator aware)
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/${CONFIG_VAR}/gen_skin.timestamp
COMMAND ${CMAKE_COMMAND} -DBUNDLEDIR=${_bundle_dir}
-DTEXTUREPACKER_EXECUTABLE=$<TARGET_FILE:TexturePacker::TexturePacker::Executable>
-P ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/GeneratedPackSkins.cmake
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/${CONFIG_VAR}
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/${CONFIG_VAR}/gen_skin.timestamp
DEPENDS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/GeneratedPackSkins.cmake
${XBT_SOURCE_FILELIST}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Generating skin xbt"
)
add_custom_target(gen_skin_pack DEPENDS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/${CONFIG_VAR}/gen_skin.timestamp)

# Packaging target. This generates system addon, xbt creation, copy files to build tree
add_custom_target(generate-packaging ALL
DEPENDS TexturePacker::TexturePacker::Executable export-files gen_skin_pack gen_system_addons)
# Make sure we build any libs before we look to export-files.
# We may need to export some shared libs/data (eg Python)
add_dependencies(export-files ${GLOBAL_TARGET_DEPS})

# Add to lib${APP_NAME_LC} solely for Win UWP. msix building doesnt seem to pick up the
# generated buildtree if we do it later. Other platforms dont care when this happens.
add_dependencies(lib${APP_NAME_LC} generate-packaging)

set_target_properties(generate-packaging PROPERTIES FOLDER "Build Utilities")

if(WIN32)
set_target_properties(${APP_NAME_LC} PROPERTIES WIN32_EXECUTABLE ON)
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT ${APP_NAME_LC})
Expand Down Expand Up @@ -450,7 +535,7 @@ if(HOST_CAN_EXECUTE_TARGET AND ENABLE_TESTING)
unset(_TEST_LIBRARIES)

if (ENABLE_INTERNAL_GTEST)
add_dependencies(${APP_NAME_LC}-test ${APP_NAME_LC}-libraries export-files gtest)
add_dependencies(${APP_NAME_LC}-test ${APP_NAME_LC}-libraries generate-packaging gtest)
endif()

# Enable unit-test related targets
Expand Down
2 changes: 1 addition & 1 deletion addons/game.controller.default/addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="game.controller.default"
name="Default Controller"
version="1.0.40"
version="1.0.41"
provider-name="Team Kodi">
<extension point="kodi.game.controller" library="resources/layout.xml"/>
<extension point="xbmc.addon.metadata">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
msgid ""
msgstr ""
"Project-Id-Version: KODI Main\n"
"Report-Msgid-Bugs-To: https://github.com/xbmc/xbmc/issues/\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2014-05-30 17:00+8\n"
"PO-Revision-Date: 2021-05-20 16:49+0000\n"
"PO-Revision-Date: 2023-10-23 01:11+0000\n"
"Last-Translator: Christian Gade <[email protected]>\n"
"Language-Team: Burmese <https://kodi.weblate.cloud/projects/kodi-core/game-controller-default/my_mm/>\n"
"Language: my_mm\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 4.6.2\n"
"X-Generator: Weblate 5.0.2\n"

msgctxt "Addon Summary"
msgid "Default Controller"
Expand All @@ -31,7 +31,7 @@ msgstr ""

msgctxt "#30000"
msgid "Kodi"
msgstr ""
msgstr "ကိုဒီ"

msgctxt "#30001"
msgid "A"
Expand Down
2 changes: 1 addition & 1 deletion addons/game.controller.keyboard/addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="game.controller.keyboard"
name="IBM Model M Keyboard"
version="1.1.30"
version="1.1.33"
provider-name="Team Kodi">
<extension point="kodi.game.controller" library="resources/layout.xml"/>
<extension point="xbmc.addon.metadata">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,3 +588,7 @@ msgstr ""
msgctxt "#30140"
msgid "Clear"
msgstr ""

msgctxt "#30141"
msgid "OEM 102nd Key"
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -588,3 +588,7 @@ msgstr ""
msgctxt "#30140"
msgid "Clear"
msgstr ""

msgctxt "#30141"
msgid "OEM 102nd Key"
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -588,3 +588,7 @@ msgstr ""
msgctxt "#30140"
msgid "Clear"
msgstr ""

msgctxt "#30141"
msgid "OEM 102nd Key"
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: KODI Addons\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2014-05-30 17:00+8\n"
"PO-Revision-Date: 2022-04-14 22:45+0000\n"
"Last-Translator: Christian Gade <[email protected]>\n"
Expand Down Expand Up @@ -589,3 +589,7 @@ msgstr ""
msgctxt "#30140"
msgid "Clear"
msgstr ""

msgctxt "#30141"
msgid "OEM 102nd Key"
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -588,3 +588,7 @@ msgstr ""
msgctxt "#30140"
msgid "Clear"
msgstr ""

msgctxt "#30141"
msgid "OEM 102nd Key"
msgstr ""
Loading

0 comments on commit 1886103

Please sign in to comment.