home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / os2mb108.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1997-06-30  |  10KB  |  338 lines

  1. /* Recreate objects script.
  2.  * 
  3.  * Generated via Object Desktop Package File 'MBase'.
  4.  * Modified by Marsiglietti Max 1997.
  5.  */
  6.  
  7. /* Register with REXX API extensions. */
  8. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  9. Call SysLoadFuncs
  10. '@cls'
  11.  
  12. /* Get the boot drive location */
  13. OurPath = Value( 'SOMDDIR',,'OS2ENVIRONMENT' )
  14. BootDrv = lastpos("\OS2\ETC\DSOM", OurPath)
  15. say "MaxBase installation program for OS/2 Warp."
  16. say "------- ------------ ------- --- ---- -----"
  17. say
  18. if BootDrv = 0 then
  19. do 
  20.  do until BootDrv \= ""
  21.   call charout "stdout:", "Please enter your boot drive letter [e.g., C] : "
  22.   pull BootDrv
  23.  end
  24.  if right(BootDrv, 1) \= ':' then
  25.   BootDrv = BootDrv || ":"
  26. end
  27. else
  28. do
  29.  BootDrv = substr(OurPath, BootDrv - 2, 1)
  30.  do
  31.   say "Please enter your boot drive letter [e.g., C]"
  32.   call charout "stdout:", "(Default [pressing ENTER] is "BootDrv") : "
  33.   pull ask
  34.  end
  35.  if ask \= "" then BootDrv = ask
  36.  if right(BootDrv, 1) \= ':' then
  37.   BootDrv = BootDrv || ":"
  38. end
  39. curdir = directory()
  40. '@cls'
  41. say "MaxBase installation program for OS/2 Warp."
  42. say "------- ------------ ------- --- ---- -----"
  43. say
  44. say "This installation procedure will create the WPS"
  45. say " objects you will need to use MaxBase and its"
  46. say " C/S counterparts, Sportello and RXDBServer."
  47. say "Also, if this is your first MaxBase installation,"
  48. say " your "bootdrv"\config.sys file will be changed."
  49. say
  50. say "Close this window now to abort, or press ENTER to"
  51. say "proceed with the installation."
  52. Parse Upper Pull Answer
  53. '@start e readme.os2'
  54. '@start e readme.1st'
  55. '@copy mbase.bmp 'BootDrv'\os2\bitmap >nul'
  56. CreateCollision = 'Replace' 
  57.  
  58. InnF=BootDrv'\CONFIG.MBS'
  59. OutF=BootDrv'\CONFIG.SYS'
  60. '@copy 'OutF' 'InnF' >nul'
  61. '@del 'OutF
  62.  
  63. msg.1 = "Warning:       ===> No system files changed. <==="
  64. msg.2 = "Warning: ===> You can start using MaxBase right now. <==="
  65.  
  66. classpathpresent = 0
  67. do until lines(InnF) = 0
  68.  
  69.  InStr = linein(InnF)
  70.  
  71.  if (translate(Left(word(instr, 2), 9)) = "CLASSPATH") then
  72.   classpathpresent = 1
  73.  
  74.  if (translate(Left(word(instr, 2), 9)) = "CLASSPATH") & (pos(translate(curdir"\client"), translate(instr)) = 0) then
  75.  do
  76.   instr = strip(instr)
  77.   if right(instr, 1)\=";" then
  78.    instr = instr || ";"
  79.   instr = instr || curdir"\NetRexxR.zip;"curdir";"curdir"\taligent.zip;"curdir"\client;"curdir"\server;.\.;"
  80.   msg.1 =  "Warning:                 ===> "BootDrv"\Config.sys changed. <==="
  81.   msg.2 =  "Warning: ===> You must now restart your computer before using MaxBase. <==="
  82.  end
  83.  call lineout outf, instr
  84. end
  85. if classpathpresent=0 then
  86. do
  87.  call lineout outf, "SET CLASSPATH=" || curdir"\NetRexxR.zip;"curdir";"curdir"\taligent.zip;"curdir"\client;"curdir"\server;.\.;"
  88.   msg.1 =  "Warning:                 ===> "BootDrv"\Config.sys changed. <==="
  89.   msg.2 =  "Warning: ===> You must now restart your computer before using MaxBase. <==="
  90. end
  91.  
  92. say "Done registering changes to classpath."
  93. say
  94. say msg.1
  95. say msg.2
  96. say
  97. Call CreateObjects
  98. Exit
  99.  
  100. CreateObject: procedure
  101.     Parse Arg Class, Title, Location, Setup, Collision
  102.     rc = SysCreateObject( Class, Title, Location, Setup, Collision )
  103.     If rc <> 1 Then
  104.         Say ' > failed to create ['Title' | 'Class'] at location ['Location']'
  105.     return rc
  106.  
  107. CreateObjects:
  108.  
  109. say "                                      | 0%   | 50%   | 100%"
  110. say "                                      V      V       V"
  111. call charout "stdout:", "Registering WPS objects, please wait  "
  112. rc = CreateObject( 'WPFolder',,
  113.     'MaxBase',,
  114.     '<WP_DESKTOP>',,
  115.     'NOPRINT=YES;'||,
  116.         'DEFAULTVIEW=CONTENTS;'||,
  117.         'ICONPOS=90,75;'||,
  118.         'ICONVIEWPOS=25 25 55 50;'||,
  119.         'SELFCLOSE=1;'||,
  120.         'BACKGROUND='BootDrv'\OS2\BITMAP\mbase.bmp,N,,I,255 255 255;'||,
  121.         'ALWAYSSORT=YES;'||,
  122.         'TREEVIEW=LINES,MINI;'||,
  123.         'FOLDERICONBACKGROUNDCOLOR=255 255 255;'||,
  124.         'ICONTEXTBACKGROUNDCOLOR=255 255 255;'||,
  125.         'ICONFILE=' || curdir || '\ICONS\MAIN_CL.ICO;'||,
  126.         'ICONNFILE=1,' || curdir || '\ICONS\MAIN_OP.ICO;'||,
  127.         'OBJECTID=<MaxBase>',,
  128.     CreateCollision )
  129.  
  130. call charout "stdout:", "."
  131. rc = CreateObject( 'WPFolder',,
  132.     'Docs',,
  133.     '<MaxBase>',,
  134.     'NOPRINT=YES;'||,
  135.         'DEFAULTVIEW=CONTENTS;'||,
  136.         'ICONPOS=85,63;'||,
  137.         'ICONVIEWPOS=25 35 50 30;'||,
  138.         'SELFCLOSE=1;'||,
  139.         'ALWAYSSORT=YES;'||,
  140.         'TREEVIEW=LINES,MINI;'||,
  141.         'ICONFILE=' || curdir || '\ICONS\DOC_CL.ICO;'||,
  142.         'ICONNFILE=1,' || curdir || '\ICONS\DOC_OP.ICO;'||,
  143.         'OBJECTID=<MB_DOCS>',,
  144.     CreateCollision )
  145.  
  146. call charout "stdout:", "."
  147. rc = CreateObject( 'WPShadow',,
  148.     'db_store',,
  149.     '<MaxBase>',,
  150.     'NOPRINT=YES;'||,
  151.         'DEFAULTVIEW=UNKNOWN;'||,
  152.         'HELPPANEL=1277;'||,    
  153.         'SHADOWID=' || curdir || '\db_store;'||,
  154.         'ICONPOS=68,90',,
  155.     CreateCollision )
  156.  
  157.  
  158. call charout "stdout:", "."
  159.   rc = CreateObject( 'WPShadow',,
  160.     'Readme.os2',,
  161.     '<MB_DOCS>',,
  162.     'DEFAULTVIEW=UNKNOWN;'||,
  163.         'HELPPANEL=4082;'||,
  164.         'SHADOWID=' || curdir || '\Readme.os2;'||,
  165.         'ICONPOS=87,19',,
  166.     CreateCollision )
  167.  
  168.  
  169. call charout "stdout:", "."
  170.   rc = CreateObject( 'WPShadow',,
  171.     'Readme.1st',,
  172.     '<MB_DOCS>',,
  173.     'DEFAULTVIEW=UNKNOWN;'||,
  174.         'HELPPANEL=4082;'||,
  175.         'SHADOWID=' || curdir || '\Readme.1st;'||,
  176.         'ICONPOS=87,19',,
  177.     CreateCollision )
  178.  
  179.  
  180. call charout "stdout:", "."
  181.   rc = CreateObject( 'WPShadow',,
  182.     'SportelloApplet.doc',,
  183.     '<MB_DOCS>',,
  184.     'DEFAULTVIEW=UNKNOWN;'||,
  185.         'HELPPANEL=4082;'||,
  186.         'SHADOWID=' || curdir || '\client\SportelloApplet.doc;'||,
  187.         'ICONPOS=87,19',,
  188.     CreateCollision )
  189.  
  190.  
  191. call charout "stdout:", "."
  192.   rc = CreateObject( 'WPShadow',,
  193.     'MaxBase.doc',,
  194.     '<MB_DOCS>',,
  195.     'DEFAULTVIEW=UNKNOWN;'||,
  196.         'HELPPANEL=4082;'||,
  197.         'SHADOWID=' || curdir || '\MaxBase.doc;'||,
  198.         'ICONPOS=87,19',,
  199.     CreateCollision )
  200.  
  201.  
  202. call charout "stdout:", "."
  203.   rc = CreateObject( 'WPShadow',,
  204.     'RXDbase.doc',,
  205.     '<MB_DOCS>',,
  206.     'DEFAULTVIEW=UNKNOWN;'||,
  207.         'HELPPANEL=4082;'||,
  208.         'SHADOWID=' || curdir || '\RXDbase.doc;'||,
  209.         'ICONPOS=87,19',,
  210.     CreateCollision )
  211.  
  212.  
  213. call charout "stdout:", "."
  214.   rc = CreateObject( 'WPShadow',,
  215.     'RXDBclient.doc',,
  216.     '<MB_DOCS>',,
  217.     'DEFAULTVIEW=UNKNOWN;'||,
  218.         'HELPPANEL=4082;'||,
  219.         'SHADOWID=' || curdir || '\Client\RXDBclient.doc;'||,
  220.         'ICONPOS=87,19',,
  221.     CreateCollision )
  222.  
  223.  
  224. call charout "stdout:", "."
  225.   rc = CreateObject( 'WPShadow',,
  226.     'Sportello.doc',,
  227.     '<MB_DOCS>',,
  228.     'DEFAULTVIEW=UNKNOWN;'||,
  229.         'HELPPANEL=4082;'||,
  230.         'SHADOWID=' || curdir || '\Client\Sportello.doc;'||,
  231.         'ICONPOS=87,19',,
  232.     CreateCollision )
  233.  
  234.  
  235. call charout "stdout:", "."
  236.   rc = CreateObject( 'WPProgram',,
  237.       'Open local DB',,
  238.       '<MaxBase>',,
  239.       'NOTDEFAULTICON=YES;'||,
  240.           'NOPRINT=YES;'||,
  241.           'DEFAULTVIEW=RUNNING;'||,
  242.           'ICONPOS=2,6;'||,
  243.           'ASSOCFILTER=*.DAT,*.DBF,*.LDB;'||,
  244.           'EXENAME=' || curdir || '\MAXBASE.CMD;'||,
  245.           'PARAMETERS=%**F;'||,
  246.           'PROGTYPE=WINDOWABLEVIO;'||,
  247.           'MINIMIZED=YES;'||,
  248.           'ICONFILE=' || curdir || '\ICONS\MaxBase.ICO',,
  249.       CreateCollision )
  250.  
  251. call charout "stdout:", "."
  252.   rc = CreateObject( 'WPProgram',,
  253.       'Share DB on the network',,
  254.       '<MaxBase>',,
  255.       'NOTDEFAULTICON=YES;'||,
  256.           'NOPRINT=YES;'||,
  257.           'DEFAULTVIEW=RUNNING;'||,
  258.           'HELPPANEL=15684;'||,
  259.           'ICONPOS=88,82;'||,
  260.           'ICONVIEWPOS=36 76 38 16;'||,
  261.           'ASSOCFILTER=*.DAT;'||,
  262.           'EXENAME=' || curdir || '\server\runserver.cmd;'||,
  263.           'PARAMETERS=/d:%**F /p:[Port?] /l:log.txt /a:[Password? ENTER=none];'||,
  264.           'PROGTYPE=WINDOWABLEVIO;'||,
  265.           'NOAUTOCLOSE=YES;'||,
  266.           'ICONFILE=' || curdir || '\ICONS\RXDBServer.ICO',,
  267.       CreateCollision )
  268.  
  269. call charout "stdout:", "."
  270.   rc = CreateObject( 'WPProgram',,
  271.       'Access a remote DB',,
  272.       '<MaxBase>',,
  273.       'NOTDEFAULTICON=YES;'||,
  274.           'NOPRINT=YES;'||,
  275.           'DEFAULTVIEW=RUNNING;'||,
  276.           'HELPPANEL=15684;'||,
  277.           'ICONPOS=16,6;'||,
  278.           'EXENAME=' || curdir || '\client\runclient.cmd;'||,
  279.           'PARAMETERS=[Host?] [Port?] [Password? ENTER=none];'||,
  280.           'PROGTYPE=WINDOWABLEVIO;'||,
  281.           'MINIMIZED=YES;'||,
  282.           'ICONFILE=' || curdir || '\ICONS\RXDBClient.ICO',,
  283.       CreateCollision )
  284.  
  285. call charout "stdout:", "."
  286. rc = CreateObject( 'WPFolder',,
  287.     'NewDB',,
  288.     '<MaxBase>',,
  289.     'TEMPLATE=YES;'||,
  290.         'DEFAULTVIEW=CONTENTS;'||,
  291.         'HELPPANEL=15685;'||,
  292.         'ICONPOS=54,82;'||,
  293.         'SELFCLOSE=1;'||,
  294.         'ICONVIEWPOS=38 73 33 18;'||,
  295.         'ALWAYSSORT=YES;'||,
  296.         'BACKGROUND=(none),,,C,199 199 199;'||,
  297.         'ICONFILE=' || curdir || '\ICONS\MB_CL.ICO;'||,
  298.         'ICONNFILE=1,' || curdir || '\ICONS\MB_OP.ICO;'||,
  299.         'OBJECTID=<NewDB>',,
  300.     CreateCollision )
  301.  
  302.     call SysCopyObject curdir'\rxdb.dat', '<NewDB>'
  303.  
  304. call charout "stdout:", "."
  305. rc = CreateObject( 'WPUrl',,
  306.     'Get the latest Java 1.02 runtime for OS/2!',,
  307.     '<MaxBase>',,
  308.     'DEFAULTVIEW=CONTENTS;'||,
  309.     'URL=ftp://ftp.hursley.ibm.com/pub/java/fixes/os2/102/runtime.exe;'||,
  310.     'ICONPOS=56,47',,
  311.     CreateCollision )
  312.  
  313.  
  314. call charout "stdout:", "."
  315.   rc = CreateObject( 'WPShadow',,
  316.     'readme.plugins',,
  317.     '<MB_DOCS>',,
  318.     'DEFAULTVIEW=UNKNOWN;'||,
  319.         'HELPPANEL=4082;'||,
  320.         'SHADOWID=' || curdir || '\readme.plugins;'||,
  321.         'ICONPOS=87,19',,
  322.     CreateCollision )
  323.  
  324. say "."
  325.   rc = CreateObject( 'WPProgram',,
  326.       'SmartGuide to MaxBase',,
  327.       '<MaxBase>',,
  328.           'NOPRINT=YES;'||,
  329.           'DEFAULTVIEW=RUNNING;'||,
  330.           'HELPPANEL=15684;'||,
  331.           'ICONPOS=16,6;'||,
  332.           'STARTUPDIR=' || curdir || ';' ||,
  333.           'EXENAME=sguide.exe;'||,
  334.           'PARAMETERS=' || curdir || '\mbase.sgs;',,
  335.       CreateCollision )
  336. say "Done registering objects on the Workplace Shell."
  337. return
  338.