home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / install / runprog.cmd < prev    next >
Encoding:
Text File  |  1994-03-04  |  16.7 KB  |  473 lines

  1. /***********************************************************************/
  2. /* RUNPROG                                                             */
  3. /*                                                                     */
  4. /* Purpose: Uses XCOPY to install all files from a sub directory       */
  5. /*          into a user specified destination directory.               */
  6. /*                                                                     */
  7. /* Parameters: BootDrive: Drive letter where system boots              */
  8. /*             Install Drive: Drive letter and path of CDROM           */
  9. /*             Program Name: fully qualified Name of the program to run*/
  10. /*             Flag:    parameter for the program.                     */
  11. /***********************************************************************/
  12. /*                (C) Copyright IBM Corporation 1994                   */
  13. /***********************************************************************/
  14. parse upper arg Ctl.!BDr Ctl.!CDr Ctl.!ProgName Ctl.!RunProgName Ctl.!flag
  15. trace 'o'
  16. call on halt
  17. Globals = 'Ctl.' 'RXCADD.'
  18.  
  19. call Initialize
  20.  
  21. if RxCaDD.OpType = 'REMOVE'
  22.   then do
  23.     call 'MessageBox' Ctl.!ProgName, 'Remove is not supported.  Add the application',
  24.          'again to recreate the program object.'
  25.     call 'CaDDExit'
  26.     exit 0
  27.   end  /* Do */
  28.  
  29. if substr(Ctl.!BDr,2, 1) <> ':' | substr(Ctl.!CDr,2, 1) <> ':'
  30.   then call MyExit 302
  31. Ctl.!CurDir = directory()
  32. call directory(Ctl.!CurDir)
  33. call RunProgram
  34.  
  35. call 'CaddComplete' 12
  36. call 'CaddExit'
  37.  
  38. call MyExit 0
  39. exit
  40.  
  41. Initialize: procedure expose (Globals)
  42. CurDir = directory()
  43. call directory Ctl.!CDr'INSTALL'
  44. call Rxfuncadd 'CADDINIT', 'RXCADD', 'CADDINIT'
  45. ver = 'CAddInit'()
  46. /* Ctl.!Quiet = (wordpos('/N', Ctl.!Options) <> 0) */
  47. return 0
  48.  
  49.  
  50. RunProgram: procedure expose (Globals)
  51. '@ECHO OFF'
  52. value = ' '
  53. SSND='SSND'
  54. MMPM21TK='MMPM21TK'
  55. ULTIMOT='ULTIMOT'
  56. REALIZER='REALIZER'
  57. CSETFIXC='CSETFIXC'
  58. CSETFIXL='CSETFIXL'
  59. CSETFIXU='CSETFIXU'
  60. CSETFXCD='CSETFXCD'
  61. CSETFXLD='CSETFXLD'
  62. CSETFXUD='CSETFXUD'
  63. CSET21LD='CSET21LD'
  64. CSETF21L='CSETF21L'
  65. WKPLACE='WKPLACE'
  66. READ2='READ2'
  67. PENOS2='PENOS2'
  68. PENBASE='PENBASE'
  69. LAPS='LAPS'
  70. TCPIP='TCPIP'
  71. SBL='SBL'
  72. NSC='NSC'
  73. DCE='DCE'
  74. COM8SDD='COM8SDD'
  75. COMMPASS='COMMPASS'
  76. WF2FIX21='WF2FIX21'
  77. PAB2='PAB2'
  78.  
  79.  
  80. Select
  81. when Ctl.!ProgName = SSND then do
  82. say '┌────────────────────────────────────────────────────────────────────────┐'
  83. say '│                                                                        │'
  84. say '│      To install Boca Soft System Sounds,                               │'
  85. say '│      please change the PATH field on the install panel to              │'
  86. say '│               \MULTIMED\SSND                                           │'
  87. say '│      by using the .. entry in the Directory field.                     │'
  88. say '│      Select the INSTALL push button after highlighting all products.   │'
  89. say '│                                                                        │'
  90. say '└────────────────────────────────────────────────────────────────────────┘'
  91. pause
  92. Ctl.!RunProgName
  93. End
  94.  
  95. when Ctl.!ProgName = MMPM21TK Then do
  96. say '┌────────────────────────────────────────────────────────────────────────┐'
  97. say '│                                                                        │'
  98. say '│      To install the OS/2 Multimedia Toolkit Version 1.1,               │'
  99. say '│      please change the PATH field on the install panel to              │'
  100. say '│               \MULTIMED\MMPM21TK                                       │'
  101. say '│      by using the .. entry in the Directory field.                     │'
  102. say '│      Select the INSTALL push button after highlighting all products.   │'
  103. say '│                                                                        │'
  104. say '└────────────────────────────────────────────────────────────────────────┘'
  105. pause
  106. Ctl.!RunProgName
  107. End
  108.  
  109. when Ctl.!ProgName = LAPS then do
  110. say '┌────────────────────────────────────────────────────────────────────────┐'
  111. say '│                                                                        │'
  112. say '│                LAN Adapter and Protocol Service                        │'
  113. say '│                                                                        │'
  114. say '└────────────────────────────────────────────────────────────────────────┘'
  115. pause
  116. '@cd ..\comm\tcpip\laps'
  117. Ctl.!RunProgName
  118. '@cd ..\..\..\install'
  119. End
  120.  
  121. when Ctl.!ProgName = TCPIP Then do
  122. say '┌────────────────────────────────────────────────────────────────────────┐'
  123. say '│                                                                        │'
  124. say '│      Please ensure that LAPS has been installed first                  │'
  125. say '│                                                                        │'
  126. say '│      before proceeding with TCPIP installation,                        │'
  127. say '│      please refer to the READ.ME file on the                           │'
  128. say '│            \COMM\TCPIP\TCPIP directory                                 │'
  129. say '│                                                                        │'
  130. say '└────────────────────────────────────────────────────────────────────────┘'
  131. pause
  132.  
  133. '@cd ..\comm\tcpip\tcpip'
  134. Ctl.!RunProgName
  135. '@cd ..\..\..\install'
  136. End
  137.  
  138. when Ctl.!ProgName = PENOS2 Then do
  139. say '┌────────────────────────────────────────────────────────────────────────┐'
  140. say '│                                                                        │'
  141. say '│            This step will install the Pen OS/2 Tool Kit                │'
  142. say '│                                                                        │'
  143. say '└────────────────────────────────────────────────────────────────────────┘'
  144. pause
  145.  
  146. '@cd ..\devtools\penos2'
  147. Ctl.!RunProgName
  148. '@cd ..\..\install'
  149. End
  150.  
  151. when Ctl.!ProgName = PENBASE Then do
  152. say '┌────────────────────────────────────────────────────────────────────────┐'
  153. say '│                                                                        │'
  154. say '│            This step will install the Pen for OS/2 Base                │'
  155. say '│                                                                        │'
  156. say '└────────────────────────────────────────────────────────────────────────┘'
  157. pause
  158.  
  159. '@cd ..\devtools\penbase'
  160. Ctl.!RunProgName
  161. '@cd ..\..\install'
  162. End
  163.  
  164.  
  165.  
  166. when Ctl.!ProgName = CSETFXCD Then do
  167. do until answer = 'Y'
  168.   say
  169.   say '┌────────────────────────────────────────────────────────────────────────────┐'
  170.   say '│                       The Developer Connection                             │'
  171.   say '│               IBM C SET ++ for OS/2 (Corrective Service)                   │'
  172.   say '│                                                                            │'
  173.   say '│        The installation process will prompt you for a path, which is       │'
  174.   say '│          an optional argument. If supplied, the CSD installation           │'
  175.   say '│        program assumes that IBM C/C++ is installed in that directory.      │'
  176.   say '│      If not specified, the program searches for the installed version.     │'
  177.   say '│                                                                            │'
  178.   say '└────────────────────────────────────────────────────────────────────────────┘'
  179.   say
  180.   say '  Enter a destination for 'Ctl.!ProgName' (optional) or Q to QUIT:'
  181.    tmppath = translate(linein(STDIN))
  182.   if tmppath <> '' then do
  183.      if tmppath = 'Q'
  184.        then call MyExit 300
  185.      if right(tmppath,1) = '\'
  186.        then tmppath = strip(tmppath, 'T', '\')
  187.      if tmppath \= ''
  188.        then do
  189.          say
  190.          say '  You entered 'tmppath' is this correct(Y/N)?'
  191.          answer = translate(linein(STDIN))
  192.          do while answer \= 'Y' & answer \= 'N'
  193.            say beep(450,150)'Enter (Y for yes or N for No)'
  194.            answer = translate(linein(STDIN))
  195.          end /* do */
  196.      end
  197.  end /* if */
  198.  else answer ='Y'
  199. end /* Do */
  200.  
  201. '@cd ..\services\csetfix\compiler'
  202. if tmppath <>'' then Ctl.!RunProgName tmppath
  203. else Ctl.!RunProgName
  204. '@cd ..\..\..\install'
  205. End
  206.  
  207. when Ctl.!ProgName = CSETFXLD Then do
  208. do until answer = 'Y'
  209.   say
  210.   say '┌────────────────────────────────────────────────────────────────────────────┐'
  211.   say '│                       The Developer Connection                             │'
  212.   say '│               IBM C SET ++ for OS/2 (Corrective Service)                   │'
  213.   say '│                                                                            │'
  214.   say '│        The installation process will prompt you for a path, which is       │'
  215.   say '│          an optional argument. If supplied, the CSD installation           │'
  216.   say '│        program assumes that IBM C/C++ is installed in that directory.      │'
  217.   say '│      If not specified, the program searches for the installed version.     │'
  218.   say '│                                                                            │'
  219.   say '└────────────────────────────────────────────────────────────────────────────┘'
  220.   say
  221.   say '  Enter a destination for 'Ctl.!ProgName' (optional) or Q to QUIT:'
  222.   tmppath = translate(linein(STDIN))
  223.   if tmppath <> '' then do
  224.      if tmppath = 'Q'
  225.        then call MyExit 300
  226.      if right(tmppath,1) = '\'
  227.        then tmppath = strip(tmppath, 'T', '\')
  228.      if tmppath \= ''
  229.        then do
  230.          say
  231.          say '  You entered 'tmppath' is this correct(Y/N)?'
  232.          answer = translate(linein(STDIN))
  233.          do while answer \= 'Y' & answer \= 'N'
  234.            say beep(450,150)'Enter (Y for yes or N for No)'
  235.            answer = translate(linein(STDIN))
  236.          end /* do */
  237.      end
  238.  end /* if */
  239.  else answer ='Y'
  240. end /* Do */
  241.  
  242. '@cd ..\services\csetfix\clslib20'
  243. if tmppath <>'' then Ctl.!RunProgName tmppath
  244. else Ctl.!RunProgName
  245. '@cd ..\..\..\install'
  246. End
  247.  
  248.  
  249.  
  250. when Ctl.!ProgName = CSET21LD Then do
  251. do until answer = 'Y'
  252.   say
  253.   say '┌────────────────────────────────────────────────────────────────────────────┐'
  254.   say '│                       The Developer Connection                             │'
  255.   say '│               IBM C SET ++ for OS/2 (Corrective Service)                   │'
  256.   say '│                                                                            │'
  257.   say '│        The installation process will prompt you for a path, which is       │'
  258.   say '│          an optional argument. If supplied, the CSD installation           │'
  259.   say '│        program assumes that IBM C/C++ is installed in that directory.      │'
  260.   say '│      If not specified, the program searches for the installed version.     │'
  261.   say '│                                                                            │'
  262.   say '└────────────────────────────────────────────────────────────────────────────┘'
  263.   say
  264.   say '  Enter a destination for 'Ctl.!ProgName' (optional) or Q to QUIT:'
  265.   tmppath = translate(linein(STDIN))
  266.   if tmppath <> '' then do
  267.      if tmppath = 'Q'
  268.        then call MyExit 300
  269.      if right(tmppath,1) = '\'
  270.        then tmppath = strip(tmppath, 'T', '\')
  271.      if tmppath \= ''
  272.        then do
  273.          say
  274.          say '  You entered 'tmppath' is this correct(Y/N)?'
  275.          answer = translate(linein(STDIN))
  276.          do while answer \= 'Y' & answer \= 'N'
  277.            say beep(450,150)'Enter (Y for yes or N for No)'
  278.            answer = translate(linein(STDIN))
  279.          end /* do */
  280.      end
  281.  end /* if */
  282.  else answer ='Y'
  283. end /* Do */
  284.  
  285. '@cd ..\services\csetfix\clslib21'
  286. if tmppath <>'' then Ctl.!RunProgName tmppath
  287. else Ctl.!RunProgName
  288. '@cd ..\..\..\install'
  289. End
  290.  
  291.  
  292. when Ctl.!ProgName = CSETFXUD Then do
  293. do until answer = 'Y'
  294.   say
  295.   say '┌────────────────────────────────────────────────────────────────────────────┐'
  296.   say '│                       The Developer Connection                             │'
  297.   say '│               IBM C SET ++ for OS/2 (Corrective Service)                   │'
  298.   say '│                                                                            │'
  299.   say '│        The installation process will prompt you for a path, which is       │'
  300.   say '│          an optional argument. If supplied, the CSD installation           │'
  301.   say '│        program assumes that IBM C/C++ is installed in that directory.      │'
  302.   say '│      If not specified, the program searches for the installed version.     │'
  303.   say '│                                                                            │'
  304.   say '└────────────────────────────────────────────────────────────────────────────┘'
  305.   say
  306.   say '  Enter a destination for 'Ctl.!ProgName' (optional) or Q to QUIT:'
  307.   tmppath = translate(linein(STDIN))
  308.   if tmppath <> '' then do
  309.      if tmppath = 'Q'
  310.        then call MyExit 300
  311.      if right(tmppath,1) = '\'
  312.        then tmppath = strip(tmppath, 'T', '\')
  313.      if tmppath \= ''
  314.        then do
  315.          say
  316.          say '  You entered 'tmppath' is this correct(Y/N)?'
  317.          answer = translate(linein(STDIN))
  318.          do while answer \= 'Y' & answer \= 'N'
  319.            say beep(450,150)'Enter (Y for yes or N for No)'
  320.            answer = translate(linein(STDIN))
  321.          end /* do */
  322.      end
  323.  end /* if */
  324.  else answer ='Y'
  325. end /* Do */
  326.  
  327. '@cd ..\services\csetfix\utility'
  328. if tmppath <>'' then Ctl.!RunProgName tmppath
  329. else Ctl.!RunProgName
  330. '@cd ..\..\..\install'
  331. End
  332.  
  333. when Ctl.!ProgName = CSETFIXC Then do
  334. '@cd ..\services\csetfix\compiler'
  335. Ctl.!RunProgName 'a:'
  336. '@cd ..\..\..\install'
  337. End
  338.  
  339. when Ctl.!ProgName = CSETFIXL Then do
  340. '@cd ..\services\csetfix\clslib20'
  341. Ctl.!RunProgName 'a:'
  342. '@cd ..\..\..\install'
  343. End
  344.  
  345. when Ctl.!ProgName = CSETF21L Then do
  346. '@cd ..\services\csetfix\clslib21'
  347. Ctl.!RunProgName 'a:'
  348. '@cd ..\..\..\install'
  349. End
  350.  
  351. when Ctl.!ProgName = CSETFIXU Then do
  352. '@cd ..\services\csetfix\utility'
  353. Ctl.!RunProgName 'a:'
  354. '@cd ..\..\..\install'
  355. End
  356.  
  357. when Ctl.!ProgName = SBL Then do
  358. '@cd ..\devtools\sbl\sbleval'
  359. '@call 'Ctl.!RunProgName
  360. '@cd ..\..\..\install'
  361. End
  362.  
  363. when Ctl.!ProgName = NSC Then do
  364. '@cd ..\comm\nsc'
  365. '@call 'Ctl.!RunProgName
  366. '@cd ..\..\install'
  367. End
  368.  
  369. when Ctl.!ProgName = COM8SDD Then do
  370. '@cd ..\devtools\com8sdd'
  371. '@call 'Ctl.!RunProgName
  372. '@cd ..\..\install'
  373. End
  374.  
  375. when Ctl.!ProgName = DCE Then do
  376. '@cd ..\comm\dce'
  377. '@call 'Ctl.!RunProgName
  378. '@cd ..\..\install'
  379. End
  380.  
  381.  
  382. when Ctl.!ProgName = WF2FIX21 Then do
  383. say '┌────────────────────────────────────────────────────────────────────────┐'
  384. say '│                                                                        │'
  385. say '│      This will install the CSD1 fixes to your system                   │'
  386. say '│                                                                        │'
  387. say '│      For more information, please refer to the README                  │'
  388. say '│      file on the SERVICES\WF2FIX21 directory.                          │'
  389. say '│                                                                        │'
  390. say '└────────────────────────────────────────────────────────────────────────┘'
  391. pause
  392. '@cd ..\services\wf2fix21'
  393. Ctl.!RunProgName
  394. '@cd ..\..\install'
  395. pause
  396. End
  397.  
  398. when Ctl.!ProgName = COMMPASS Then do
  399. '@cd ..\comm\commpass'
  400. Ctl.!RunProgName
  401. '@cd ..\..\install'
  402. End
  403.  
  404. when Ctl.!ProgName = PAB2 Then do
  405. '@cd ..\database\pab2'
  406. Ctl.!RunProgName
  407. '@cd ..\..\install'
  408. End
  409.  
  410. when Ctl.!ProgName = WKPLACE Then do
  411. '@cd ..\prodtool\wkplace'
  412. Ctl.!RunProgName
  413. '@cd ..\..\install'
  414. End
  415.  
  416. when Ctl.!ProgName = READ2 Then do
  417. '@cd ..\books'
  418. Ctl.!RunProgName
  419. '@cd ..\install'
  420. End
  421.  
  422. when Ctl.!ProgName = REALIZER Then do
  423. Ctl.!RunProgName
  424. End
  425.  
  426. when Ctl.!ProgName = ULTIMOT then do
  427. say '┌────────────────────────────────────────────────────────────────────────┐'
  428. say '│                                                                        │'
  429. say '│      To install the MMPM2 Ultimotion Workshop,                         │'
  430. say '│      Select the INSTALL push button after highlighting all products.   │'
  431. say '│      IMPORTANT: After installation, READ THE README FILE (ITEM 10)     │'
  432. say '│                 TO RENAME ANY OF 6 .INI AND .ADF FILES YOU MAY HAVE.   │'
  433. say '│                 THIS MUST BE DONE BEFORE YOU REBOOT AND RUN ULTIMOT.   │'
  434. say '│                                                                        │'
  435. say '└────────────────────────────────────────────────────────────────────────┘'
  436. pause
  437. Ctl.!RunProgName
  438. End
  439.  
  440. Otherwise Do
  441. '@call 'Ctl.!RunProgName
  442. End
  443. End
  444.  
  445. Resp = rc
  446. if Resp \= 0
  447.   then call MyExit 301
  448. return 0
  449.  
  450. MyExit: procedure expose (Globals)
  451. parse arg Resp
  452.  
  453. select
  454.   when Resp = 301
  455.     then do
  456.       call 'MessageBox' Ctl.!ProgName, 'Could not find 'Ctl.!ProgName'.'
  457.     end /* Do */
  458.   when Resp = 302
  459.     then do
  460.       call 'MessageBox' Ctl.!ProgName,'Could not find OS/2 2.0 Boot Drive or CD-ROM path.',
  461.                         'Make sure that INSTALL was run from the drive letter of the CD-ROM.'
  462.     end  /* Do */
  463.   otherwise
  464.     nop
  465. end  /* select */
  466. exit Resp
  467.  
  468.  
  469. halt:
  470.  
  471. call MyExit 2
  472. return
  473.