* This script is invoked when Relay is invoked via Setup. It leads the user
* through the configuration dialog boxes for the features they've chosen to
* install.
on error
set drive &RDRIVE
&PARM1 = &1 ;* type of installation (NORMAL, UPGRADE or UPDATE)
&PARM2 = &2 ;* run Online Registration? (REG or NOREG)
&PARM3 = &3 ;* run SYS Converter? (SYS)
&AFLAG = N ;* flag for Async
&TFLAG = N ;* flag for TN3270 options
&AUTOFLAG = N ;* flag to denote that they may have to update AUTOEXEC
if not exists &RDRIVE.\DATAFILE.DAT goto DONE
open &RDRIVE.\DATAFILE.DAT as #1 for input
loop READ *
read file #1 &DATALINE
if not found close #1; goto DONE
&DATALINE = &trim(&upper(&DATALINE))
if (&DATALINE = +SERIAL) &AFLAG = Y
then gosub SERIAL; then goto READ
if (&DATALINE = +COAX) gosub COAX; goto READ
if (&DATALINE = +TIC) gosub TIC; goto READ
if (&DATALINE = +GATEWAY) gosub GATE; goto READ
if (&TFLAG = Y) goto READ
if (&DATALINE = +TN3270) or (&DATALINE = +TELNET) gosub TCPIP
then &TFLAG = Y; then goto READ
-READ
* Configure Asynchronous options...
-SERIAL
display dialogbox OKCANCEL "Relay/PC Gold Setup" "Relay/PC Gold is now bringing up the configuration dialog for Asynchronous Dialup Support. Choose CANCEL if you do not wish to configure."
if (&rc > 0) return
select menu configuremodems
gosub WAIT
return
* Configure Coax Adapters...
-COAX
display dialogbox OKCANCEL "Relay/PC Gold Setup" "Relay/PC Gold is now bringing up the configuration dialog for 3270 Coax Support. Choose CANCEL if you do not wish to configure."
if (&rc > 0) return
select menu configurecoaxadapters
gosub WAIT
return
* Configure Tic...
-TIC
&AUTOFLAG = Y
display dialogbox OKCANCEL "Relay/PC Gold Setup" "Relay/PC Gold is now bringing up the configuration dialog for Token-Ring Support. Choose CANCEL if you do not wish to configure."
if (&rc > 0) return
select menu configureticaddress
gosub WAIT
return
* Configure 3270 Gateways...
-GATE
&AUTOFLAG = Y
display dialogbox OKCANCEL "Relay/PC Gold Setup" "Relay/PC Gold is now bringing up the configuration dialog for 3270 Gateway Support. Choose CANCEL if you do not wish to configure."
if (&rc > 0) return
select menu configure3270gateways
gosub WAIT
return
* Configure TCP/IP...
-TCPIP
&AUTOFLAG = Y
display dialogbox OKCANCEL "Relay/PC Gold Setup" "Relay/PC Gold is now bringing up the configuration dialog for TCP/IP Support. Choose CANCEL if you do not wish to configure."
if (&rc > 0) return
select menu configureTCP/IP
gosub WAIT
return
-WAIT
loop BOXDOWN *
wait 2
if (&dialogview = NONE) return
-BOXDOWN
* Configuration is complete - launch SYS Converter if user specified to
-DONE
quiet erase &RDRIVE.\DATAFILE.DAT
if (&PARM1 = NORMAL) then &TEXT = "installation"
if (&PARM1 = UPGRADE) then &TEXT = "upgrade"
if (&PARM1 = UPDATE) then &TEXT = "update"
if (&PARM2 = REG) goto REGISTER
* Tell them that the installation/update/upgrade is complete
display dialogbox OK "Relay/PC Gold Setup" "Your &TEXT of Relay/PC Gold is now complete!"
* If the user installed TIC, Gateway or TCP/IP features, notify them that they
* may need to make changes to their AUTOEXEC.BAT and CONFIG.SYS files in order
* for those features to work properly.
if (&AUTOFLAG = Y)
then display dialogbox OK "Relay/PC Gold Setup" "You may need to modify your AUTOEXEC.BAT &LF and CONFIG.SYS files in order to use some &LF of the features you have installed. &LF Please refer to the README file for more details."
* Ask user if they want to run Online Registration (only if they installed ASYNC)
* and only if this is a first time installation
if (&AFLAG = N) goto SYS
if (&PARM1 = UPDATE) goto SYS
display dialogbox OKCANCEL "Relay/PC Gold Setup" "Would you like to register now?"
&HRC = &retcode
if (&HRC = 2) goto SYS
* Launch online registration application
-REGISTER
global &CONT; &CONT = N
launch &RDRIVE.\REGISTER.EXE
&HRC = &retcode
if (&HRC > 0) goto SYS
wait until (&CONT = Y) or (&CONT = E)
if (&CONT = E) goto SYS
select menu controlmenuminimize
quiet execute WRLYREG1
wait until (&CONT = D)
-SYS
if (&PARM3 <> SYS) quiet stop
display dialogbox OKCANCEL "Relay/PC Gold Setup" "If you have a previous version of Relay, you may convert that Directory of Computers to the new 6.0 format. Press OK to run the SYS Convert Program."