SaveVidLevel = VideoLevel
EchoOff

; VirtualModeOsBuild>Install.jcl
; Install the VirtualMode System Build Utilities subpackage

; Except for yesno strings  'First disk message' the following is the only 
; nationalizable string in this file.
ErrorMsg     = 'Cannot open VirtualModeOsBuild>InstallMsg.bin'

FromFloppy   = 0
FromServer   = 2
TotalNoise   = 0
TotalSilence = 2
FloppyType   = 0
Floppy5Qtr   = 1
Floppy3Half  = 4
NotFound     = 65535
ClearScreen  = 'PF'

If SaveVidLevel = TotalNoise
   Display(ClearScreen)
EndIf

If InstallType = FromFloppy
   FloppyType   = DeviceType(DeviceFrom)
EndIf

; The following message is nationalizable
If FloppyType = Floppy5Qtr
   FirstDisk  = 'Virtual Mode SBU Diskette 1 of 6 (B25VBU1)'
Else 
   If FloppyType = Floppy3Half
      FirstDisk  = 'Virtual Mode SBU Diskette 1 of 3 (B25VBU1)'
   EndIf
EndIf

FromSpec     = ConcatStrings(DeviceFrom, '<vCTOS>*')
ToSpec       = ConcatStrings(VolumeTo, DirectoryTo)
ArchSpec     = ConcatStrings(DeviceFrom, '<Lib>Vbu')
ArchFromSpec = '<*>*'
ArchToSpec   = ConcatStrings(ToSpec, '*')
SubFromSpec  = ConcatStrings(ToSpec, '*.sub')

If Public
   ToSys = '[Sys]<Sys>'
   CmdVolTo = '[Sys]'
Else
   ToSys = '[Sys]<Sys>'
   CmdVolTo = '[Sys]'
EndIf

If InstallType = FromFloppy
   NextFloppy(FirstDisk)
EndIf

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

If SaveVidLevel = TotalNoise
   EchoSome
Endif
DisplayLine
Command Merge Command Files ,
           CmdFileFrom      ,
           CmdFileTo        ,
           Yes              ,
           CmdVolTo
DisplayLine
Command Create Directory ,
           ToSpec        ,
                         ,
           250
If SaveVidLevel = TotalNoise
   EchoOff
Endif

If InstallType = FromServer
   If SaveVidLevel = TotalNoise
      EchoSome
   Endif
   DisplayLine
   Command LCopy                                  ,
                                                  ,
              @[Scr]<$>InstallOverwriteOkFrom.fls ,
              @[Scr]<$>InstallOverwriteOkTo.fls   ,
                                                  ,
              Yes                                 ,
              No                                  ,
              No                                  ,
              Yes
   DisplayLine
   Command LCopy          ,
              SubFromSpec ,
                          ,
              ToSys       ,
                          ,
              Yes         ,
              No          ,
              No          ,
              Yes
   If SaveVidLevel = TotalNoise
      EchoOff
   Endif
   GoTo ChkPkgs
Endif

If SaveVidLevel = TotalNoise
   EchoSome
Endif
DisplayLine
Command LCopy       ,
           FromSpec ,
                    ,
           ToSpec   ,
                    ,
           Yes      ,
           No       ,
           No       ,
           Yes
DisplayLine
Command LCopy          ,
           SubFromSpec ,
                       ,
           ToSys       ,
                       ,
           Yes         ,
           No          ,
           No          ,
           Yes
If SaveVidLevel = TotalNoise
   EchoOff
Endif

RestartLabel

DisplayLine
If FloppyType = Floppy5Qtr
   Msg  = GetMsg(3)
   Msg1 = GetMsg(4)
Else
   If FloppyType = Floppy3Half
      Msg  = GetMsg(6)
      Msg1 = GetMsg(7)
   EndIf
EndIf
DisplayLine(Msg)
DisplayLine(Msg1)

DisplayLine
Msg = GetMsg(5)
DisplayAndWait(Msg)
DisplayLine

EchoSome
DisplayLine
Command Restore Archive    ,
           ArchSpec        ,
           ArchFromSpec    ,
           ArchToSpec      ,
           Yes
EchoOff

RestartLabel
If FloppyType = Floppy5Qtr
   Msg = GetMsg(9)
   NextFloppy(Msg)
endif

If SaveVidLevel = TotalNoise
   EchoSome
Endif
DisplayLine
Command LCopy       ,
           FromSpec ,
                    ,
           ToSpec   ,
                    ,
           Yes      ,
           No       ,
           No       ,
           Yes
If SaveVidLevel = TotalNoise
   EchoOff
Endif

If FloppyType = Floppy5Qtr
   Msg = GetMsg(1)
   NextFloppy(Msg)
   If SaveVidLevel = TotalNoise
      EchoSome
   Endif
   DisplayLine
   Command LCopy       ,
              FromSpec ,
                       ,
              ToSpec   ,
                       ,
              Yes      ,
              No       ,
              No       ,
              Yes
   If SaveVidLevel = TotalNoise
       EchoOff
   Endif
EndIf

If FloppyType = Floppy5Qtr
   Msg = GetMsg(2)
   NextFloppy(Msg)
Else
   If FloppyType = Floppy3Half
      Msg = GetMsg(8)
      NextFloppy(Msg)
   EndIf
EndIf

If SaveVidLevel = TotalNoise
   EchoSome
Endif
DisplayLine
Command LCopy       ,
           FromSpec ,
                    ,
           ToSpec   ,
                    ,
           Yes      ,
           No       ,
           No       ,
           Yes
If SaveVidLevel = TotalNoise
   EchoOff
Endif

ChkPkgs:
DisplayLine

EndIt:

End
entifying the  *
* resource and gets back a resource handle.                                *
*                                                                          *
