--LTScript2Impl.mesa
--limited tool to write prometheus script 
--Created by
--   JFung.PASA	  	22-May-84 13:16:54

--last edited by
--   JFung.PASA	   	16-Aug-84  9:54:44 


DIRECTORY
     CmFile,
     Cursor USING [Set],
     Event,
     EventTypes,
     Exec,
     File,
     Format,
     FormSW,
     Heap,
     LispToolOps,
     MFile,
     MStream,
     OthelloOps,
     PhysicalVolume,
     Process,
     Profile,
     Put,
     Runtime,
     Stream,
     String,
     StringLookUp,
     Supervisor,
     Time,
     Token,
     Tool,
     ToolDriver,
     ToolWindow,
     UserInput,
     Version,
     Volume,
     Window;


LTScript2Impl: PROGRAM
     IMPORTS
          Cursor, LispToolOps, MFile, MStream,
          Process, Put, 
	  Stream, String, 
	  ToolWindow, Volume, Window

     EXPORTS LispToolOps =


     BEGIN OPEN ILT: LispToolOps;

     debug: BOOLEAN ← FALSE;

     WriteScriptA: PUBLIC PROCEDURE[myFile: MFile.Handle, writeS: MStream.Handle] =
          BEGIN
	  tempString: LONG STRING ← NIL;

 	  IF debug THEN {
			Put.Text[ILT.toolData.fileSW, "WriteScriptA"L];
         		Process.Pause[Process.SecondsToTicks[5]];
			};

          -- write second part of prometheus script
          writeS.PutString["\\Partition 10 Mb disk for 1 Interlisp-D volume and 1 Dsk volume(2000)\n"L];
          writeS.PutString["Comment WARNING - PARTITIONING A DISK DESTROYS ALL ITS CONTENTS\n"L];
          writeS.PutString["Confirm Continue?\n"L];
	  writeS.PutString["Create Rd0 YLisp 3\n"L];
	  writeS.PutString["SystemTools 3500 normal\n"L];
	  writeS.PutString["Dsk 2000 normal\n"L];
	  writeS.PutString["Lisp  normal\n"L];
          writeS.PutString["Check RD0\n"L];
	  writeS.PutString["Comment Disk partitioned for Interlisp-D\n"L];
 
          writeS.PutString["\\Partition 10 Mb disk for 1 Interlisp-D/LOOPS volume and 1 Dsk volume(1000)\n"L];
          writeS.PutString["Comment WARNING - PARTITIONING A DISK DESTROYS ALL ITS CONTENTS\n"L];
          writeS.PutString["Confirm Continue?\n"L];
	  writeS.PutString["Create Rd0 YLisp 3\n"L];
	  writeS.PutString["SystemTools 3500 normal\n"L];
	  writeS.PutString["Dsk 1000 normal\n"L];
	  writeS.PutString["Lisp  normal\n"L];
          writeS.PutString["Check RD0\n"L];
	  writeS.PutString["Comment Disk partitioned for Interlisp-D\n"L];
 
writeS.PutString["\\Partition 29 Mb disk for 1 Interlisp-D volume and 1 Dsk volume\n"L];
          writeS.PutString["Comment WARNING - PARTITIONING A DISK DESTROYS ALL ITS CONTENTS\n"L];
          writeS.PutString["Confirm Continue?\n"L];
	  writeS.PutString["Create Rd0 YLisp 3\n"L];
	  writeS.PutString["SystemTools 3500 normal\n"L];
	  writeS.PutString["Lisp 16200 normal\n"L];
	  writeS.PutString["Dsk  normal\n"L];
          writeS.PutString["Check RD0\n"L];
	  writeS.PutString["Comment Disk partitioned for Interlisp-D\n"L];
	  
writeS.PutString["\\Partition 29 or 42 Mb disk for 2 Interlisp-D volumes and 1 Dsk volume\n"L];
          writeS.PutString["Comment WARNING - PARTITIONING A DISK DESTROYS ALL ITS CONTENTS\n"L];
          writeS.PutString["Confirm Continue?\n"L];
	  writeS.PutString["Create Rd0 YLisp 4\n"L];
	  writeS.PutString["SystemTools 3500 normal\n"L];
	  writeS.PutString["Lisp 16200 normal\n"L];
	  writeS.PutString["Lisp2 16200 normal\n"L];
	  writeS.PutString["Dsk  normal\n"L];
          writeS.PutString["Check RD0\n"L];
	  writeS.PutString["Comment Disk partitioned for Interlisp-D\n"L];
 
writeS.PutString["\\Partition 42 Mb disk for 3 Interlisp-D volumes and 1 Dsk volume\n"L];
          writeS.PutString["Comment WARNING - PARTITIONING A DISK DESTROYS ALL ITS CONTENTS\n"L];
          writeS.PutString["Confirm Continue?\n"L];
	  writeS.PutString["Create Rd0 YLisp 5\n"L];
	  writeS.PutString["SystemTools 3500 normal\n"L];
	  writeS.PutString["Lisp 16200 normal\n"L];
	  writeS.PutString["Lisp2 16200 normal\n"L];
	  writeS.PutString["Lisp3 16200 normal\n"L];
	  writeS.PutString["Dsk  normal\n"L];
          writeS.PutString["Check RD0\n"L];
	  writeS.PutString["Comment Disk partitioned for Interlisp-D\n"L];

writeS.PutString["\\Erase SystemTools volume\n"L];
          writeS.PutString["Confirm Continue?\n"L];
          writeS.PutString["Online RD0\n"L];
	  writeS.PutString["Comment Erasing SystemTools volume...\n"L];
          writeS.PutString["Erase SystemTools\n"L];
	  writeS.PutString["Comment SystemTools volume erased\n"L];
 
writeS.PutString["\\Erase Dsk volume\n"L];
          writeS.PutString["Online RD0\n"L];
	  writeS.PutString["Comment Erasing Dsk volume...\n"L];
          writeS.PutString["Erase Dsk\n"L];
          writeS.PutString["Confirm Continue?\n"L];
	  writeS.PutString["Comment Dsk volume erased\n"L];
 
writeS.PutString["\\Initialize SystemTools Volume\n"L];
          writeS.PutString["Online RD0\n"L];
          writeS.PutString["Comment Ready to Install System files\n"L];
          writeS.PutString["Confirm Continue?\n"L];
	  writeS.PutString["Request Installation Utility\n"L];
	  writeS.PutString["Comment Installing Lisp microcode file...\n"L];
	  writeS.PutString["Initial RD0 Lisp11SAx000Initial.db\n"L];
	  writeS.PutString["Comment Lisp microcode installed\n"L];
	  writeS.PutString["Check RD0\n"L];
	  writeS.PutString["Germ SystemTools DLion.germ Y\n"L];	  
	  writeS.PutString["Request System Files\n"L];
	  writeS.PutString["Comment Installing System files...\n"L];
          writeS.PutString["Pilot SystemTools Mesa.db Y\n"L];
          writeS.PutString["Fetch SystemTools TajoDLion.boot\n"L];
          writeS.PutString["Set Physical SystemTools YYY\n"L];
	  writeS.PutString["Comment System files installed\n"L];
 
<<	  
 	  IF debug THEN {
			Put.Text[ILT.toolData.fileSW, "SendNow..."L];
         		Process.Pause[Process.SecondsToTicks[5]];
			};
          writeS.SendNow;
 	  IF debug THEN {
			Put.Text[ILT.toolData.fileSW, "CopyFileHandle..."L];
         		Process.Pause[Process.SecondsToTicks[5]];
			};
          myFile ← MFile.CopyFileHandle[
               MStream.GetFile[writeS], MFile.dontRelease, readOnly];

          IF debug THEN {
               Put.Line[ILT.toolData.fileSW, "Delete..."L];
               Process.Pause[Process.SecondsToTicks[5]];
               };
          writeS.Delete;
          IF myFile # NIL THEN MFile.Release[myFile];
          Cursor.Set[textPointer];
          Put.Line[ILT.toolData.fileSW, " Done"L];
	  Process.Pause[Process.SecondsToTicks[5]];
>>
	  END;  
     END...