Kodi Community Forum

Full Version: Skin XML Converter + Formatter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13
Well stop using variables with "special" characters Wink

I'll get it fixed for the next build.
(2014-07-09, 15:46)Bumpaneer Wrote: [ -> ]Well stop using variables with "special" characters Wink

I'll get it fixed for the next build.

It helps me organize Nerd
Cheers Wink
(2014-07-09, 15:41)Jeroen Wrote: [ -> ]@Bumpaneer:

I am getting a lot of entries like this one:

Code:
Undefined Variable: media - [ViewList.xml : Line 24]

The variable names in question have a ":" in them. Example:

PHP Code:
<variable name="menu:Controls"

So it's sort of comparable to this one, I guess the ":" is seen as the end of the var's name.

But it's not a regression or anything, I did't use any variables with a ":" in them at the time of posting the linked post.
Bumpaneer,

I would also like to jump in on this one, in my case I see

PHP Code:
Unused VariableIcon(-5)Poster - [Includes_Variables.xml Line 253]
Unused VariableIcon(-4)Poster - [Includes_Variables.xml Line 257]
Unused VariableIcon(-3)Poster - [Includes_Variables.xml Line 261]
Unused VariableIcon(-2)Poster - [Includes_Variables.xml Line 265]
Unused VariableIcon(-1)Poster - [Includes_Variables.xml Line 269]
Unused VariableIcon(0)Poster - [Includes_Variables.xml Line 273]
Unused VariableIcon(1)Poster - [Includes_Variables.xml Line 277]
Unused VariableIcon(2)Poster - [Includes_Variables.xml Line 281]
Unused VariableIcon(3)Poster - [Includes_Variables.xml Line 285]
Unused VariableIcon(4)Poster - [Includes_Variables.xml Line 289]
Unused VariableIcon(5)Poster - [Includes_Variables.xml Line 293]
Undefined VariableIcon - [View-VideoCoverflow.xml Line 35
which going on the fact that it works just fine would suggest that it is valid XBMC xml.

Also am seeing <camera> flagged as an error in the check value section, for example
PHP Code:
Includes_HorzHome.xmlInvalid Value for //control[@type='label']/*: camera
Includes_Shelf.xmlInvalid Value for //control[@type='image']/*: camera 
which again is valid as it works just fine.

As always thanks a million for working on this as it has spotted a number of silly errors I have made in my code.
Wyrm (xTV-SAF)
(2014-07-10, 15:07)wyrm Wrote: [ -> ]I would also like to jump in on this one, in my case I see

PHP Code:
Unused VariableIcon(-5)Poster - [Includes_Variables.xml Line 253]
Unused VariableIcon(-4)Poster - [Includes_Variables.xml Line 257]
Unused VariableIcon(-3)Poster - [Includes_Variables.xml Line 261]
Unused VariableIcon(-2)Poster - [Includes_Variables.xml Line 265]
Unused VariableIcon(-1)Poster - [Includes_Variables.xml Line 269]
Unused VariableIcon(0)Poster - [Includes_Variables.xml Line 273]
Unused VariableIcon(1)Poster - [Includes_Variables.xml Line 277]
Unused VariableIcon(2)Poster - [Includes_Variables.xml Line 281]
Unused VariableIcon(3)Poster - [Includes_Variables.xml Line 285]
Unused VariableIcon(4)Poster - [Includes_Variables.xml Line 289]
Unused VariableIcon(5)Poster - [Includes_Variables.xml Line 293]
Undefined VariableIcon - [View-VideoCoverflow.xml Line 35
which going on the fact that it works just fine would suggest that it is valid XBMC xml.

Can you post the variable definition so I can make sure I'm parsing it correctly?

I'll get the camera element added as acceptable for all controls in the next build as well.

Thanks guys
(2014-07-10, 16:19)Bumpaneer Wrote: [ -> ]
(2014-07-10, 15:07)wyrm Wrote: [ -> ]I would also like to jump in on this one, in my case I see
/snip

Can you post the variable definition so I can make sure I'm parsing it correctly?

I'll get the camera element added as acceptable for all controls in the next build as well.

Thanks guys
Bumpaneer,

This is just one of them, but they all take the same form
PHP Code:
    <variable name="Icon(0)Poster">
        <
value condition="!IsEmpty(ListItem(0).Art(poster))">$INFO[ListItem(0).Art(poster)]</value>
        <
value>$INFO[ListItem(0).Icon]</value>
    </
variable

Basically Icon(someinteger)Poster give the result I'm after in XBMC, flagged as an error in the skin tool.

Thanks mate
Wyrm (xTV-SAF)
@wyrm

Gotcha, so pretty much the same problem, it doesn't like the parenthesis currently. I've adapted the code so it should take anything between the $VAR[] and I can stop all this guess and check nonsense with variables. Confused

Hopefully have a new build today or tomorrow.
1.2.4 available here: https://dl.dropboxusercontent.com/u/1681...v1.2.4.exe

Changes:
  • Special characters in variables should work now ( including () and : )
  • The camera element is now valid for all controls
  • <onleft>, <onright>, etc are now value checked for "-" and "noop" is recommended instead
  • The window should now resize properly

As usual let me know if you find any bugs. I'm still working on file names/line numbers for the remaining checks.
Hello Bumpaneer, many thanks for updating this useful tool.
I have problems when checking the textures: the tool don't recognize all the items under the directory "media/dialogs", for example:

media/dialogs/spin/spin-down.png
media/dialogs/spin/spin-up.png
media/dialogs/radio/on.png
media/dialogs/radio/off.png

All these images are present in "IncludesDialogs.xml", which is contained in "Includes.xml".
Thanks.
What is the exact output of the log?
Don't know if you're referring to the main window of the tool, hope this can help:

Image
Its saying those images are unused. Do you have code that directly references those images? It may be that code references them indirectly (such as star ratings or flags) and the warning may be ignored.
No, the images are used in "IncludesDialogs.xml":

PHP Code:
    <include name="dialog_Radio">
        <
height>40</height>
        <
font>regular_20</font>
        <
textoffsetx>15</textoffsetx>
        <
textoffsety>5</textoffsety>
        <
radiowidth>48</radiowidth>
        <
radioheight>24</radioheight>
        <
textureradioonnofocus colordiffuse="Color4">dialogs/radio/on.png</textureradioonnofocus>
        <
textureradiooffnofocus colordiffuse="Color4">dialogs/radio/off.png</textureradiooffnofocus>
        <
textureradioonfocus colordiffuse="Color1">dialogs/radio/on.png</textureradioonfocus>
        <
textureradioofffocus colordiffuse="Color1">dialogs/radio/off.png</textureradioofffocus>
        <
texturefocus border="3">dialogs/select-fo.png</texturefocus>
        <
texturenofocus border="3">dialogs/select-nf.png</texturenofocus>
        <
textcolor>Color5</textcolor>
        <
focusedcolor>Color1</focusedcolor>
        <
disabledcolor>Disabled</disabledcolor>
        <
selectedcolor>Selected</selectedcolor>
    </include>

    <include 
name="dialog_Spin">
        <
textoffsety>-2</textoffsety>
        <
aligny>center</aligny>
        <
spinwidth>26</spinwidth>
        <
spinheight>26</spinheight>
        <
texturefocus border="3">dialogs/select-fo.png</texturefocus>
        <
texturenofocus border="3">dialogs/select-nf.png</texturenofocus>
        <
textureup colordiffuse="Color4">dialogs/spin/spin-up.png</textureup>
        <
texturedown colordiffuse="Color4">dialogs/spin/spin-down.png</texturedown>
        <
textureupfocus>dialogs/spin/spin-up.png</textureupfocus>
        <
texturedownfocus>dialogs/spin/spin-down.png</texturedownfocus>
    </include> 

The other images are correctly checked.
Thanks, found the issue. The special texture fields for spin controls and radio button controls were not being included as textures. Will be fixed in the next release.
Forgive me if this is a stupid question but how easy / difficult would it be to port this to other platforms? Not that I would be able to be of any use when possible though I'm afraid, but just wondering if that's even possible. I guess it being VB doesn't help.
Nothing that I'm going to take on I'm afraid. All the logic is easily available in the VB code, but writing any sort of GUI would be beyond me at this point.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13