Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Howto: load sources.xml and mediasources.xml at build time #59

Open
phunkyfish opened this issue May 13, 2019 · 6 comments
Open

Howto: load sources.xml and mediasources.xml at build time #59

phunkyfish opened this issue May 13, 2019 · 6 comments
Labels

Comments

@phunkyfish
Copy link
Collaborator

If you want to preload a sources.xml and mediasources.xml this works:

  1. Create a tvOS folder: xbmc-src/userdata/tvOS
  2. Copy sources.xml and mediasources.xml here
  3. Generate the xcode project and build after applying this patch:
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index a46f06d377..4644e6537b 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -420,10 +420,15 @@ bool CApplication::Create(const CAppParamParser &params)
   CopyUserDataIfNeeded("special://masterprofile/", "Lircmap.xml");
 
   //! @todo - move to CPlatformXXX
-  #ifdef TARGET_DARWIN_EMBEDDED
+  #ifdef TARGET_DARWIN_IOS
     CopyUserDataIfNeeded("special://masterprofile/", "iOS/sources.xml", "sources.xml");
   #endif
 
+  #ifdef TARGET_DARWIN_TVOS
+    CopyUserDataIfNeeded("special://masterprofile/", "tvOS/mediasources.xml", "mediasources.xml");
+    CopyUserDataIfNeeded("special://masterprofile/", "tvOS/sources.xml", "sources.xml");
+  #endif
+
   if (!CLog::Init(CSpecialProtocol::TranslatePath("special://logpath").c_str()))
   {
     fprintf(stderr,"Could not init logging classes. Log folder error (%s)\n", CSpecialProtocol::TranslatePath("special://logpath").c_str());
@fuzzard
Copy link

fuzzard commented May 13, 2019

Seems odd that this is how ios does it. Shouldnt this be done at build time, rather than in code?

@phunkyfish
Copy link
Collaborator Author

iOS is using a default sources.xml if there is not one. This is a common way to provide default files in kodi.

As userdata is only created on startup I’m not sure how else this would be done.

@fuzzard
Copy link

fuzzard commented May 13, 2019

fair enough

@phunkyfish
Copy link
Collaborator Author

But a clean way to do this without needing a patch would be great.

@sy6sy2 sy6sy2 added the HowTo label May 15, 2019
@fuzzard
Copy link

fuzzard commented Jun 6, 2019

May be worthwhile starting up an Apple TV wiki page on the kodi wiki for information that isnt easily put into the single github dev instructions.

https://kodi.wiki/view/Devices

May want to wait until we get ATV in master first before we start slapping bits and pieces into kodi wiki though.

@phunkyfish
Copy link
Collaborator Author

Ya, there lots of info like that. Such as versions pass through works on etc. But as you said after tvOS is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants