Patchou's Cabana

The personal blog of Patchou

MCT Documentation – Logging and Settings

< back to Media Center Themer’s documentation index

This page should answer some of the remaining start-up questions you may have about this
software and prepare you to do more with the themer in following help
sections. There’s not much to it anyway and you can always contact me directly or on forums if you need more information. After that, the remaining sections will show you how to change Media Center’s resources such as strings ands menus.

Use the Log Luke

One file that’s not yet been covered in this documentation is called MediaCenterThemer Log.txt. You’ll find it in the same directory as the configuration and schema files (%PROGRAMDATA%\Media Center Themer). It is generated every time Media Center is run on your computer and can be used for two reasons: detect problems with Media Center Themer and find out about text color/attributes in use in Media Center. Here is a quick example of what the log file looks like:

0430 11/04/08 15:41:40| ---- Session started ----
0430 11/04/08 15:41:40| Loading themer dll
0430 11/04/08 15:41:40| Process launched (x64): "C:\Windows\ehome\ehshell.exe" 
0430 11/04/08 15:41:40| Theme loaded successfully from "C:\ProgramData\Media Center Themer\MCTDefault.xml"
0430 11/04/08 15:41:40| Initialization was a success
0430 11/04/08 15:41:42| [diagnostic] Text format in use: RGB(151,217,255), 44pt, "Segoe Media Center Light"
0430 11/04/08 15:41:42| [diagnostic] Text format in use: RGB(242,242,242), 44pt, "Segoe Media Center Light"
0430 11/04/08 15:41:42| [diagnostic] Text format in use: RGB(242,242,242), 23pt, "Segoe Media Center"
0430 11/04/08 15:41:48| [diagnostic] Legacy string color in use: RGB(151,217,255)
0430 11/04/08 15:41:48| [diagnostic] Legacy string color in use: RGB(242,242,242)
0430 11/04/08 15:41:52| Unloading themer dll
0430 11/04/08 15:41:52| ---- Session ended ----

The “Session started” line will appear every time Media Center is started. It will be followed by different kinds of informative messages: the ones that should interest you the most are those prefixed with “[diagnostic]”. As you’ve seen in this documentation, Media Center Themer heavily relies on pre-existing conditions to do its work and you may have wondered how you’re supposed to know that a specific text is displayed with a color such as rgb(151,217,255) : well, wonder no more :-). While running, Media Center Themer logs all the different combinations of text formatting that Media Center uses to display something on screen. For that reason, the log file should be your first source of information while theming Media Center, especially if you want to do a good job and do specific customizations here and there to ensure your theme is at its best.

In the log above, you can see that the first 3 diagnostic lines start with “Text format in use:”. These parameters can be used as conditions in the Text sub-elements of TextFormat in your configuration file and were logged when the welcome screen of Media Center was displayed. To generate this example, I then entered the general settings of Media Center which caused the next 2 diagnostic lines to be generated. Because the text is located in the settings pages of Media Center, the lines start with “Legacy text color in use:” which is an indication that you’ll have to add your conditional attributes in the LegacyText sub-elements of TextFormat to change the color of this text.

When a window from an add-on is displayed, you’ll see something like that in your log:

1f98 11/04/08 15:56:13| Process launched (x64): "C:\Windows\eHome\ehExtHost.exe" 11128 d70f6e30-0cec-4ea2-9166-9f8e83ee0880 3 False
1f98 11/04/08 15:56:14| [diagnostic] Text format in use: RGB(2,166,212), 48pt, "Segoe Media Center Light"
1f98 11/04/08 15:56:14| [diagnostic] Text format in use: RGB(2,166,212), 19pt, "Segoe Media Center"
1f98 11/04/08 15:56:14| [diagnostic] Text format in use: RGB(242,242,242), 18pt, "Segoe Media Center Semibold"

Notice the very first piece of text at the beginning of the line: “1f98”. It uniquely identifies each of the different processes launched by Media Center. You can use it as an indication that a given text format was generated by an add-on and not the main Media Center process. If that doesn’t mean much to you, don’t worry: text formatting is defined the same way for Media Center and all its add-ons, you don’t need to create special entries in your configuration file for add-ons that use colors already used by Media Center itself. When the conditions defined in aText element match the text displayed anywhere in the software, new attributes will be applied whether the text is coming from Media Center or any third party add-on (provided of course that the add-on is properly integrated in Media Center’s user interface and is not a third party program launched in a different executable).

Registry Settings

The last piece of configuration for this program can be found in the Windows registry. After installation, the following key is created in your registry and is essential for the software to run properly:

HKEY_LOCAL_MACHINE\SOFTWARE\Patchou\Media Center Themer (same location on both x86 and x64 systems)

Among the many values available, here are the ones you should know about and modify if needed. Note that these settings are only loaded when Media Center is started (so you will need to restart Media Center for changes to apply).

  • EnableThemer: this is a master switch. If set to 0, the entire Media Center Themer software will be disabled.
  • LogTextFormat: this controls if [diagnostic] messages appear in the log for text formats (colors). Set to 0 to disable this feature and save a bit of processing power and memory.
  • LogResources: this controls [diagnostic] messages for resources as well as resource extraction to files. Set to 1 to enable this feature to help you customize the look of Media Center.
  • LogStrings: this controls [diagnostic] messages for strings and messages loaded by the user interface. Set to 1
    to enable this feature to help you modify the text displayed in Media Center.
  • ProcessAddons: by default Media Center Themer processes all the Media Center add-ons it can detect. If you only wish to customize Media Center itself, set this value to 0.
  • ThemeFile: the configuration file loaded by Media Center Themer. By default, the value is “MCTDefault.xml” and the file gets loaded from the application’s data directory. It is recommended to create a new file for your theme, with a new name, and modify this registry setting accordingly. A complete path can be specified to load a configuration file from another directory.

Command Line

Some advanced users may prefer the flexibility of using command line parameters to specify some parameters for the themer. These parameters can be specified when launching Media Center with “ehshell.exe”. Note that command line parameters will only apply to the Media Center’s main program, add-ons will only use the registry settings (they are run in different processes).

  • /EnableThemer=n. See the EnableThemer registry setting.
  • /LogTextFormat=n. See the LogTextFormat registry setting.
  • /LogResources=n. See the LogResources registry setting.
  • /LogStrings=n. See the LogStrings registry setting.
  • /ThemeFile=”theme.xml”. See the ThemeFile registry setting.

It’s finally time to learn how to change the pictures used by Media Center. This will be the last topic of the Get Started section of
this documentation.

  • Archive

  • Categories

  • Blogroll