;****************************************************************
; Mongol Commander Install Script
; $VER: 1.0 (24 Januar 1995) ©1995 Raw Entertainment
;
; Original    by Jack Rollan ---- 27 Januar 1995
;
; Written for use with Commodore's Installer V1.24
;****************************************************************

;****************************************************************
; Some useful variables
;****************************************************************
  
 ; set up a error cleanup routine
  
(onerror
 (makeassign "Mongol_Install_Disk" (safe))
)


(complete 0)
  
 ; just in case the installation was restarted

(makeassign "Mongol_Install_Disk" (safe))  ; start fresh
  
 ; see if this is really an update
  
(@execute-dir "c:")
  
(set is_update 0)
(set Mongol_dest (getassign "MONGOL" "a"))
  

 ; if update, be sure they want program in same place
  
(if Mongol_dest
 (if (askbool
   (prompt "Your current copy of Mongol Commander \n appears to be located in the drawer \n named \""
     Mongol_dest
     "\". \n Do you want the update installed in that drawer?"
   )
   (help
    "The installer has determined that you may already have a "
    "copy of Mongol Commander installed on your system. If "
    "this is wrong, select NO as an answer. Otherwise, select YES."
  )
  (default 1)
 )
  
  (set is_update 1)  ; if user wants in same place
  
  (set Mongol_dest   ; if user wants in different place
   (tackon
    (askdir
     (prompt "A In which disk or drawer should Mongol Commander be installed?")
     (help @askdir-help)
     (default @default-dest)
    )
    "Mongol"
   )
  )
 )
  
  
; else if not an update, get a location for program
;
 (set Mongol_dest
  (tackon
   (askdir
    (prompt "B In which disk or drawer should \n  Mongol Commander be installed?")
    (help @askdir-help)
    (default @default-dest)
   )
   "Mongol"
  )
 )
)

(makedir Mongol_dest (infos))
  
 ; reinitialize assigns

(if (not @pretend)
 (makeassign "MONGOL" Mongol_dest)
)
  
 ; now lock on to disks volumes
  
  
   
  ;COPY DISKETTES & DECOMPRESS
(askdisk
 (prompt "Please insert the master program disk \n labeled \"Mongol_Install_Disk\"."
         "\n (files will be copied and decompressed).")
 (help "The Mongol Commander program and other \n options will be copied "
   "from the \"Mongol_Install_Disk\" \n into your system.")
  (dest  "Mongol_Install_Disk")
)
  
  
  
(copyfiles
 (prompt "Files will be copied and decompressed.")
  (help "The Mongol Commander program and other \n options will be copied "
   "from the \"Mongol_Install_Disk\" \n into your system.") 
   (source "Mongol_Install_Disk:")
   (dest Mongol_dest)
   (all)
   (confirm)
)

(working "decompressing files")

 
   (run "lha e Mongol:PROGRAMS.lzh Mongol:")

   (delete "Mongol:PROGRAMS.lzh")

   (run "lha e Mongol:AUDIO/SOUND.lzh Mongol:AUDIO/")

   (delete "Mongol:AUDIO/SOUND.lzh")

(complete 16)

(askdisk
 (prompt "Please insert \n the disk \n labeled \"Mongol_Disk_2\"."
         "\n (files will be copied and decompressed).")
 (help "The Mongol Commander program and other \n options will be copied "
   "from the \"Mongol_Disk_2\" \n into your system.")
  (dest  "Mongol_Disk2")
)

 (copyfiles
 (prompt "Files will be copied and decompressed.")
  (help "The Mongol Commander program and other \n options will be copied "
   "from the \"Mongol_Install_Disk\" \n into your system.")
   (source "Mongol_Disk2:")
   (dest Mongol_dest)
   (all)
   (confirm)
)

   (working "decompressing files")


   (run "lha e Mongol:ARMIES/ARMY5.lzh Mongol:ARMIES/")

   (delete "Mongol:ARMIES/ARMY5.lzh")

   (run "lha e Mongol:FRAMES/SCAPES1.lzh Mongol:FRAMES/")

   (delete "Mongol:FRAMES/SCAPES1.lzh")

(complete 32)

(askdisk
 (prompt "Please insert \n the disk \n labeled \"Mongol_Disk_3\"."
        "\n (files will be copied and decompressed).")
 (help "The Mongol Commander program and other \n options will be copied "
   "from the \"Mongol_Disk_3\" \n into your system.")
  (dest  "Mongol_Disk3")
)

 (copyfiles
 (prompt "Files will be copied and decompressed.")
  (help "The Mongol Commander program and other \n options will be copied "
   "from the \"Mongol_Install_Disk\" \n into your system.")
   (source "Mongol_Disk3:")
   (dest Mongol_dest)
   (all)
   (confirm)
)

(working "decompressing files")


   (run "lha e Mongol:ARMIES/ARMY6.lzh Mongol:ARMIES/")

   (delete "Mongol:ARMIES/ARMY6.lzh")

   (run "lha e Mongol:FRAMES/SCAPES2.lzh Mongol:FRAMES/")

   (delete "Mongol:FRAMES/SCAPES2.lzh")

 (complete 48)

(askdisk
 (prompt "Please insert \n the disk \n labeled \"Mongol_Disk_4\"."
         "\n (files will be copied and decompressed).")
 (help "The Mongol Commander program and other \n options will be copied "
   "from the \"Mongol_Disk_4\" \n into your system.")
  (dest  "Mongol_Disk4")
)

 (copyfiles
 (prompt "Files will be copied and decompressed.")
  (help "The Mongol Commander program and other \n options will be copied "
   "from the \"Mongol_Install_Disk\" \n into your system.")
   (source "Mongol_Disk4:")
   (dest Mongol_dest)
   (all)
   (confirm)
)

(working "decompressing files")

   (run "lha e Mongol:ARMIES/ARMY4.lzh Mongol:ARMIES/")

   (delete "Mongol:ARMIES/ARMY4.lzh")

 (complete 64)

(askdisk
 (prompt "Please insert \n the disk \n labeled \"Mongol_Disk_5\"."
         "\n (files will be copied and decompressed).")
 (help "The Mongol Commander program and other \n options will be copied "
   "from the \"Mongol_Disk_5\" \n into your system.")
  (dest  "Mongol_Disk5")
)

 (copyfiles
 (prompt "Files will be copied and decompressed.")
  (help "The Mongol Commander program and other \n options will be copied "
   "from the \"Mongol_Install_Disk\" \n into your system.")
   (source "Mongol_Disk5:")
   (dest Mongol_dest)
   (all)
   (confirm)
)
 (complete 80)

(working "decompressing files")

   (run "lha e Mongol:ARMIES/ARMY3.lzh Mongol:")

   (delete "Mongol:ARMIES/ARMY3.lzh")

(askdisk
 (prompt "Please insert \n the disk \n labeled \"Mongol_Disk_6\"."
          "\n (files will be copied and decompressed).")
 (help "The Mongol Commander program and other \n options will be copied "
   "from the \"Mongol_Disk_6\" \n into your system.")
  (dest  "Mongol_Disk6")
)

 (copyfiles
 (prompt "Files will be copied and decompressed.")
  (help "The Mongol Commander program and other \n options will be copied "
   "from the \"Mongol_Install_Disk\" \n into your system.")
  (source "Mongol_Disk6:")
   (dest Mongol_dest)
   (all)
   (confirm)
)

(working "decompressing files")

   (run "lha e Mongol:ARMIES/ARMY2.lzh Mongol:")

   (delete "Mongol:ARMIES/ARMY2.lzh")




(complete 99)

 ; modify S:User-Startup

(startup "Mongol Commander ©1994-5"
 (prompt
  "Some instructions need to be added to the \"S:user-startup\" "
  "so that your system will be properly configured to use Mongol Commander.")
 (help "Do this or Mongol Commander won't work!!")
 (command "ASSIGN MONGOL: \"" Mongol_dest "\"\n"
  
 )
)


(complete 100)
  
(exit)
