Theme Installer v1.04
(c) 1996 Jonathan Potter

** Please see the bottom of this file for history information **

1. Introduction

This is a fairly straight-forward program written more as an exercise than
anything else. I've come back to Windows programming after a long absence
and this is my first Win95 program. Therefore, it's fairly basic, but it
seems to work ok.

Theme Installer automates (to some extent) the process of installing
Plus! Themes. There are hundreds of different themes available now, and all
the ones I have seen need to be installed manually (copy these files to your
Plus!\Themes directory, these to Windows\System, etc..) What's more, they had
to be uninstalled manually too.

Theme Installer reads the .theme file for the theme and works out where
everything needs to go, and copies it there automatically.

It also adds an Uninstall entry to the Registry. This allows you to
uninstall the theme from the Add & Remove Software control panel.


2. Installation

To install Theme Installer, simply copy the executable somewhere nice and
safe (c:\Program Files is a good choice.) Once you have it in its permanent
location, run it (from Explorer or Start/Run, etc).

A message box will appear asking you if you want to install the
Theme Installer Shell Extension. This simple extension adds an "Install"
item to the context menu for Plus! Theme files
(HKEY_CLASSES_ROOT\ThemeFile\Shell).


3. Usage

Once the Shell Extension has been installed, all you need to do to install
a new theme is select the .theme file with mouse button 2 and choose the
Install command from the context menu. Theme Installer automatically
determines the location of your Windows and Themes directories and copies the
theme files to their correct locations.

Removing installed Themes is straight-forward. Open the Add & Remove Software
applet in the Control Panel, find your theme in the list and click the
Remove button. Once again, Theme Installer reads the .theme file to find out
what to delete, so this file must still be present in the Themes directory.
For safety's sake, no .DLL or .EXE files will be deleted (in case they are
shared files); if a theme uses these for the screen saver, you will have to
delete them manually (this is pretty rare in my experience).

The Theme Installer keeps a log of the files it copies and the directories
it creates, so it knows exactly what to remove. This allows a theme to use
components not supplied with it itself (for example, some themes use the
standard Windows or Plus! cursors).


4. Installing Startup, Shutdown screens and Fonts

Theme Installer can install startup screens, shutdown screens and fonts.
To do this, the theme file creator must (manually) insert a special section
in the theme file. This is because the Plus! themes system does not support
these files itself. This special section looks like this:

	[ThemeInstallerSpecial]
	StartupScreen=<startup pic name>
	ShutdownWaitScreen=<shutdown wait pic name>
	ShutdownSafeScreen=<shutdown safe pic name>
	Font=%FontDir%<font name>
	Font=%FontDir%<font name>
	etc.

StartupScreen, ShutdownWaitScreen and ShutdownSafeScreen are the startup and
shutdown screens. You can use any filename for these screens; they will
automatically be renamed to Logo.sys, LogoW.sys and LogoS.sys when they are
copied. The existing startup and shutdown screens will be renamed to Logo.old,
LogoW.old and LogoS.old, and will be recovered when the user uninstalls the
theme.

%FontDir% is a magic tag for Theme Installer that causes it to insert the
path of the Windows\Fonts directory (similar to %ThemeDir% and %WinDir%).
You can install as many fonts as you like (each on a separate line in the
theme file).


5. Uninstalling

You should not move Theme Installer once you have installed it, as the
Uninstall entries it creates for themes point to this location. If you do
want to remove Theme Installer, run the program again and it will allow you
to remove the shell extension. You can then delete the executable.


6. Distribution

Theme creators are free to distribute Theme Installer with their themes.
If the program is run without a supplied filename, it will search its current
directory for a .theme file to install. This means you can ship an archive
with Theme Installer in the same directory as the theme files, and all the
user has to do is double-click on the Installer icon. Note that if they want
to be able to uninstall the theme the Theme Installer program has to be in
the same location as when the theme was installed, so you might want to point
this out in any documentation you supply.


7. Tips on Theme Installation

Theme Installer will install most themes with no intervention from you.
The .theme file (if you are viewing by icons, it has the same icon as the
Desktop Themes control panel applet) MUST be in the same folder as all the
theme components. Many themes are distributed this way, but some have the
.theme file in one folder, and the components in sub-directory of that.
If this is the case, you have to move the .theme file into the same folder
as the components before installing.

I've noticed that many themes are shipped with an incorrect screen saver
defined. If you get an error saying a component could not be copied,
you can select Ok to continue the installation, skipping over the
troublesome file. Selecting cancel will remove anything installed up to this
point.


8. Copyright

This program is freeware, but not public domain, and is (c) 1996 by
Jonathan Potter. You may do with it what you wish. Any comments,
bug reports, etc, are welcome. Please email me at jpotter@lss.com.au.

- Jon



-----------------------------
Program history :

   v1.0              - initial release

   v1.01  (2 Aug 96) - Theme Installer now stores information about what
                       it actually installs in the .theme file that is
                       copied (the original is not touched).

                       This allows it to remove only the files and
                       directories that it created. Some themes use standard
                       Windows or Plus! objects (eg for cursors), and v1.0
                       Theme Installer would have deleted these along with
                       the theme files if you uninstalled a theme.

   v1.02 (20 Aug 96) - Changed the context menu command from "Install" to
                       "&Install Theme"

   v1.03  (5 Sep 96) - Added [ThemeInstallerSpecial] key facility, to enable
                       the installation of startup screens, shutdown screens
                       and fonts.

   v1.04 (17 Sep 96) - If a theme component is not found when installing, a
                       more "user-friendly" warning is shown, and it is
                       only shown once per install. That way, if the theme
                       author forgot to include a whole lot of components,
                       you don't get endless anonymous errors during the
                       installation process.
