home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / netdor3.zip / VNDINST / FRNTENDS / IBMC2 / PACKINST.CMD < prev    next >
OS/2 REXX Batch file  |  1996-04-04  |  5KB  |  156 lines

  1. /******************************************************************
  2.  
  3. Description:    IBM C/2 Compiler Install Exec.
  4.  
  5. Details:        This really just prompts the user for information
  6.                  about how the IBMC/2 Compiler environment
  7.                  should be setup.
  8.  
  9. Dependencies:
  10.    Externals:   RXUTILS.DLL - Part of VENDOR package.
  11.    Drive(s):    TCPIP lib and include files on W: drive.  Change this
  12.                 if needed.
  13.    Directories:  \--+--\IBMC2--+--\BIN
  14.                     |          |
  15.                     |          +--\BINP
  16.                     |          |
  17.                     |          +--\BINR
  18.                     |          |
  19.                     |          +--\INCLUDE--+--\MT
  20.                     |          |            |
  21.                     |          +--\LIB      +--\SYS
  22.                     |          |
  23.                     |          +--\SRC
  24.                     |
  25.                     |
  26.                     +--\NETSRC--+--\H
  27.                     |           |
  28.                     |           +--\LIB
  29.                     |
  30.                     +--\SQLLIB
  31.                     |
  32.                     +--\TOOLKT*--\  Normal Toolkit dir struct
  33.  
  34.    Window Type: FS/Win
  35.    App Title:   None
  36.  
  37. Last Updated:   6/17/92
  38. ******************************************************************/
  39. trace 'O'
  40. '@echo off'
  41.  
  42. /* Give header */
  43. say;
  44. say 'Configuration for IBM C/2 Programming Environment'
  45. say '-------------------------------------------------'
  46. say;
  47.  
  48. /* Get user options */
  49. call AskUser
  50.  
  51. /* Give completed message */
  52. say
  53. say 'IBMC2 is ready to execute.  A reboot is not required.'
  54. say 'Press any key at the Vendor Continue... Panel and OK to run'
  55. say 'the IBMC2 Programming environment now.'
  56. say
  57. 'pause'
  58. 'exit'
  59.  
  60.  
  61.  
  62.  
  63. /*** Procedure for asking user for options ***/
  64. AskUser:
  65.  call RxFuncAdd 'RXOS2INI',    'RXUTILS', 'RXOS2INI'
  66.  
  67.   File = 'USER'
  68.   App = 'IBMC2'
  69.   Toolkit = 'Toolkit'
  70.   TCPIP   = 'TCPIP'
  71.   TCPIPR3 = 'TCPIPR3'
  72.   TCPIPR0 = 'TCPIPR0'
  73.   SQLLIB  = 'SQLLIB'
  74.  
  75.   CurTKver  =RxOs2Ini(File,  App, Toolkit)
  76.   LinkTCP   =RxOs2Ini(File,  App, TCPIP)
  77.   LinkTCPR3 =RxOs2Ini(File,  App, TCPIPR3)
  78.   LinkTCPR0 =RxOs2Ini(File,  App, TCPIPR0)
  79.   LinkSQL   =RxOs2Ini(File,  App, SQLLIB )
  80.   if LinkTCP='Y' then
  81.      call RxOs2Ini File,  App, TCPIP, '$RXDEL'
  82.  
  83.   if CurTKver <> '$RXERROR' then do
  84.     Ver=right(CurTKver,1)
  85.     say 'Current OS/2 Programming Toolkit: 1.'Ver
  86.     if left(LinkTCP,1) = 'Y' then
  87.        say 'Link to TCPIP Libraries: Yes'
  88.     else if left(LinkTCPR3,1) = 'Y' then
  89.        say 'Link to TCPIP Ring 3 Libraries: Yes'
  90.     else if left(LinkTCPR0,1) = 'Y' then
  91.        say 'Link to TCPIP Ring 0 Libraries: Yes'
  92.     else
  93.        say 'Link to TCPIP Libraries: No'
  94.     if left(LinkSQL,1) = 'Y' then
  95.        say 'Link with SQL support: Yes'
  96.     else
  97.        say 'Link with SQL support: No'
  98.     say;
  99.     say 'You can choose to change the current settings or accept them.'
  100.     say;
  101.   end
  102.  
  103.   say 'IBM C/2 can link your applications with any of the following'
  104.   say 'Programming Toolkits:'
  105.   say '     1. IBM OS/2 Programming Tools and Information Ver 1.1'
  106.   say '     2. IBM OS/2 Programming Tools and Information Ver 1.2'
  107.   say '     3. IBM OS/2 Programming Tools and Information Ver 1.3'
  108.   say;
  109.   say 'Choose which toolkit you want to link your applications with:'
  110.   do until WhichTK='1' | WhichTK='2' | WhichTK='3'
  111.     WhichTK = left(linein(STDIN),1)
  112.   end
  113.  
  114.   LinkTCPR0 = 'N'
  115.   LinkTCPR3 = 'N'
  116.   say
  117.   say 'If you are writing TCP/IP applications you will want to link with'
  118.   say 'TCP Libraries.'
  119.   say 'Do you want to include the TCPIP libraries in the LIB path? (Y/N)'
  120.   do until LinkTCP='Y' | LinkTCP='N'
  121.     LinkTCP = translate(left(linein(STDIN),1))
  122.   end
  123.   if LinkTCP = 'Y' then do
  124.     say
  125.     say 'Would you like to link TCP/IP Ring 0 or Ring 3 libraries:'
  126.     say '   1. TCPIP Ring 0 Libraries'
  127.     say '   2. TCPIP Ring 3 Libraries'
  128.     say 'Choose which library you want to link your applications with:'
  129.     do until WhichLib='1' | WhichLib='2'
  130.       WhichLib = left(linein(STDIN),1)
  131.     end
  132.     if WhichLib = '1' then
  133.       LinkTCPR0 = 'Y'
  134.     else
  135.       LinkTCPR3 = 'Y'
  136.   end
  137.  
  138.   say
  139.   say'If you are writing Database Manager applications you will want to'
  140.   say 'link with the SQL Libraries and header files.'
  141.   say 'Do you want to include the SQL libraries and headers? (Y/N)'
  142.   do until LinkSQL='Y' | LinkSQL='N'
  143.     LinkSQL = translate(left(linein(STDIN),1))
  144.   end
  145.  
  146.   CurTKver = 'TOOLKT1'WhichTK
  147.  
  148.   call RxOs2Ini File, App, TCPIPR0, LinkTCPR0
  149.   call RxOs2Ini File, App, TCPIPR3, LinkTCPR3
  150.   call RxOs2Ini File, App, SQLLIB,  LinkSQL
  151.   call RxOs2Ini File, App, Toolkit, CurTKver
  152.  
  153.   say
  154.   say 'IBMC2 Toolkit version, TCPIP and SQL link access saved.'
  155. return
  156.