$JOB 123152Instll

;***	s12.3.153 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

FLOPPY = 0
SERVER = 2

ServerDir    = '[sys]<SSSpecials>'
ServerSpec   = '[sys]<SSSpecials>s12.3.153>'
ArchiveSpec  = $ConcatStrings(DeviceFrom, '<CTOS>')
TargetSpec   = $ConcatStrings(VolumeTo, '<Sys>')
$IF (InstallType = SERVER)
	FromSpec = ServerSpec
$ELSE
	FromSpec = ArchiveSpec

CmdFileFrom  = $ConcatStrings(DeviceFrom,'<sys>install.cmds')
CmdFileTo    = $ConcatStrings(TargetSpec,'sys.cmds')
;BinFileFrom  = $ConcatStrings(DeviceFrom,'<sys>statuscodesmsg1.bin')
;BinFileTo    = $ConcatStrings(TargetSpec,'statuscodesmsg.bin')

$ENDIF


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

If InstallType = FromFloppy
   FloppyType  = DeviceType(DeviceFrom)
EndIf


;***	Install the SUX package.

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


$COMMAND Merge Command Files ,
	CmdFileFrom ,
	CmdFileTo ,
	MsgYes ,
	VolumeTo


$IF (InstallType = SERVER)
$COMMAND LCopy, 
	(ClusterView,LoginService,RKVS,Rum,RumNul,MsReader,CdRomService,Exec, 
	 Editor, QueueMgr, CreateConfig, Plog, ChgVolName, DisplayConfig, 
	 SystemMgr, FormatDisk, SuperZipUtility, Squash, MCR, InstallMgr, 
	 SelectiveArchive , installscreenprint, settime, srpstats), 
	FromSpec, 
	TargetSpec, 
	(.Run), 
	MsgYes, MsgNo, MsgNo, MsgYes

$COMMAND LCopy, 
	(ZipUtility), 
	FromSpec, 
	TargetSpec, 
	.Data, 
	MsgYes, MsgNo, MsgNo, MsgYes

$COMMAND LCopy, 
	(ClusterView, Rkvs, Rum, ZipUtility, installmgr, volutil), 
	FromSpec, 
	TargetSpec, 
	Msg.Bin, 
	MsgYes, MsgNo, MsgNo, MsgYes

$ELSE

If FloppyType = Floppy3Half
$COMMAND LCopy, 
	(ClusterView,LoginService,RKVS,Rum,RumNul,MsReader,CdRomService,Exec, 
	Editor, QueueMgr, CreateConfig, Plog, ChgVolName, DisplayConfig), 
	FromSpec, 
	TargetSpec, 
	(.Run), 
	MsgYes, MsgNo, MsgNo, MsgYes
	
$COMMAND LCopy, 
	(statuscodesmsg1), 
	FromSpec, 
	TargetSpec, 
	(.bin), 
	MsgYes, MsgNo, MsgNo, MsgYes


$RestartLabel
$IF (Public)
	Msg = GetMsg(5)
	$DISPLAYLINE
	$DISPLAYLINE(Msg)
	$ContinueOnError
	$COMMAND 'Create Directory', ServerDir, , 500
	$CancelOnError
	$COMMAND LCopy, 
		(ClusterView,LoginService,RKVS,Rum,RumNul,MsReader,CdRomService, 
		Exec,Editor,QueueMgr,CreateConfig,Plog,ChgVolName, DisplayConfig), 
		TargetSpec, 
		ServerSpec, 
		.Run, 
		MsgYes, MsgNo, MsgNo, MsgYes


$COMMAND LCopy, 
	(statuscodesmsg1), 
	TargetSpec, 
	ServerSpec, 
	.bin, 
	MsgYes, MsgNo, MsgNo, MsgYes

;$Run ([Sys]<sys>MergeBinMsgFiles.run, 'Merge Binary Message Files', '00'),
;	[sys]<sys>statuscodesmsg1.bin,[sys]<sys>statuscodesmsg.bin,

BinFileFrom  = $ConcatStrings(TargetSpec,'statuscodesmsg1.bin')
BinFileTo    = $ConcatStrings(TargetSpec,'statuscodesmsg.bin')

$COMMAND Merge Binary Message Files, 
		BinFileFrom ,
		BinFileTo ,
		MsgYes		
		
DelFile     = $ConcatStrings(TargetSpec,'statuscodesmsg1.bin')        

$COMMAND Delete, 
		DelFile ,
		MsgNo
		
   EndIf

Msg = GetMsg(7)
$NextFloppy(Msg)

$COMMAND LCopy, 
	(SystemMgr, FormatDisk, SuperZipUtility, Squash, MCR, InstallMgr, 
	 SelectiveArchive, settime, installScreenPrint, srpstats), 
	FromSpec, 
	TargetSpec, 
	(.Run), 
	MsgYes, MsgNo, MsgNo, MsgYes

$COMMAND LCopy, 
	(ZipUtility), 
	FromSpec, 
	TargetSpec, 
	(.Data), 
	MsgYes, MsgNo, MsgNo, MsgYes

$COMMAND LCopy, 
	(ClusterView, Rkvs, Rum, ZipUtility, installmgr, volutil), 
	FromSpec, 
	TargetSpec, 
	Msg.bin, 
	MsgYes, MsgNo, MsgNo, MsgYes
 
Msg = GetMsg(4)
$DISPLAYLINE(Msg)

$RestartLabel
$IF (Public)
	Msg = GetMsg(5)
	$DISPLAYLINE
	$DISPLAYLINE(Msg)
	$ContinueOnError
	$COMMAND 'Create Directory', ServerDir, , 500
	$CancelOnError
	$COMMAND LCopy, 
		(SystemMgr, FormatDisk, SuperZipUtility, Squash, MCR, InstallMgr, 
		 SelectiveArchive, SetTime, InstallScreenPrint, srpstats), 
		TargetSpec, 
		ServerSpec, 
		.Run, 
		MsgYes, MsgNo, MsgNo, MsgYes
	$COMMAND LCopy, 
		(ZipUtility), 
		TargetSpec, 
		ServerSpec, 
		.Data, 
		MsgYes, MsgNo, MsgNo, MsgYes
	$COMMAND LCopy, 
		(ClusterView, Rkvs, Rum, ZipUtility, installmgr, volutil), 
		TargetSpec, 
		ServerSpec, 
		Msg.Bin, 
		MsgYes, MsgNo, MsgNo, MsgYes
   EndIf

Else 
   If FloppyType = Floppy5Qtr
   
$COMMAND LCopy, 
	(SystemMgr, ClusterView, LoginService, RKVS, Rum, RumNul, CdRomService), 
	FromSpec, 
	TargetSpec, 
	.Run, 
	MsgYes, MsgNo, MsgNo, MsgYes


$COMMAND LCopy, 
	(ClusterView, Rkvs, Rum, ZipUtility), 
	FromSpec, 
	TargetSpec, 
	Msg.bin, 
	MsgYes, MsgNo, MsgNo, MsgYes

$RestartLabel
$IF (Public)
	Msg = GetMsg(5)
	$DISPLAYLINE
	$DISPLAYLINE(Msg)
	$ContinueOnError
	$COMMAND 'Create Directory', ServerDir, , 500
	$CancelOnError
	$COMMAND LCopy, 
		(SystemMgr,ClusterView,LoginService,RKVS,Rum,RumNul,CdRomService 
         ), 
		TargetSpec, 
		ServerSpec, 
		.Run, 
		MsgYes, MsgNo, MsgNo, MsgYes
	$COMMAND LCopy, 
		(ClusterView, Rkvs, Rum, ZipUtility), 
		TargetSpec, 
		ServerSpec, 
		Msg.Bin, 
		MsgYes, MsgNo, MsgNo, MsgYes
   EndIf
   
   Msg=GetMsg(15)
   $NextFloppy(Msg)


$COMMAND LCopy, 
	(Exec, Editor, QueueMgr), 
	FromSpec, 
	TargetSpec, 
	.Run, 
	MsgYes, MsgNo, MsgNo, MsgYes



$RestartLabel
$IF (Public)
	Msg = GetMsg(5)
	$DISPLAYLINE
	$DISPLAYLINE(Msg)
	$ContinueOnError
	$COMMAND 'Create Directory', ServerDir, , 500
	$CancelOnError
	$COMMAND LCopy, 
		(Exec, Editor, QueueMgr), 
		TargetSpec, 
		ServerSpec, 
		.Run, 
		MsgYes, MsgNo, MsgNo, MsgYes
   EndIf

   Msg=GetMsg(16)
   $NextFloppy(Msg)

$COMMAND LCopy, 
	(MsReader, CreateConfig, Plog, ChgVolName, DisplayConfig), 
	FromSpec, 
	TargetSpec, 
	.Run, 
	MsgYes, MsgNo, MsgNo, MsgYes

$RestartLabel
$IF (Public)
	Msg = GetMsg(5)
	$DISPLAYLINE
	$DISPLAYLINE(Msg)
	$ContinueOnError
	$COMMAND 'Create Directory', ServerDir, , 500
	$CancelOnError
	$COMMAND LCopy, 
	 (MsReader, CreateConfig, Plog, ChgVolName, DisplayConfig), 
		TargetSpec, 
		ServerSpec, 
		.Run, 
		MsgYes, MsgNo, MsgNo, MsgYes
   EndIf



   Msg=GetMsg(17)
   $NextFloppy(Msg)

$COMMAND LCopy, 
	(FormatDisk, SuperZipUtility, Squash, MCR), 
	FromSpec, 
	TargetSpec, 
	.Run, 
	MsgYes, MsgNo, MsgNo, MsgYes

$COMMAND LCopy, 
	(ZipUtility), 
	FromSpec, 
	TargetSpec, 
	.Data, 
	MsgYes, MsgNo, MsgNo, MsgYes

$RestartLabel
$IF (Public)
	Msg = GetMsg(5)
	$DISPLAYLINE
	$DISPLAYLINE(Msg)
	$ContinueOnError
	$COMMAND 'Create Directory', ServerDir, , 500
	$CancelOnError
	$COMMAND LCopy, 
	 (FormatDisk, SuperZipUtility, Squash, MCR, InstallMgr, SelectiveArchive 
	  Settime, InstallScreenPrint), 
		TargetSpec, 
		ServerSpec, 
		.Run, 
		MsgYes, MsgNo, MsgNo, MsgYes
	$COMMAND LCopy, 
	 (ZipUtility), 
	 TargetSpec, 
	 ServerSpec, 
	 .Data, 
	 MsgYes, MsgNo, MsgNo, MsgYes
   EndIf

   Msg=GetMsg(18)
   $NextFloppy(Msg)
   
$COMMAND LCopy, 
	(InstallMgr, SelectiveArchive), 
	FromSpec, 
	TargetSpec, 
	.Run, 
	MsgYes, MsgNo, MsgNo, MsgYes

Msg = GetMsg(4)
$DISPLAYLINE(Msg)

$RestartLabel
$IF (Public)
	Msg = GetMsg(5)
	$DISPLAYLINE
	$DISPLAYLINE(Msg)
	$ContinueOnError
	$COMMAND 'Create Directory', ServerDir, , 500
	$CancelOnError
	$COMMAND LCopy, 
	 (InstallMgr, SelectiveArchive), 
		TargetSpec, 
		ServerSpec, 
		.Run, 
		MsgYes, MsgNo, MsgNo, MsgYes
   EndIf
   
EndIf


endif

$ENDIF		; From SERVER


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

$END
w,LoginService,RKVS,Rum,RumNul,MsReader,CdRomService, 
		Exec,Editor,QueueMgr,CreateConfig,Plog,ChgVolName, DisplayConfig), 
		TargetSpec, 
		ServerSpec, 
		.