SaveVidLevel = VideoLevel
EchoOff

; B27ClusterOs>Install.jcl
; Install the B27 RealMode Cluster Operating System subpackage

; Except for yesno strings, these two messages are the only nationalizable
; strings in this file.
ErrorMsg     = 'Cannot access B27ClusterOs>InstallMsg.bin'
FirstDisk    = 'Real Mode OS Diskette 3 of 4 (B25R343)'

FromFloppy   = 0
FromServer   = 2
TotalNoise   = 0
TotalSilence = 2
NotFound     = 65535
ClearScreen  = 'PF'

If SaveVidLevel = TotalNoise
   Display(ClearScreen)
EndIf

OsName       = 'bAwsClstr.run'
FontName     = 'bAwsSys.font'
FloppySpec   = ConcatStrings(DeviceFrom, '<CTOS>')
OsFrom       = ConcatStrings(FloppySpec, OsName)
FontFrom     = ConcatStrings(FloppySpec, FontName)
ToSpec       = ConcatStrings(VolumeTo, DirectoryTo)
PublicOsTo   = ConcatStrings(ToSpec, OsName)
PublicFontTo = ConcatStrings(ToSpec, FontName)
PublicWsTo   = ConcatStrings(ToSpec, 'Ws127>SysImage.sys')
EtcFromSpec  = ConcatStrings(DeviceFrom, '<OsInstall>')
ConfigFile   = 'Config.sys'
NlsKbdFile   = 'NlsKbd.sys'

If InstallType = FromFloppy
   NextFloppy(FirstDisk)
EndIf

InitErc = InitMsgFile(MsgFile)
If InitErc <> 0
   DisplayLine(ErrorMsg)
   Cancel
Endif

If InstallType = FromServer
   Msg = GetMsg(3)
   DisplayLine(Msg)
   DisplayLine
   Msg = GetMsg(5)
   DisplayAndWait(Msg)
   Cancel
Endif

If Not Public
   Msg = GetMsg(4)
   DisplayLine(Msg)
   DisplayLine
   Msg = GetMsg(5)
   DisplayAndWait(Msg)
   Cancel
Endif

If SaveVidLevel = TotalNoise
   EchoSome
EndIf
DisplayLine
Command LCopy          ,
           ConfigFile  ,
           EtcFromSpec ,
           ToSpec      ,
                       ,
           No          ,
           No          ,
           No          ,
           Yes
Msg = GetMsg(12)
ConfigSpec = ConcatStrings(ToSpec, Msg)
DisplayLine
Command LCopy          ,
           ConfigFile  ,
           EtcFromSpec ,
           ConfigSpec  ,
                       ,
           No          ,
           No          ,
           No          ,
           Yes
FileName = ConcatStrings(ToSpec, NlsKbdFile)
Ver = FileVersion(FileName)
If Ver <> '0'
   Msg = GetMsg(11)
   SaveSpec = ConcatStrings(ToSpec, Msg)
   FileName = ConcatStrings(SaveSpec, NlsKbdFile)
   Ver = FileVersion(FileName)
   If Ver = '0'
      DisplayLine
      Command LCopy         ,
                 NlsKbdFile ,
                 ToSpec     ,
                 SaveSpec   ,
                            ,
                 No         ,
                 No         ,
                 No         ,
                 Yes
      DisplayLine
      Msg = ConcatStrings(ToSpec, NlsKbdFile)
      Display(Msg)
      Msg = GetMsg(10)
      Display(Msg)
      Display(ToSpec)
      Msg = GetMsg(11)
      Display(Msg)
      DisplayLine(NlsKbdFile)
   EndIf
EndIf
DisplayLine
Command LCopy          ,
           NlsKbdFile  ,
           EtcFromSpec ,
           ToSpec      ,
                       ,
           Yes         ,
           No          ,
           No          ,
           Yes
DisplayLine
Command LCopy                      ,
                                   ,
           OsFrom                  ,
           (PublicOsTo,PublicWsTo) ,
                                   ,
           Yes                     ,
           No                      ,
           No                      ,
           Yes

Command LCopy                      ,
                                   ,
           FontFrom                ,
           PublicFontTo            ,
                                   ,
           Yes                     ,
           No                      ,
           No                      ,
           Yes

If SaveVidLevel = TotalNoise
   EchoOff
EndIf

ChkPkgs:
DisplayLine

;B27 Cluster Lfs Os
Pkg = GetMsg(8)
If SubString(Pkg, Pkgs) <> NotFound
   Diskette = GetMsg(1)
   NextFloppy(Diskette)
   GoTo EndIt
EndIf

;B24 Debugger
Pkg = GetMsg(6)
If SubString(Pkg, Pkgs) <> NotFound
   Diskette = GetMsg(2)
   NextFloppy(Diskette)
   GoTo EndIt
EndIf

;B26 Debugger
Pkg = GetMsg(7)
If SubString(Pkg, Pkgs) <> NotFound
   Diskette = GetMsg(2)
   NextFloppy(Diskette)
   GoTo EndIt
EndIf

;B27 Debugger
Pkg = GetMsg(9)
If SubString(Pkg, Pkgs) <> NotFound
   Diskette = GetMsg(2)
   NextFloppy(Diskette)
   GoTo EndIt
EndIf

EndIt:

End
