home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / objfac.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-04-09  |  3KB  |  117 lines

  1. /* The Object Factory DEMO version REXX installation */
  2.  
  3. Parse source . . __rexx_name;
  4. __rexx_dir = Filespec('D',__rexx_name)||Filespec('P',__rexx_name)
  5.  
  6. Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs';
  7. Call SysLoadFuncs;           
  8.  
  9. system_dll = FileSpec('Drive', Value('SYSTEM_INI', ,'OS2ENVIRONMENT')) || '\OS2\DLL';
  10.  
  11. rc = SysDeregisterObjectClass('SOMNotebook');
  12. Address CMD '@ERASE 'system_dll'\SOMNOTE.DLL 2>NUL';
  13. Address CMD '@COPY '__rexx_dir'SOMNOTE.DLL 'system_dll;
  14.  
  15. If rc <> 0 Then
  16.     Do;
  17.        Say  "Could not replace SOMNOTE.DLL";
  18.            Exit;
  19.         End;
  20.  
  21. rc = SysRegisterObjectClass('SOMNotebook', system_dll || '\SOMNOTE.DLL');
  22.  
  23. If rc <> 1 Then 
  24.     Do;
  25.            Say  "Could not register SOM Notebook, rc="rc".";
  26.            Exit;
  27.         End;
  28. Else
  29.     Say "SOM Notebook registered.";
  30.  
  31. rc = SysDeregisterObjectClass('ClassNotebook');
  32. Address CMD '@ERASE 'system_dll'\CLSSNOTE.DLL 2>NUL';
  33. Address CMD '@COPY '__rexx_dir'CLSSNOTE.DLL 'system_dll;
  34.  
  35. If rc <> 0 Then
  36.     Do;
  37.        Say  "Could not replace CLSSNOTE.DLL";
  38.            Exit;
  39.         End;
  40.  
  41. rc = SysRegisterObjectClass('ClassNotebook', system_dll || '\CLSSNOTE.DLL');
  42.  
  43. If rc <> 1 Then 
  44.     Do;
  45.            Say  "Could not register Class Notebook, rc="rc".";
  46.            Exit;
  47.         End;
  48. Else
  49.     Say "Class Notebook registered.";
  50.  
  51. rc = SysDeregisterObjectClass('ClassTree');
  52. Address CMD '@ERASE 'system_dll'\CLSSTREE.DLL 2>NUL';
  53. Address CMD '@COPY '__rexx_dir'CLSSTREE.DLL 'system_dll;
  54.  
  55. If rc <> 0 Then
  56.     Do;
  57.        Say  "Could not replace CLSSTREE.DLL";
  58.            Exit;
  59.         End;
  60.  
  61. rc = SysRegisterObjectClass('ClassTree', system_dll || '\CLSSTREE.DLL');
  62.  
  63. If rc <> 1 Then 
  64.     Do;
  65.            Say  "Could not register Class Tree, rc="rc".";
  66.            Exit;
  67.         End;
  68. Else
  69.     Say "Class Tree registered.";
  70.  
  71. COPY "*.HLP" "C:\OS2\HELP"
  72. COPY "*.INF"  "C:\OS2\HELP"
  73.  
  74. rc=SysCreateObject('WPProgram','The Object Factory Help','<WP_DESKTOP>', ,
  75.              "EXENAME=VIEW.EXE;PARAMETERS=C:\OS2\HELP\SYNAPTEC.INF");
  76.  
  77. Say "";
  78.  
  79. If rc <> 1 Then 
  80.     Do;
  81.            Say  "Could not create help program object rc="rc".";
  82.            Exit;
  83.         End;
  84. Else
  85.     Say "Help added to desktop.";
  86.  
  87. Say "";
  88. Say "All objects have successfully been added to your machine."
  89.  
  90. Say "";
  91. Say "";
  92.  
  93. Say "Please enter a new directory name to place method tables: ";
  94. Pull MethodDirectory;
  95.  
  96. rc = SysMkDir(MethodDirectory);
  97.  
  98. If rc <> 0 Then
  99.     Do;
  100.        Say "Could not create directory "MethodDirectory;
  101.        Exit;
  102.     End;
  103.  
  104. COPY "*.WPS" MethodDirectory;
  105. COPY "*.MTH" MethodDirectory;
  106.  
  107. Say "";
  108. Say "The Object Factory's DEMO version is now installed";
  109. Say "";
  110.  
  111. Say "You will now have 2 new templates in your System Templates folder";
  112. Say "";
  113.  
  114. Say "Before starting, you MUST add "MethodDirectory" to the PATH statement in CONFIG.SYS and reboot.";
  115.  
  116. Exit;
  117.