;Install script for HeroQuest MapMaker. Copyright � 1993 Camiel Rouweler.
;$VER: Install_HQMM 1.04 (05-nov-1993)

(welcome
   "Welcome to the HQMM installer\n"
)

(message
   "This utility will install HQMM to your system.\n"
   "If you have an older version of HQMM installed it will be overwritten "
   "when you install HQMM to the same directory as the older version.\n"
   "Also, during the installation, a font will be copied into your FONTS: "
   "drawer. This is required in order to let HQMM run.\n"
   "About 120 kB free diskspace is required, plus 10 more for the font"
)

(if (exists "Work:" (noreq))
   (set @default-dir "Work:HQMM") ;then clause
   (set @default-dir "SYS:HQMM")  ;else clause
)


(set destdir
   (askdir
      (prompt "select a directory where you want HQMM installed to.")
      (help @askdir-help)
      (default @default-dir)
      (newpath)
   )
)

(set @default-dest destdir)

(if (NOT (exists destdir (noreq)))
   (makedir destdir
      (prompt "I will now create the directory " destdir)
      (help @makedir-help)
      (infos)
   )
)

(copyfiles
   (prompt "Select files to install" destdir)
   (help "HQMM\nThis is the executable file.\n\n"
         "StoryPaper\nThis is an IFF file that is used for printing the story. "
         "This one is required if you want to print new missions.\n\n"
         "HQMM.guide\nThis is the documentation file in which is explained how "
         "to use HQMM. To read this file, you need the AmigaGuide utility.\n\n"
         "HQMM.example\nThis is an example of a mission for HQMM.\n\n"
         "General help:\n"
         @copylib-help)
   (source "")
   (dest destdir)
   (choices "HQMM" "StoryPaper" "HQMM.guide" "HQMM_example")
   (infos)
   (confirm)
)

(if (NOT (exists "FONTS:heroquest.font" (noreq)))
   (
      (message
         "I will now create a new directory in your FONTS: drawer to "
         "store the HQMM font."
         (help "This font is required by HQMM in order to run.")
      )
      (copyfiles
         (prompt "OK to copy HQMM font to FONTS:heroquest?")
         (help @copyfiles-help)
         (source "fonts")
         (dest "FONTS:")
         (choices "heroquest")
         (fonts)
         (confirm)
      )
   )
)

(if (OR (NOT (exists "FONTS:Times/18")) (NOT(exists "FONTS:Times/24")))
   (message
      "Warning: The font Times/18 or Times/24 is not installed in your "
      "FONTS: drawer. HQMM needs these in order to run."
      (help "Use the Commodore system installer utility to install these "
            "fonts to your system.")
   )
)

(exit
   "\n\nHave a nice day!"
)