Skip to content

Commit

Permalink
RetroEngine: Implement RetroPlayer v4
Browse files Browse the repository at this point in the history
  • Loading branch information
garbear committed Jan 17, 2024
1 parent 6dbe52b commit 298525c
Show file tree
Hide file tree
Showing 192 changed files with 12,084 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ cmake_install.cmake
/addons/kodi.binary.instance.audiodecoder/addon.xml
/addons/kodi.binary.instance.audioencoder/addon.xml
/addons/kodi.binary.instance.game/addon.xml
/addons/kodi.binary.instance.identity/addon.xml
/addons/kodi.binary.instance.imagedecoder/addon.xml
/addons/kodi.binary.instance.inputstream/addon.xml
/addons/kodi.binary.instance.peripheral/addon.xml
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ option(ENABLE_LIBTORRENT "Enable libtorrent support?" ON)
option(ENABLE_INTERNAL_BOOST "Enable internal boost?" ON) # TODO: Change to OFF
option(ENABLE_INTERNAL_LIBDATACHANNEL "Enable internal libdatachannel?" ON) # TODO: Change to OFF
option(ENABLE_INTERNAL_LIBJUICE "Enable internal libjuice?" ON) # TODO: Change to OFF
option(ENABLE_INTERNAL_LIBQRENCODE "Enable internal libqrencode?" ON) # TODO: Change to OFF
option(ENABLE_INTERNAL_LIBSRTP "Enable internal libsrtp?" ON) # TODO: Change to OFF
option(ENABLE_INTERNAL_LIBTORRENT "Enable internal libtorrent?" ON) # TODO: Change to OFF
option(ENABLE_INTERNAL_LMDB "Enable internal LMDB?" ON) # TODO: Change to OFF
option(ENABLE_INTERNAL_LZ4 "Enable internal LZ4?" ON) # TODO: Change to OFF
option(ENABLE_INTERNAL_PLOG "Enable internal plog?" ON) # TODO: Change to OFF
option(ENABLE_INTERNAL_TRY_SIGNAL "Enable internal try_signal?" ON) # TODO: Change to OFF
option(ENABLE_INTERNAL_USRSCTP "Enable internal usrsctp?" ON) # TODO: Change to OFF
Expand Down Expand Up @@ -218,8 +221,11 @@ set(required_deps ASS>=0.15.0
LibDataChannel
LibDvd
Libjuice
Libqrencode
Libsrtp
Libtorrent
LMDB
Lz4
Lzo2
OpenSSL>=1.1.0
PCRE
Expand Down
7 changes: 7 additions & 0 deletions addons/kodi.binary.instance.identity/addon.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="kodi.binary.instance.identity" version="@ADDON_INSTANCE_VERSION_IDENTITY@" provider-name="Team Kodi">
<backwards-compatibility abi="@ADDON_INSTANCE_VERSION_IDENTITY_MIN@"/>
<requires>
<import addon="xbmc.core" version="0.1.0"/>
</requires>
</addon>
10 changes: 9 additions & 1 deletion addons/resource.language.en_gb/resources/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -18777,7 +18777,15 @@ msgctxt "#35270"
msgid "Your account is not verified. Please check your email to complete your sign up."
msgstr ""

#empty strings from id 35271 to 35504
#empty strings from id 35271 to 35399

#. Name of add-ons that provide user identities
#: xbmc/addons/addoninfo/AddonInfo.cpp
msgctxt "#35400"
msgid "Identity providers"
msgstr ""

#empty strings from id 35401 to 35504

#. connection state "host unreachable"
#: xbmc/pvr/addons/PVRClients.cpp
Expand Down
14 changes: 14 additions & 0 deletions addons/skin.estuary/xml/Includes_DialogSelect.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,13 @@
<texture>$INFO[ListItem.Art(screenshot)]</texture>
<aspectratio>keep</aspectratio>
</control>
<control type="gameengine">
<left>10</left>
<right>10</right>
<top>10</top>
<height>256</height>
<savestate>$INFO[ListItem.FilenameAndPath]</savestate>
</control>
<control type="label">
<left>10</left>
<right>10</right>
Expand Down Expand Up @@ -274,6 +281,13 @@
<texture>$INFO[ListItem.Art(screenshot)]</texture>
<aspectratio>keep</aspectratio>
</control>
<control type="gameengine">
<left>10</left>
<right>10</right>
<top>10</top>
<height>256</height>
<savestate>$INFO[ListItem.FilenameAndPath]</savestate>
</control>
<control type="label">
<left>10</left>
<right>10</right>
Expand Down
76 changes: 76 additions & 0 deletions cmake/modules/FindLMDB.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#.rst:
# FindLMDB
# --------
# Finds the LMDB library
#
# This will define the following variables:
#
# LMDB_FOUND - system has LMDB
# LMDB_INCLUDE_DIRS - the LMDB include directory
# LMDB_LIBRARIES - the LMDB libraries
#
# and the following imported targets:
#
# LMDB::LMDB - The LMDB library
#

# If target exists, no need to rerun find. Allows a module that may be a
# dependency for multiple libraries to just be executed once to populate all
# required variables/targets.
if(NOT TARGET LMDB::LMDB)
if(ENABLE_INTERNAL_LMDB)
include(cmake/scripts/common/ModuleHelpers.cmake)

set(MODULE_LC liblmdb)

SETUP_BUILD_VARS()

set(LIBLMDB_VERSION ${${MODULE}_VER})

set(CMAKE_ARGS -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")

set(PATCH_COMMAND ${CMAKE_COMMAND} -E copy
"${CORE_SOURCE_DIR}/tools/depends/target/${MODULE_LC}/CMakeLists.txt"
"${CMAKE_CURRENT_BINARY_DIR}/${CORE_BUILD_DIR}/${MODULE_LC}/src/${MODULE_LC}/CMakeLists.txt")

BUILD_DEP_TARGET()
else()
# Populate paths for find_package_handle_standard_args
find_path(LIBLMDB_INCLUDE_DIR NAMES lmdb.h)
find_library(LIBLMDB_LIBRARY NAMES lmdb)
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LMDB
REQUIRED_VARS
LIBLMDB_LIBRARY
LIBLMDB_INCLUDE_DIR
VERSION_VAR
LIBLMDB_VERSION)

if(LMDB_FOUND)
set(LMDB_INCLUDE_DIRS "${LIBLMDB_INCLUDE_DIR}")
set(LMDB_LIBRARIES "${LIBLMDB_LIBRARY}")

add_library(LMDB::LMDB UNKNOWN IMPORTED)

set_target_properties(LMDB::LMDB PROPERTIES
FOLDER "External Projects"
IMPORTED_LOCATION "${LIBLMDB_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBLMDB_INCLUDE_DIR}")

if(TARGET liblmdb)
add_dependencies(LMDB::LMDB liblmdb)
endif()

# Add dependency to libkodi to build
set_property(GLOBAL APPEND PROPERTY INTERNAL_DEPS_PROP LMDB::LMDB)
else()
if(LMDB_FIND_REQUIRED)
message(FATAL_ERROR "LMDB not found. Maybe use -DENABLE_INTERNAL_LMDB=ON")
endif()
endif()

mark_as_advanced(LIBLMDB_INCLUDE_DIR)
mark_as_advanced(LIBLMDB_LIBRARY)
endif()
92 changes: 92 additions & 0 deletions cmake/modules/FindLibqrencode.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#.rst:
# FindLibqrencode
# --------
# Find the libqrencode library and headers
#
# This will define the following variables:
#
# LIBQRENCODE_FOUND - system has libqrencode library and headers
# LIBQRENCODE_INCLUDE_DIRS - the libqrencode include directories
# LIBQRENCODE_LIBRARIES - the libqrencode library directories
#
# and the following imported targets::
#
# libqrencode::libqrencode - The libqrencode library
#

# If target exists, no need to rerun find. Allows a module that may be a
# dependency for multiple libraries to just be executed once to populate all
# required variables/targets.
if(NOT TARGET libqrencode::libqrencode)
if(ENABLE_INTERNAL_LIBQRENCODE)
include(cmake/scripts/common/ModuleHelpers.cmake)

set(MODULE_LC libqrencode)

SETUP_BUILD_VARS()

set(LIBQRENCODE_VERSION ${${MODULE}_VER})

# Debug postfix only used for windows
if(WIN32 OR WINDOWS_STORE)
set(LIBQRENCODE_DEBUG_POSTFIX "d")
endif()

set(CMAKE_ARGS -DWITH_TOOLS=NO)

BUILD_DEP_TARGET()
else()
# Populate paths for find_package_handle_standard_args
find_path(LIBQRENCODE_INCLUDE_DIR NAMES libqrencode.h)
find_library(LIBQRENCODE_LIBRARY_RELEASE NAMES qrencode)
find_library(LIBQRENCODE_LIBRARY_DEBUG NAMES qrencoded)
endif()

include(SelectLibraryConfigurations)
select_library_configurations(LIBQRENCODE)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libqrencode
REQUIRED_VARS
LIBQRENCODE_LIBRARY
LIBQRENCODE_INCLUDE_DIR
VERSION_VAR
LIBQRENCODE_VERSION
)

if(LIBQRENCODE_FOUND)
set(LIBQRENCODE_INCLUDE_DIRS "${LIBQRENCODE_INCLUDE_DIR}")
set(LIBQRENCODE_LIBRARIES "${LIBQRENCODE_LIBRARY}")

add_library(libqrencode::libqrencode UNKNOWN IMPORTED)

set_target_properties(libqrencode::libqrencode PROPERTIES
FOLDER "External Projects"
INTERFACE_INCLUDE_DIRECTORIES "${LIBQRENCODE_INCLUDE_DIR}")

if(LIBQRENCODE_LIBRARY_RELEASE)
set_target_properties(libqrencode::libqrencode PROPERTIES
IMPORTED_CONFIGURATIONS RELEASE
IMPORTED_LOCATION_RELEASE "${LIBQRENCODE_LIBRARY_RELEASE}")
endif()
if(LIBQRENCODE_LIBRARY_DEBUG)
set_target_properties(libqrencode::libqrencode PROPERTIES
IMPORTED_CONFIGURATIONS DEBUG
IMPORTED_LOCATION_DEBUG "${LIBQRENCODE_LIBRARY_DEBUG}")
endif()

if(TARGET libqrencode)
add_dependencies(libqrencode::libqrencode libqrencode)
endif()

# Add dependency to libkodi to build
set_property(GLOBAL APPEND PROPERTY INTERNAL_DEPS_PROP libqrencode::libqrencode)
else()
if(LIBQRENCODE_FIND_REQUIRED)
message(FATAL_ERROR "libqrencode not found. Maybe use -DENABLE_INTERNAL_LIBQRENCODE=ON")
endif()
endif()

mark_as_advanced(LIBQRENCODE_INCLUDE_DIR)
mark_as_advanced(LIBQRENCODE_LIBRARY)
endif()
78 changes: 78 additions & 0 deletions cmake/modules/FindLz4.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#.rst:
# FindLz4
# --------
# Finds the LZ4 library
#
# This will define the following variables:
#
# LZ4_FOUND - system has LZ4
# LZ4_INCLUDE_DIRS - the LZ4 include directory
# LZ4_LIBRARIES - the LZ4 libraries
#
# and the following imported targets:
#
# Lz4::Lz4 - The LZ4 library
#

# If target exists, no need to rerun find. Allows a module that may be a
# dependency for multiple libraries to just be executed once to populate all
# required variables/targets.
if(NOT TARGET Lz4::Lz4)
if(ENABLE_INTERNAL_LZ4)
include(cmake/scripts/common/ModuleHelpers.cmake)

set(MODULE_LC liblz4)

SETUP_BUILD_VARS()

set(LIBLZ4_VERSION ${${MODULE}_VER})

set(CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF
-DBUILD_STATIC_LIBS=ON
-DLZ4_BUILD_CLI=OFF
-DLZ4_BUILD_LEGACY_LZ4C=OFF
-DLZ4_BUNDLED_MODE=OFF)

set(LIBLZ4_SOURCE_SUBDIR build/cmake)

BUILD_DEP_TARGET()
else()
# Populate paths for find_package_handle_standard_args
find_path(LIBLZ4_INCLUDE_DIR NAMES lz4.h)
find_library(LIBLZ4_LIBRARY NAMES lz4)
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Lz4
REQUIRED_VARS
LIBLZ4_LIBRARY
LIBLZ4_INCLUDE_DIR
VERSION_VAR
LIBLZ4_VERSION)

if(LZ4_FOUND)
set(LZ4_INCLUDE_DIRS "${LIBLZ4_INCLUDE_DIR}")
set(LZ4_LIBRARIES "${LIBLZ4_LIBRARY}")

# Add dependency to libkodi to build
set_property(GLOBAL APPEND PROPERTY INTERNAL_DEPS_PROP Lz4::Lz4)

add_library(Lz4::Lz4 UNKNOWN IMPORTED)

set_target_properties(Lz4::Lz4 PROPERTIES
FOLDER "External Projects"
IMPORTED_LOCATION "${LIBLZ4_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBLZ4_INCLUDE_DIR}")

if(TARGET liblz4)
add_dependencies(Lz4::Lz4 liblz4)
endif()
else()
if(LZ4_FIND_REQUIRED)
message(FATAL_ERROR "LZ4 not found. Maybe use -DENABLE_INTERNAL_LZ4=ON")
endif()
endif()

mark_as_advanced(LIBLZ4_INCLUDE_DIR)
mark_as_advanced(LIBLZ4_LIBRARY)
endif()
6 changes: 6 additions & 0 deletions cmake/treedata/common/retroengine.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
xbmc/cores/RetroEngine cores/RetroEngine
xbmc/cores/RetroEngine/guibridge cores/RetroEngine/guibridge
xbmc/cores/RetroEngine/guicontrols cores/RetroEngine/guicontrols
xbmc/cores/RetroEngine/input cores/RetroEngine/input
xbmc/cores/RetroEngine/rendering cores/RetroEngine/rendering
xbmc/cores/RetroEngine/streams cores/RetroEngine/streams
9 changes: 9 additions & 0 deletions cmake/treedata/common/subdirs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ xbmc/addons/interfaces/gui/dialogs addons_interfaces_gui_dialogs
xbmc/addons/settings addons_settings
xbmc/application application
xbmc/commons commons
xbmc/crypto crypto
xbmc/crypto/codecs crypto/codecs
xbmc/crypto/cryptold crypto/cryptold
xbmc/crypto/did crypto/did
xbmc/crypto/ed25519 crypto/ed25519
xbmc/crypto/identity crypto/identity
xbmc/crypto/multiformats crypto/multiformats
xbmc/crypto/random crypto/random
xbmc/datastore datastore
xbmc/dbwrappers dbwrappers
xbmc/dialogs dialogs
xbmc/favourites favourites
Expand Down
6 changes: 6 additions & 0 deletions cmake/treedata/common/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ xbmc/addons/gui/skin/test test/skin
xbmc/cores/AudioEngine/Sinks/test test/audioengine_sinks
xbmc/cores/VideoPlayer/test/edl test/edl
xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/test test/videoshaders
xbmc/crypto/codecs/test test/crypto/codecs
xbmc/crypto/cryptold/test test/crypto/cryptold
xbmc/crypto/did/test test/crypto/did
xbmc/crypto/ed25519/test test/crypto/ed25519
xbmc/crypto/multiformats/test test/multiformats/ed25519
xbmc/crypto/random/test test/crypto/random
xbmc/filesystem/test test/filesystem
xbmc/games/addons/input/test test/games/addons/input
xbmc/games/controllers/input/test test/games/controllers/input
Expand Down
4 changes: 4 additions & 0 deletions tools/depends/target/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ DEPENDS = \
libgpg-error \
libjpeg-turbo \
libjuice \
liblmdb \
liblz4 \
liblzo2 \
libmicrohttpd \
libplist \
libpng \
libqrencode \
libshairplay \
libsrtp \
libtorrent \
Expand Down Expand Up @@ -178,6 +181,7 @@ libinput: mtdev libevdev
libmicrohttpd: gnutls libgcrypt libgpg-error
libplist: $(ZLIB)
libpng: $(ZLIB)
libqrencode: $(ICONV) libpng $(ZLIB)
libsrtp: openssl
libtorrent: boost libdatachannel openssl try_signal $(ZLIB)
libva: libdrm $(LIBVA_DEPS)
Expand Down

0 comments on commit 298525c

Please sign in to comment.