home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
comm
/
rbbs2.zip
/
UPGRADE.BAT
< prev
Wrap
DOS Batch File
|
1990-10-28
|
12KB
|
424 lines
ECHO OFF
CLS
IF 1028 == %1 GOTO LEVELOK
ECHO ' Incorrect upgrade version -%1- specified. Please read the following
ECHO ' before trying again.
:ERROR1
ECHO '
ECHO ' This batch file should be invoked with the command
ECHO '
ECHO ' UPGRADE 1028 XXXXX (SEE NOTE)
ECHO '
ECHO ' "1028" is the parameter passed to this .BAT file that indicates
ECHO ' this is for upgrading RBBS-PC version 17.3A/0923 to 17.3B
ECHO ' And that you are using the .MRG files from RBBS-MRG.ZIP
ECHO ' against the unmodified source code of RBBS-PC version 17.3A/0923
ECHO '
ECHO ' NOTE: Replace the XXXXX with one of the following:
ECHO '
ECHO ' QB1.02 if using the QuickBasic version 1.02 compiler (recommended)
ECHO ' QB2.01 if using the QuickBasic version 2.01 compiler (recommended)
ECHO ' QB3.00 if using the QuickBasic version 3.00 compiler (recommended)
ECHO ' QB4.5 if using the QuickBasic version 4.5 compiler (acceptable)
ECHO ' IBM2.00 if using the unmodified IBM version 2.00 compiler (acceptable)
ECHO ' NOT Recommended are: QB1.0, QB2.00, QB4.00
ECHO '
ECHO ' YOU MUST USE CAPITAL LETTERS FOR ALL PARAMETERS!
ECHO '
GOTO END
:LEVELOK
IF QB1.00 == %2 GOTO COMPILER
IF QB1.02 == %2 GOTO COMPILER
IF QB2.00 == %2 GOTO COMPILER
IF QB2.01 == %2 GOTO COMPILER
IF QB3.00 == %2 GOTO COMPILER
IF QB4.5 == %2 GOTO COMPILER
IF IBM2.00 == %2 GOTO COMPILER
ECHO ' Incorrect compiler specified! Read the above before trying again.
GOTO ERROR1
:COMPILER
IF TURBO == %3 GOTO TURBO1
IF COMPILE == %3 GOTO COMPILE1
IF LINK == %3 GOTO TURBO5
CLS
ECHO ' This .BAT file is supplied to assist you in upgrading the un-modified
ECHO ' 17.3A/0923 source code to version 17.3B
ECHO ' This .BAT file makes some fundamental assumptions about your
ECHO ' configuration:
ECHO ' 1. BLED version 2.1 or later is available.
ECHO ' 2. 2.0 MB of disk storage is available to contain all the
ECHO ' files necessary to apply, compile and link the revised
ECHO ' version of RBBS-PC that contains these temporary fixes.
ECHO ' 3. Either the QuickBASIC (versions 1.02/2.01/3.00/4.5)
ECHO ' or the unmodified IBM Version 2.0 BASIC compiler is available.
ECHO '
ECHO ' There is no "ASSUMED" compiler in this .BAT file.
ECHO ' You have selected the use of the %2 compiler options.
ECHO '
ECHO ' If the above assumptions are incorrect, hit Ctrl-Break to
ECHO ' terminate this batch job. Otherwise .....
pause
CLS
ECHO '
ECHO ' The UPGRADE.BAT file requires access to:
ECHO ' BDRIVEC2.OBJ XMODEM.OBJ RBBS-PC.BAS RBBSDV.OBJ
ECHO ' BCOMxx.LIB** BLED.EXE LINK.EXE** RBBSSUB1.BAS RBBSUTIL.OBJ
ECHO ' (xx=10/20/30/45) GIVEBK31.OBJ PC-NET.OBJ RBBSSUB2.BAS RBBSML.OBJ
ECHO ' ANSI17.OBJ QBARCV6.OBJ RBBSSUB3.BAS 10-NET.OBJ
ECHO ' RBBSHS.OBJ BASNOV.OBJ RBBSSUB4.BAS FOSSCOMM.OBJ
ECHO ' RBBSSUB5.BAS
IF %2 == IBM2.00 GOTO IBM2
IF %2 == QB1.02 GOTO QBB3
IF %2 == QB2.01 GOTO QBB3
IF %2 == QB3.00 GOTO QBB3
IF %2 == QB4.5 GOTO QBB4
ECHO ' BASCOM.EXE** GWCOM.OBJ** LKL%13.DAT RBBS-VAR.BAS
GOTO BYPASS1
:QBB3
ECHO ' QB.EXE** GWCOM.OBJ** LKL%13.DAT RBBS-VAR.BAS
GOTO BYPASS1
:QBB4
ECHO ' BC.EXE** LKL%14.DAT RBBS-VAR.BAS
GOTO BYPASS1
:IBM2
ECHO ' BASCOM.EXE** IBMCOM.OBJ** RBBS-VAR.BAS
:BYPASS1
ECHO ' NOTE: ** indicates files supplied with the BASIC compiler
ECHO '
ECHO ' IF access to these files is not available from the drive and/or
ECHO ' the DOS subdirectory that you are running this .BAT file out of
ECHO ' hit Ctrl-Break to terminate this batch file. If access to these
ECHO ' files is available to UPGRADE.BAT ......
pause
ECHO ' The following files from RBBS-MRG.ZIP must be unarchived and put
ECHO ' in the same directory as the above pre-existing files:
ECHO '
ECHO ' R-PC%1.MRG Note: The "%1" indicates that these are .MRG
ECHO ' RSB1%1.MRG files to be applied to the unmodified
ECHO ' RSB2%1.MRG source code for 17.3
ECHO ' RSB3%1.MRG
ECHO ' RSB4%1.MRG
ECHO ' RSB5%1.MRG RVAR%1.BAS
ECHO ' If all of the above files are available as indicated above....
IF EXIST R-PC%1.MRG GOTO GOTMRG
ECHO ' Merge files not found. Please put them in the default drive/path.
GOTO END
:GOTMRG
pause
ECHO ' The basic sequence of what is about to happen is:
ECHO '
ECHO ' Original 17.3A/0923 %1.MRG file to upgrade
ECHO ' source code BLED.CFG to 17.3B
ECHO ' ! ! !
ECHO ' \!/ \!/ \!/
ECHO ' +---------------------------------+
ECHO ' ! BLED !======+Modified BAS file
ECHO ' +---------------------------------+ !
ECHO ' \!/
ECHO ' +--------------------+
ECHO ' ! BASIC compiler !
ECHO ' +--------------------+
ECHO ' !
ECHO ' +----------------------+ \!/
ECHO ' ! LINK !+===========Modified OBJ file
ECHO ' +----------------------+
ECHO ' !
ECHO ' \!/
ECHO ' Modified EXE file
ECHO '
ECHO ' If you have reviewed this .BAT file and agree to take the sole
ECHO ' responsibility for what is about to happen .....
PAUSE
:TURBO1
CLS
ECHO ON
RENAME RBBS-VAR.BAS RBBS-VAR.OLD
COPY RVAR%1.BAS RBBS-VAR.BAS
BLED /B/L RBBS-PC.BAS R-PC%1.MRG R-PC%1.BAS WARNR-PC
BLED /B/L RBBSSUB1.BAS RSB1%1.MRG RSB1%1.BAS WARNSUB1
BLED /B/L RBBSSUB2.BAS RSB2%1.MRG RSB2%1.BAS WARNSUB2
BLED /B/L RBBSSUB3.BAS RSB3%1.MRG RSB3%1.BAS WARNSUB3
BLED /B/L RBBSSUB4.BAS RSB4%1.MRG RSB4%1.BAS WARNSUB4
BLED /B/L RBBSSUB5.BAS RSB5%1.MRG RSB5%1.BAS WARNSUB5
REM RENAME CNFG-VAR.BAS CNFG-VAR.OLD
REM COPY CVAR%1.BAS CNFG-VAR.BAS
REM BLED /B/L CONFIG.BAS CNFG%1.MRG CNFG%1.BAS WARNCNFG
REM BLED /B/L CNFG-SUB.BAS CSUB%1.MRG CSUB%1.BAS WARNCSUB
ECHO OFF
:COMPILE1
IF QB1.02 == %2 GOTO QB2MAIN
IF QB2.00 == %2 GOTO QB2MAIN
IF QB2.01 == %2 GOTO QB2MAIN
IF QB3.00 == %2 GOTO QB2MAIN
IF QB4.5 == %2 GOTO QB4MAIN
IF IBM2.00 == %2 GOTO IBMMAIN
ECHO ON
BASCOM R-PC%1.BAS,,NUL,/C:4096/O;
ECHO OFF
GOTO MAINEND
:QB2MAIN
ECHO ON
QB R-PC%1.BAS,/C:4096/O/E/S;
ECHO OFF
GOTO MAINEND
:QB4MAIN
ECHO ON
BC R-PC%1.BAS,,NUL,/O/C:4096/S/E/MBF;
ECHO OFF
GOTO MAINEND
:IBMMAIN
ECHO ON
BASCOM R-PC%1.BAS,,NUL,/C:4096/O/N;
ECHO OFF
:MAINEND
IF TURBO == %3 GOTO TURBO2
ECHO ' If any errors were detected in this compile, terminate this batch job
ECHO ' with Ctrl-Break as something is not correct. Otherwise .....
pause
:TURBO2
IF QB1.02 == %2 GOTO QB2SUB1
IF QB2.01 == %2 GOTO QB2SUB1
IF QB3.00 == %2 GOTO QB2SUB1
IF QB4.5 == %2 GOTO QB4SUB1
IF IBM2.00 == %2 GOTO IBMSUB1
ECHO ON
BASCOM RSB1%1.BAS,,NUL,/X/O;
ECHO OFF
GOTO SUB1END
:QB2SUB1
ECHO ON
QB RSB1%1.BAS,/X/O;
ECHO OFF
GOTO SUB1END
:QB4SUB1
ECHO ON
BC RSB1%1.BAS,,NUL,/X/O/MBF;
ECHO OFF
GOTO SUB1END
:IBMSUB1
ECHO ON
BASCOM RSB1%1.BAS,,NUL,/X/O/N;
ECHO OFF
:SUB1END
IF TURBO == %3 GOTO TURBO3
ECHO ' If any errors were detected in this compile, terminate this batch job
ECHO ' with Ctrl-Break as something is not correct. Otherwise ....
pause
:TURBO3
IF QB1.02 == %2 GOTO QB2SUB2
IF QB2.01 == %2 GOTO QB2SUB2
IF QB3.00 == %2 GOTO QB2SUB2
IF QB4.5 == %2 GOTO QB4SUB2
IF IBM2.00 == %2 GOTO IBMSUB2
ECHO ON
BASCOM RSB2%1.BAS,,NUL,/O;
ECHO OFF
GOTO SUB2END
:QB2SUB2
ECHO ON
QB RSB2%1.BAS,/O/E;
ECHO OFF
GOTO SUB2END
:QB4SUB2
ECHO ON
BC RSB2%1.BAS,,NUL,/O/E/MBF;
ECHO OFF
GOTO SUB2END
:IBMSUB2
ECHO ON
BASCOM RSB2%1.BAS,,NUL,/O/N;
ECHO OFF
:SUB2END
IF TURBO == %3 GOTO TURBO4
ECHO ' If any errors were detected in this compile, terminate this batch job
ECHO ' with Ctrl-Break as something is not correct. Otherwise ....
pause
:TURBO4
IF QB1.02 == %2 GOTO QB2SUB3
IF QB2.01 == %2 GOTO QB2SUB3
IF QB3.00 == %2 GOTO QB2SUB3
IF QB4.5 == %2 GOTO QB4SUB3
IF IBM2.00 == %2 GOTO IBMSUB3
ECHO ON
BASCOM RSB3%1.BAS,,NUL,/O;
ECHO OFF
GOTO SUB3END
:QB2SUB3
ECHO ON
QB RSB3%1.BAS,/O/E;
ECHO OFF
GOTO SUB3END
:QB4SUB3
ECHO ON
BC RSB3%1.BAS,,NUL,/O/E/MBF;
ECHO OFF
GOTO SUB3END
:IBMSUB3
ECHO ON
BASCOM RSB3%1.BAS,,NUL,/O/N;
ECHO OFF
:SUB3END
IF TURBO == %3 GOTO TURBO5
ECHO ' If any errors were detected in this compile, terminate this batch job
ECHO ' with Ctrl-Break as something is not correct. Otherwise ....
pause
:TURBO5
IF QB1.02 == %2 GOTO QB2SUB4
IF QB2.01 == %2 GOTO QB2SUB4
IF QB3.00 == %2 GOTO QB2SUB4
IF QB4.5 == %2 GOTO QB4SUB4
IF IBM2.00 == %2 GOTO IBMSUB3
ECHO ON
BASCOM RSB4%1.BAS,,NUL,/O;
ECHO OFF
GOTO SUB4END
:QB2SUB4
ECHO ON
QB RSB4%1.BAS,/O/E;
ECHO OFF
GOTO SUB4END
:QB4SUB4
ECHO ON
BC RSB4%1.BAS,,NUL,/O/E/MBF;
ECHO OFF
GOTO SUB4END
:IBMSUB4
ECHO ON
BASCOM RSB4%1.BAS,,NUL,/O/N;
ECHO OFF
:SUB4END
IF TURBO == %3 GOTO TURBO6
ECHO ' If any errors were detected in this compile, terminate this batch job
ECHO ' with Ctrl-Break as something is not correct. Otherwise ....
pause
:TURBO6
IF QB1.02 == %2 GOTO QB2SUB5
IF QB2.01 == %2 GOTO QB2SUB5
IF QB3.00 == %2 GOTO QB2SUB5
IF QB4.5 == %2 GOTO QB4SUB5
IF IBM2.00 == %2 GOTO IBMSUB5
ECHO ON
BASCOM RSB5%1.BAS,,NUL,/O;
ECHO OFF
GOTO SUB5END
:QB2SUB5
ECHO ON
QB RSB5%1.BAS,/O/E;
ECHO OFF
GOTO SUB5END
:QB4SUB5
ECHO ON
BC RSB5%1.BAS,,NUL,/O/E/MBF;
ECHO OFF
GOTO SUB5END
:IBMSUB5
ECHO ON
BASCOM RSB5%1.BAS,,NUL,/O/N;
ECHO OFF
:SUB5END
IF TURBO == %3 GOTO TURBO7
ECHO ' If any errors were detected in this compile, terminate this batch job
ECHO ' with Ctrl-Break as something is not correct. Otherwise ....
pause
:TURBO7
IF QB4.5 == %2 GOTO QBLINK
IF IBM2.00 == %2 GOTO IBMLINK1
ECHO ON
LINK @LKL%13.DAT
ECHO OFF
GOTO DELETER
:QBLINK
ECHO ON
LINK @LKL%14.DAT
ECHO OFF
GOTO DELETER
:IBMLINK1
LINK R-PC%1+RSB1%1+RSB2%1+RSB3%1+RSB4%1+RSB5%1+IBMCOM+QBARCV6+ANSI17+XMODEM+RBBSML+BDRIVEC2+PC-NET+10-NET+RBBSDV+RBBSUTIL,,,;
:DELETER
IF TURBO == %3 GOTO TURBO8
ECHO ' If any errors were detected in this Link, terminate this batch job
ECHO ' with Ctrl-Break as something is not correct. Otherwise ....
pause
:TURBO8
GOTO DELETER1
IF QB1.02 == %2 GOTO QB2CNFG
IF QB2.01 == %2 GOTO QB2CNFG
IF QB3.00 == %2 GOTO QB2CNFG
IF QB4.5 == %2 GOTO QB4CNFG
IF IBM2.00 == %2 GOTO IBMCNFG
ECHO ON
BASCOM CNFG%1.BAS,,NUL,/O/E/C:4096/S;
ECHO OFF
GOTO CNFGEND
:QB2CNFG
ECHO ON
QB CNFG%1.BAS,/O/E/C:4096/S;
ECHO OFF
GOTO CNFGEND
:QB4CNFG
ECHO ON
BC CNFG%1.BAS,,NUL,/O/E/C:4096/S;
ECHO OFF
GOTO CNFGEND
:IBMCNFG
ECHO ON
BASCOM CNFG%1.BAS,,NUL,/O/E/C:4096/S;
ECHO OFF
:CNFGEND
IF TURBO == %3 GOTO TURBO9
ECHO ' If any errors were detected in this compile, terminate this batch job
ECHO ' with Ctrl-Break as something is not correct. Otherwise ....
pause
:TURBO9
IF QB1.02 == %2 GOTO QB2CSUB
IF QB2.01 == %2 GOTO QB2CSUB
IF QB3.00 == %2 GOTO QB2CSUB
IF QB4.5 == %2 GOTO QB4CSUB
IF IBM2.00 == %2 GOTO IBMCSUB
ECHO ON
BASCOM CSUB%1.BAS,,NUL,/O/E/C:4096/S;
ECHO OFF
GOTO CSUBEND
:QB2CSUB
ECHO ON
QB CSUB%1.BAS,/O/E/C:4096/S;
ECHO OFF
GOTO CSUBEND
:QB4CSUB
ECHO ON
BC CSUB%1.BAS,,NUL,/O/E/C:4096;
ECHO OFF
GOTO CSUBEND
:IBMCSUB
ECHO ON
BASCOM CSUB%1.BAS,,NUL,/O/E/C:4096/S;
ECHO OFF
:CSUBEND
IF TURBO == %3 GOTO TURB10
ECHO ' If any errors were detected in this compile, terminate this batch job
ECHO ' with Ctrl-Break as something is not correct. Otherwise ....
pause
:TURBO10
ECHO OFF
IF QB4.5 == %2 GOTO CQB45LINK
IF IBM2.00 == %2 GOTO CIBMLINK
ECHO ON
LINK CNFG%1+GWCOM+CSUB%1+RBBSUTIL+FOSSCOMM,,,;
ECHO OFF
GOTO DELETER1
:CQB45LINK
ECHO ON
LINK CNFG%1+CSUB%1+RBBSUTIL+FOSSCOMM,,,;
ECHO OFF
GOTO DELETER1
:CIBMLINK
ECHO ON
LINK CNFG%1+IBMCOM+CSUB%1+RBBSUTIL+FOSSCOMM,,,;
:DELETER1
CLS
ECHO OFF
ECHO ' Before using anything created by this .BAT file, make backup copies
ECHO ' of all files that you can not easily re-create.
ECHO ON
:END