Completely Extra & Completely Additional Resources - jojobrogess/skin.auramod GitHub Wiki

This Page will consist of RANDOM Resources

Until there is enough of a group to start new pages


Recommended Skin Development Software:

Kodi Dev Kit

In order to get everything working you need to manage your Kodi add-ons as a project while havin the add-on root as the only project folder. To allow JSON-RPC interaction with Kodi you also need to install script toolbox ( https://github.com/phil65/script.toolbox ) as well as activating JSON control via Kodi settings. Also, don´t forget to set up your KodiDevKit settings!

Feature list:

Kodi Log:
  • Open log from command palette
  • Jump to code where exception ocurred by pressing shift+enter when line with path is selected
Syntax Highlighting:
  • Added custom syntax highlighting for
    • Kodi language files
    • Kodi SkinXML files
    • Kodi log files
Tooltips:
  • Show english translation when label id is selected
  • Show additional translation of choice when label id is selected
  • Show actual color / color hex / alpha % for all color themes when color is selected
  • Show variable content
  • Show include content
  • Show font tag
  • Show constant value
  • Show value of selected Kodi InfoLabel in tooltip (by using JSON-RPC)
  • Show infos for selected image (image dimensions and file size)
  • Show window file name
JSON-RPC: (newest script.toolbox version needed)
  • Auto-reload skin after saving xml
  • Execute builtins from command palette
  • Reload skin
  • Display Kodi InfoLabel
Shortcuts:
  • Auto-completion for common Kodi snippets
    • builtins
    • boolean conditions
    • window names
    • include names
    • variable names
    • font names
    • constant names
Shortcuts:
  • Jump to include (shift+enter)
  • Jump to variable (shift+enter)
  • Jump to constant (shift+enter)
  • Jump to font (shift+enter)
  • Jump to label definition (shift+enter)
  • Jump to color definition (shift+enter)
  • Preview skin image (ctrl+enter)
  • Switch xml folder (ctrl+shift+enter)
  • Replicate code fragments (and insert asc. number starting with [offset]) (ctrl+shift+x)
Fuzzy searches:
  • Search through all skin labels
  • Search through all textures including preview
  • Search through all available fonts
  • Search through all translated strings ($LOCALIZE[id]) of currently open file
  • Search through all boolean conditions
  • Search through all builtins
Sanity checks:
  • Check for unused includes / invalid include references
  • Check for unused variables / invalid variable references
  • Check for unused fonts / invalid include font references
  • Check for unused labels / invalid label references
  • Check for invalid values / structure:
    • invalid nodes
    • invalid attributes
    • invalid attribute values
    • invalid node values
    • invalid multiple nodes
    • check for correct parantheses
    • check "empty" action calls
Context menu:
  • Move label to language file (creates entry in strings.po using the first free id and replaces selected text with $LOCALIZE[foo])
  • Go to Kodi online wiki (opens corresponding online help page, only for control types atm)
  • Preview skin image
Misc:
  • Auto-check skin file on saving
  • SkinCheck can also be used from command line with "python script.py PATH_TO_ADDON"
    • requires Python 3.3 interpreter
  • Build skin with texturepacker from command palette
  • Jump-to-Addon command
Remote Actions
  • Quick access to common ADB commands:
    • set remote IP
    • connect to remote
    • push add-on to remote
    • pull log from remote
    • clear temp folder on remote
    • pull screenshot from remote
    • reboot remote

Note: Sublime Text 2 is not supported. Also, KodiDevKit takes advantage of certain features of ST3 that have bugs in earlier ST3 releases or were implemented during betas. For the best experience, use the latest ST3 dev build. Minimum required version is build 3084.

Available on PackageControl: https://packagecontrol.io/packages/KodiDevKit


Recommended File Editors:

Notepad++ notepad4ever

SBT or Sublime Text og-full


How to Run Multiple Kodi "Builds" Video

This will allow you to run different builds that have different files installed on the same installation version.


Kodi in Portable Mode *Only works in Windows

This will allow you to run Kodi in multiple different versions on the same machine.

More information can be found about this here Portable Mode, in the Kodi Wiki.

If you have a requirement to run a different version of Kodi or multiple of the same version without removing your current installation, Kodi has the ability to run in portable mode.

Follow these steps to install additional Kodi setups on the same computer.

Download required version of Kodi and run the Installation
During the installation process you will be prompted to specify the install location. 
This must be changed from the default location offered.
Install to a removable USB device, or another folder or hard drive on your computer where standard users have write permission 
    (e.g. not under Program Files)
Once the Install has finished do not run Kodi until the remainder of these steps have been completed.
Navigate to where you just installed Kodi and look for the file kodi.exe
Create a shortcut to kodi.exe. Usually by right clicking on the kodi.exe file and selecting Send to then desktop (create shortcut)
Right click on the newly created shortcut and select Properties. In Target:, 
Add the switch ` -p` after kodi.exe. NOTICE the space before the `-`. 
    e.g. `"E:\Kodi\kodi.exe" -p` and save the change (see image)

Go to your start menu and locate the newly created entry for your portable install (it will be under new name you gave the install). 
Right click on the Kodi shortcut there (do not run it!), select properties and make the same -p change as above. 
(Note: In some cases an entry may not be created here.)
If you intend to only use the shortcut created in the previous step, this step can be skipped.
[1](/jojobrogess/skin.auramod/wiki/1)(https://kodi.wiki/view/Portable_mode#cite_note-1)
Start Kodi (via either the shortcut or the newly modified start menu entry). 
This will create a portable_data folder within the portable installation folder. 
This folder is the equivelant of the [Kodi data folder](https://kodi.wiki/view/Kodi_data_folder) created in standard installations.

Note: It is this shortcut that enables Portable Mode. If you create another shortcut and fail to add the -p switch, or start this portable version of Kodi in another manner, then the standard userdata folder will be created which may overwrite your existing installation of Kodi.

Portable01

Location of Kodi data folder When using Portable Mode, the location of the Kodi data folder is moved into the portable installation folder and named portable_data Using the image example, the Kodi data folder will be located in E:\Kodi v18\portable_data


https://kodi.wiki/view/Basic_playlists#Queue_Method

Queue Method

While browsing your library, you have the ability to queue items for playback. These items are added to a temporary playlist.

This temporary playlist can be accessed from the Sideblade menu and can be further edited and saved as a Basic playlist.

Using this method, Basic Playlists can be created for Music and Videos from either the files or library structure.

1600px-Music-Playlist04 Browse your library or browse your folder structure

1600px-Music-Playlist05 Select Go to playlist from the left sideblade menu

1600px-Music-Playlist06 The playlist view. Note the combined Movies and Episodes.

Adding Items Highlight the item to be added then using one of the following two methods

    Press Q on your keyboard, or
    From the [Context Menu](https://kodi.wiki/view/Basic_controls#Context_Menu) select Queue item

Repeat as necessary and all items will be added to the temporary playlist.

Accessing the Playlist From the Sideblade menu select Go to playlist Once you enter the playlist, the options for editing and saving are similar to the Playlist Editor detailed above.


https://kodi.wiki/view/Skin_Optimizations

Why to optimize skins

While the PC the skin is written on might be fast enough to render the GUI at 4k/60fps, it might be too expensive to run on lower end hardware. This page will give examples how to optimize skins, focusing on GPU performance.

In general, the two most important resources on the GPU are memory bandwidth and computing power. Different systems might show different bottlenecks to render the GUI, but the following topics should help both.

Analysis via Renderdoc

It is highly advised to use a tool like Renderdoc, a debugging program for computer graphics. While it offers a lot of features for graphics developers, it is also suitable for skinners to check for issues in the GUI layer compositing. With Renderdoc, the amount of overdraw can easily be judged.

A tutorial how it can aid in skin development can be found here.


What's Renderdoc?

Renderdoc (https://renderdoc.org/) is a free graphics debugger for OpenGL and DirectX. It can record, store and replay frames rendered by an application. It exposes a plethora of information related to the commands the GPU receives.

The scope of this tutorial is to give you an idea how it can be used to debug Kodi skins.

Capturing a frame

Firstly, it is highly recommended to disable smart redraw and dirty regions in Kodi.

Install and run Renderdoc. Go to the "Launch Application" tab, select the Kodi executable and click "Launch"

797px-Renderdoc_start

Kodi should start up. Navigate to a view you want to analyze. In Renderdoc, select "Capture Frame(s) Immediately". The capture should show up. Activate it via double click.

Renderdoc_capture

Analyzing frame composition

Select the "Texture Viewer" tab. In the "Event Browser" on the left hand side, extend the "Colour Pass" list on the left. There you can 'replay' each draw command the GPU receives for this frame. On the main screen, you will see the state of the framebuffer at the selected GPU command.

Renderdoc_drawcalls

On the right, you can switch to the input texture of the selected draw command. With a click on the thumbnail, it will show up on the main screen. The alpha channel is off by default, so some textures might look a bit odd.

By right clicking on the main screen, the content of the selected pixel can be analyzed.

Overlays

Some overlays have relevance for Kodi. Select one with the dropdown menu.

Renderdoc_overlays

Highlight Drawcall

Shows the boundary box of the selected draw call.

Wireframe mesh

Shows the geometry the current selected draw call is using.

Quad Overdraw (Pass)

Shows the accumulated amount of overdraw of the currently selected draw call. This is the most interesting overlay. It shows how many layers are making up the skin. The colors change with each layer applied. Right click on a pixel to see how many layers are drawn.

Renderdoc_overdraw