Closed sy6sy2 closed 4 years ago
you have old version. grab the latest from ATV branch: https://github.com/SylvainCecchetto/xbmc/blob/ATV/xbmc/cores/AudioEngine/Sinks/AESinkDARWINIOS.mm
In CMakeLists.txt
we have:
core_add_subdirs_from_filelist(${CMAKE_SOURCE_DIR}/cmake/treedata/common/*.txt
${CMAKE_SOURCE_DIR}/cmake/treedata/${CORE_SYSTEM_NAME}/*.txt)
It worked when CORE_SYSTEM_NAME
was equal to tvos
but now that we use CORE_SYSTEM_NAME =ios
with CORE_PLATFORM_NAME=tvos
then Cmake used cmake/treedata/ios/subdirs.txt
instead of cmake/treedata/tvos/subdirs.txt
.
Any idea on how to fix it without modifying CMakeLists.txt
?
How does it work for rbpi?
It seems that it uses the same subdirs.txt file as linux
I assume those files are different between iOS and tvOS.
I think CMakeLists.txt would need to be changed. Temp var with CORE_SYSTEM_NAME and then update it if CORE_PLATFORM_NAME is tvos.
I see CORE_PLATFORM_NAME has changed from appletvos to tvos. Will this cause any issues with the build? There are many things named with appletvos but not sure if they are created by us or are Xcode specific.
This is my current dirty hack :-/
# Subdirs
# Tempo hack
if(CORE_PLATFORM_NAME STREQUAL "tvos")
core_add_subdirs_from_filelist(${CMAKE_SOURCE_DIR}/cmake/treedata/common/*.txt
${CMAKE_SOURCE_DIR}/cmake/treedata/${CORE_PLATFORM_NAME}/*.txt)
core_add_optional_subdirs_from_filelist(${CMAKE_SOURCE_DIR}/cmake/treedata/optional/common/*.txt
${CMAKE_SOURCE_DIR}/cmake/treedata/optional/${CORE_PLATFORM_NAME}/*.txt)
else()
core_add_subdirs_from_filelist(${CMAKE_SOURCE_DIR}/cmake/treedata/common/*.txt
${CMAKE_SOURCE_DIR}/cmake/treedata/${CORE_SYSTEM_NAME}/*.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)
endif()
I don't see any issue concerning CORE_PLATFORM_NAME yet.
So, I am able to compile Kodi on ATV-cmake-generation branch (I will push latest changes on GitHub). (not tested on my Apple TV yet). But I think that there is duplicated code in windowing between iOS and tvOS that we need to modify.
Did you get a chance to try and run it on your apple TV?
I would like, but once again I am stuck with this fucking no code signature found
-_-'
But this time, the "delete" fix don't work
That happens to me sometimes too. I just delete the kodi-build dir and regenerate the project.
I will try again, thank you ;-)
Still have the issue :-(
Maybe an issue with generation of the project. Will kick off a build now, is the branch updated?
Yes maybe ... I will try tomorrow to build and run the ATV branch to see if I have still the issue.
Yes the branch is up to date. There is just an issue with the bundle identifier that I will fix tomorrow
Should probably also include the link to the build doc in the PR.
Is anybody have an idea on how to fix this "Tempo hack" (https://github.com/xbmc/xbmc/pull/15956/commits/f821dba3046bb4e88da84c07751ac7bcb3e041a4#r278421327) properly? Thank you!
Either set CORE_PLATFORM_NAME to CORE_SYSTEM_NAME for everything except tvOS and use that or use a temp var which gets set to CORE_SYSTEM_NAME except in the case of where CORE_PLATFORM_NAME is tvOS
Actually that would break raspberry pi. So all I have is the temp var approach.
Branch will need a rebase as currently pvr addons don’t build as they have been branched to Matrix.
Yes there is the temp var approach, but I think Rechi wants that we not touch this part of the CmakeList file. But I will try ;-)
Yep, I will rebase now!
I force pushed the temp var approach and the branch is up to date with master.
what if you temporarily set CORE_SYSTEM_NAME
to expected value and then set it back?
if(CORE_PLATFORM_NAME STREQUAL "tvos")
set(CORE_SYSTEM_NAME_ORIGNIAL ${CORE_SYSTEM_NAME})
set(CORE_SYSTEM_NAME "tvos")
endif()
core_add_subdirs_from_filelist(${CMAKE_SOURCE_DIR}/cmake/treedata/common/*.txt
${CMAKE_SOURCE_DIR}/cmake/treedata/${CORE_SYSTEM_NAME}/*.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)
if(CORE_PLATFORM_NAME STREQUAL "tvos")
set(CORE_SYSTEM_NAME ${CORE_SYSTEM_NAME_ORIGNIAL})
endif()
Yes, sounds a better alternative as the temp var approach. I will update this file. thank you.
Rechi said "This is still a hack" :-/ I guess that we need to find another solution without modifying CmakeLists.txt
Ask him what he suggests?
I think the right approach is to modify cmake/treedata/ios/subdirs.txt
that it contains ${CORE_PLATFORM_NAME}
where appropriate. probably it would require small modification of core_add_subdirs_from_filelist
and core_add_optional_subdirs_from_filelist
macros in cmake/scripts/common/Macros.cmake
as well.
I thought about that actually. So I need to adapt core_add_subdirs_from_filelist
and core_add_optional_subdirs_from_filelist
in order to replace the var ${CORE_PLATFORM_NAME}
by the actual value.
yep. But maybe also ask Rechi on his view on the solution now, he might offer a better one.
But I cannot do something like
xbmc/windowing/${CORE_PLATFORM_NAME} windowing/${CORE_PLATFORM_NAME}
because with iOS this var is not set.
then we need to set it...
or wait, there're some cmake generator expressions that can use conditions, so we can write in a single statement "if CORE_PLATFORM_NAME is set, then use it, otherwise use CORE_SYSTEM_NAME"
Another solution, but I doubt is a good one, would be to use the same sources files for iOS and tvOS. So we have only one folder in xbmc/platform/darwin/
and xbmc/windowing/
but a lot of if/else macro :-/
or wait, there're some cmake generator expressions that can use conditions, so we can write in a single statement "if CORE_PLATFORM_NAME is set, then use it, otherwise use CORE_SYSTEM_NAME"
Do you mean, using this thing in CmakeLists? But it could break raspberry no?
no-no, in ios/subdirs.txt
Another solution, but I doubt is a good one, would be to use the same sources files for iOS and tvOS. So we have only one folder in
xbmc/platform/darwin/
andxbmc/windowing/
but a lot of if/else macro :-/
does rbpi use this approach?
Yes, bpi uses the CORE_PLATFORM_NAME
var:
if(OS STREQUAL linux)
set(CMAKE_SYSTEM_NAME Linux)
set(CORE_SYSTEM_NAME linux)
if(PLATFORM STREQUAL raspberry-pi)
set(CORE_PLATFORM_NAME rbpi)
[...]
But bpi uses the same subdirectories as Linux so the issue with CmakeList does not appear :-/
sorry, I mean in code:
So we have only one folder in xbmc/platform/darwin/ and xbmc/windowing/ but a lot of if/else macro
Hum, I don't understand how it works for rbpi because there is a folder xbmc/windowing/rbpi
but not a file cmake/treedata/rbpi/subdirs.txt
Ok I understand, this is done by CmakeLists.txt in xbmc/windowing
folder:
set(SOURCES GraphicContext.cpp
OSScreenSaver.cpp
Resolution.cpp
WinSystem.cpp)
set(HEADERS GraphicContext.h
OSScreenSaver.h
Resolution.h
WinEvents.h
WinSystem.h
XBMC_events.h
VideoSync.h)
if(CORE_PLATFORM_NAME_LC STREQUAL rbpi)
add_subdirectory(rpi)
endif()
core_add_library(windowing)
Maybe we could use the same approach?
So what I can do is:
CORE_PLATFORM_NAME
to ios
or tvos
cmake/treedata/ios/subdirs.txt
only folders/files that are common to iOS and tvOSif(CORE_PLATFORM_NAME_LC STREQUAL xxxx) add_subdirectory(xxxx) endif()
approach in CmakeLists.txt
files for files that are not the same for IOS and tvOS.Then we do not need to modify the main CmakeLists.txt
file.
What do you think?
personally I think we should follow the rbpi approach. Could you forward your comment to Rechi to find out his opinion?
Agreed, I’d say rbpi approach is probably the right one.
created https://github.com/xbmc/xbmc/pull/16015 for the iOS audio sink change
it seems that after our latest cmake hack build started failing...
Really? I will try tomorrow, time to sleep ;-) In any case this hack should be removed soon if Rechi is agree with the rpi approach!
Rechi’s reply makes perfect sense now that I see it.
Yes! Totally agree. Now we can wait for "sub-PRs" to be merged (see https://github.com/SylvainCecchetto/xbmc/issues/52 discussion). After that, we will have the final PR (this one) with only tvOS support.
ATV-cmake-generation branch
Description
Branch to use for the next PR to upstream/master.
This branch must be kept up to date with upstream/master by using:
The only purpose of the modifications made by this branch is to be able to generate without error the project Xcode with Cmake for the Apple TV. Here we do not care if we can compile or not this project with Xcode
Commits
tools/depends/target/Toolchain.cmake.in
file changes