Proposed New Skin directory layout - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: Proposed New Skin directory layout (/showthread.php?tid=2442) Pages:
1
2
|
- jmarshall - 2004-03-28 hi all, due to the differing resolutions that various people use, and therefore the need for displaying skins in differing resolutions, i have coded up a new system to take care of it all. the current layout has the following structure: <skindir> media/ fonts/ pal/ .xml files credits.txt i propose to extend this by offering other subfolders for ntsc, 720p, 1080i and also pal16x9 and ntsc16x9. that will take care of all the various options. basically the structure will change to this: <skindir> fonts/ pal/ pal16x9/ ntsc/ ntsc16x9/ 720p/ 1080i/ skin.xml the skin.xml file will contain the current credits.txt, as well as information regarding the default resolution that xbmc should fall back on and scale if a requested resolution is not present. only one subdir actually needs to be present - the others will only be used if they are there. the idea is that a skinner will only need to create one of the above subfolders completely - the others can be used to override the default files just like the pal/ folder currently does. xbmc then first looks in the folder corresponding to whatever resolution the gui is running in (for instance pal16x9/ ). if it doesn't find the .xml files describing the skin layout, it will fall back to the default resolution of the skin (could be pal/). once it retrieves the info, it will either display the info as is (if it found the .xml files for the correct resolution), or it will scale the .xml files to the correct resolution. each subfolder's coordinate system depends on the resolution it represents: pal, pal16x9: 720x576 ntsc, ntsc16x9: 720x480 720p: 1280x720 1080i: 1920x1080 this will enable skinners to get pixel perfect skins, and is also necessary due to the fact that the fonts have to be rendered based on the pixel system being used. skinners may want to note that the pal and ntsc resolutions are not square based pixels - make sure you take the pixel aspect ratio's into account if you want nice circles etc. the one thing i am not yet sure about is how to handle the media/ subdirectory and texture files. the current system basically searches media/ first, then the pal/media directory. this is fine, but the addition of the textures.xpr file complicates matters. my current thoughts is that there should be just one textures.xpr file in a media/ subdir of the main skin directory. this will be generated by scanning all subdirs for there separate media/ dirs, and combining them as is currently done with the pal directory. we then attempt to load the file corresponding to the resolution we are in first, then default back to the default resolution directory if that does not work. this is pretty similar to how the pal subdir works now. any and all comments are most welcome, from both skinners and the dev team. cheers, jonathan - jmarshall - 2004-03-28 as i think about it, i see little point in having so many media subdirectories - it just makes the code + the skinning system more complex than it needs to be. i therefore propose a single media/ directory in the skin's root directory. if the skinner wants to use different textures for different resolutions, they simply need to name them differently. the xbox scales all the images quite well, so i'd be surprised if many different versions of each image were needed anyway. this ofcourse makes the code way simpler! comments? - Hullebulle - 2004-03-28 what about the ability to define a path+filename in the skin xmls instead of the filename only. this way skinners could create the folder structure and organize the files/pics like they want. - Gamester17 - 2004-03-28 for reference, here is the previous team discussion on the topic: Quote:subject: new skinning system to fix the resolution difficulties Quote:subject: re: new skinning system to fix the resolution difficulties Quote:subject: re: re: new skinning system to fix the resolution difficulties Quote:subject: re: re: re: new skinning system to fix the resolution difficulties - Gamester17 - 2004-03-28 (jmarshall @ mar. 28 2004,07:25 Wrote:the xbox scales all the images quite well, so i'd be surprised if many different versions of each image were needed anyway.i think that the option to use different images for different resolutions should at least be given, then it's up to the skinner to use it or not - jmarshall - 2004-03-28 i think it's easiest from a code + layout point of view just to leave every texture in the one /media directory. skinners a more than welcome to use different textures for each resolution if they want to - they just need to name the files differently. having them in separate directories gives no real benefit imo - it just makes the code overly complicated (need to check each directory (or pseudo directory if we're reading from textures.xpr) etc. etc.) as for having a path defined in the .xml file, that is possible, though the xbmctex application would have to take this into account as well as xbmc. once again, it would make the code more complex than it needs to be. kiss is something we should strive for imo. any skinners have a take on this? - Butcher - 2004-03-29 on the texture pathing - having support for subdirectories isn't a big deal for xbmc - it should basically work with the current code. by this i mean having explicitly coded subdir paths in the xml, not automatically searched subdirs. so for instance instead of <texture>background.png</texture> the skinner could use <texture>pal/background.png</texture>. this would require a modification to textures.xpr, but it should be too much of a job. i think this is something that could be useful to keep the skinners sane while dealing with the different res / aspect ratio graphics. on the whole scaling issue - check the credits, they auto scale to the resolution being used, though i have no idea how well it works for hdtv res, only pal/ntsc. - jmarshall - 2004-03-30 butcher: agreed that it's easy enough to add subdir support, though how do you see it layed out in terms of directory structure? it makes sense to me to have a media/ directory in the root of the skin directory (just like fonts/ is and media/ is now). i propose that any paths given will be taken off the media/ directory in the root of skin. ie one would have: skindir/ fonts/ font files etc. media/ media files texture.xpr subdir1/ specific media files for hdtv or whatever subdir2/ ntsc specific media files or whatever skin.xml ntsc/ pal/ etc. ofcourse, the subdir1/ and subdir2/ etc. subdirs of the media/ directory can be called whatever the skinner likes. xbmctex will parse the media/ directory and all subdirs when generating textures.xpr. how does that sound? as for the scaling, i already have it coded up and it works fine. for instance, i tried using the pal specific textures in ntsc mode, and everything scaled fine once i correctly defined the height tags in the .xml files. if the above sounds all good, i'll code up whatever else is needed, then do a cvs update sometime in the next few days. cheers, jonathan - Butcher - 2004-03-30 sounds good to me, i'll modify xbmctex tonight. - jmarshall - 2004-03-30 i've already modified the code in both xbmctex and xbmc, but am awaiting a download of the directx sdk to check my code changes are ok. i'm on 56k dialup at home, so 90mb of downloads takes a long time basically, i recurse through directories starting from inputdir (or if inputdir is null, from the current directory) and convert all the graphics files from there. file names are stored as paths offset from inputdir, in the windows path form (ie \ instead of /). i thought i might increase the file header size to 128 bytes so as to have room for 116 characters for file names as well. this seems a good compromise between unnecessary blank space, and allowing skinners a bit more latitude in naming their files. i've just got to fix up a few coordinates in the ntsc .xml files, then all will be done. i'll cvs commit as soon as i have it sorted tonight. cheers, jonathan - Butcher - 2004-03-30 if we're going to have nexted directories, then 128 bytes may be an idea - 64 was good because i could assume the existing files were 42 chars max from being on fatx. - jmarshall - 2004-03-31 will do 128 bytes then. - jmarshall - 2004-04-01 have committed the changes as outlined above to the skin layout. everything should hopefully be fine, though forza has pointed out that i uploaded the incorrect version of textures.xpr. i'm on an unreliable dialup connection, so i probably can't fix this myself. perhaps someone could please run xbmctex.exe on the media directory and commit the new file? thanks, jonathan - Gamester17 - 2004-04-01 @jonathan, great work! will you make sure you update the skinning documentation too so all skinners will know how to skin now? - onkel bouncy - 2004-04-01 again many changes on the skin. to keep the overview is real hard. i think most of the skinners stopped changing their skins. now, me too. possibly if there is a kind of final version of xbmc, but i guess this will be never happen. keep xbmc alive. |