sy6sy2 / xbmc

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS and Windows.
https://kodi.tv/
Other
6 stars 1 forks source link

Port top shelf extension for latest movies and TV shows from yab branch #46

Closed phunkyfish closed 5 years ago

phunkyfish commented 5 years ago

A lot of work on this is done.

we already have all the code, now it's just a matter of cmake configuration to set up extension target.

@kambala-decapitator

kambala-decapitator commented 5 years ago

top shelf ported, now it needs to be tested with proper provisioning profiles.

will write what to do soon, if nobody else knows.

phunkyfish commented 5 years ago

Will follow your lead on this 😉

kambala-decapitator commented 5 years ago

finally some progress: Screen Shot 2019-05-10 at 17 54 22

currently pressing Play starts the selected movie correctly, but pressing Tap results in empty dialog instead of movie details: Screen Shot 2019-05-10 at 17 50 59

besides using proper provisioning profiles, one should also add media sources with type Movie or TV Show to make them appear in the Top Shelf.

kambala-decapitator commented 5 years ago

one thing that was missing for the top shelf to actually work is https://github.com/kambala-decapitator/xbmc/commit/a5cd132299ae114cbd1e6fb8041868a24c6aa5ad, also made code improvements https://github.com/kambala-decapitator/xbmc/commit/084bf64eddf6aa857ff9fdad9682ee031f57ad00.

modifications to make top shelf work:

  1. create app ID, group app ID and proper provisioning profiles in your paid dev account (detailed instructions in #57). In my case the profiles are named "tvos-kambala" and "tvos-topshelf-kambala".
  2. modify cmake/scripts/ios/PathSetup.cmake to set your app ID to PLATFORM_BUNDLE_IDENTIFIER variable.
  3. modify cmake/scripts/ios/Install.cmake to include signing settings. You need to find your Developer Team ID (either in the dev portal or simply open a provisioning profile with text editor). Add the following just before the first add_custom_command(:
set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
                                                XCODE_ATTRIBUTE_CODE_SIGN_STYLE "Manual"
                                                XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "YOUR_TEAM_ID"
                                                XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "YOUR_APP_PROVISIONING_PROFILE_NAME")
if(TOPSHELF_EXTENSION_NAME)
  set_target_properties(${TOPSHELF_EXTENSION_NAME} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
                                                              XCODE_ATTRIBUTE_CODE_SIGN_STYLE "Manual"
                                                              XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "YOUR_TEAM_ID"
                                                              XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "YOUR_TOPSHELF_PROVISIONING_PROFILE_NAME")
endif()

in my case, it looks like this:

set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
                                                XCODE_ATTRIBUTE_CODE_SIGN_STYLE "Manual"
                                                XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "83BQGRWT8G"
                                                XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "tvos-kambala")
if(TOPSHELF_EXTENSION_NAME)
  set_target_properties(${TOPSHELF_EXTENSION_NAME} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
                                                              XCODE_ATTRIBUTE_CODE_SIGN_STYLE "Manual"
                                                              XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "83BQGRWT8G"
                                                              XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "tvos-topshelf-kambala")
endif()
sy6sy2 commented 5 years ago

Thank you very munch for the procedure!

BTW if you plan to rebase your code by using fuzzard/master_darwin-embedded-ATV branch pay attention to this commit https://github.com/fuzzard/xbmc/commit/6b3f053eb72b8e767db59746cc4ddd50584a7c96 concerning top shelf target ;-)

phunkyfish commented 5 years ago

@kambala-decapitator assuming I want to automate this as much as possible so I have a patch for the cmake changes. Can I also add the provisioning profiles to xcode automatically or do I need to manually assign those in xcode?

phunkyfish commented 5 years ago

I will write a PR for the doc once I have this up and running. Will include how to automate it as well do it in the Xcode UI.

kambala-decapitator commented 5 years ago

You add the provisioning profiles to your Mac manually only once (after you download them from the dev portal) by double-clicking them. Afterwards patch like I wrote above is enough.

phunkyfish commented 5 years ago

Magic, thanks!

kambala-decapitator commented 5 years ago

I think that instead of manual modifying cmake files we can do it via command-line variables like -DBUNDLE_ID=com.whatever.kodi and then just check for presence of those

phunkyfish commented 5 years ago

Nice, ya, that would work nicely.

phunkyfish commented 5 years ago

So 6 possible command line variables?

BUNDLE_ID CODE_SIGN_IDENTITY CODE_SIGN_STYLE DEVELOPMENT_TEAM_ID PROVISIONING_PROFILE PROVISIONING_PROFILE_TOPSHELF

phunkyfish commented 5 years ago

Maybe some of those can be inferred such as CODE_SIGN_IDENTITY and CODE_SIGN_STYLE if some of the others are provided.

phunkyfish commented 5 years ago

If only bundle ID is set then set everything to automatic for free dev account users, otherwise use manual.

pogarek commented 5 years ago

I've tested top shelf with Yoda plugin (for TV Show) . More info here: https://github.com/SylvainCecchetto/xbmc/issues/61#issuecomment-496792940

kambala-decapitator commented 5 years ago

implemented command line params in https://github.com/fuzzard/xbmc/pull/8

fuzzard commented 5 years ago

Id consider this issue done.

Any outstanding issues are more feature changes than anything

kambala-decapitator commented 5 years ago

I agree

phunkyfish commented 5 years ago

Closing! 1 down many to go 😉