; Installer Script for MCF4AmIRC Version 3.0.

(set @def-dest1 "Rexx:")
(set @def-dest2 "AmiTCP:help")
(set @def-dest3 "ENVARC:")
(set @def-dest4 "AmiTCP:Doc")

(set #Hello
(cat "\nWelcome to the Installer Proceedure for MCF for AmIRC"
     " Before using this Installer, you should really read the"
     " documentation first so that you have a better understanding"
     " of what MCF is and how it actually works.  It will also"
     " make the installation process easier to understand."
))

(set #config-player
(cat "\nSelect the program that you wish to us to play sounds."
     " The current default is 'Play16' since this works fine"
     " when you are connected to the net.\n"
))

(set #config-sounds
(cat "\nSelect the directory which contains the sound files"
     " you want to be available for playing thru MCF.\n"
))

(set #config-o-ops
(cat "\nDo you with to turn Auto OPs ON?\n (default 'Y')\n"
))

(set #config-o-rcmds
(cat "\nDo you with to turn Remote Commands ON?\n(default 'Y')\n"
))

(set #config-o-sounds
(cat "\nDo you with to turn the Sounds feature ON?\n(default 'Y')\n"
))

(set #config-o-fserv
(cat "\nDo you with to turn the File Server feature ON?\n(default 'N')\n"
))

(set #player-help
(cat "\nThis is the program that will play your sounds.\n\n"
))

(set #sounds-help
(cat "\nThis is the directory which contains your sound files.\n\n"
))

(set #opts-help
(cat "\nThese are AUTO options that are alterable by using %AUTO.\n\n"
))

(set #path-text-help
(cat "\nSelect directory to install MCF OPs and help files to"
))

(set #path-text-rexx
(cat "\nSelect directory to install MCF Rexx Scripts to"
))

(set #path-help
(cat "\nThis section lets you choose where to install MCF Ops and"
     " help files on your hard disk.  If you already have installed"
     " a previous version or have already configured your MCF.Ops"
     " and MCF.Fserv files, De-Select them before copying.\n\n"
     @askdir-help
))

(set #copy-help
(cat "\nThis section lets you choose where to install MCF Ops and"
     " help files on your hard disk.  If you already have installed"
     " a previous version or have already configured your MCF.Ops"
     " and MCF.Fserv files, De-Select them before copying.\n\n"
     @copyfiles-help
))

(set #path-rexx
(cat "\nThis section lets you choose where to install MCF"
     " Script files on your hard disk.\n"
     "I've found less problems if only 1 directory is assigned"
     " to Rexx:.\n\n"
     @askdir-help
))

(set #rexx-copy-text
(cat "Installing MCF Scripts"
))

(set #help-copy-text
(cat "Installing MCF Ops and Help files. De-Select MCF.Ops and"
     " MCF.Fserv if you have already configured these files"
))

(set #env-copy-text
(cat "Installing MCF ENV: & ENVARC: files:"
))

(set #doc-dir-choose
(cat "\nWhich parts of documentation do you wish to install?"
))

(set #doc-dir-choose-help
(cat "\nSelect which of the following files are to be installed:\n\n"
     "  MCF4AmIRC.guide  - documentation\n"
     "  MCF4AmIRC.readme - ReadMe file. Latest update info\n\n"
     @askdir-help
))

(set #install-docs
(cat "\nInstall documentation?"
     "\n\n"
     "This consists of the following files:\n\n"
     "AmigaGuide documentation\n"
     "ReadMe file. Latest update info\n"
))

(set #goodbye
(cat "\nInstallation of MCF if Complete.  You will need to Re-Boot for "
     "the Assign to MCF: executed unless you manually Assign MCF: to the "
     "proper directory.  Please remember that MCF4AmIRC is not perfect, "
     "nor even anywhere near complete in it's Flood Protection.  Any info "
     "on how to handle Floods not included in MCF would be appreciated\n\n"
))

(set #my-address
(cat	"Donald T Becker\n"
	"335 S Chestnut St\n"
	"Mt Carmel Pa 17851-2219\n\n"
	"email:   dtbecker@prolog.net\n"
	"IRC:     StarDustr!StarDustr@*.ptd.net\n"
))
;********************************************************************

(complete 7) (message #Hello)
(set player
   (askfile (prompt #config-player)
   (help #player-help)
   (default "Play16")
))

(complete 14)
(set sounds
   (askdir (prompt #config-sounds)
   (help #sounds-help)
   (default "")
))

(complete 21)
(set o-fserv
   (askbool (prompt #config-o-fserv)
   (help #opts-help)
   (choices "YES" "NO")
   (default 0)
))

(complete 28)
(set o-ops
   (askbool (prompt #config-o-ops)
   (help #opts-help)
   (choices "YES" "NO")
   (default 0)
))

(complete 35)
(set o-rcmds
   (askbool (prompt #config-o-rcmds)
   (help #opts-help)
   (choices "YES" "NO")
   (default 0)
))

(complete 42)
(set o-sounds
   (askbool (prompt #config-o-sounds)
   (help #opts-help)
   (choices "YES" "NO")
   (default 0)
))

(set ops-f "N")
(set rcmds-f "N")
(set sounds-f "N")
(set fserv-f "N")

(if (= o-ops 1)
     (set ops-f "Y")
)

(if (= o-rcmds 1)
     (set rcmds-f "Y")
)

(if (= o-sounds 1)
     (set sounds-f "Y")
)

(if (= o-fserv 1)
     (set fserv-f "Y")
)

(run "echo >ENV:MCF.Startup $VER: MCF.Startup 3.0 (18.05.96)")
(run "echo >>ENV:MCF.Startup SOUNDPLAYER " player)
(run "echo >>ENV:MCF.Startup SOUNDDIR    " sounds)
(run "echo >>ENV:MCF.Startup FSERV       " fserv-f)
(run "echo >>ENV:MCF.Startup OPS         " ops-f)
(run "echo >>ENV:MCF.Startup RCMDS       " rcmds-f)
(run "echo >>ENV:MCF.Startup SOUNDS      " sounds-f)

(complete 49)
(set target1
   (askdir (prompt #path-text-rexx)
   (help #path-rexx)
   (default @def-dest1)
   (newpath)
))
(set @def-dest1 target1)

(complete 56)
(copyfiles
   (prompt #rexx-copy-text)
   (help @copyfiles-help)
   (source "Rexx")
   (dest @def-dest1)
   (pattern "#?")
   (files)
)

(complete 63)
(set target2
   (askdir (prompt #path-text-help)
   (help #path-help)
   (default @def-dest2)
   (newpath)
))
(set @def-dest2 target2)

(complete 70)
(copyfiles
   (prompt #help-copy-text)
   (help @copy-help)
   (source "MCF")
   (dest @def-dest2)
   (pattern "#?")
   (files)
   (confirm)
)

(complete 77)
(startup "MCF for AmIRC"
     (prompt
      "An Assign to MCF: needs to be added to the \"S:User-Startup\" so the MCF: knows where to find the OPs and help files.")
     (help "Installs the Assign to MCF: in your S:User-Startup")
     (command "Assign MCF: " @def_dest2)
)

(complete 84)
(copyfiles
   (prompt #env-copy-text)
   (help @copyfiles-help)
   (source "ENV:")
   (dest @def-dest3)
   (choices "ENV:MCF.Startup")
   (files)
)

(complete 14)
(set docs (askbool (prompt #install-docs)
		(help #install-docs-help)
		(choices "YES" "NO")
	  )
)

(complete 92)
(if (= docs 1)
	(copyfiles
	   (prompt #doc-dir-choose)
	   (help #doc-dir-choose-help)
           (source "")
           (choices "MCF4AmIRC.guide" "MCF4AmIRC.guide.info" "MCF4AmIRC.ReadMe")
	   (dest @def-dest4)
	   (infos)
           (files)
	   (confirm)
	)
)

(complete 100) (message #goodbye #my-address)

