home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
PWRBAT23.ZIP
/
PBINSTAL.PWR
< prev
next >
Wrap
Text File
|
1996-05-09
|
10KB
|
363 lines
;VARIABLES
Variable Work1,80
Variable Msg,80
Variable Work2,1
Variable CurrColor,3
Variable MonitorType,1
Variable BorderClr,3,4
Variable BlkOnRed,3,'064'
Variable BlkOnGray,3,112
Variable BluOnGray,3,113
Variable RedOnGray,3,116
Variable TitleClr,4
Variable ErrClr,4
Variable Bell,1,#7
Variable Normal,1,1
Variable Off,1,0
Variable Spaces,40,' '
Variable SourceDrive,1
Variable SourceDir,80,'\'
Variable RTN,1,#013
Variable ESC,1,#027
Variable VolID,12
Variable DriveType,12
Variable StrLoc,2
Variable FlopInst,1,1
Variable ErrorMsg,78
Variable TargetDrive,1
Variable TargetDir,80
Variable DemoDrive,1
Variable DemoDir,80
Variable InfoMsg,76
Variable CreateFlag,1,0
;HOUSEKEEPING
?Color Work1,Work1,CurrColor
SetVar MonitorType,DispAdapter
Compare MonitorType,'C',,,ColorMon
SetVar BorderClr,'000'
SetVar BlkOnRed,'007'
SetVar BlkOnGray,BlkOnRed
SetVar BluOnGray,BlkOnRed
SetVar RedOnGray,BlkOnRed
Label ColorMon
Concat ErrClr,'',BlkOnRed
Concat TitleClr,'',BlkOnGray
;MAIN ROUTINE
Clear BluOnGray,,'░',BorderClr
Concat Work1,TitleClr,' Press Escape To Exit Installation '
Center Work1,25
Box2 6,2,75,4,RedOnGray
Concat Work1,TitleClr,'PowerBatch Installation'
Center Work1,3
SaveBox 2,6,78,8
Box1 2,6,78,8,BlkOnGray
Label FindSource
WriteAt 3,7,'Look For Install Disk...'
SetVar SourceDrive,'A'
?DiskInfo SourceDrive,VolID,DriveType
Compare VolID,'PBINSTAL',,,FoundID
SetVar SourceDrive,'B'
?DiskInfo SourceDrive,VolID,DriveType
Compare VolID,'PBINSTAL',,,FoundID
SetVar SourceDrive,'?'
Label FoundID
WriteAt 3,7,'Drive Letter Which Contains Install Disk '
Write SourceDrive,RedOnGray
GoToXY 44,7
FlushKey
ReadUpKey Work1
GoToXy 44,7
Write Work1,RedOnGray
Compare Work1,Esc,,,EndPgm
Compare Work1,RTN,,,SrcDrEntered
SetVar SourceDrive,Work1
Label SrcDrEntered
?DiskInfo SourceDrive,VolID,DriveType
LocStr 'Floppy',DriveType,1,StrLoc
Compare StrLoc,0,FromFlop
SetVar FlopInst,0
?CurrDir SourceDrive,SourceDir
ClearBox 2,6,78,8,BlkOnGray
WriteAt 3,7,'Source Dir '
Write SourceDir,RedOnGray
GoToXY 14,7
FlushKey
ReadUpKey Work1
Compare Work1,Esc,,,EndPgm
Compare Work1,RTN,,,FoundDisk
Compare Work1,'\',,,NoSlash
Concat Work1,'\',Work1
Label NoSlash
WriteAt 14,7,Spaces
WriteAt 14,7,Work1
ReadStr SourceDir
Concat SourceDir,Work1,SourceDir
Upper SourceDir
WriteAt 14,7,SourceDir
Concat Work1,SourceDrive,':',SourceDir,'\POWERMAK.EXE'
?FileExist Work1,FoundDisk
SetVar ErrorMsg,'This directory does not contain the source for PowerBatch'
Perform ErrorRtn
GoTo FindSource
Label FromFlop
Compare VolID,'PBINSTAL',,,FoundDisk
SetVar ErrorMsg,'This disk is not the install disk...'
Perform ErrorRtn
GoTo FindSource
Label FoundDisk
ClearBox 2,6,78,8,BlkOnGray
WriteAt 3,7,'Drive Letter Where You Will Install PB Plus+ '
Write 'C:',RedOnGray
GoToXY 48,7
FlushKey
ReadUpKey TargetDrive
Compare TargetDrive,Esc,,,EndPgm
Compare TargetDrive,RTN,TrgDrEntered,TrgDrEntered
SetVar TargetDrive,'C'
Label TrgDrEntered
?DriveExist TargetDrive,SrcDrOK
SetVar ErrorMsg,'Specified drive does not exist...'
Perform ErrorRtn
GoTo FoundDisk
Label SrcDrOK
ClearBox 2,6,78,8,BlkOnGray
WriteAt 3,7,'Target Directory: '
SaveBox 2,10,78,15
Box1 2,10,78,15,BlkOnGray
WriteAt 3,11,'In order to compile PB Plus+ programs from any directory on your system,'
WriteAt 3,12,'the compiler must be in a directory located on the DOS search path.'
WriteAt 3,13,'If you wish to compile from only the directory containing the compiler'
WriteAt 3,14,'it will not be necessary to have the compiler on the DOS search path.'
GoToXY 21,7
FlushKey
ReadStr TargetDir
Upper TargetDir
SetVar Work2,TargetDir
Compare Work2,'\',,,TrgtDirOK
Concat TargetDir,'\',TargetDir
Label TrgtDirOK
Concat TargetDir,TargetDrive,':',TargetDir
SetVar Work1,TargetDir
Perform ChkDir
Compare CreateFlag,0,SrcDrOk
?InPath TargetDir,PathOK
SetVar InfoMsg,'Selected directory not in path...'
Perform MsgRtn
Wait 30
RestBox
Label PathOK
ClearBox 2,6,78,8,BlkOnGray
WriteAt 3,7,'Drive Letter Where You Will Install PB Plus+ Demos Programs '
WriteAt 63,7,TargetDrive
Write ':'
GoToXY 63,7
FlushKey
ReadUpKey DemoDrive
Compare DemoDrive,Esc,,,EndPgm
Compare DemoDrive,RTN,DemoDrEntered,DemoDrEntered
SetVar DemoDrive,TargetDrive
Label DemoDrEntered
?DriveExist DemoDrive,DemoDrOK
SetVar ErrorMsg,'Specified drive does not exist...'
Perform ErrorRtn
GoTo PathOK
Label DemoDrOK
ClearBox 2,6,78,8,BlkOnGray
WriteAt 3,7,'Demo Directory: '
GoToXY 19,7
FlushKey
ReadStr DemoDir
Upper DemoDir
SetVar Work2,DemoDir
Compare Work2,'\',,,DemoDirOK
Concat DemoDir,'\',DemoDir
Label DemoDirOK
Concat DemoDir,DemoDrive,':',DemoDir
SetVar Work1,DemoDir
Perform ChkDir
Compare CreateFlag,0,DemoDrOK
Box1 2,6,78,15,BluOnGray
WriteAt 3,7,'Source Drive For PB Plus+ '
Write SourceDrive,RedOnGray
Write ':',RedOnGray
Write SourceDir,RedOnGray
WriteAt 3,9,'Target Directory: '
Write TargetDir,RedOnGray
WriteAt 3,11,'Demo Directory : '
Write DemoDir,RedOnGray
GoToXy 5,13
FlushKey
ReadYN 'Enter Y if correct...Else enter N (Y/N)',Work2
Compare Work2,'N',,,ColorMon
;INSTALL SOFTWARE
Length Work1,SourceDir
MidString Work1,SourceDir,Work1,1
Compare Work1,'\',,,SrcDirOK
Concat SourceDir,'\'
Label SrcDirOK
Concat Work1,TitleClr,' Install Software '
Center Work1,25
Cursor Off
Box4 2,17,78,19,RedOnGray,,7
Concat Work1,SourceDrive,':',SourceDir,'POWERMAK.EXE'
Concat Msg,'Copy ',Work1,' to ',TargetDir,' '
MidString Msg,Msg,1,70
WriteAt 3,18,Msg,RedOnGray
COPY Work1,TargetDir,' >NUL'
Concat Work1,SourceDrive,':',SourceDir,'SMLMODEL.MDL'
Concat Msg,'Copy ',Work1,' to ',TargetDir,' '
MidString Msg,Msg,1,70
WriteAt 3,18,Msg,RedOnGray
COPY Work1,TargetDir,' >NUL'
Concat Work1,SourceDrive,':',SourceDir,'ARRAYS.EXE'
Concat Msg,'Copy ',Work1,' to ',TargetDir,' '
MidString Msg,Msg,1,70
WriteAt 3,18,Msg,RedOnGray
COPY Work1,TargetDir,' >NUL'
Cursor Off
Concat Work1,SourceDrive,':',SourceDir,'COLORS.EXE'
Concat Msg,'Copy ',Work1,' to ',TargetDir,' '
MidString Msg,Msg,1,70
WriteAt 3,18,Msg,RedOnGray
COPY Work1,TargetDir,' >NUL'
Cursor Off
Concat Work1,SourceDrive,':',SourceDir,'KEYID.EXE'
Concat Msg,'Copy ',Work1,' to ',TargetDir,' '
MidString Msg,Msg,1,70
WriteAt 3,18,Msg,RedOnGray
COPY Work1,TargetDir,' >NUL'
Cursor Off
Concat Work1,SourceDrive,':',SourceDir,'MENUDEMO.EXE'
Concat Msg,'Copy ',Work1,' to ',TargetDir,' '
MidString Msg,Msg,1,70
WriteAt 3,18,Msg,RedOnGray
COPY Work1,TargetDir,' >NUL'
Cursor Off
Concat Work1,SourceDrive,':',SourceDir,'PLUSDEMO.EXE'
Concat Msg,'Copy ',Work1,' to ',TargetDir,' '
MidString Msg,Msg,1,70
WriteAt 3,18,Msg,RedOnGray
COPY Work1,TargetDir,' >NUL'
Cursor Off
Concat Work1,SourceDrive,':',SourceDir,'README.1ST'
Concat Msg,'Copy ',Work1,' to ',TargetDir,' '
MidString Msg,Msg,1,70
WriteAt 3,18,Msg,RedOnGray
COPY Work1,TargetDir,' >NUL'
Cursor Off
Concat Work1,SourceDrive,':',SourceDir,'FILE_ID.DIZ'
Concat Msg,'Copy ',Work1,' to ',TargetDir,' '
MidString Msg,Msg,1,70
WriteAt 3,18,Msg,RedOnGray
COPY Work1,TargetDir,' >NUL'
Cursor Off
Concat Work1,SourceDrive,':',SourceDir,'PACKING.LST'
Concat Msg,'Copy ',Work1,' to ',TargetDir,' '
MidString Msg,Msg,1,70
WriteAt 3,18,Msg,RedOnGray
COPY Work1,TargetDir,' >NUL'
Cursor Off
Concat Work1,SourceDrive,':',SourceDir,'REGISTER.EXE'
?FileExist Work1,,InstallDoc
Concat Msg,'Copy ',Work1,' to ',TargetDir,' '
MidString Msg,Msg,1,70
WriteAt 3,18,Msg,RedOnGray
COPY Work1,TargetDir,' >NUL'
Cursor Off
Label InstallDoc
CD DEMODIR
Concat Work1,SourceDrive,':',SourceDir,'MAKEDOC.EXE'
?FileExist Work1,BuildDocMsg
Concat Work1,SourceDrive,':',SourceDir,'*.DOC'
Label BuildDocMsg
Concat Msg,'Copy ',Work1,' to ',DemoDir,' '
MidString Msg,Msg,1,70
WriteAt 3,18,Msg,RedOnGray
COPY Work1,DemoDir,' >NUL'
Cursor Off
Concat Work1,SourceDrive,':',SourceDir,'MAKEPWR.EXE'
?FileExist Work1,BuildPwrMsg
Concat Work1,SourceDrive,':',SourceDir,'*.PWR'
Label BuildPwrMsg
Concat Msg,'Copy ',Work1,' to ',DemoDir,' '
MidString Msg,Msg,1,70
WriteAt 3,18,Msg,RedOnGray
COPY Work1,DemoDir,' >NUL'
Cursor Off
Clear CurrColor,,,0
Cursor Normal
?FileExist 'MAKEDOC.EXE',,DoPwr
MAKEDOC
ERASE 'MAKEDOC.EXE'
Label DoPwr
?FileExist 'MAKEPWR.EXE',,DoReg
MAKEPWR
ERASE 'MAKEPWR.EXE'
Label DoReg
Concat Work1,SourceDrive,':',SourceDir,'REGISTER.EXE'
CD TargetDir
?FileExist Work1,,EndPgm
REGISTER
Label EndPgm
Clear CurrColor,,,0
Cursor Normal
Halt
;SUBROUTINES
Label ChkDir
SetVar CreateFlag,0
?DirExist Work1,ChkDirXit
SetVar InfoMsg,'Creating Directory'
Perform MsgRtn
MKDIR Work1
?DirExist Work1,CreateOK
SetVar ErrorMsg,'UNABLE TO CREATE DIRECTORY!!'
Perform ErrorRtn
SetVar CreateFlag,1
GoTo ChkDirXit
Label CreateOK
Wait 10
Label ChkDirXit
RestBox
Exit
Label MsgRtn
SaveBox 2,21,78,23
Box2 2,21,78,23,BlkOnRed
Concat InfoMsg,'',BlkOnRed,InfoMsg
Center InfoMsg,22
Exit
Label ErrorRtn
SaveBox 2,21,78,23
Box1 2,21,78,23,BlkOnRed
Concat ErrorMsg,'',BlkOnRed,ErrorMsg
Center ErrorMsg,22
Write Bell
Concat Work1,'',BlkOnRed,' Press Any Key To Continue '
Center Work1,23
FlushKey
ReadKey Work1,,10
RestBox
Exit