home *** CD-ROM | disk | FTP | other *** search
- /* -------------------WARNING------------------*/
- /* Do not change without notifying ROC Conder */
- /* -------------------WARNING------------------*/
- /* MPMCDIMG.CMD */
-
- /* MultiMedia Installation Routine to make a Hard Disk image of the
- installation package and to modify the control files for hard disk. */
-
- parse upper arg DRIVE PATH
- '@echo off'
-
- say ' '
- say "This CMD copies the MMPM/2 installation package from diskette to hard disk "
- say "and changes the control files to the correct ones for hard disk operation. "
- say "The hard disk installation package can then be used in response file "
- say "generation and installation."
- say ' '
-
- if length(DRIVE) <> 1 then call usage
-
- say "Usage: MPMCDIMG drive_letter [path]"
- say ' '
- say ' '"PATH is any number of path levels but only the last one "
- say " may not exist. More than one non-existent path level may "
- say " cause errors."
- say ' '
-
- INPUTFILE='A:\CONTROL.SCR'
- x=stream(INPUTFILE, 'c', 'close')
-
- signal on notready name fileclosed
-
- nextline=linein(INPUTFILE)
- nounits=0
- do forever
- nextline=linein(INPUTFILE)
- if nextline <> '' then
- do
- if (substr(nextline,1,11) = 'munitcount=') then
- do
- nextline = nextline || ' '
- nounits=substr(nextline,12,1)
- if (substr(nextline,13,1) <> ' ') then
- do
- nounits = nounits || substr(nextline,13,1)
- end
- say "nounits = "nounits""
- leave
- end
- end
- end /* do forever */
-
- i = 0
- do forever
- nextline=linein(INPUTFILE)
- if nextline <> '' then
- do
- if (substr(nextline, 1, 10) = 'medianame=') then
- do
- i = i + 1
- array.i = substr(nextline, 11)
- if i = nounits then
- leave
- end
- end
- end /* do forever */
- /*
- do k = 1 to nounits
- say 'array['k'] = ('array.k')'
- end
- */
- fileclosed:
- signal off notready
-
- x=stream(INPUTFILE, 'c', 'close')
-
- if length(PATH) = 0 then
- do
- PATH='\MPMPACK'
- end
- say "Copying MMPM/2 to hard disk."
- /*
- array.1 = "IBM Multimedia Presentation Manager/2 Diskette 1"
- array.2 = "IBM Multimedia Presentation Manager/2 Diskette 2"
- array.3 = "IBM Multimedia Presentation Manager/2 Diskette 3"
- array.4 = "IBM Multimedia Presentation Manager/2 Diskette 4"
- array.5 = "IBM Multimedia Presentation Manager/2 Diskette 5"
- array.6 = "IBM Multimedia Presentation Manager/2 Diskette 6"
- array.7 = "IBM Multimedia Presentation Manager/2 Diskette 7"
- array.8 = "IBM Multimedia Presentation Manager/2 Diskette 8"
- array.9 = "IBM Multimedia Presentation Manager/2 Diskette 9"
- */
-
- 'md' DRIVE':'PATH
- 'attrib -R ' DRIVE':'PATH'\* /S >nul 2>nul'
-
- do k = 1 to nounits
- say ' '
- say "Please insert" array.k
- say "into diskette drive A:."
- say ' '
- pause
-
- 'xcopy a:\*.* ' DRIVE':'PATH'\*.* /s /v 2>nul'
- end
-
- DRIVE':'
- if (nounits <> 1) then
- do
- 'cd' PATH'\hdcontl'
- 'copy controlh.scr ..\control.scr'
- INPUTFILE = 'controlh.scr'
- x = stream(INPUTFILE, 'c', 'close')
- signal on notready name controlread
- nextline = linein(INPUTFILE)
- do forever
- nextline = linein(INPUTFILE)
- if nextline <> '' then
- do
- if (substr(nextline, 1, 9) = 'filelist=') then
- do
- 'copy' substr(nextline,10) '..'
- 'erase' substr(nextline,10)
- leave
- end
- end
- end
- controlhread:
- x = stream(INPUTFILE, 'c', 'close')
- 'erase controlh.scr'
- 'cd ..'
- 'rmdir hdcontl'
- end
-
- say "Package Generation Finished..."
-
- exit 0
-
- usage:
- say ' '
- say "Usage: MPMCDIMG drive_letter [path]"
- say ' '
- say "Where drive_letter = Drive on which to generate the package (this is "
- say " required)."
- say ' '
- say ' '"[path] = the path without drive letter where the package should be "
- say " generated. (This is optional. The default is MPMPACK.)"
- say ' '
- say ' '"PATH is any number of path levels but only the last one may not "
- say " exist. More than one non-existent path level may cause errors."
- say ' '
-
- exit 0
-