home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv2.zip / VACPP / IBMCPP / BIN / IWFSETUP.CMD < prev    next >
OS/2 REXX Batch file  |  1995-06-02  |  18KB  |  412 lines

  1. /*---------------------------------------------------------------------------*/
  2. /*      Licensed Materials - Property of IBM                                 */
  3. /*                                                                           */
  4. /*      "Restricted Materials of IBM"                                        */
  5. /*                                                                           */
  6. /*      IBM WorkFrame                                                        */
  7. /*                                                                           */
  8. /*      (C) Copyright IBM Corp. 1991, 1995. All Rights Reserved.             */
  9. /*                                                                           */
  10. /*      US Government Users Restricted Rights - Use, duplication or          */
  11. /*      disclosure restricted by GSA ADP Schedule Contract with IBM Corp.    */
  12. /*---------------------------------------------------------------------------*/
  13. /* REXX */
  14.  
  15. /**************************************************************************/
  16. /* Install command file for Project Smarts                                */
  17. /* Parameters: WFDir - Directory where Project Smarts files are installed */
  18. /*             LogFile - A log file to place results                      */
  19. /**************************************************************************/
  20.  
  21. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  22. call SysLoadFuncs
  23.  
  24. if (Arg() <> 1) Then
  25.    call Abort("Error in parameter list.");
  26. arg WFDir LogFile
  27.  
  28. /* Load the Project Smartz utility functions. */
  29. rc = RxFuncAdd('iwfLoadFuncs', 'iwfRexx', 'iwfLoadFuncs');
  30. rc = iwfLoadFuncs();
  31.  
  32.  
  33. /***** Set object IDs for Quickstart shell projects *****/
  34. call Status("Updating 18 shell projects (this will take a few minutes)...")
  35.  
  36.  
  37. /* WPS Shell Project */
  38. WPSPath = WFDir||'\SMARTS\PROJECTS\WPS';
  39. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  40. if (rc <> 1) then
  41.   call Status("Error: Could not set WPS shell project.")
  42. else call Status("1 done.")
  43.  
  44. /* Visual Builder Shell Project */
  45. WPSPath = WFDir||'\SMARTS\PROJECTS\VB';
  46. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  47. if (rc <> 1) then
  48.   call Status("Error: Could not set Visual Builder shell project.")
  49. else call Status("2 done.")
  50.  
  51. /* PM Shell Project */
  52. WPSPath = WFDir||'\SMARTS\PROJECTS\PM';
  53. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  54. if (rc <> 1) then
  55.   call Status("Error: Could not set PM shell project.");
  56. else call Status("3 done.")
  57.  
  58. /* Help Shell Project */
  59. WPSPath = WFDir||'\SMARTS\PROJECTS\Help';
  60. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  61. if (rc <> 1) then
  62.   call Status("Error: Could not set Help shell project.")
  63. else call Status("4 done.");
  64.  
  65. /* INF Shell Project */
  66. WPSPath = WFDir||'\SMARTS\PROJECTS\Info';
  67. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  68. if (rc <> 1) then
  69.   call Status("Error: Could not set INF shell project.");
  70. else call Status("5 done.");
  71.  
  72. /* RESDLL Shell Project */
  73. WPSPath = WFDir||'\SMARTS\PROJECTS\ResDLL';
  74. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  75. if (rc <> 1) then
  76.   call Status("Error: Could not set Resource DLL shell project.");
  77. else call Status("6 done.");
  78.  
  79. /* CDLL Shell Project #1 */
  80. WPSPath = WFDir||'\SMARTS\PROJECTS\CDLL_SS';
  81. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  82. if (rc <> 1) then
  83.   call Status("Error: Could not set C DLL shell project #1.")
  84. else call Status("7 done.");
  85.  
  86. /* CDLL Shell Project #2 */
  87. WPSPath = WFDir||'\SMARTS\PROJECTS\CDLL_SD';
  88. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  89. if (rc <> 1) then
  90.   call Status("Error: Could not set C DLL shell project #2.")
  91. else call Status("8 done.")
  92.  
  93. /* CDLL Shell Project #3 */
  94. WPSPath = WFDir||'\SMARTS\PROJECTS\CDLL_MS';
  95. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  96. if (rc <> 1) then
  97.   Call Status("Error: Could not set C DLL shell project #3.")
  98. else call Status("9 done.")
  99.  
  100. /* CDLL Shell Project #4 */
  101. WPSPath = WFDir||'\SMARTS\PROJECTS\CDLL_MD';
  102. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  103. if (rc <> 1) then
  104.   Call Status("Error: Could not set C DLL shell project #4.")
  105. else call Status("10 done.")
  106.  
  107. /* CPPDLL Shell Project #1 */
  108. WPSPath = WFDir||'\SMARTS\PROJECTS\CDLL_MDF';
  109. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  110. if (rc <> 1) then
  111.   Call Status("Error: Could not set C++ DLL shell project #1.")
  112. else call Status("11 done.")
  113.  
  114. /* CPPDLL Shell Project #2 */
  115. WPSPath = WFDir||'\SMARTS\PROJECTS\CDLL_SDF';
  116. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  117. if (rc <> 1) then
  118.   Call Status("Error: Could not set C++ DLL shell project #2.")
  119. else call Status("12 done.")
  120.  
  121. /* ICLUI Shell Project */
  122. WPSPath = WFDir||'\SMARTS\PROJECTS\ICLUI';
  123. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  124. if (rc <> 1) then
  125.   Call Status("Error: Could not set ICLUI shell project.");
  126. else call Status("13 done.")
  127.  
  128. /* DTS Shell Project #1 */
  129. WPSPath = WFDir||'\SMARTS\PROJECTS\DTSMain';
  130. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  131. if (rc <> 1) then
  132.   Call Status("Error: Could not set DTS shell project #1.");
  133. else call Status("14 done.")
  134.  
  135. /* DTS Shell Project #2 */
  136. WPSPath = WFDir||'\SMARTS\PROJECTS\DTSDog';
  137. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  138. if (rc <> 1) then
  139.   call Status("Error: Could not set DTS shell project #2.");
  140. else call Status("15 done.")
  141.  
  142. /* DTS Shell Project #3 */
  143. WPSPath = WFDir||'\SMARTS\PROJECTS\DTSAnim';
  144. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  145. if (rc <> 1) then
  146.   call Status("Error: Could not set DTS shell project #3.")
  147. else call Status("16 done.")
  148.  
  149. /* DAX Shell Project #1 */
  150. WPSPath = WFDir||'\SMARTS\PROJECTS\DAXSOM';
  151. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  152. if (rc <> 1) then
  153.   Call Status("Error: Could not set DAX shell project #1.");
  154. else call Status("17 done.")
  155.  
  156. /* DAX Shell Project #2 */
  157. WPSPath = WFDir||'\SMARTS\PROJECTS\DAXCPP';
  158. rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
  159. if (rc <> 1) then
  160.   Call Status("Error: Could not set DAX shell project #2.");
  161. else 
  162. DO
  163.   call Status("18 done.")
  164.   call Status("All shell projects updated.")
  165. END
  166.  
  167.  
  168. /********* Populating the catalog with entries *******/
  169.  
  170. /* Initialize - use a global stem variable. */
  171. stem = "stem"
  172. RC_OK     = 0
  173. RC_CANCEL = 95
  174.  
  175.  
  176. /* Open the catalog. */
  177. call Status("Populating Smarts catalog with entries...")
  178. stem.pszCatalog = "<VAPrjSmarts>"
  179. rc = iwfOpenCatalog(stem);
  180. if (rc <> 0) then
  181.    call Abort("Unable to open the Project Smarts catalog.");
  182.  
  183.  
  184. /* Add a catalog entry. */
  185. stem.pszName              =  "Presentation Manager Application";
  186. line1                     =  "A basic Presentation Manager (PM) application that "
  187. line2                     =  "creates a window with a menu "
  188. line3                     =  "bar containing the common "
  189. line4                     =  "menu items, File, Edit, and "
  190. line5                     =  "Help.  The application is "
  191. line6                     =  "fully help-enabled, with "
  192. line7                     =  "context-sensitive help and "
  193. line8                     =  "tutorial templates.  "
  194. line9                     =  "Commands are processed in a standard window procedure "
  195. line10                    =  "that provides File open and Save as dialogs.  "
  196. line11                    =  "You can use this application as a template for writing "
  197. line12                    =  "your own PM application."
  198. stem.pszDescription       = line1||line2||line3||line4||line5||line6||line7||line8||line9||line10||line11||line12;
  199. stem.pszSourceLocation    = WFDir"\SMARTS\PM"
  200. stem.pszInstallScript     = WFDir"\SMARTS\SCRIPTS\PMSCRIPT.CMD"
  201. stem.pszInstallParameters = "%project% %location% %catalog%"
  202. rc = iwfUpdateCatalog(stem);
  203. if (rc <> 0) then
  204.    call Abort("Unable to update the Project Smarts catalog.");
  205.  
  206.  
  207. /* Add a catalog entry. */
  208. stem.pszName              = "Visual Builder Application"
  209. line1                     = "A template for a basic visual builder application. It "
  210. line2                     = "creates a window with a menu "
  211. line3                     = "bar containing the common "
  212. line4                     = "menu items, File, Edit, and "
  213. line5                     = "Help.  The application is "
  214. line6                     = "fully help-enabled, with "
  215. line7                     = "context-sensitive help and "
  216. line8                     = "tutorial templates."
  217. stem.pszDescription       = line1||line2||line3||line4||line5||line6||line7||line8;
  218. stem.pszSourceLocation    = WFDir"\SMARTS\VB"
  219. stem.pszInstallScript     = WFDir"\SMARTS\SCRIPTS\VBSCR.CMD"
  220. stem.pszInstallParameters = "%project% %location%"
  221. rc = iwfUpdateCatalog(stem);
  222. if (rc <> 0) then
  223.    call Abort("Unable to update the Project Smarts catalog.");
  224.  
  225.  
  226.  
  227. /* Add a catalog entry. */
  228. stem.pszName              = "WorkPlace Shell Application"
  229. line1                     = "This basic WorkPlace Shell (WPS) application creates a "
  230. line2                     = "WPS class that derives from the WPFileSystem class.  "
  231. line3                     = "You can change it to inherit from WPFolder or another "
  232. line4                     = "WPS class. The common methods are overriden for you.  "
  233. line5                     = "For instance, the wpDragOver and wpDrop methods are "
  234. line6                     = "overriden so that when another WPS object is "
  235. line7                     = "dropped on the object, it displays a "
  236. line8                     = "message box identifying the dropped object.  "
  237. line9                     = "The object is fully help-enabled, with a working Help cascade and a tutorial template. "
  238. line10                    = "A REXX command file for registering and creating the object "
  239. line11                    = "is also provided.  You can add your own views, Settings notebook pages, icons, "
  240. line12                    = "and any application-specific processing.  Use this application as a template for "
  241. line13                    = "writing your own WPS application."
  242. stem.pszDescription       = line1||line2||line3||line4||line5||line6||line7||line8||line9||line10||line11||line12||line13;
  243. stem.pszSourceLocation    = WFDir"\SMARTS\WPS"
  244. stem.pszInstallScript     = WFDir"\SMARTS\SCRIPTS\WPSSCR.CMD"
  245. stem.pszInstallParameters = "%project% %location% %catalog%"
  246. rc = iwfUpdateCatalog(stem);
  247. if (rc <> 0) then
  248.    call Abort("Unable to update the Project Smarts catalog.");
  249.  
  250.  
  251. /* Add a catalog entry. */
  252. stem.pszName              = "IPF Context-Sensitive Help"
  253. line1                     = "A "
  254. line2                     = "template for an Information "
  255. line3                     = "Processing Facility (IPF) source "
  256. line4                     = "file for context-sensitive help. "
  257. stem.pszDescription       = line1||line2||line3||line4;
  258. stem.pszSourceLocation    = WFDir"\SMARTS\HELP"
  259. stem.pszInstallScript     = WFDir"\SMARTS\SCRIPTS\HELPSCR.CMD"
  260. stem.pszInstallParameters = "%project% %location% %catalog%"
  261. rc = iwfUpdateCatalog(stem);
  262. if (rc <> 0) then
  263.    call Abort("Unable to update the Project Smarts catalog.");
  264.  
  265.  
  266. /* Add a catalog entry. */
  267. stem.pszName              = "IPF Document"
  268. line1                     = "A "
  269. line2                     = "template for an Information "
  270. line3                     = "Processing Facility (IPF) source "
  271. line4                     = "file for a document or tutorial. "
  272. stem.pszDescription       = line1||line2||line3||line4;
  273. stem.pszSourceLocation    = WFDir"\SMARTS\INF"
  274. stem.pszInstallScript     = WFDir"\SMARTS\SCRIPTS\INFSCR.CMD"
  275. stem.pszInstallParameters = "%project% %location% %catalog%"
  276. rc = iwfUpdateCatalog(stem);
  277. if (rc <> 0) then
  278.    call Abort("Unable to update the Project Smarts catalog.");
  279.  
  280.  
  281. /* Add a catalog entry. */
  282. stem.pszName              = "Resource Dynamic Link Library"
  283. line1                     = "A "
  284. line2                     = "template for building a Resource DLL. "
  285. line3                     = "You can use your own .RC file, or "
  286. line4                     = "have a template .RC file generated for you."
  287. stem.pszDescription       = line1||line2||line3||line4;
  288. stem.pszSourceLocation    = WFDir"\SMARTS\RESDLL"
  289. stem.pszInstallScript     = WFDir"\SMARTS\SCRIPTS\RESSCR.CMD"
  290. stem.pszInstallParameters = "%project% %location% %catalog%"
  291. rc = iwfUpdateCatalog(stem);
  292. if (rc <> 0) then
  293.    call Abort("Unable to update the Project Smarts catalog.");
  294.  
  295.  
  296.  
  297. /* Add a catalog entry. */
  298. stem.pszName              =  "UI Class Library Application";
  299. line1                     =  "A basic User Interface Class Library application that "
  300. line2                     =  "creates a window with a menu "
  301. line3                     =  "bar containing the common "
  302. line4                     =  "menu items, File, Edit, and "
  303. line5                     =  "Help.  The application is "
  304. line6                     =  "fully help-enabled, with "
  305. line7                     =  "context-sensitive help and "
  306. line8                     =  "tutorial templates.  "
  307. line9                     =  "Commands are processed in a standard window procedure "
  308. line10                    =  "that provides File open and Save as dialogs.  "
  309. line11                    =  "You can use this application as a template for writing "
  310. line12                    =  "your own UI class library application."
  311. stem.pszDescription       = line1||line2||line3||line4||line5||line6||line7||line8||line9||line10||line11||line12;
  312. stem.pszSourceLocation    = WFDir"\SMARTS\ICLUI"
  313. stem.pszInstallScript     = WFDir"\SMARTS\SCRIPTS\ICLUISCR.CMD"
  314. stem.pszInstallParameters = "%project% %location% %catalog%"
  315. rc = iwfUpdateCatalog(stem);
  316. if (rc <> 0) then
  317.    call Abort("Unable to update the Project Smarts catalog.");
  318.  
  319.  
  320. /* Add a catalog entry. */
  321. stem.pszName              = "C Dynamic Link Library"
  322. line1                     = "A "
  323. line2                     = "template for building a basic C DLL. "
  324. line3                     = "You can choose to link statically or dynamically to the "
  325. line4                     = "single- or multi-threaded C Set ++ runtime library."
  326. stem.pszDescription       = line1||line2||line3||line4;
  327. stem.pszSourceLocation    = WFDir"\SMARTS\CDLL"
  328. stem.pszInstallScript     = WFDir"\SMARTS\SCRIPTS\CDLLSCR.CMD"
  329. stem.pszInstallParameters = "%project% %location% %catalog%"
  330. rc = iwfUpdateCatalog(stem);
  331. if (rc <> 0) then
  332.    call Abort("Unable to update the Project Smarts catalog.");
  333.  
  334.  
  335. /* Add a catalog entry. */
  336. stem.pszName              = "C++ Dynamic Link Library"
  337. line1                     = "A template for building a basic C++ DLL.  "
  338. line2                     = "You can choose to export by name, ordinal, or mangled name, "
  339. line3                     = "and whether to link statically or dynamically to the "
  340. line4                     = "single- or multi-threaded C Set ++ runtime library."
  341. stem.pszDescription       = line1||line2||line3||line4;
  342. stem.pszSourceLocation    = WFDir"\SMARTS\CPPDLL"
  343. stem.pszInstallScript     = WFDir"\SMARTS\SCRIPTS\CPDLLSCR.CMD"
  344. stem.pszInstallParameters = "%project% %location% %catalog%"
  345. rc = iwfUpdateCatalog(stem);
  346. if (rc <> 0) then
  347.    call Abort("Unable to update the Project Smarts catalog.");
  348.  
  349.  
  350. /* Add a catalog entry. */
  351. stem.pszName              = "Data Access Application"
  352. line1                     = "A template for an application that uses database classes generated "
  353. line2                     = "by the Data Access Builder.  You supply your own database and the Data Access Builder generates a C++ interface "
  354. line3                     = "for it.  The template C++ client source file contains calls to connect to your database "
  355. line4                     = "and manipulate its data.  \n\n"
  356. line5                     = "Note: You must have DB2/2 installed to use this application. "
  357. stem.pszDescription       = line1||line2||line3||line4||line5;
  358. stem.pszSourceLocation    = WFDir"\SMARTS\DAX"
  359. stem.pszInstallScript     = WFDir"\SMARTS\SCRIPTS\DAXSCR.CMD"
  360. stem.pszInstallParameters = "%project% %location% %catalog%"
  361. rc = iwfUpdateCatalog(stem);
  362. if (rc <> 0) then
  363.    call Abort("Unable to update the Project Smarts catalog.");
  364.  
  365.  
  366. /* Add a catalog entry. */
  367. stem.pszName              = "Direct-to-SOM Application"
  368. line1                     = "A template for a Direct-to-SOM application that creates three classes "
  369. line2                     = "in three DLLs.  A client main program then accesses these classes, "
  370. line3                     = "two statically, and the other dynamically.  "
  371. stem.pszDescription       = line1||line2||line3;
  372. stem.pszSourceLocation    = WFDir"\SMARTS\DTS"
  373. stem.pszInstallScript     = WFDir"\SMARTS\SCRIPTS\DTSSCR.CMD"
  374. stem.pszInstallParameters = "%project% %location% %catalog%"
  375. rc = iwfUpdateCatalog(stem);
  376. if (rc <> 0) then
  377.    call Abort("Unable to update the Project Smarts catalog.");
  378.  
  379.  
  380. /* Close the catalog. */
  381. rc = iwfCloseCatalog(stem);
  382. if (rc <> 0) then
  383.    call Abort("Unable to close the Project Smarts catalog.");
  384.  
  385. /* We are done. */
  386. call Status("Project Smarts catalog processing completed successfully.");
  387. call Status("OK.");
  388. call Done(0);
  389.  
  390.  
  391. Abort:
  392. parse arg abortMessage
  393. call Status("Aborting!")
  394. call Status(abortMessage)
  395. call Done(16)
  396.  
  397.  
  398. Status:
  399. parse arg statusMsg
  400. SAY statusMsg
  401. statusMsg = DATE('U')' 'TIME()' 'statusMsg
  402. Call LINEOUT LogFile,statusMsg
  403. return
  404.  
  405.  
  406. Done:
  407. arg doneRc
  408. call LINEOUT(LogFile);   /* Closes log file */
  409. rc = iwfDropFuncs();     /* Unloads Smarts DLLs */
  410. exit(doneRc)
  411.  
  412.