@Echo Off

Rem If you want to install this Theme somewhere else, PLEASE change these
Rem directories.  If the directory doesn't exist, it will be created.
Rem (At least, it will try to create it...)

Rem PLEASE NOTE: This installation is intended for those who have purchased
Rem the PLUS! pack from Microsoft.

Rem To Change where the ULTIMA *.THEME files go, modify this line:

  Set ThemeDir="C:\Program Files\Plus!\Themes\"

Rem If you change this line, then the ULTIMA *.THEME files won't be able to
Rem find the files, and you'll have to manually install each sound, icon,
Rem cursor and background within Windows 95.

  Set UThemeDir="C:\Program Files\Plus!\Themes\Ultima\"

Rem ********************************************************************
Rem Start of the Installation.  DO NOT MODIFY ANY TEXT BELOW THIS LINE!!
Rem ********************************************************************

  If "%ThemeDir%" == "" Goto NoSpace
  If "%UThemeDir%" == "" Goto NoSpace

  If Exist "Ultima 1.The" Goto WinZip

  If "%@Eval[2+2]" == "4" Goto 4DosInstall
  If Not Exist "Ultima 1.Theme" Goto NotAgn2
  If Not Exist %ThemeDir%\*.* Goto NoThemeDir
  cls
  Echo.
  Echo                    Installing the Ultima Theme 2.1!
  Echo.
  If Not Exist %UThemeDir%\*.* Md %UThemeDir%
  Echo.
  Echo Installing .THEME files to %ThemeDir%.
  Pause
  Move *.Theme %ThemeDir%
  Echo.
  Echo Installing Wallpaper, Icons, Cursors, Fonts and Sounds to %UThemeDir%.
  Pause
  Move *.jpg %UThemeDir%
  Move *.ani %UThemeDir%
  Move *.cur %UThemeDir%
  Move *.bmp %UThemeDir%
  Move *.dll %UThemeDir%
  Move *.ttf %UThemeDir%
  Move *.wav %UThemeDir%
  Copy Readme.Doc %UThemeDir%
  Echo.
  Echo Installation Almost Complete
  Echo.
  Echo To complete installation go to the Control Panel and select Desktop Themes.
  Echo From there, choose the Ultima Theme.  Enjoy!
  Pause
  Goto Xit2

:4DosInstall
  If Not Exist "Ultima 1.Theme" Goto NotAgain
  If Not DirExist %ThemeDir Goto NoThemeDir
  setlocal
  unalias *

:Main
  Gosub SHOWDIRS
  Drawbox 1 20 3 60 2 bla on cya fill cya sha
  ScrPut 2 22 bri whi on cya Micro Dragon's Ultima Theme Installer
  Set CHC=%@SELECT[Main.Mnu,6,26,18,53]
  Set CHC=%@SUBSTR[%CHC,9,1]
  Iff "%CHC"=="" Then goto XIT
  ElseIff "%CHC"=="U" Then goto INSTALL
  ElseIff "%CHC"=="e" Then goto ABOUT
  ElseIff "%CHC"=="s" Then goto XIT
  ElseIff "%CHC"=="-" Then goto Main
  EndIff

:Install
  cls blu on whi
  DrawBox 1 22 3 58 2 Bla on Cya fill Cya
  ScrPut 2 24 Bri Whi on Cya Installing Ultima Theme
  Screen 5 0
  Iff Not DirExist %UThemeDir Then
    Md %UThemeDir
    Echo %UThemeDir created...
  Endiff
  Echo.
  Echo Installing .Theme files to %ThemeDir.
  Pause
  Move *.Theme %ThemeDir
  Echo.
  Echo Installing Wallpaper, Icons, Cursors, Fonts and Sounds to %UThemeDir.
  Pause
  Move *.jpg;*.ani;*.cur;*.bmp;*.ttf;*.wav;*.dll %UThemeDir
  Copy Readme.Doc %UThemeDir
  cls
  DrawBox 10 25 12 56 2 Bla on Gre fill Gre sha
  ScrPut 11 27 Bri Whi on Gre Installation Almost Complete
  Echo.
  Echo To complete installation, go to the Control Panel, select Desktop Themes.
  Echo From there, choose the Ultima Theme.  Enjoy!
  Pause
  Goto Xit

:NotAgain
  DrawBox 1 20 3 60 2 Bla on Red fill Red
  ScrPut 2 22 Bri Yel on Red The Ultima Theme is already installed
  Pause ÿ
  Goto Xit2

:NotAgn2
  Echo.
  Echo The Ultima Theme is already installed.
  Echo.
  Goto Xit

:NoThemeDir
  Echo.
  Echo The following directory does not exist!
  Echo.
  Echo %ThemeDir%
  Echo.
  Echo This is where the ULTIMA.THEME file will go.  Please edit this
  Echo INSTALL.BAT file and correct the THEMEDIR setting at the top
  Echo of the file and save.  Then run the Install program again.
  Echo.
  Goto Xit2

:About
  DrawBox 7 16 17 64 2 Bla on Gre fill Gre Sha
  ScrPut 8 19 Bri Yel on Gre Micro Dragon's Ultima Theme 4Dos Installer
  ScrPut 9 34 Bla on Gre version 1.1
  ScrPut 10 28 Bla on Gre Created by Louis Stice
  ScrPut 11 31 Bla on Gre louis@psyber.com
  ScrPut 13 18 Bri Whi on Gre This program is FREEWARE.  Distribute Freely.
  ScrPut 15 18 Bri Whi on Gre This theme was made in honor of the best game
  ScrPut 16 18 Bri Whi on Gre ever made.
  Pause ÿ
  Goto Main

:ShowDirs
 cls blu on whi
   Rem Make sure I have the longest directory...
 Set Tlen=%@Len[%UThemeDir]
 If "%@Len[%ThemeDir]" GT "%Tlen" set Tlen=%@Len[%ThemeDir]
 Set LEFT=%@Int[%@Eval[(80-(%Tlen+24))/2]]
 Set RIGHT=%@EVAL[%TLen+%LEFT+27]
 Drawbox 17 %LEFT 21 %RIGHT 1 bla on cya fill cya sha
 Scrput 18 %@EVAL[%LEFT+2] Bri Whi on Cya Ultima Theme Directory: %UThemeDir
 Scrput 20 %@EVAL[%LEFT+2] Bri Whi on Cya Plus! Pack Directory  : %ThemeDir
 Set Tlen=
 Set LEFT=
 Set RIGHT=
 Return

:NoSpace
 Echo.
 Echo Automatic installation of the Ultima Theme cannot be done in the
 Echo current DOS window configuration.  The problem is that you don't
 Echo have enough environment space for the installation program's
 Echo variables.  You can either make more environment space or follow
 Echo the instructions for the manual installation in the ReadMe.Doc file.
 Echo.
 Echo To clear out environment space:
 Echo Open a DOS window.  Type SET [Return] A whole bunch of text whizzes
 Echo by.  This is your enviroment.  
 Echo.
 Echo To clear an environment variable, type SET, the name of the environment
 Echo variable, an equals sign, then press Return.
 Echo.
 Echo Example:  set blaster=[Return]
 Echo.
 Echo This will erase the blaster environment FOR THIS DOS BOX ONLY.  It's
 Echo only a temporary change.  When you've cleared enough space, this install
 Echo program will work just fine.
 Echo.
 Pause
 Goto Xit2

:WinZip
 Echo.
 Echo Installation of the Ultima Theme is not possible!  The UTheme21.Zip
 Echo file contains long filenames and typing in PKUnzip UTheme21.Zip will
 Echo truncate all of the filenames.
 Echo.
 Echo You need to use a Windows 95 Zip file manager like WinZip to properly
 Echo extract the files contained in this archive.  WinZip
 Echo is a shareware program that knows how to handle long filenames.
 Echo Sorry for this inconvenience.
 Echo.
 Echo If you don't know where to find WinZip for Windows 95, go to my web
 Echo page (http://www.psyber.com/~louis) and follow the link in the
 Echo files area to WinZip.
 Echo.
 Pause
 Goto Xit2

:XIT
  If "%@Eval[2+2]" == "4" EndLocal
  If "%@Eval[2+2]" == "4" Cls Whi on Bla
Rem Cancel
:Xit2
  set ThemeDir=
  set UThemeDir=
