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

add the option to conditionally include files #7208

merged 1 commit into from Jul 5, 2015


None yet
3 participants

ronie commented May 30, 2015

allow skinners to conditionally include a file:
<include condition="StringCompare(Skin.AspectRatio,16:9)" file="ViewsAddonBrowser.xml" />
<include condition="StringCompare(Skin.AspectRatio,4:3)" file="ViewsAddonBrowser-4x3.xml" />

this will make it a lot easier for skins to support multiple aspect-ratios (for instance the re-touched skin).

another use case might be to include platform specific files:
<include condition="System.Platform.Android" file="customAndroidSettings.xml" />

const char *condition = node->Attribute("condition");
if (condition)
{ // check this condition
INFO::InfoPtr conditionID = g_infoManager.Register(condition);

This comment has been minimized.


mkortstiege May 30, 2015


We might want to check conditionID before proceeding. So maybe drop bool value and do if (conditionID && conditionID->Get())

This comment has been minimized.


ronie May 30, 2015


thanx for reviewing!
i just c/p'd the code we use for conditionally including a piece of code:


This comment has been minimized.


mkortstiege commented May 30, 2015

Makes totally sense to have conditional includes. Thanks.

mkortstiege added a commit that referenced this pull request Jul 5, 2015

Merge pull request #7208 from ronie/conditional-files
add the option to conditionally include files

@mkortstiege mkortstiege merged commit a962441 into xbmc:master Jul 5, 2015

@MartijnKaijser MartijnKaijser added this to the Isengard 16.0-alpha1 milestone Jul 5, 2015

@ronie ronie deleted the ronie:conditional-files branch Feb 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment