home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / multimedia / scala / install / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1996-05-30  |  29KB  |  662 lines

  1. /* $Id: os2_install.cmd,v 1.14 1996/05/30 17:22:52 DANIEL Exp $ */
  2. /* OS/2 Scala MM100 Installer */
  3. PARSE ARG from .
  4.  
  5. /*
  6.  *****************************************************************************
  7.  *
  8.  * Only make changes in these lines and the ones with the directory lists...
  9.  *
  10.  *****************************************************************************
  11.  */
  12. Name=           'MM100'
  13. Description=    'Scala MultiMedia MM100'
  14. Version=        '1.00'
  15. VersionDate=    '05/14/1996'
  16. Default=        'C:\Scala'
  17.  
  18. /****************************************************************************/
  19. /* Do not touch... */
  20. i=0
  21. /****************************************************************************/
  22. /*            Source-----------------------------  Destination--------------*/
  23. i=i+1;CODE.i='SCALA\*.EXE                          \'
  24. i=i+1;CODE.i='SCALA\*.TXT                          \'
  25. i=i+1;CODE.i='SCALA\APPS\*                         APPS\'
  26. i=i+1;CODE.i='SCALA\CATALOGS\*                     CATALOGS\'
  27. i=i+1;CODE.i='SCALA\CLIPS\SCALA\*                  CLIPS\SCALA\'
  28. i=i+1;CODE.i='SCALA\CONFIG\*                       CONFIG\'
  29. i=i+1;CODE.i='SCALA\EX\*                           EX\'
  30. i=i+1;CODE.i='SCALA\FONTS\SAMERICA\*               FONTS\SAMERICA\'
  31. i=i+1;CODE.i='SCALA\FONTS\SBETON\*                 FONTS\SBETON\'
  32. i=i+1;CODE.i='SCALA\FONTS\SCENTURY\*               FONTS\SCENTURY\'
  33. i=i+1;CODE.i='SCALA\FONTS\SCOMPACT\*               FONTS\SCOMPACT\'
  34. i=i+1;CODE.i='SCALA\FONTS\SDIDOT\*                 FONTS\SDIDOT\'
  35. i=i+1;CODE.i='SCALA\FONTS\SFRANKLN\*               FONTS\SFRANKLN\'
  36. i=i+1;CODE.i='SCALA\FONTS\SFRUTIGR\*               FONTS\SFRUTIGR\'
  37. i=i+1;CODE.i='SCALA\FONTS\SFUTURA\*                FONTS\SFUTURA\'
  38. i=i+1;CODE.i='SCALA\FONTS\SGARAMND\*               FONTS\SGARAMND\'
  39. i=i+1;CODE.i='SCALA\FONTS\SGILL\*                  FONTS\SGILL\'
  40. i=i+1;CODE.i='SCALA\FONTS\SGOUDY\*                 FONTS\SGOUDY\'
  41. i=i+1;CODE.i='SCALA\FONTS\SHELVETI\*               FONTS\SHELVETI\'
  42. i=i+1;CODE.i='SCALA\FONTS\SNGOTHIC\*               FONTS\SNGOTHIC\'
  43. i=i+1;CODE.i='SCALA\FONTS\SPOKABA1\*               FONTS\SPOKABA1\'
  44. i=i+1;CODE.i='SCALA\FONTS\SPOKABA2\*               FONTS\SPOKABA2\'
  45. i=i+1;CODE.i='SCALA\FONTS\SUNIVERS\*               FONTS\SUNIVERS\'
  46. i=i+1;CODE.i='.EMPTYDIR                            MPEG\'
  47. i=i+1;CODE.i='.EMPTYDIR                            MUSIC\'
  48. i=i+1;CODE.i='.EMPTYDIR                            SOUNDS\'
  49. i=i+1;CODE.i='SCALA\POINTERS\*                     POINTERS\'
  50. i=i+1;CODE.i='SCALA\SYSTEM\*                       SYSTEM\'
  51. i=i+1;CODE.i='SCALA\SYSTEM\LOADERS\*               SYSTEM\LOADERS\'
  52. i=i+1;CODE.i='SCALA\SYSTEM\VIDEO\*                 SYSTEM\VIDEO\'
  53. i=i+1;CODE.i='SCALA\WIPES\FADE.WIP                 WIPES\'
  54. i=i+1;CODE.i='SCALA\WIPES\PUSHES.WIP               WIPES\' 
  55. i=i+1;CODE.i='SCALA\WIPES\REVEALS.WIP              WIPES\'
  56. i=i+1;CODE.i='SCALA\WIPES\WIPES.BMP                WIPES\'
  57. i=i+1;CODE.i='SCALA\WIPES\ZOOMS.WIP                WIPES\'
  58. /*            Source-----------------------------  Destination--------------*/
  59. /****************************************************************************/
  60. /* Do not touch... */
  61. CODE.0=i
  62. i=0
  63. /****************************************************************************/
  64. /*            Source-----------------------------  Destination--------------*/
  65. i=i+1;COMP.i='COMPACT\BACKGRND\*                   BACKGRND\'
  66. i=i+1;COMP.i='COMPACT\MUSIC\MIDI\*                 MUSIC\MIDI\'
  67. i=i+1;COMP.i='COMPACT\SCRIPTS\*                    SCRIPTS\'
  68. i=i+1;COMP.i='COMPACT\SCRIPTS\ARTWORK\FEATURES\*   SCRIPTS\ARTWORK\FEATURES\'
  69. i=i+1;COMP.i='COMPACT\SCRIPTS\ARTWORK\SOUNDTST\*   SCRIPTS\ARTWORK\SOUNDTST\'
  70. /*            Source-----------------------------  Destination--------------*/
  71. /****************************************************************************/
  72. /* Do not touch... */
  73. COMP.0=i
  74. i=0
  75. /****************************************************************************/
  76. /*            Source-----------------------------  Destination--------------*/
  77. i=i+1;TYPI.i='SCALA\WIPES\ALPHA1.WIP               WIPES\'
  78. i=i+1;TYPI.i='SCALA\WIPES\PICTURES\ALPHA1\*        WIPES\PICTURES\ALPHA1\'
  79. i=i+1;TYPI.i='SCALA\HELP\*                         HELP\'
  80. i=i+1;TYPI.i='SCALA\HELP\GRAPHICS\*                HELP\GRAPHICS\'
  81. i=i+1;TYPI.i='SCALA\ANIMS\1*                       ANIMS\'
  82. i=i+1;TYPI.i='SCALA\BACKGRND\AQUAREL\1*            BACKGRND\AQUAREL\'
  83. i=i+1;TYPI.i='SCALA\BACKGRND\BUILD\1*              BACKGRND\BUILD\'
  84. i=i+1;TYPI.i='SCALA\BACKGRND\GRADIEN\1*            BACKGRND\GRADIEN\'
  85. i=i+1;TYPI.i='SCALA\BACKGRND\NAIVE\1*              BACKGRND\NAIVE\'
  86. i=i+1;TYPI.i='SCALA\BACKGRND\OFFICE\1*             BACKGRND\OFFICE\'
  87. i=i+1;TYPI.i='SCALA\BACKGRND\PEOPLE\1*             BACKGRND\PEOPLE\'
  88. i=i+1;TYPI.i='SCALA\BACKGRND\VOLUME1\*             BACKGRND\VOLUME1\'
  89. i=i+1;TYPI.i='SCALA\BUTTONS\*                      BUTTONS\'
  90. i=i+1;TYPI.i='SCALA\BUTTONS\3D\*                   BUTTONS\3D\'
  91. i=i+1;TYPI.i='SCALA\BUTTONS\ARROWS\*               BUTTONS\ARROWS\'
  92. i=i+1;TYPI.i='SCALA\BUTTONS\BACKDROP\*             BUTTONS\BACKDROP\'
  93. i=i+1;TYPI.i='SCALA\BUTTONS\PRESETS\*              BUTTONS\PRESETS\'
  94. i=i+1;TYPI.i='SCALA\BUTTONS\CIRCLES\*              BUTTONS\CIRCLES\'
  95. i=i+1;TYPI.i='SCALA\BUTTONS\MISC\*                 BUTTONS\MISC\'
  96. i=i+1;TYPI.i='SCALA\BUTTONS\ROUND\*                BUTTONS\ROUND\'
  97. i=i+1;TYPI.i='SCALA\BUTTONS\VCR\*                  BUTTONS\VCR\'
  98. i=i+1;TYPI.i='SCALA\CLIPS\ARROWS\*                 CLIPS\ARROWS\'
  99. i=i+1;TYPI.i='SCALA\CLIPS\BALLOONS\*               CLIPS\BALLOONS\'
  100. i=i+1;TYPI.i='SCALA\CLIPS\BOXES\*                  CLIPS\BOXES\'
  101. i=i+1;TYPI.i='SCALA\CLIPS\BULLETS\*                CLIPS\BULLETS\'
  102. i=i+1;TYPI.i='SCALA\CLIPS\DIVIDERS\*               CLIPS\DIVIDERS\'
  103. i=i+1;TYPI.i='SCALA\CLIPS\DRAWINGS\*               CLIPS\DRAWINGS\'
  104. i=i+1;TYPI.i='SCALA\CLIPS\FOOD\*                   CLIPS\FOOD\'
  105. i=i+1;TYPI.i='SCALA\CLIPS\MISC\*                   CLIPS\MISC\'
  106. i=i+1;TYPI.i='SCALA\CLIPS\OFFICE\*                 CLIPS\OFFICE\'
  107. i=i+1;TYPI.i='SCALA\CLIPS\PEOPLE\*                 CLIPS\PEOPLE\'
  108. i=i+1;TYPI.i='SCALA\CLIPS\SCALA\*                  CLIPS\SCALA\'
  109. i=i+1;TYPI.i='SCALA\CLIPS\WEATHER\*                CLIPS\WEATHER\'
  110. i=i+1;TYPI.i='SCALA\MUSIC\MIDI\1*                  MUSIC\MIDI\'
  111. i=i+1;TYPI.i='SCALA\MUSIC\WAVE\1*                  MUSIC\WAVE\'
  112. i=i+1;TYPI.i='SCALA\PALETTES\*                     PALETTES\'
  113. i=i+1;TYPI.i='SCALA\PALETTES\VIDEO\*               PALETTES\VIDEO\'
  114. i=i+1;TYPI.i='SCALA\POINTERS\3DPOINT\*             POINTERS\3DPOINT\'
  115. i=i+1;TYPI.i='SCALA\SCRIPTS\CALCUL.SCA             SCRIPTS\'
  116. i=i+1;TYPI.i='SCALA\SCRIPTS\FEATURES.SCA           SCRIPTS\'
  117. i=i+1;TYPI.i='SCALA\SCRIPTS\FONTBOOK.SCA           SCRIPTS\'
  118. i=i+1;TYPI.i='SCALA\SCRIPTS\KIMS.SCA               SCRIPTS\'
  119. i=i+1;TYPI.i='SCALA\SCRIPTS\MAIN.SCA               SCRIPTS\'
  120. i=i+1;TYPI.i='SCALA\SCRIPTS\POKABAL.SCA            SCRIPTS\'
  121. i=i+1;TYPI.i='SCALA\SCRIPTS\SCABACK.SCA            SCRIPTS\'
  122. i=i+1;TYPI.i='SCALA\SCRIPTS\SCALATOR.SCA           SCRIPTS\'
  123. i=i+1;TYPI.i='SCALA\SCRIPTS\SCAPRODS.SCA           SCRIPTS\'
  124. i=i+1;TYPI.i='SCALA\SCRIPTS\SCAQUIZ.SCA            SCRIPTS\'
  125. i=i+1;TYPI.i='SCALA\SCRIPTS\SCAWORLD.SCA           SCRIPTS\'
  126. i=i+1;TYPI.i='SCALA\SCRIPTS\SOUNDTST.SCA           SCRIPTS\'
  127. i=i+1;TYPI.i='SCALA\SCRIPTS\ARTWORK\CALCUL\*       SCRIPTS\ARTWORK\CALCUL\'
  128. i=i+1;TYPI.i='SCALA\SCRIPTS\ARTWORK\FEATURES\*     SCRIPTS\ARTWORK\FEATURES\'
  129. i=i+1;TYPI.i='SCALA\SCRIPTS\ARTWORK\FONTBOOK\*     SCRIPTS\ARTWORK\FONTBOOK\'
  130. i=i+1;TYPI.i='SCALA\SCRIPTS\ARTWORK\KIMS\*         SCRIPTS\ARTWORK\KIMS\'
  131. i=i+1;TYPI.i='SCALA\SCRIPTS\ARTWORK\MAIN\*         SCRIPTS\ARTWORK\MAIN\'
  132. i=i+1;TYPI.i='SCALA\SCRIPTS\ARTWORK\POKABAL\*      SCRIPTS\ARTWORK\POKABAL\'
  133. i=i+1;TYPI.i='SCALA\SCRIPTS\ARTWORK\SCALATOR\*     SCRIPTS\ARTWORK\SCALATOR\'
  134. i=i+1;TYPI.i='SCALA\SCRIPTS\ARTWORK\SCAPRODS\*     SCRIPTS\ARTWORK\SCAPRODS\'
  135. i=i+1;TYPI.i='SCALA\SCRIPTS\ARTWORK\SCAQUIZ\*      SCRIPTS\ARTWORK\SCAQUIZ\'
  136. i=i+1;TYPI.i='SCALA\SCRIPTS\ARTWORK\SCAWORLD\*     SCRIPTS\ARTWORK\SCAWORLD\'
  137. i=i+1;TYPI.i='SCALA\SCRIPTS\ARTWORK\SOUNDTST\*     SCRIPTS\ARTWORK\SOUNDTST\'
  138. i=i+1;TYPI.i='SCALA\SOUNDS\1*                      SOUNDS\'
  139. i=i+1;TYPI.i='SCALA\SOUNDS\SCAVOICE\*               SOUNDS\SCAVOICE\'
  140. /*            Source-----------------------------  Destination--------------*/
  141. /****************************************************************************/
  142. /* Do not touch... */
  143. TYPI.0=i
  144. i=0
  145.  
  146. /*
  147.  *****************************************************************************
  148.  *
  149.  *  The rest is not to be touched...
  150.  *
  151.  *****************************************************************************
  152.  */
  153. /* Default language */
  154. LangDir='English'
  155.  
  156. /* Directory scanning stuff... */
  157. CALL RxFuncAdd 'SysFileTree','RexxUtil','SysFileTree'
  158.  
  159. IF from='?' THEN
  160.   DO
  161.     SAY 'OS/2 Scala Install'
  162.     SAY
  163.     SAY 'OS2_INSTALL [source path]'
  164.     SAY
  165.     SAY '   Source drive path is optional and defaults to the location of'
  166.     SAY '   the install program.'
  167.     EXIT
  168.   END
  169.  
  170. /* If the user did not give a FROM we generate it */
  171. IF LENGTH(from)<2 THEN
  172.   DO
  173.     PARSE SOURCE junk junk from .
  174.     from=STRIP(from)
  175.  
  176.     /* Now, remove the file name */
  177.     DO UNTIL RIGHT(from,1)='\'
  178.       from=LEFT(from,LENGTH(from)-1)
  179.     END
  180.     from=LEFT(from,LENGTH(from)-1)
  181.     IF RIGHT(from,1)=':' THEN
  182.       DO
  183.         from=from || '\'
  184.       END
  185.   END
  186.  
  187. OldDIR=DIRECTORY()
  188. Source=DIRECTORY(from)
  189. junk=DIRECTORY(OldDIR)
  190.  
  191. IF LENGTH(Source)<2 THEN
  192.   DO
  193.     SAY 'Could not find the directory' from
  194.     EXIT
  195.   END
  196.  
  197. Title=LEFT(Description,80-LENGTH(Name VersionDate)-1,' ') ,
  198.    || Name VersionDate
  199.  
  200. Target=Default
  201. CALL DisplayTitle
  202. SAY 'Type new path name or EXIT to quit or <RETURN> to continue.'
  203. PARSE PULL line .
  204. IF TRANSLATE(line)='EXIT' THEN EXIT
  205. IF LENGTH(line)>1 THEN Target=line
  206.  
  207. DO FOREVER
  208.   CALL DisplayTitle
  209.   SAY 'Checking target...'
  210.  
  211.   junk=TRANSLATE(Target,' ','\')
  212.   DO i=1 TO WORDS(junk)
  213.     IF LENGTH(WORD(junk,i))>8 THEN
  214.       DO
  215.         SAY
  216.         SAY 'Path name elements must be no greater than 8 characters'
  217.         junk=''
  218.         LEAVE
  219.       END
  220.   END
  221.  
  222.   IF junk\='' THEN
  223.     DO
  224.       test=DIRECTORY(Target)
  225.       junk=DIRECTORY(OldDIR)
  226.     
  227.       IF LENGTH(test)<2 THEN
  228.         DO
  229.           SAY
  230.           SAY 'Target directory does not exist.'
  231.           junk=CHAROUT(,'Do you wish to create it? (Y/N) Y' || '08'x)
  232.           PARSE PULL line .
  233.           IF LENGTH(line)<1 THEN line='Y'
  234.           line=TRANSLATE(LEFT(line,1))
  235.           IF line='Y' THEN
  236.             DO
  237.               CALL MakePath Target
  238.               test=DIRECTORY(Target)
  239.               junk=DIRECTORY(OldDIR)
  240.               IF LENGTH(test)<2 THEN
  241.                 DO
  242.                   SAY
  243.                   SAY 'Directory could not be created.'
  244.                 END
  245.               ELSE
  246.                 DO
  247.                   LEAVE
  248.                 END
  249.             END
  250.         END
  251.       ELSE
  252.         DO
  253.           SAY
  254.           SAY 'Target directory already exists.'
  255.           junk=CHAROUT(,'Do you wish to use it? (Y/N) Y' || '08'x)
  256.           PARSE PULL line .
  257.           IF LENGTH(line)<1 THEN line='Y'
  258.           line=TRANSLATE(LEFT(line,1))
  259.           IF line='Y' THEN
  260.             DO
  261.               LEAVE
  262.             END
  263.         END
  264.     END
  265.  
  266.   SAY
  267.   SAY 'Type new path name or EXIT to quit or <RETURN> to continue.'
  268.   PARSE PULL line .
  269.   IF TRANSLATE(line)='EXIT' THEN EXIT
  270.   IF LENGTH(line)>1 THEN Target=line
  271. END
  272.  
  273. /* Now, select a language */
  274. Lang=Source
  275. IF RIGHT(Lang,1)\='\' THEN Lang=Lang || '\'
  276. Lang=Lang || 'INSTALL\'
  277. rc=SysFileTree(Lang'*',langs,'DO')
  278.  
  279. DO FOREVER
  280.   CALL DisplayTitle
  281.   SAY 'Select the language to install:'
  282.   SAY
  283.   SAY '        0) English    <DEFAULT>'
  284.   DO i=1 TO langs.0
  285.     Lang=TRANSLATE(langs.i,' ','\')
  286.     Lang=WORD(Lang,WORDS(Lang))
  287.     langs.i=TRANSLATE(LEFT(Lang,1)) ,
  288.          || TRANSLATE(SUBSTR(Lang,2),XRANGE('a','z'),XRANGE('A','Z'))
  289.     SAY '       'RIGHT(i,2)')' langs.i
  290.   END
  291.   SAY
  292.   junk=CHAROUT(,'Enter your selection: 0' || '08'x)
  293.   PARSE PULL line .
  294.   IF LENGTH(line)<1 THEN line=0
  295.   IF (line<=langs.0) & (line>=0) THEN LEAVE
  296. END
  297.  
  298. IF line>0 THEN
  299.   DO
  300.     LangDir=langs.line
  301.   END
  302.  
  303. /* Select Compact or Typical install... */
  304. DO FOREVER
  305.   CALL DisplayTitle
  306.   SAY 'Please select install type:'
  307.   SAY
  308.   SAY '       1)  Compact install (about  15 MB) <DEFAULT>'
  309.   SAY '       2)  Typical install (about 80 MB)'
  310.   SAY '       3)  Full install (about 380 MB)'
  311.   SAY
  312.   junk=CHAROUT(,'Install type: 1' || '08'x)
  313.   PARSE PULL line .
  314.   IF (line>=1) & (line<=3) THEN LEAVE
  315. END
  316. InstallType=line
  317.  
  318. Target=DIRECTORY(Target)
  319. junk=DIRECTORY(OldDIR)
  320.  
  321. /* Now start the real work... */
  322. CALL DisplayTitle
  323.  
  324. IF (InstallType<=2) THEN
  325.   DO i=1 TO CODE.0
  326.     PARSE VAR CODE.i input output .
  327.     IF RIGHT(output,1)\='\' THEN
  328.       DO
  329.         SAY 'Error in line' i 'of the CODE description.'
  330.         SAY 'Destination is not a directory.'
  331.         SAY CODE.i
  332.         EXIT
  333.       END
  334.     junk=DoCopy(input,output)
  335.   END
  336.  
  337. /* Do the language (English will be a no-op)... */
  338. junk=DoCopy('INSTALL\'LangDir'\CATALOGS\*','CATALOGS\')
  339. junk=DoCopy('INSTALL\'LangDir'\CONFIG\*','CONFIG\')
  340.  
  341. /* Compact install */
  342. IF InstallType=1 THEN
  343.   DO i=1 TO COMP.0
  344.     PARSE VAR COMP.i input output .
  345.     IF RIGHT(output,1)\='\' THEN
  346.       DO
  347.         SAY 'Error in line' i 'of the COMP description.'
  348.         SAY 'Destination is not a directory.'
  349.         SAY COMP.i
  350.         EXIT
  351.       END
  352.     junk=DoCopy(input,output)
  353.   END
  354.  
  355. /* Typical install */
  356. IF InstallType=2 THEN
  357.   DO i=1 TO TYPI.0
  358.     PARSE VAR TYPI.i input output .
  359.     IF RIGHT(output,1)\='\' THEN
  360.       DO
  361.         SAY 'Error in line' i 'of the TYPI description.'
  362.         SAY 'Destination is not a directory.'
  363.         SAY TYPI.i
  364.         EXIT
  365.       END
  366.     junk=DoCopy(input,output)
  367.   END
  368.  
  369.  
  370. /* Full install */
  371. IF InstallType=3 THEN
  372. DO
  373.   CopyFrom=From
  374.   IF RIGHT(CopyFrom,1)\='\' THEN CopyFrom=CopyFrom || '\'
  375.   CopyFrom=From || 'SCALA'
  376.   SAY 'Installing everything (this will take a while)...'
  377.   '@xcopy /S 'CopyFrom'  'Target' >nul'
  378. end
  379.  
  380. SAY 'Now creating OS/2 folder and icons...'
  381. CALL MakeIcons Target Name
  382. SAY
  383. SAY 'Installation complete.'
  384. SAY
  385. SAY 'While it is not required that you shutdown before you use Scala,'
  386. SAY 'you may wish to do so to insure that OS/2 fully saves the changes'
  387. SAY 'made to your desktop.'
  388.  
  389. EXIT
  390.  
  391. /* Simple title display routine...  Used all over the place... */
  392. DisplayTitle:  PROCEDURE EXPOSE Title Source Target LangDir
  393.   '@CLS'
  394.   SAY
  395.   SAY Title
  396.   SAY 
  397.   SAY 'Installing from:' Source
  398.   SAY
  399.   SAY 'Installing to:  ' Target
  400.   SAY
  401.   SAY 'Language:       ' LangDir
  402.   SAY
  403. RETURN 0
  404.  
  405. DoCopy: PROCEDURE EXPOSE Target Source
  406.   input=ARG(1)
  407.   output=ARG(2)
  408.  
  409.   /* Now start the real work for this description line */
  410.   CopyTo=Target
  411.   IF RIGHT(CopyTo,1)\='\' THEN CopyTo=CopyTo || '\'
  412.   IF output\='\' THEN CopyTo=CopyTo || output
  413.  
  414.   CopyFrom=Source
  415.   IF RIGHT(CopyFrom,1)\='\' THEN CopyFrom=CopyFrom || '\'
  416.   IF input\='\' THEN CopyFrom=CopyFrom || input
  417.  
  418.   /* Now start the real work... */
  419.   junk=CHAROUT(,LEFT('Copying to:     ' CopyTo,79) || COPIES('08'x,79))
  420.   CALL MakePath CopyTo
  421.  
  422.   rc=SysFileTree(CopyFrom,'files','FO')
  423.   DO j=1 TO files.0
  424.     file=TRANSLATE(files.j,' ','\'); file=WORD(file,WORDS(file))
  425.     junk=CHAROUT(,LEFT('Copying to file:' CopyTo || file,79) || COPIES('08'x,79))
  426.     '@Copy >NUL: 2>NUL: "'files.j'" "'CopyTo || file'"'
  427.     IF RC\=0 THEN
  428.       DO
  429.         SAY
  430.         SAY 'There was a failure during the copy.'
  431.         SAY 'Install aborted.'
  432.         EXIT
  433.       END
  434.   END
  435.   junk=CHAROUT(,COPIES(' ',79) || COPIES('08'x,79))
  436. RETURN 0
  437.  
  438. /* Simple multi-segment path create... */
  439. MakePath: PROCEDURE
  440.   PARSE ARG Path .
  441.  
  442.   Dirs=TRANSLATE(Path," ","\")
  443.   IF LEFT(Path,1)='\' THEN Path='\'
  444.   ELSE Path=''
  445.  
  446.   DO i=1 TO WORDS(Dirs)
  447.     Path=Path || WORD(Dirs,i)
  448.     '@MKDIR >NUL: 2>NUL:' Path
  449.     Path=Path || '\'
  450.   END
  451. RETURN 0
  452.  
  453. /* The fancy Folder/Icon generator */
  454. MakeIcons: PROCEDURE
  455. PARSE ARG Dir Name .
  456.  
  457. /* Functions we need from RexxUtil */
  458. CALL RxFuncAdd 'SysPutEA','RexxUtil','SysPutEA'
  459. CALL RxFuncAdd 'SysSaveObject','RexxUtil','SysSaveObject'
  460. CALL RxFuncAdd 'SysCreateObject','RexxUtil','SysCreateObject'
  461. CALL RxFuncAdd 'SysSetObjectData','RexxUtil','SysSetObjectData'
  462.  
  463. /* Set a more useful LONGNAME for where our files are... */
  464. Longname='Scala' || '0A'x || Name 'Files'
  465. AppName='Scala' || '0A'x || Name
  466. FolderName='Scala'
  467. DiagName='Scala' || '0A'x || 'Diagnostics'
  468. FolderID='<SCALA_'Name'_FOLDER>'
  469. EA='FDFF'x || D2C(LENGTH(Longname)) || '00'x || Longname
  470. junk=SysPutEA(Dir,'.LONGNAME',EA)
  471.  
  472. Folder= 'OBJECTID='FolderID';'      ,
  473.      || 'OPEN=DEFAULT;'             ,
  474.      || 'CONCURRENTVIEW=NO;'        ,
  475.      || 'ALWAYSSORT=YES;'           ,
  476.      || 'ICONVIEWPOS=10,70,35,22;'
  477.  
  478. /* First, create the Scala folder on the desktop and open it */
  479. junk=SysCreateObject('WPFolder',FolderName,'<WP_DESKTOP>',Folder,'REPLACE')
  480.  
  481. /* This is the image data for the Scala application icons */
  482. Icon='424128000000780000000000000043491A00000010001000E00100000C00000020'x || ,
  483.      '00400001000100000000FFFFFF43491A00000010001000E00200000C0000002000'x || ,
  484.      '200001000400000000000080008000008080800000800080808000C0C0C0808080'x || ,
  485.      '0000FF00FF0000FFFFFF0000FF00FFFFFF00FFFFFF424128000000F00000000000'x || ,
  486.      '000043491A00000008000800E00400000C0000001000200001000100000000FFFF'x || ,
  487.      'FF43491A00000008000800600500000C0000001000100001000400000000800000'x || ,
  488.      '008000808000000080800080008080808080CCCCCCFF000000FF00FFFF000000FF'x || ,
  489.      'FF00FF00FFFFFFFFFF424128000000680100000004000343491A00000014001400'x || ,
  490.      'E00500000C0000002800500001000100000000FFFFFF43491A0000001400140060'x || ,
  491.      '0800000C0000002800280001000400000000800000008000808000000080800080'x || ,
  492.      '008080808080CCCCCCFF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF424128'x || ,
  493.      '000000000000000004000343491A0000000A000A00800B00000C00000014002800'x || ,
  494.      '01000100000000FFFFFF43491A0000000A000A00200C00000C0000001400140001'x || ,
  495.      '000400000000800000008000808000000080800080008080808080CCCCCCFF0000'x || ,
  496.      '00FF00FFFF000000FFFF00FF00FFFFFFFFFF000000000000000000000000000000'x || ,
  497.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  498.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  499.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  500.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  501.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  502.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  503.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  504.      '0000000000000000000070808080808080808080808080808080F8888888888888'x || ,
  505.      '88888888888888888878888808080808080808080808080880F888800000000000'x || ,
  506.      '000000000000008878889999999999999999999999990880F88899999999999999'x || ,
  507.      '9999999999008878889999999999999999999999990880F8889999FFF999999999'x || ,
  508.      '9999999900887888999FFFFF99999999999999990880F888999FFFFF9999999999'x || ,
  509.      '99999900887888999FFFFF99999999999999990880F8889999FFF9999999999999'x || ,
  510.      '999900887888999999999FFF9999999999990880F88899999999FFFFF999999999'x || ,
  511.      '990088788899999999FFFFFF99999999990880F88899999999FFFFFFF999999999'x || ,
  512.      '00887888999999999FFFFFFF999999990880F8889999999999FFFFFFF999999900'x || ,
  513.      '88788899999999999FFFFFFF9999990880F888999999999999FFFFFFF999990088'x || ,
  514.      '78889999999999999FFFFFFF99990880F88899999999999999FFFFFFF999008878'x || ,
  515.      '88999999999999999FFFFFFF990880F8889999999999999999FFFFFF9900887888'x || ,
  516.      '99999999999999999FFFFF990880F888999999999999999999FFF9990088788899'x || ,
  517.      '99999999999999999999990880F888999999999999999999999999888878888888'x || ,
  518.      '888888888888888888888880F88888888888888888888888888888887888888888'x || ,
  519.      '8888888888888888888880F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7000000000000'x || ,
  520.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  521.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  522.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  523.      '000000000000000000000000000000000000000000000077777777777777777770'x || ,
  524.      '00000000000777CCCCCCCCCCCC0777CCFCCCCCCCCC0777CFFFCCCCCCCC0777CCFC'x || ,
  525.      'CCCCCCCC0777CCCCFFCCCCCC0777CCCCFFFCCCCC0777CCCCCFFFCCCC0777CCCCCC'x || ,
  526.      'FFFCCC0777CCCCCCCFFFCC0777CCCCCCCCFFFC0777CCCCCCCCCFCC0777CCCCCCCC'x || ,
  527.      'CCCC77777777777777777777777777777777770000000000000000000000000000'x || ,
  528.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  529.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  530.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  531.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  532.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  533.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  534.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  535.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  536.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  537.      '000000000000000000FFFFFFFFFF000000FFFFFFFFFF000000FFFFFFFFFF000000'x || ,
  538.      'FFFFFFFFFF000000F00000000F000000F00000000F000000F00000000F000000F0'x || ,
  539.      '0000000F000000F00000000F000000F00000000F000000F00000000F000000F000'x || ,
  540.      '00000F000000F00000000F000000F00000000F000000F00000000F000000F00000'x || ,
  541.      '000F000000F00000000F000000F00000000F000000F00000000F000000F0000000'x || ,
  542.      '0F000000F00000000F000000F00000000F000000F00000000F000000F00000000F'x || ,
  543.      '000000F00000000F000000F00000000F000000F00000000F000000F00000000F00'x || ,
  544.      '0000F00000000F000000F00000000F000000F00000000F000000F00000000F0000'x || ,
  545.      '00F00000000F000000F00000000F000000F00000000F000000F00000000F000000'x || ,
  546.      'FFFFFFFFFF000000FFFFFFFFFF000000FFFFFFFFFF000000FFFFFFFFFF00000000'x || ,
  547.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  548.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  549.      '000000000000000000000000000000807070707070707070707070707070700000'x || ,
  550.      '0000F7777777777777777777777777777777000000008777770707070707070707'x || ,
  551.      '070707077000000000F7777000000000000000000000000077000000008777CCCC'x || ,
  552.      'CCCCCCCCCCCCCCCCCCCC077000000000F777CCCCCCCCCCCCCCCCCCCCCCCC007700'x || ,
  553.      '0000008777CCCCCCCCCCCCCCCCCCCCCCCC077000000000F777CCCCFFFCCCCCCCCC'x || ,
  554.      'CCCCCCCC0077000000008777CCCFFFFFCCCCCCCCCCCCCCCC077000000000F777CC'x || ,
  555.      'CFFFFFCCCCCCCCCCCCCCCC0077000000008777CCCFFFFFCCCCCCCCCCCCCCCC0770'x || ,
  556.      '00000000F777CCCCFFFCCCCCCCCCCCCCCCCC0077000000008777CCCCCCCCCFFFCC'x || ,
  557.      'CCCCCCCCCC077000000000F777CCCCCCCCFFFFFCCCCCCCCCCC0077000000008777'x || ,
  558.      'CCCCCCCCFFFFFFCCCCCCCCCC077000000000F777CCCCCCCCFFFFFFFCCCCCCCCC00'x || ,
  559.      '77000000008777CCCCCCCCCFFFFFFFCCCCCCCC077000000000F777CCCCCCCCCCFF'x || ,
  560.      'FFFFFCCCCCCC0077000000008777CCCCCCCCCCCFFFFFFFCCCCCC077000000000F7'x || ,
  561.      '77CCCCCCCCCCCCFFFFFFFCCCCC0077000000008777CCCCCCCCCCCCCFFFFFFFCCCC'x || ,
  562.      '077000000000F777CCCCCCCCCCCCCCFFFFFFFCCC0077000000008777CCCCCCCCCC'x || ,
  563.      'CCCCCFFFFFFFCC077000000000F777CCCCCCCCCCCCCCCCFFFFFFCC007700000000'x || ,
  564.      '8777CCCCCCCCCCCCCCCCCFFFFFCC077000000000F777CCCCCCCCCCCCCCCCCCFFFC'x || ,
  565.      'CC0077000000008777CCCCCCCCCCCCCCCCCCCCCCCC077000000000F777CCCCCCCC'x || ,
  566.      'CCCCCCCCCCCCCCCC77770000000087777777777777777777777777777770000000'x || ,
  567.      '00F777777777777777777777777777777700000000877777777777777777777777'x || ,
  568.      '7777777000000000F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8000000000000000000'x || ,
  569.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  570.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  571.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  572.      '000000000000000000000000000000000000000000000000000000000000000000'x || ,
  573.      '000000000000000000000000000000000000000000FFFFF000FFFFF000C0003000'x || ,
  574.      'C0003000C0003000C0003000C0003000C0003000C0003000C0003000C0003000C0'x || ,
  575.      '003000C0003000C0003000C0003000C0003000C0003000C0003000FFFFF000FFFF'x || ,
  576.      'F00000000000000000000000000000000000000000000000000000777777777777'x || ,
  577.      '77770000000077700000000000070000000077CCCCCCCCCCCC070000000077CCFC'x || ,
  578.      'CCCCCCCC070000000077CFFFCCCCCCCC070000000077CCFCCCCCCCCC0700000000'x || ,
  579.      '77CCCCFFCCCCCC070000000077CCCCFFFCCCCC070000000077CCCCCFFFCCCC0700'x || ,
  580.      '00000077CCCCCCFFFCCC070000000077CCCCCCCFFFCC070000000077CCCCCCCCFF'x || ,
  581.      'FC070000000077CCCCCCCCCFCC070000000077CCCCCCCCCCCC7700000000777777'x || ,
  582.      '777777777700000000777777777777777700000000000000000000000000000000'x || ,
  583.      '0000000000000000000000'x
  584.  
  585. DOS_settings= 'SET DOS_AUTOEXEC=;'               ,
  586.            || 'SET DOS_BACKGROUND_EXECUTION=0;'  ,
  587.            || 'SET DOS_BREAK=0;'                 ,
  588.            || 'SET DOS_FCBS=16;'                 ,
  589.            || 'SET DOS_FCBS_KEEP=8;'             ,
  590.            || 'SET DOS_FILES=40;'                ,
  591.            || 'SET DOS_HIGH=0;'                  ,
  592.            || 'SET DOS_RMSIZE=640;'              ,
  593.            || 'SET DOS_UMB=1;'                   ,
  594.            || 'SET DPMI_DOS_API=ENABLED;'        ,
  595.            || 'SET DPMI_MEMORY_LIMIT=16;'        ,
  596.            || 'SET HW_NOSOUND=0;'                ,
  597.            || 'SET HW_ROM_TO_RAM=1;'             ,
  598.            || 'SET HW_TIMER=1;'                  ,
  599.            || 'SET IDLE_SECONDS=0;'              ,
  600.            || 'SET IDLE_SENSITIVITY=75;'         ,
  601.            || 'SET INT_DURING_IO=1;'             ,
  602.            || 'SET KBD_ALTHOME_BYPASS=1;'        ,
  603.            || 'SET KBD_BUFFER_EXTEND=0;'         ,
  604.            || 'SET KBD_CTRL_BYPASS=NONE;'        ,
  605.            || 'SET KBD_RATE_LOCK=1;'             ,
  606.            || 'SET SESSION_PRIORITY=31;'         ,
  607.            || 'SET VIDEO_8514A_XGA_IOTRAP=0;'    ,
  608.            || 'SET VIDEO_FASTPASTE=1;'           ,
  609.            || 'SET VIDEO_ONDEMAND_MEMORY=1;'     ,
  610.            || 'SET VIDEO_RETRACE_EMULATION=0;'   ,
  611.            || 'SET VIDEO_ROM_EMULATION=1;'       ,
  612.            || 'SET VIDEO_SWITCH_NOTIFICATION=0;'
  613.  
  614. Common_setup= 'PROGTYPE=VDM;'      ,
  615.            || 'CONCURRENTVIEW=NO;' ,
  616.            || 'MINWIN=DESKTOP;'
  617.  
  618. /* Create the program object */
  619. Prog= 'EXENAME=' || Dir || '\MM.EXE;'  ,
  620.    || 'STARTUPDIR=' || Dir || ';'      ,
  621.    || 'ICONFILE=' || Dir || '\MM.ICO;' ,
  622.    || 'OBJECTID=<SCALA_'Name'>;'       ,
  623.    || DOS_settings                     ,
  624.    || Common_setup
  625.  
  626. /* Write an icon image file to use... */
  627. junk=CHAROUT(Dir || '\' || 'MM.ICO',Icon)
  628. junk=STREAM(Dir || '\' || 'MM.ICO','C','CLOSE')
  629.  
  630. /* Create... */
  631. junk=SysCreateObject('WPProgram',AppName,FolderID,Prog,'REPLACE')
  632.  
  633. /* Create the DIAG program object */
  634. DIAG= 'EXENAME=' || Dir || '\DIAG.EXE;'  ,
  635.    || 'STARTUPDIR=' || Dir || ';'        ,
  636.    || 'ICONFILE=' || Dir || '\DIAG.ICO;' ,
  637.    || 'OBJECTID=<SCALA_DIAG>;'           ,
  638.    || Common_setup                       ,
  639.    || DOS_settings
  640.  
  641. /* Write an icon image file to use... */
  642. junk=CHAROUT(Dir || '\' || 'DIAG.ICO',Icon)
  643. junk=STREAM(Dir || '\' || 'DIAG.ICO','C','CLOSE')
  644.  
  645. /* Create... */
  646. junk=SysCreateObject('WPProgram',DiagName,FolderID,DIAG,'REPLACE')
  647.  
  648. /* Finally, create a shadow to the place where the files are */
  649. /* We need to first set some options on the real directory... */
  650. MM_Files= 'NORENAME=YES;'   ,
  651.        || 'ALWAYSSORT=YES;'
  652. junk=SysSetObjectData(Dir,MM_Files)
  653.  
  654. /* and now for the shadow... */
  655. Shadow='SHADOWID=' || Dir || ';' || MM_Files
  656. junk=SysCreateObject('WPShadow',Longname,FolderID,Shadow,'REPLACE')
  657.  
  658. /* And, just so we know things are saved, we ask the folder to save... */
  659. junk=SysSaveObject(FolderID,'Synchronous')
  660.  
  661. RETURN 0
  662.