home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pcm45tkt.zip / bootdrv / os2 / pcmbldob.cmd < prev    next >
OS/2 REXX Batch file  |  1999-02-23  |  7KB  |  175 lines

  1. /* ----------------------------------------------------------------*/
  2. /* PCMBLDOB.CMD - Build PCM Testkit folder and objects on desktop. */
  3. /*                                                                 */
  4. /* Carried on: "SETUP" Diskette                                    */
  5. /*                                                                 */
  6. /* OS/2 BOOT DRIVE DETERMINED USING COMSPEC= ENVIRONMENT VARIABLE  */
  7. /*     Create PCM TESTKIT folder on desktop                        */
  8. /*     Add PCMSETUP to folder if found in \OS2                     */
  9. /*     Add PCMRSLTS to folder if found in \OS2                     */
  10. /*     Add PCMDOC   to folder if found in \OS2                     */
  11. /*     Add PCMHDW   to folder if found in \OS2                     */
  12. /*     Add PCMTEST  to folder if found in \OS2                     */
  13. /*     Add LANTEST  to folder if found in \OS2                     */
  14. /* ----------------------------------------------------------------*/
  15. '@echo off'
  16. arg parm.1 comments
  17.  
  18. if left(parm.1,1) = '?' then signal INFO_PLEASE
  19.  
  20. /*------------------------------------------*/
  21. /* USE  COMSPEC= TO FIND OS/2 BOOT DRIVE.   */
  22. /*------------------------------------------*/
  23. cmspec = value('COMSPEC',,'OS2ENVIRONMENT');
  24. os2drv = left(cmspec,1)
  25.  
  26.  
  27. os2drv':'
  28. 'cd \'
  29.  
  30. 'attrib  -h -r -s OS2KRNL'                                     /**************/
  31. if stream('os2krnl','c','query exists') = '' then do           /* NO OS2KRNL */
  32.    say '  *****************************************************';
  33.    say '  *** Could NOT find \OS2KRNL                       ***';
  34.    say '  *** Please change to OS/2 boot drive and re-enter.***';
  35.    say '  *****************************************************';
  36.    signal INFO_PLEASE
  37.    end
  38. else do
  39.    say '  *****************************************************';
  40.    say '  *** Building PCM Testkit folder and objects       ***';
  41.    say '  *****************************************************';
  42.    end
  43. 'attrib  +h +r +s OS2KRNL'
  44.  
  45.  
  46. call rxfuncadd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  47. call SysLoadFuncs
  48.  
  49. /* ----------------------------------------------------------------------*/
  50. /* ICONVIEWPOS  var1,var2,var3,var4                                      */
  51. /*              var1 = how far from left   of screen folder is when open */
  52. /*              var2 = how far from bottom of screen folder is when open */
  53. /*              var3 = how wide folder is when open                      */
  54. /*              var4 = how deep folder is when open                      */
  55. /* ----------------------------------------------------------------------*/
  56. classname='WPFolder'
  57. title='PCM^Compatibility Testkit^Version 4.5'
  58. location='<WP_DESKTOP>'
  59. setup='OBJECTID=<PCM_KIT>;'||,
  60.       'ICONFILE='os2drv':\OS2\PCMKIT_F.ICO;'||,
  61.       'ALWAYSSORT=YES;'||,
  62.       'ICONVIEWPOS=20,50,55,45;'
  63. call BldObj
  64.  
  65.  
  66. if stream(os2drv':\os2\pcmsetup.exe','c','query exists') \= '' then do
  67.    classname='WPProgram';
  68.    title='Base Testcases^Installation & Setup'
  69.    location='<PCM_KIT>'
  70.    setup='OBJECTID=<PCM_SETUP>;'||,
  71.          'EXENAME='os2drv':\OS2\PCMSETUP.EXE;'||,
  72.          'ICONFILE='os2drv':\OS2\PCMSETUP.ICO;'||,
  73.          'PROGTYPE=PM;'||,
  74.          'STARTUPDIR='os2drv':\OS2;'
  75.    call BldObj
  76. end
  77.  
  78.  
  79. if stream(os2drv':\os2\pcmrslts.exe','c','query exists') \= '' then do
  80.    classname='WPProgram';
  81.    title='Results Diskette^Processing'
  82.    location='<PCM_KIT>'
  83.    setup='OBJECTID=<PCM_RSLTS>;'||,
  84.          'EXENAME='os2drv':\OS2\PCMRSLTS.EXE;'||,
  85.          'ICONFILE='os2drv':\OS2\PCMRSLTS.ICO;'||,
  86.          'PROGTYPE=PM;'||,
  87.          'STARTUPDIR='os2drv':\OS2;'
  88.    call BldObj
  89. end
  90.  
  91.  
  92. if stream(os2drv':\os2\pcmdoc.inf','c','query exists') \= '' then do
  93.    classname='WPProgram';
  94.    title='PCM Testkit^Documentation'
  95.    location='<PCM_KIT>'
  96.    setup='OBJECTID=<PCM_DOCS>;'||,
  97.          'EXENAME='os2drv':\OS2\VIEW.EXE;'||,
  98.          'PARAMETERS='os2drv':\OS2\PCMDOC.INF;'||,
  99.          'ICONFILE='os2drv':\OS2\PCMDOC.ICO;'||,
  100.          'PROGTYPE=PM;'||,
  101.          'STARTUPDIR='os2drv':\OS2;'
  102.    call BldObj
  103. end
  104.  
  105.  
  106. if stream(os2drv':\os2\pcmhdw.exe','c','query exists') \= '' then do
  107.    classname='WPProgram';
  108.    title='System Hardware^Configuration'
  109.    location='<PCM_KIT>'
  110.    setup='OBJECTID=<PCM_HDW>;'||,
  111.          'EXENAME='os2drv':\OS2\PCMHDW.EXE;'||,
  112.          'ICONFILE='os2drv':\OS2\PCMHDW.ICO;'||,
  113.          'PROGTYPE=PM;'||,
  114.          'STARTUPDIR='os2drv':\OS2;'
  115.    call BldObj
  116. end
  117.  
  118.  
  119. if stream(os2drv':\os2\pcmtest.exe','c','query exists') \= '' then do
  120.    classname='WPProgram';
  121.    title='Test Selection^& Control^BASE'
  122.    location='<PCM_KIT>'
  123.    setup='OBJECTID=<PCM_TEST>;'||,
  124.          'EXENAME='os2drv':\OS2\PCMTEST.EXE;'||,
  125.          'ICONFILE='os2drv':\OS2\PCMTEST.ICO;'||,
  126.          'PROGTYPE=PM;'||,
  127.          'STARTUPDIR='os2drv':\OS2;'
  128.    call BldObj
  129. end
  130.  
  131.  
  132. if stream(os2drv':\os2\lantest.exe','c','query exists') \= '' then do
  133.    classname='WPProgram';
  134.    title='Test Selection^& Control^LAN'
  135.    location='<PCM_KIT>'
  136.    setup='OBJECTID=<LAN_TEST>;'||,
  137.          'EXENAME='os2drv':\OS2\LANTEST.EXE;'||,
  138.          'ICONFILE='os2drv':\OS2\LANTEST.ICO;'||,
  139.          'PROGTYPE=PM;'||,
  140.          'STARTUPDIR='os2drv':\OS2;'
  141.    call BldObj
  142. end
  143.  
  144.  
  145.  
  146. exit;
  147.  
  148. /*------------------*/
  149. /* Common procedure */
  150. /*------------------*/
  151. BldObj:
  152.    say '  *** Building object for 'title'     ';
  153.    result = SysCreateObject(classname, title, location, setup, 'R')
  154.    if result = 0 then do
  155.       say '  *** OBJECT NOT CREATED - ERROR -                  ***';
  156.       end
  157.    return;
  158.  
  159.  
  160. INFO_PLEASE:
  161. say ''
  162. say '╔════════════════════════════════════════════════════════════════╗';
  163. say '║                                                                ║';
  164. say '║ PCMBLDOB.CMD - Build PCM Testkit folder and program objects on ║';
  165. say '║                on the desktop.                                 ║';
  166. say '║                                                                ║';
  167. say '║ Parameters:  NONE                                              ║';
  168. say '║                                                                ║';
  169. say '║ OS/2 BOOT DRIVE DETERMINED WITH COMSPEC= ENVIRONMENT VARIABLE. ║';
  170. say '║                                                                ║';
  171. say '║ Called by x:\PCM_INST\INSTALL.CMD  or  x:\LAN_INST\INSTALL.CMD ║';
  172. say '║                                                                ║';
  173. say '╚════════════════════════════════════════════════════════════════╝';
  174. exit
  175.