|
|
Integration with Messenger
Being able to replace the resources of Messenger is not enough
to make a complete skinning system. You have to know what to
replace exactly and the effects it will have on other windows of
the program. Remember that a single image can be used in many
places so you can't arbitrarily change one picture for one window
without considering the global impact of the modification.
For that reason, Messenger Plus! offers a special feature
integrated in Messenger called the Resource
Extractor. As its name implies, this feature extracts all
the resources from your version of Messenger, however, it does not
stop there. The resources are also categorized, decrypted, analyzed
and reformatted to be more understandable. All of this is done
automatically and the whole process takes about a minute to
complete.
The Resource Extractor can be found in the Preferences panel of
Messenger Plus! (Customize!\Skins
section). By default, all the resources will be extracted in a new
directory in your documents, named with the version string of your
Messenger. The only option not enabled by default concerns
Messenger Plus!'s own resources. Leave this option unchecked until
you read the Skinning Messenger Plus!
Itself (keep that one for a later date). Also, note that if a
hard-patch skin (a skin not made for Messenger Plus!) is installed
on your Messenger, its resources will be extracted the same way but
some of the more advanced analyses may not be achieved
properly.
Resource Extraction
Once the resources are extracted, the log file of the operation
called Extraction Log is automatically
opened. You can quickly verify if everything went well by checking
the last line of the log. This file sums-up some primary
information regarding the extraction: version of Messenger Plus!,
version and language of Messenger, number of resources extracted
grouped by categories, result of each consolidation operation along
with the name of the associated window if available, and finally,
the number of pictures that were cross-referenced to generate the
Picture Map file.
Directories and sub-directories are created for
clarity reasons. Overall, you'll find four different kinds of
files in these directories:
-
Raw resources. These are the
resources as extracted from Messenger, untouched by Messenger Plus!
(with the exception of decrypted resources, see below). Raw
resources can be found in the Graphics and
Windows directories and are generally named using
this convention: file_type_id.ext. So for example, a
bitmap with id 11103 extracted from Messenger's executable file
will be named msgexe_bitmap_11103.bmp
and a window's style sheet with id 920 extracted from Messenger's
resources DLL will be named msgres_4005_920.txt (style sheet's resource type is
normally 4005, but you don't have to care about that).
- Reorganized Raw Resources. Text
files can be found in the Strings or
Strings & Colors directory. The
msglang_strings.txt file contains all
the text displayed by Messenger anywhere in the program (with the
exception of some dialog boxes and menus). The strings are kept
unchanged but are organized in an ini-like file for more
readability. The original table ids are specified in the file
although this information should not be of much importance for your
skin. Each line is formatted like this: id=string and
special characters such as carriage returns and tabulations are
replaced with their corresponding escape codes (\r, \n and \t). The
same escape codes are recognized in the skininfo file for strings
replacement.
- Reformatted Resources. You'll
find these in the Consolidated Windows directory.
The text files recorded there are the results of several analyses
performed by Messenger Plus! on Messenger's windows and style sheet
files. Because of the way these files are generated internally at
Microsoft, their raw form is not very practical or user-friendly.
Definition files' lines are packed together and style sheets are
full of references to sub-resources ids for strings, integers,
colors, rectangles, backgrounds, etc... whenever possible,
Messenger Plus! rearranges the lines and replaces cryptic resource
references with actual data (see below for more details). Messenger
Plus! also analyzes the files for pictures references and places a
copy of each picture file in the Pictures sub
directory of each window. This way, you instantly get to see all
the pictures used by a given window (keep in mind though that in
some instances, Messenger can also use other pictures not
hard-coded in the windows files).
- Generated Data Files. Although
the string file could be considered part of this category, the term
specifically refers to files that are generated without data taken
directly from Messenger. This includes Extraction
Log.txt that you'll find in the root directory and
Picture Map.txt that's located in the Graphics directory. This particular file will give
you the list of every window using each picture files. Use it to
quickly assess the impact of modifying one specific picture. As
noted above, remember that some pictures are also used by Messenger
in some places without direct linking in the windows files: the map
file is here to help but nothing beats live testing.
RLE Encrypted Files
One thing that discouraged many skinners in the recent releases
of Messenger is the use of a proprietary RLE
encryption system for pictures. Fortunately, Messenger Plus! deals
with this and can successfully decrypt most of the encrypted files.
In most cases, Messenger accepts both encrypted and un-encrypted
picture files in its windows which means that you don't need to
worry about the need to re-encrypt your pictures when replacing
encrypted content. Most of the pictures decrypted by Messenger
Plus! are not named in a particular way so you won't even know if
the file was previously encrypted or not. Here are the known
limitations of the current decryption system:
- Some RLE files do not translate properly into picture files.
These files are left untouched with a .msrle extension attached to them. If Messenger
Plus! encounters a problem while trying to decrypt a file, the
result will also be a raw RLE file. These files are provided as-is
and can only have some use if you find another tool to decrypt
them.
- The RLE system used by Microsoft is complex and supports many
different kinds of properties. Although Messenger Plus! does its
best to produce an accurate representation of the picture, some
properties cannot be emulated 100% in a decrypted format. This is
particularly true for multi-picture files: some RLE files contain
more than one picture. When such a file is detected, Messenger
Plus! outputs every picture next to one another and appends
"_multi" to the name of the file. There
is currently no known way to replace this kind of file directly
although some of them can be entirely replaced with new pictures
with new ids, using different files for each sub-image index (this
will make more sense the day you have to work with multi-picture
files).
Consolidation of Windows Files
If you're among the more experienced skinners (or are working
toward this goal), the consolidated windows files
are exactly what you'll need to study to create skins that are
truly different from the original Messenger layout. This subject is
discussed in details in the Windows
Definitions and Styles section. Here, you'll find a list of
what exactly Messenger Plus! does to the files to make them more
understandable. In the Consolidated
Windows directory, you'll find a sub-directory for each
window. If the name of the window is available in the style file,
it is added to the name of the directory. For each window, a
modified version of the definition file and the style sheet file is
copied along with the associated pictures.
Note that because Messenger uses ANSI encoding for its style and
definition files, string replacements applied in Messenger versions
using extended character sets (such as Japanese) will produce files
that are not readable by Messenger (the files will possibly be
accepted on some systems and not others). In that case, Messenger
won't be able to read the modified files if specified in a skin,
the strings will need to be kept separated from those files.
Except for some minor limitations (like explained above), it is
interesting to note that the consolidated versions of definition
and style files are created to stay compatible with Messenger. This
means that if needed, you can do your changes in the consolidated
version of the file and use it in your skin without any problem.
That being said, it is recommended to use this practice for testing
purposes only, especially for style sheet files. Public versions of
your skin should use the original raw version of the files with the
appropriate modifications included into them. This ensures that
compatibility with localized versions of Messenger (as well as with
future updates) is kept at its maximum.
Final Word
Although this section of the documentation may seem quite
technical, you'll quickly get used to it while working on your
skins. Don't give it too much thoughts in the beginning and just
use this page as a reference when needed. All you need to remember
is that you can count on Messenger Plus! to extract the resources
of Messenger and present them to you in the best possible way. The
main reason you'll generally want to look at the extracted files is
to get the id of a resource you want to modify, whether it's a
string, a picture, a window definition or anything else belonging
to Messenger.
With that in mind, you're now ready to create your very first skin!
See Also
Introduction to Skinning, Your First Skin.
|