;Installer V4 For AmiTCP Control Panel V4.2
;
;©Martin Hunt 1995
;
;
(set amitcpdir
   (askdir
       (prompt "Where is AmiTCP installed?")
       (help @askdir-help)
       (default "dh1:amitcp")
   )
)

(makeassign "amitcp" amitcpdir)

(set @default-dest
   (askdir
       (prompt "Where is AmiTCP Control Panel Installed?")
       (help @askdir-help)
       (default "sys:wbstartup")
   )
)

(copyfiles
   (prompt "Copying AmiTCP Control Panel to " @default-dest )
   (help @copyfiles-help)
   (source "cp_MainProg/controlpanel4.2")
   (dest @default-dest)
   (infos)
)
(copyfiles
   (prompt "Copying AmiTCP Control Panel to " @default-dest )
   (help @copyfiles-help)
   (source "cp_MainProg/controlpanel.exe")
   (dest "c:")
)

(set @doc-dest
   (askdir
       (prompt "Where do you want to install AmiTCP Control Panel's Documents?")
       (help @askdir-help)
       (default "amitcp:docs")
   )
)


(copyfiles
   (prompt "Copying AmiTCP Control Panel Docs to " @doc-dest )
   (help @copyfiles-help)
   (source "docs")
   (all)
   (dest @doc-dest)
   (infos)
   (confirm)
)

(copyfiles
   (prompt "Copying AmiTCP Control Panel Scripts and Commands to AmiTCP:bin" )
   (help @copyfiles-help)
   (source "bin")
   (all)
   (dest "Amitcp:bin")
   (infos)
   (confirm)
)

(set left
    (asknumber
       (prompt "Enter How Far From The Left \n Of The Screen Do You Want \n Control Panel To Appear")
       (help @asknumber-help)
       (range 0 1200)
       (default 20)
    )
)

(set top
    (asknumber
       (prompt "Enter How Far Down The Screen \n Do You Want Control Panel To Appear")
       (help @asknumber-help)
       (range 0 600)
       (default 30)
    )
)

(set device1
   (askbool
      (prompt "Select The Device\n You Use To\nConnect To The Net\nThis Is Usually\n\nSLIP")
      (default 1)
      (choices "SLIP" "OTHER")
      (help "IF Not Sure It Is Probably SLIP")
   )  
)

(if(= device1 1)
   (set DEVICE ("DEVICE = SLIP\n"))
   (set DEVICE ("DEVICE = PPP\n"))
)

(set Status1
   (askbool
      (prompt "\nDo You Want\nControl Panel\nStatus Information")
      (default 1)
      (choices "YES" "NO")
      (help "Oh dear, just make a decsion!")
   )
)

(if(= Status1 1)
   (set STATUS ("STATUS = YES\n"))
   (set STATUS ("STATUS = NO\n"))
)

(message "\nControl Panel V4 runs various programs.\nAs everybodies Amitcp set up varies\nit is necessary to configure the particular\n programs you are using.\n")
(set link
   (askfile
      (prompt "What Script Do You Use To Connect To The Net?")
      (help @askfile-help)
      (default "amitcp:bin/link_gui.exe")
   )
)

(set mail
   (askfile
       (prompt "What Mail Program Do You Use?")
       (help @askfile-help)
       (default "amitcp:bin/mail")
   )
)

(set news
   (askfile
       (prompt "What News Program Do You Use?")
       (help @askfile-help)
       (default "amitcp:bin/grn")
   )
)

(set ftp
   (askfile
       (prompt "What FTP Program Do You Use?")
       (help @askfile-help)
       (default "amitcp:bin/gui-ftp")
   )
)

(set WWW
   (askfile
       (prompt "What WWW Browser Do You Use?")
       (help @askfile-help)
       (default "amitcp:bin/amosaic")
   )
)

(set Gopher
   (askfile
       (prompt "What Gopher Program Do You Use?")
       (help @askfile-help)
       (default "amitcp:bin/gopher")
   )
)

(set IRC
   (askfile
       (prompt "What IRC Program Do You Use?")
       (help @askfile-help)
       (default "amitcp:bin/gv")
   )
)

(set UUDECODER
   (askfile
       (prompt "What UUDecoder Do You Use?")
       (help @askfile-help)
       (default "amitcp:bin/uuxt-gui")
   )
)

(set DeArchiver
   (askfile
       (prompt "What DeArchiver Do You Use?")
       (help @askfile-help)
       (default "amitcp:bin/guiarc")
   )
)

(set newsed
   (askfile
       (prompt "What News Group Editor Do You Use?")
       (help @askfile-help)
       (default "amitcp:bin/newsed_gui.exe")
   )
)


(message "Control Panel V4\n has 2 buttons and 5 menu items\n which can be configured by the user,\n\n If you do not require these options\n just keep pressing proceed")
(set option1Text
   (askstring
      (prompt "Enter Menu and Button Text For Option 1/nIt Must Consist Of 1 Word Only")
      (help @askstring-help)
      (default " ")
   )
)
(set option1prog
   (askfile
      (prompt "Which Program Should This Option Run?")
      (help @askfile-help)
      (default " ")
   )
)
(set option2Text
   (askstring
      (prompt "Enter Menu and Button Text For Option 2\nIt Must Consist Of 1 Word Only")
      (help @askstring-help)
      (default " ")
   )
)
(set option2prog
   (askfile
      (prompt "Which Program Should This Option Run?")
      (help @askfile-help)
      (default " ")
   )
)
(set option3Text
   (askstring
      (prompt "Enter Menu Text For Option 3\nIt Must Consist Of 1 Word Only")
      (help @askstring-help)
      (default " ")
   )
)
(set option3prog
   (askfile
      (prompt "Which Program Should This Option Run?")
      (help @askfile-help)
      (default " ")
   )
)
(set option4Text
   (askstring
      (prompt "Enter Menu Text For Option 4\nIt Must Consist Of 1 Word Only")
      (help @askstring-help)
      (default " ")
   )
)
(set option4prog
   (askfile
      (prompt "Which Program Should This Option Run?")
      (help @askfile-help)
      (default " ")
   )
)
(set option5Text
   (askstring
      (prompt "Enter Menu Text For Option 5\nIt Must Consist Of 1 Word Only")
      (help @askstring-help)
      (default " ")
   )
)
(set option5prog
   (askfile
      (prompt "Which Program Should This Option Run?")
      (help @askfile-help)
      (default " ")
   )
)
(message "Control Panel V4\n allows the user details for 4 users to be preset,\n and quickly changed by using a menu.\n\nIf you don't want use this facility\njust keep pressing proceed.")
(set User1Text
   (askstring
      (prompt "Enter Menu Text For User 1\nIt Must Consist Of 1 Word Only")
      (help @askstring-help)
      (default "")
   )
)
(set user1name
   (askstring
      (prompt "Enter the User Name of User 1\nThis Must Consist Of One Word Only")
      (help @askstring-help)
      (default "")
   )
)
(set user1realname
   (askstring
      (prompt "Enter the Real Name of User 1")
      (help @askstring-help)
      (default "")
   )
)

(set User2Text
   (askstring
      (prompt "Enter Menu Text For User 2\nIt Must Consist Of 1 Word Only")
      (help @askstring-help)
      (default "")
   )
)
(set user2name
   (askstring
      (prompt "Enter the User Name of User 2\nThis Must Consist Of One Word Only")
      (help @askstring-help)
      (default "")
   )
)
(set user2realname
   (askstring
      (prompt "Enter the Real Name of User 2")
      (help @askstring-help)
      (default "")
   )
)
(set User3Text
   (askstring
      (prompt "Enter Menu Text For User 3\nIt Must Consist Of 1 Word Only")
      (help @askstring-help)
      (default "")
   )
)
(set user3name
   (askstring
      (prompt "Enter the User Name of User 3\nThis Must Consist Of One Word Only")
      (help @askstring-help)
      (default "")
   )
)
(set user3realname
   (askstring
      (prompt "Enter the Real Name of User 3")
      (help @askstring-help)
      (default "")
   )
)
(set User4Text
   (askstring
      (prompt "Enter Menu Text For User 4\nIt Must Consist Of 1 Word Only")
      (help @askstring-help)
      (default "")
   )
)
(set user4name
   (askstring
      (prompt "Enter the User Name of User 4\nThis Must Consist Of One Word Only")
      (help @askstring-help)
      (default "")
   )
)
(set user4realname
   (askstring
      (prompt "Enter the Real Name of User 4")
      (help @askstring-help)
      (default "")
   )
)
(message "Control Panel V4\nAllows You To Change The Pop You Use\nBy Selecting A Menu option\n\nIf You Do Not require This Option \nJust Keep Pressing Proceed")
(set pop1text
   (askstring
      (prompt "Enter The Menu Text For POP1\nThis Must Consist Of One Word Only")
      (help @askstring-help)
      (default "")
   )
)
(set pop1file
   (askfile
      (prompt "What Dialscript Is Used To Dial This POP")
      (help @askfile)
      (default "")
   )
)
(set pop2text
   (askstring
      (prompt "Enter The Menu Text For POP2\nThis Must Consist Of One Word Only")
      (help @askstring-help)
      (default "")
   )
)
(set pop2file
   (askfile
      (prompt "What Dialscript Is Used To Dial This POP")
      (help @askfile)
      (default "")
   )
)
(set pop3text
   (askstring
      (prompt "Enter The Menu Text For POP3\nThis Must Consist Of One Word Only")
      (help @askstring-help)
      (default "")
   )
)
(set pop3file
   (askfile
      (prompt "What Dialscript Is Used To Dial This POP")
      (help @askfile)
      (default "")
   )
)


(Set intro1 "; Control Panel Configuration File\n")
(Set intro2 "; CPv4.0 23/3/95\n")
(set blankline "\n")
(Set intro3 "; Requester Position\n")
(set leftpos ("LEFT = %ld \n" left))
(set toppos ("TOP = %ld \n" top))
(set intro4 "; Where Is AmiTCP stored?\n")
(set amitcpdirt ("AMITCPDIR = %s \n" amitcpdir))
(set Intro5 "; Programs Used By Control Panel\n")
(set linkprog ("Link = %s \n" link))
(set mailprog ("Mail = %s \n" mail))
(set newsprog ("News = %s \n" news))
(set FtpProg ("FTP = %s \n" ftp))
(set WWWprog ("WWW = %s \n" www))
(Set GopherProg ("Gopher = %s \n" gopher))
(set IRCprog ("IRC = %s \n" irc))
(set tracerouteprog ("TRACEROUTE = Amitcp:bin/ping.traceroute.exe\n"))
(set pingprog ("PING = AMITCP:bin/ping.traceroute.exe\n"))
(set archieprog ("ARCHIE = Amitcp:bin/archie_gui.exe\n"))
(set fingerprog ("FINGER = Amitcp:bin/finger_gui.exe\n"))
(set autoprog ("AUTO = AMITCP:bin/auto.exe\n"))
(Set UUDecoderProg ("UUDECODER = %s \n" uudecoder))
(Set Dearchiverprog ("DEARCHIVER = %s \n" dearchiver))
(Set NewsEdProg ("NEWSEDPROG = %s \n" NewsEd))
(set UserOptions ("; Control Panel User Options\n"))
(set option1 ("OPTION1 = %s %s\n" option1text option1prog))
(set option2 ("OPTION2 = %s %s\n" option2text option2prog))
(set option3 ("OPTION3 = %s %s\n" option3text option3prog))
(set option4 ("OPTION4 = %s %s\n" option4text option4prog))
(set option5 ("OPTION5 = %s %s\n" option5text option5prog))
(set Users ("; Control Panel Users\n"))
(set user1 ("USER1 = %s %s %s \n" user1text user1name user1realname))
(set user2 ("USER2 = %s %s %s \n" user2text user2name user2realname))
(set user3 ("USER3 = %s %s %s \n" user3text user3name user3realname))
(set user4 ("USER4 = %s %s %s \n" user4text user4name user4realname))
(set Pops ("; Control Panel Pop's\n"))
(set pop1 ("POP1 = %s %s\n" pop1text pop1file))
(set pop2 ("POP2 = %s %s\n" pop2text pop2file))
(set pop3 ("POP3 = %s %s\n" pop3text pop3file))
(set endofconfig "; End Of Control Panel Config File")
(textfile
   (dest "s:cp.config")
   (append intro1)
   (append intro2)
   (append blankline)
   (append intro3)
   (append leftpos)
   (append toppos)
   (append blankline)
   (append Intro4)
   (append amitcpdirt)
   (append blankline)
   (append device)
   (append blankline)
   (append status)
   (append blankline)
   (append intro5)
   (append linkprog)
   (append mailprog)
   (append newsprog)
   (append ftpprog)
   (append wwwprog)
   (append gopherprog)
   (append ircprog)
   (append pingprog)
   (append tracerouteprog)
   (append autoprog)
   (append archieprog)
   (append fingerprog)
   (append uudecoderprog)
   (append dearchiverprog)
   (append newsedprog)
   (append blankline)
   (append useroptions)
   (append option1)
   (append option2)
   (append option3)
   (append option4)
   (append option5)
   (append users)
   (append user1)
   (append user2)
   (append user3)
   (append user4)
   (append pops)
   (append pop1)
   (append pop2)
   (append pop3)
   (append endofconfig)
)

