;Install-Script for aSKII-rEQUEST bY SieGeL (tRSi/X-iNNOVATiON)
;$VER: Install_aSKII-rEQUEST 0.01 (06.06.95)

(COMPLETE 0)
(WELCOME "Welcome to the aSKII-rEQUEST v1.00 Installationscript");
(MESSAGE "This Script will install aSKII-rEQUEST V1.00 and all needed files to your System.\n\nNOTE: This Program is only useful for BBS-Systems !\n\nIf you want to install it now select Proceed\n\nor Press Abort to exit !")
(SET @app-name "aSKII-rEQUEST V1.00")
(SET @error-msg "WARNING: aSKII-rEQUEST iNSTALLATION sTOPPED!")
(SET @default-dest "DOORS:")
(SET commanddir "BBS:COMMANDS/BBSCMD/")
(SET #MYBBSSYSTEMHELP
 (CAT           "\nPlease choose which BBS-System you are running.\n"
                "aSKII-rEQUEST runs correct under aMIEX V3.++ or\n"
                "FAME V0.x , and detects automatically, under \n"
                "which System it would started and uses the \n"
                "right message-write functions.\n\n"
		@ASKCHOICE-HELP))
(SET #MYDOORDESTHELP
 (CAT		"\nPlease choose a drawer where aSKII-rEQUEST should\n"
                "be installed. I recommed to create a new Drawer and\n"
                "put the Program + Icon in it, as it creates Data-\n"
                "files for every painter in the Program-Directory!\n\n"
                @ASKDIR-HELP))
(SET #MYASKDOCDEST
 (CAT           "\nPlease enter here a path where the Documentations\n"
                "from aSKII-rEQUEST should be installed.\n"
                "By default, this Directory points to the same dir\n"
                "where you have copied aSKII-rEQUEST.\n\n"
                @ASKDIR-HELP))
(SET #MYDOCHELP
 (CAT		"\nSorry, I had no time to write a German translation\n"
 		"of this document, so thiz time you will only find\n"
                "english documentations in this archive! \n\n"
                @ASKOPTIONS-HELP))

(SET #MYSLOTNUMBERHELP
 (CAT           "\nYou were prompted to enter a Slotnumber of a User\n"
                "you wish to be available as Painter. I have decided\n"
                "to let it work with slotnumbers, so all users could\n"
                "easily change their Handles without any problems...\n\n"
                "If you have entered all your painters, enter 0 (which\n"
                "is default) and press Proceed, than the Installer\n"
                "skips to the next part of the Installation\n\n"
                @ASKNUMBER-HELP))
(SET #MYSLOTNAMEHELP
 (CAT		"\nYou were promted to enter a Name for the artist\n"
            	"shown with the SlotNumber. You don't have to enter\n"
                "here anything, in this case aSKII-rEQUEST uses the\n"
                "original Username from the user.data. If you don't\n"
                "want this, simply enter here a different name,maybe\n"
                "including the artist's group-names etc. It's your\n"
                "own choice...\n\n"
		@ASKSTRING-HELP))
(SET #HELPSCREEN1
 (CAT	 	"\nYou were now asked repeatly for a Slotnumber and\n"
               	"a name for this Slot. The Slotnumber specifies the\n"
               	"painters you want to have built in in aSKII-rEQUEST.\n"
               	"The Names are optional fields, allowing you to enter\n"
               	"different names for the artists. If you have entered\n"
               	"all artists, enter '0' as Slotnumber to continue the\n"
               	"Installation.\n\n"
        	"For more informations use the HELP-Buttons!\n\n"))
(SET #NOTENOUGH
 (CAT     	"\nThis Door requires at least *ONE* artist to work\n\n"
 		"correctly, please try again the Installation!\n\n"))
(SET #BULLPATHHELP
 (CAT		"\nHere you choose a directory for the Output-Bull.\n"
                "This Bull contains all Requests and will be created\n"
                "later in the Directory you specify here.\n\n"
                @@ASKDIR-HELP))
(SET #BULLNAMEHELP
 (CAT           "\nHere you have to define a name for the Output-\n"
                "Bulletin. Default is 'ORDER.TXT', but you could\n"
                "change it to your needs...\n\n"
                @ASKSTRING-HELP))
(SET #MYANSIPICHELP
 (CAT		"\nHere you could choose which Ansis should be installed\n"
                "in the same dir as aSKII-rEQUEST. This Pictures are\n"
                "not needed in any way, but highly recommended to give\n"
                "the Door his nice Design :) . Of course, you could\n"
                "run aSKII-rEQUEST without this Pictures, but who\n"
                "wants to do this.... ? :)\n\n"
                @ASKOPTIONS-HELP))

;-------------- ERSTMAL ABCHECKEN, WELCHE BBS LUFT ------------------------

(COMPLETE 10)

(SET BBSSYSTEM
 (ASKCHOICE 	(PROMPT "Please choose the BBS-System you are running:")
        	(HELP #MYBBSSYSTEMHELP)
            	(CHOICES "FAME"
                	 "AMIEX")
            	(DEFAULT 1)))

;---------------- DANN ERSTMAL DAS DOOR INSTALLEN --------------------------

(COMPLETE 20)

  (SET maindest
   (ASKDIR (PROMPT "Please select Destination for aSKII-rEQUEST:")
           (HELP #MYDOORDESTHELP)
	   (DEFAULT @default-dest)))

  (SET @default-dest maindest)

  (COPYFILES (PROMPT "NOW COPYING FILE...")
	     (HELP @COPY-HELP)
	     (SOURCE "aSKII-rEQUEST")
	     (DEST @default-dest)
	     (INFOS))

;------------- Nach und nach die Painter eingeben lassen -------------------

(COMPLETE 25)

(MESSAGE #HELPSCREEN1)

(COMPLETE 30)

(set slotnummer 1)
(SET counta 1)
(while(<> slotnummer 0)
  (SET slotnummer
   (ASKNUMBER (PROMPT ("\nPlease enter slotnumber for Artist %ld:\n\n(0 = No more artists)\n\n" counta))
              (HELP #MYSLOTNUMBERHELP)
              (DEFAULT 0))
  )
  (SET SNAME ("SLOT.%ld" counta))
  (SET S2NAM ("SHOWN_AS.%ld" counta))
  (SET SLOTNUMBA (cat slotnummer))
  (IF (<> slotnummer 0)
    (
    (TOOLTYPE (DEST (tackon @default-dest "aSKII-rEQUEST"))
     (SETTOOLTYPE SNAME SLOTNUMBA)
     (NOPOSITION))

    (SET slotname
     (ASKSTRING (PROMPT ("\nArtist-Nr.:%ld\n\nPlease enter name for Artist with slot #%ld\n\n(No entry = uses name from user.data)\n\n" counta slotnummer))
                (HELP #MYSLOTNAMEHELP)))

     (IF (<> slotname "")
      (
      (TOOLTYPE (DEST (tackon @default-dest "aSKII-rEQUEST"))
       (SETTOOLTYPE S2NAM slotname)
       (NOPOSITION))
      ))
    )
    (
    (IF (= counta 1) (ABORT #NOTENOUGH))
    ))
  (SET counta (+ counta 1))
 )

;-------- Nu wird noch nach dem Output-Path und Namen gesucht --------------

(COMPLETE 35)

(SET BULLPATH
 (ASKDIR (PROMPT ("Please choose the Directory for the Bulletin:"))
 	 (HELP #BULLPATHHELP)
	 (DEFAULT @default-dest)))

(COMPLETE 40)

(SET BULLNAME
 (ASKSTRING (PROMPT ("And the Filename of the Bulletin please :\n\n"))
            (HELP #BULLNAMEHELP)
            (DEFAULT "ORDER.TXT")))

(SET BULL (tackon BULLPATH BULLNAME))

(TOOLTYPE (DEST (tackon @default-dest "aSKII-rEQUEST"))
 (SETTOOLTYPE "OUTPUT_BULL" BULL)
 (NOPOSITION))

;------------ Nu kommen die ganzen ANSI-Pictures anne Reihe ----------------

(SET pictures
 (ASKOPTIONS (PROMPT "Please choose which ANSIs you want to install.\n\nThey are not needed but highly recommended!\n\n")
             (HELP #MYANSIPICHELP)
             (CHOICES "mAIN mENU        (ASKII-MAIN.TXT)"
                      "eNTER rEQUEST    (ASKII-ENTER.TXT)"
                      "sHOW aRTISTS     (ASKII-LIST.TXT)"
                      "dELETE rEQUESTS  (ASKII-DELETE.TXT)")
             (DEFAULT 15)))

(IF (IN pictures 0)
	(COPYFILES (PROMPT "NOW COPYING FILE...")
		   (HELP @COPY-HELP)
		   (SOURCE "aSKII-MAIN.TXT")
		   (DEST @default-dest)
		   (INFOS)))
(IF (IN pictures 1)
	(COPYFILES (PROMPT "NOW COPYING FILE...")
		   (HELP @COPY-HELP)
		   (SOURCE "aSKII-ENTER.TXT")
		   (DEST @default-dest)
		   (INFOS)))
(IF (IN pictures 2)
	(COPYFILES (PROMPT "NOW COPYING FILE...")
		   (HELP @COPY-HELP)
		   (SOURCE "aSKII-LIST.TXT")
		   (DEST @default-dest)
		   (INFOS)))
(IF (IN pictures 3)
	(COPYFILES (PROMPT "NOW COPYING FILE...")
		   (HELP @COPY-HELP)
		   (SOURCE "aSKII-DELETE.TXT")
		   (DEST @default-dest)
		   (INFOS)))

;----------------- JETZT DIE DOC-FILES + HISTORY ---------------------------

(COMPLETE 60)

(SET docdest
 (ASKDIR (PROMPT "\nPlease select Destination for the Documentation:")
	 (HELP #MYASKDOCDEST)
	 (DEFAULT @default-dest)))

(SET sprachen
 (ASKOPTIONS (PROMPT "Please choose which parts of the Documentation\n\nshould be installed:")
	     (HELP #MYDOCHELP)
	     (CHOICES "English"
		      "History")
	     (DEFAULT 3)))

(IF (IN sprachen 0)
	(COPYFILES (PROMPT "NOW COPYING FILE...")
		   (HELP @COPY-HELP)
		   (SOURCE "aSKII-rEQUEST.GUIDE")
		   (DEST docdest)
		   (INFOS)))

(IF (IN sprachen 1)
	(COPYFILES (PROMPT "NOW COPYING FILE...")
		   (HELP @COPY-HELP)
		   (SOURCE "aSKII-rEQUEST.history")
		   (DEST docdest)
		   (INFOS)))


;----------- JETZT NUR NOCH DIE BBS-SPEZIFISCHEN DINGE ----------------------

(SET MYNAME
 (ASKSTRING (PROMPT "Please enter the Name of aSKII-rEQUEST\n\nto start it from your BBS :\n")
            (HELP @ASKSTRING-HELP)
            (DEFAULT "ASKII")))

(IF (= MYNAME "") (SET BBSNAME "ASKII.INFO") (SET BBSNAME ("%s.INFO" MYNAME)))

;
;-------------------- AMIEX-ICON INSTALLIEREN -----------------------------

(IF (= BBSSYSTEM 1)
 (
  (COMPLETE 80)
  (SET comdir
   (ASKDIR (PROMPT "Please select destination for aSKII-rEQUEST /X Icon:")
	   (HELP @ASKDIR-HELP)
	   (DEFAULT commanddir)))

   (COPYFILES (PROMPT "COPYING FILE...")
	      (HELP @COPY-HELP)
	      (SOURCE "BBS/COMMANDS/BBSCMD/ASKII.INFO")
              (DEST comdir)
              (NEWNAME BBSNAME)
              (FILES))

  (COMPLETE 90)

  (SET TTYPE
   (ASKNUMBER (PROMPT "Enter the Access-Level required to start\n\naSKII-rEQUEST in Amiex :")
              (HELP @ASKNUMBER-HELP)
              (DEFAULT 50)))

  (SET AXSLEVEL (cat TTYPE))
  (SET PRGDIR (tackon @default-dest "aSKII-rEQUEST"))
  (TOOLTYPE (DEST (tackon comdir MYNAME))
   (SETTOOLTYPE "ACCESS" AXSLEVEL)
   (SETTOOLTYPE "LOCATION" PRGDIR)
   (NOPOSITION))
  )
;---------------------------- FAME INSTALLATION -----------------------------
 (

 (SET commanddir
  (ASKDIR (PROMPT "Please choose the Directory where you want\n to save the Door-Definition :")
          (HELP @ASKDIR-HELP)
          (DEFAULT "FAME:SETTINGS/DOORS/BBSCMD/")))

 (COPYFILES (PROMPT "COPYING FILE...")
            (HELP @COPY-HELP)
            (SOURCE "FAME/SETTINGS/DOORS/BBSCMD/ASKII")
            (DEST commanddir)
            (NEWNAME MYNAME)
            (FILES))

 (SET #GO_IN_SYSED
  (CAT		"\nNow please start the System-Editor and load in the\n"
                 "Door-Definition saved in the directory:\n\n"
                 commanddir
                 "\n\nand adjust the Path to aSKII-rEQUEST to this path:\n\n"
                 @default-dest))

 (MESSAGE #GO_IN_SYSED)
 ))

(EXIT "\n\nAnother Tool comming from\n\nthe \"REAL\" (tRSi/X-iNNOVATiON)")
