$JOB 123125Instll
;***	s12.3.125 installation.

;***	Messages

ErrorMsg = 'Cannot access message file'

InitErc = InitMsgFile(MsgFile)
$IF InitErc > 0
	DisplayLine(ErrorMsg)
	Cancel
$ENDIF

MsgNo  = GetMsg(1)
MsgYes = GetMsg(2)

;***	Install params

FromFloppy = 0
FromServer = 2
SysVolume  = '[Sys]'
BangSys    = '[Sys]'
SysCmds    = '[Sys]<sys>sys.cmds'

ServerSpec   = '[Sys]<ToolKit>'
ArchiveSpec  = $ConcatStrings(DeviceFrom, '<CT>')
SysSrcSpec   = $ConcatStrings(DeviceFrom, '<sys>')
TKTargetSpec = $ConcatStrings(VolumeTo, '<Toolkit>')
SysTargetSpc = $ConcatStrings(VolumeTo, '<Sys>')
CTSpec       = $ConcatStrings(ArchiveSpec, '*')
BinFls       = $ConcatStrings(SysSrcSpec, '*.bin')
TxtFls       = $ConcatStrings(SysSrcSpec, '*.txt')
SubmitSpec   = $ConcatStrings(DeviceFrom, '<Submit>*')
SampleSpecF  = $ConcatStrings(DeviceFrom, '<Samples>*')
SampleSpecT  = $ConcatStrings(VolumeTo, '<Samples>')
$DUMP
$IF (InstallType = FromServer)
	FromSpec = ServerSpec
$ELSE
	FromSpec = ArchiveSpec
$ENDIF

FromFloppy   = 0
Floppy5Qtr   = 1
FloppyType   = 0
Floppy3Half  = 4
NotFound     = 65535
TotalNoise   = 0

If InstallType = FromFloppy
   FloppyType  = DeviceType(DeviceFrom)
EndIf

If Public
    Command Merge Command Files   ,
              CmdFileFrom         ,
              CmdFileTo           ,
              Yes                 ,
              VolumeTo

Else
    Command Merge Command Files   ,
              CmdFileFrom         ,
              CmdFileTo           ,
              Yes                 ,
              SysVolume
EndIf

If InstallType = FromServer
    Command LCopy                                      ,
                                                       ,
              @[Scr]<$>InstallOverwriteOkFrom.fls      ,
              @[Scr]<$>InstallOverwriteOkTo.fls        ,
                                                       ,
              Yes                                      ,
              No                                       ,
              No                                       
    GoTo EndIt
    Endif


;***	Install the Toolkit package.

Msg = GetMsg(3)
$DISPLAYLINE
$DISPLAYLINE(Msg)
; The following message is nationalizable


TKDir = $ConcatStrings(VolumeTo, 'ToolKit')
$Command Create Directory,TKDir,,,,

; Copy submit files to <sys>
Msg = GetMsg(7)
$DISPLAYLINE
$DISPLAYLINE(Msg)

$COMMAND LCopy, 
    SubmitSpec, 
              , 
  SysTargetSpc, 
              , 
        MsgYes

; Copy .bin files to <sys>
Msg = GetMsg(10)
$DISPLAYLINE
$DISPLAYLINE(Msg)

$COMMAND LCopy, 
        BinFls, 
              , 
  SysTargetSpc, 
              , 
        MsgYes

; Copy .txt files to <sys>
$COMMAND LCopy, 
        TxtFls, 
              , 
  SysTargetSpc, 
              , 
        MsgYes

; Copy .run files to <toolkit>
Msg = GetMsg(12)
$DISPLAYLINE
$DISPLAYLINE(Msg)

$COMMAND LCopy , 
         CTSpec, 
               , 
    TKTargetSpec, 
               , 
         MsgYes

Msg = GetMsg(8)
$NextFloppy(Msg)

; Copy .run files to <toolkit>
Msg = GetMsg(12)
$DISPLAYLINE
$DISPLAYLINE(Msg)

$COMMAND LCopy , 
         CTSpec, 
               , 
    TKTargetSpec, 
               , 
         MsgYes

Msg = GetMsg(9)
$NextFloppy(Msg)

; Copy .run files to <toolkit>
Msg = GetMsg(12)
$DISPLAYLINE
$DISPLAYLINE(Msg)

$COMMAND LCopy , 
         CTSpec, 
               , 
    TKTargetSpec, 
               , 
         MsgYes

SampleDir = $ConcatStrings(VolumeTo, 'Samples')
$Command Create Directory,SampleDir,,,,

Msg = GetMsg(11)
$DISPLAYLINE
$DISPLAYLINE(Msg)

$COMMAND LCopy, 
   SampleSpecF, 
              , 
   SampleSpecT, 
              , 
        MsgYes

Msg = GetMsg(4)
$DISPLAYLINE(Msg)


Msg = GetMsg(6)
$DISPLAYLINE
$DISPLAYLINE(Msg)

EndIt:

$END
J.RPRPjQFls=Ws.w_
S.wh6OFWst6 F..uhj.PF.G$sls6Fv
U].mU].mU].mF
FaF
bFcF
dFeF
fFgnnPh@HP