echo " "
echo "                 [32m----------------------------------------"
echo "                  [33mEmpire v2.00 2.01allation By [1mCrazy Cad[0m"
echo "                  [33m  The Amiga Castle BBS 214-219-0493   "
echo "                 [32m----------------------------------------"
echo "[31m "
echo "Empire organizes its files into several sub-directories in the PFILES:"
echo "directory.  This program will copy all the Empire files to the proper"
echo "sub-directories.  It will also check and create any needed directories."
echo " "
echo "This script should be executed in a TEMP dir where the 2.01.LZH file "
echo "has been unLZHed."
echo " "
ask "Are you ready to install Empire (y/n)"
if warn 
 echo " "
 else 
 quit
endif
echo " "
if not exists PFILES:
 echo " You must assign your PFILES: Directory before running this Installation."
 echo " This assign is required for C-NET and Empire to know where the PFILES are"
 echo " located.  If the BBS is not running you can manually do this ASSIGN by "
 echo " typing  ASSIGN PFILES: drive:path"
 echo " It would probally look something like..."
 echo "  ASSIGN PFILES:  DH0:CNet/Pfiles"
 echo " See pages 6 and 7 in the C-Net manual for additional help."
endif
if exists PFILES:
 if not exists PFILES:Emp
  echo "Creating PFILES:Emp Directory"
  makedir PFILES:Emp
 endif
 if not exists PFILES:Emp/Players
  echo "Creating Pfiles:Emp/Players Directory"
  makedir PFILES:Emp/Players
 endif
 if not exists PFILES:Emp/Mes
  echo "Creating Pfiles:Emp/Mes Directory"
  makedir PFILES:Emp/Mes
 endif
 if not exists PFILES:Emp/Mail
  echo "Creating Pfiles:Emp/Mail Directory"
  makedir PFILES:Emp/Mail
 endif
 if exists PFILES:Emp/Files/Emp.ID
  echo "PFILES:Emp/Files/Emp.ID file found."
  echo " "
  echo "The Emp.ID file contains Empire registration information.  If this existing"
  echo "Emp.ID file is registered, it should be used instead of the UNREGISTERED "
  echo "Emp.ID that is included in the 2.01.LZH.  "
  echo " "
  echo "- If you DO NOT use your existing Emp.ID the existing Emp.ID will be"
  echo "  preserved as EMP.OLDID in case it is needed."
  echo " "
  echo "- If you DO use your existing Emp.ID the new Emp.ID included in this "
  echo "  LZH will be preserved as Emp.NEWID in case it is needed."
  echo " "
  ask "Do you wish to use your existing Emp.ID file? (y/n)"
  if warn 
   copy Emp.ID Emp.NEWID
   copy PFILES:Emp/Files/Emp.ID Emp.ID
  else
   copy PFILES:Emp/Files/Emp.ID Emp.OLDID
  endif
 endif
 if exists PFILES:Emp/Files
  echo " "
  echo "PFILES:Emp/Files Directory already exists."
  echo " "
  echo "This directory contains Empire program files.  These files will be replaced"
  echo "during the install.  In order to prevent the existance of Extra files,"
  echo "it is recommended that these files be deleted.  Deleting these files WILL"
  echo "NOT affect an existing game (Players, Honor rolls etc..). "
  echo " "
  ask "Do you wish to delete the files in this directory? (y/n)"
  if warn 
   echo "Deleting files..."
   DELETE PFILES:Emp/Files/#?
  else 
   echo "No files deleted."
  endif
 endif
 if not exists PFILES:Emp/Files
  echo "Creating Pfiles:Emp/Files Directory"
  makedir PFILES:Emp/Files
 endif
 echo "Copying Empire file into PFILES:"
 copy Empire PFILES:Empire
 echo "Copying Emp.Maint file into PFILES:"
 copy Emp.Maint PFILES:Emp.Maint
 echo "Copying Emp.Util file into PFILES:"
 copy Emp.Util PFILES:Emp.Util
 echo "Copying Emp.Info! file into PFILES:"
 copy Emp.Info! PFILES:Emp.Info!
 echo "Copying Emp.Update file into PFILES:"
 copy Emp.Update PFILES:Emp.Update
 echo "Copying NewUser file into PFILES:Emp/Players"
 copy Emp.NewUser PFILES:Emp/Players/NewUser
 echo "Copying Emp.Config file into PFILES:"
 copy "Emp.Config" PFILES:Emp.Config
 echo "Copying Emp.#? into PFILES:Emp/Files"
 copy Emp.#? PFILES:Emp/Files
 if exists RAM:Emp/Files/Emp.Main
  echo " "
  echo "RAM:Emp/Files/Emp.Main exists, this indicates that Empire was configured"
  echo "to copy its files into RAM: for faster execution.  This file will be deleted"
  echo "to force Empire to recopy the NEW UPDATED files into ram."
  echo " "
  echo "Note: The Copy files into ram option is not set by default in Emp.Config."
  echo "      you will have to reset this option."
  echo " "
  delete RAM:Emp/Files/Emp.Main
 endif
 echo " "
 echo "Installation is now complete!  You can now delete this TEMP dir that"
 echo "the 2.01.LZH files were unLZHed."
 echo " "
 echo " NOTE:  If you are upgrading from a previous Empire version 1.0, 1.1 or 1.2"
 echo "        and wish to keep the same players, you must use the Emp.Update"
 echo "        program to update the player files.  To do this add Emp.Update"
 echo "        to the PFILES: just as you would any AREXX pfile and run it"
 echo "        before running the Empire game.  If you are upgrading from v1.3 or"
 echo "        above, this program does not need to be ran."
 echo " "
 echo "Empire is now ready to be added to the P-FILES area."
 echo " "
 echo "Please read the Emp.Readme files for more installation info and detailed"
 echo "instructions for Empire."
 echo " "
endif
