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 >
Wrap
OS/2 REXX Batch file
|
1995-06-02
|
18KB
|
412 lines
/*---------------------------------------------------------------------------*/
/* Licensed Materials - Property of IBM */
/* */
/* "Restricted Materials of IBM" */
/* */
/* IBM WorkFrame */
/* */
/* (C) Copyright IBM Corp. 1991, 1995. All Rights Reserved. */
/* */
/* US Government Users Restricted Rights - Use, duplication or */
/* disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */
/*---------------------------------------------------------------------------*/
/* REXX */
/**************************************************************************/
/* Install command file for Project Smarts */
/* Parameters: WFDir - Directory where Project Smarts files are installed */
/* LogFile - A log file to place results */
/**************************************************************************/
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
if (Arg() <> 1) Then
call Abort("Error in parameter list.");
arg WFDir LogFile
/* Load the Project Smartz utility functions. */
rc = RxFuncAdd('iwfLoadFuncs', 'iwfRexx', 'iwfLoadFuncs');
rc = iwfLoadFuncs();
/***** Set object IDs for Quickstart shell projects *****/
call Status("Updating 18 shell projects (this will take a few minutes)...")
/* WPS Shell Project */
WPSPath = WFDir||'\SMARTS\PROJECTS\WPS';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
call Status("Error: Could not set WPS shell project.")
else call Status("1 done.")
/* Visual Builder Shell Project */
WPSPath = WFDir||'\SMARTS\PROJECTS\VB';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
call Status("Error: Could not set Visual Builder shell project.")
else call Status("2 done.")
/* PM Shell Project */
WPSPath = WFDir||'\SMARTS\PROJECTS\PM';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
call Status("Error: Could not set PM shell project.");
else call Status("3 done.")
/* Help Shell Project */
WPSPath = WFDir||'\SMARTS\PROJECTS\Help';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
call Status("Error: Could not set Help shell project.")
else call Status("4 done.");
/* INF Shell Project */
WPSPath = WFDir||'\SMARTS\PROJECTS\Info';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
call Status("Error: Could not set INF shell project.");
else call Status("5 done.");
/* RESDLL Shell Project */
WPSPath = WFDir||'\SMARTS\PROJECTS\ResDLL';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
call Status("Error: Could not set Resource DLL shell project.");
else call Status("6 done.");
/* CDLL Shell Project #1 */
WPSPath = WFDir||'\SMARTS\PROJECTS\CDLL_SS';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
call Status("Error: Could not set C DLL shell project #1.")
else call Status("7 done.");
/* CDLL Shell Project #2 */
WPSPath = WFDir||'\SMARTS\PROJECTS\CDLL_SD';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
call Status("Error: Could not set C DLL shell project #2.")
else call Status("8 done.")
/* CDLL Shell Project #3 */
WPSPath = WFDir||'\SMARTS\PROJECTS\CDLL_MS';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
Call Status("Error: Could not set C DLL shell project #3.")
else call Status("9 done.")
/* CDLL Shell Project #4 */
WPSPath = WFDir||'\SMARTS\PROJECTS\CDLL_MD';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
Call Status("Error: Could not set C DLL shell project #4.")
else call Status("10 done.")
/* CPPDLL Shell Project #1 */
WPSPath = WFDir||'\SMARTS\PROJECTS\CDLL_MDF';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
Call Status("Error: Could not set C++ DLL shell project #1.")
else call Status("11 done.")
/* CPPDLL Shell Project #2 */
WPSPath = WFDir||'\SMARTS\PROJECTS\CDLL_SDF';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
Call Status("Error: Could not set C++ DLL shell project #2.")
else call Status("12 done.")
/* ICLUI Shell Project */
WPSPath = WFDir||'\SMARTS\PROJECTS\ICLUI';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
Call Status("Error: Could not set ICLUI shell project.");
else call Status("13 done.")
/* DTS Shell Project #1 */
WPSPath = WFDir||'\SMARTS\PROJECTS\DTSMain';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
Call Status("Error: Could not set DTS shell project #1.");
else call Status("14 done.")
/* DTS Shell Project #2 */
WPSPath = WFDir||'\SMARTS\PROJECTS\DTSDog';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
call Status("Error: Could not set DTS shell project #2.");
else call Status("15 done.")
/* DTS Shell Project #3 */
WPSPath = WFDir||'\SMARTS\PROJECTS\DTSAnim';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
call Status("Error: Could not set DTS shell project #3.")
else call Status("16 done.")
/* DAX Shell Project #1 */
WPSPath = WFDir||'\SMARTS\PROJECTS\DAXSOM';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
Call Status("Error: Could not set DAX shell project #1.");
else call Status("17 done.")
/* DAX Shell Project #2 */
WPSPath = WFDir||'\SMARTS\PROJECTS\DAXCPP';
rc = SysSetObjectData(WPSPath,"INHERITLIST=<CPPDFTPRJ>");
if (rc <> 1) then
Call Status("Error: Could not set DAX shell project #2.");
else
DO
call Status("18 done.")
call Status("All shell projects updated.")
END
/********* Populating the catalog with entries *******/
/* Initialize - use a global stem variable. */
stem = "stem"
RC_OK = 0
RC_CANCEL = 95
/* Open the catalog. */
call Status("Populating Smarts catalog with entries...")
stem.pszCatalog = "<VAPrjSmarts>"
rc = iwfOpenCatalog(stem);
if (rc <> 0) then
call Abort("Unable to open the Project Smarts catalog.");
/* Add a catalog entry. */
stem.pszName = "Presentation Manager Application";
line1 = "A basic Presentation Manager (PM) application that "
line2 = "creates a window with a menu "
line3 = "bar containing the common "
line4 = "menu items, File, Edit, and "
line5 = "Help. The application is "
line6 = "fully help-enabled, with "
line7 = "context-sensitive help and "
line8 = "tutorial templates. "
line9 = "Commands are processed in a standard window procedure "
line10 = "that provides File open and Save as dialogs. "
line11 = "You can use this application as a template for writing "
line12 = "your own PM application."
stem.pszDescription = line1||line2||line3||line4||line5||line6||line7||line8||line9||line10||line11||line12;
stem.pszSourceLocation = WFDir"\SMARTS\PM"
stem.pszInstallScript = WFDir"\SMARTS\SCRIPTS\PMSCRIPT.CMD"
stem.pszInstallParameters = "%project% %location% %catalog%"
rc = iwfUpdateCatalog(stem);
if (rc <> 0) then
call Abort("Unable to update the Project Smarts catalog.");
/* Add a catalog entry. */
stem.pszName = "Visual Builder Application"
line1 = "A template for a basic visual builder application. It "
line2 = "creates a window with a menu "
line3 = "bar containing the common "
line4 = "menu items, File, Edit, and "
line5 = "Help. The application is "
line6 = "fully help-enabled, with "
line7 = "context-sensitive help and "
line8 = "tutorial templates."
stem.pszDescription = line1||line2||line3||line4||line5||line6||line7||line8;
stem.pszSourceLocation = WFDir"\SMARTS\VB"
stem.pszInstallScript = WFDir"\SMARTS\SCRIPTS\VBSCR.CMD"
stem.pszInstallParameters = "%project% %location%"
rc = iwfUpdateCatalog(stem);
if (rc <> 0) then
call Abort("Unable to update the Project Smarts catalog.");
/* Add a catalog entry. */
stem.pszName = "WorkPlace Shell Application"
line1 = "This basic WorkPlace Shell (WPS) application creates a "
line2 = "WPS class that derives from the WPFileSystem class. "
line3 = "You can change it to inherit from WPFolder or another "
line4 = "WPS class. The common methods are overriden for you. "
line5 = "For instance, the wpDragOver and wpDrop methods are "
line6 = "overriden so that when another WPS object is "
line7 = "dropped on the object, it displays a "
line8 = "message box identifying the dropped object. "
line9 = "The object is fully help-enabled, with a working Help cascade and a tutorial template. "
line10 = "A REXX command file for registering and creating the object "
line11 = "is also provided. You can add your own views, Settings notebook pages, icons, "
line12 = "and any application-specific processing. Use this application as a template for "
line13 = "writing your own WPS application."
stem.pszDescription = line1||line2||line3||line4||line5||line6||line7||line8||line9||line10||line11||line12||line13;
stem.pszSourceLocation = WFDir"\SMARTS\WPS"
stem.pszInstallScript = WFDir"\SMARTS\SCRIPTS\WPSSCR.CMD"
stem.pszInstallParameters = "%project% %location% %catalog%"
rc = iwfUpdateCatalog(stem);
if (rc <> 0) then
call Abort("Unable to update the Project Smarts catalog.");
/* Add a catalog entry. */
stem.pszName = "IPF Context-Sensitive Help"
line1 = "A "
line2 = "template for an Information "
line3 = "Processing Facility (IPF) source "
line4 = "file for context-sensitive help. "
stem.pszDescription = line1||line2||line3||line4;
stem.pszSourceLocation = WFDir"\SMARTS\HELP"
stem.pszInstallScript = WFDir"\SMARTS\SCRIPTS\HELPSCR.CMD"
stem.pszInstallParameters = "%project% %location% %catalog%"
rc = iwfUpdateCatalog(stem);
if (rc <> 0) then
call Abort("Unable to update the Project Smarts catalog.");
/* Add a catalog entry. */
stem.pszName = "IPF Document"
line1 = "A "
line2 = "template for an Information "
line3 = "Processing Facility (IPF) source "
line4 = "file for a document or tutorial. "
stem.pszDescription = line1||line2||line3||line4;
stem.pszSourceLocation = WFDir"\SMARTS\INF"
stem.pszInstallScript = WFDir"\SMARTS\SCRIPTS\INFSCR.CMD"
stem.pszInstallParameters = "%project% %location% %catalog%"
rc = iwfUpdateCatalog(stem);
if (rc <> 0) then
call Abort("Unable to update the Project Smarts catalog.");
/* Add a catalog entry. */
stem.pszName = "Resource Dynamic Link Library"
line1 = "A "
line2 = "template for building a Resource DLL. "
line3 = "You can use your own .RC file, or "
line4 = "have a template .RC file generated for you."
stem.pszDescription = line1||line2||line3||line4;
stem.pszSourceLocation = WFDir"\SMARTS\RESDLL"
stem.pszInstallScript = WFDir"\SMARTS\SCRIPTS\RESSCR.CMD"
stem.pszInstallParameters = "%project% %location% %catalog%"
rc = iwfUpdateCatalog(stem);
if (rc <> 0) then
call Abort("Unable to update the Project Smarts catalog.");
/* Add a catalog entry. */
stem.pszName = "UI Class Library Application";
line1 = "A basic User Interface Class Library application that "
line2 = "creates a window with a menu "
line3 = "bar containing the common "
line4 = "menu items, File, Edit, and "
line5 = "Help. The application is "
line6 = "fully help-enabled, with "
line7 = "context-sensitive help and "
line8 = "tutorial templates. "
line9 = "Commands are processed in a standard window procedure "
line10 = "that provides File open and Save as dialogs. "
line11 = "You can use this application as a template for writing "
line12 = "your own UI class library application."
stem.pszDescription = line1||line2||line3||line4||line5||line6||line7||line8||line9||line10||line11||line12;
stem.pszSourceLocation = WFDir"\SMARTS\ICLUI"
stem.pszInstallScript = WFDir"\SMARTS\SCRIPTS\ICLUISCR.CMD"
stem.pszInstallParameters = "%project% %location% %catalog%"
rc = iwfUpdateCatalog(stem);
if (rc <> 0) then
call Abort("Unable to update the Project Smarts catalog.");
/* Add a catalog entry. */
stem.pszName = "C Dynamic Link Library"
line1 = "A "
line2 = "template for building a basic C DLL. "
line3 = "You can choose to link statically or dynamically to the "
line4 = "single- or multi-threaded C Set ++ runtime library."
stem.pszDescription = line1||line2||line3||line4;
stem.pszSourceLocation = WFDir"\SMARTS\CDLL"
stem.pszInstallScript = WFDir"\SMARTS\SCRIPTS\CDLLSCR.CMD"
stem.pszInstallParameters = "%project% %location% %catalog%"
rc = iwfUpdateCatalog(stem);
if (rc <> 0) then
call Abort("Unable to update the Project Smarts catalog.");
/* Add a catalog entry. */
stem.pszName = "C++ Dynamic Link Library"
line1 = "A template for building a basic C++ DLL. "
line2 = "You can choose to export by name, ordinal, or mangled name, "
line3 = "and whether to link statically or dynamically to the "
line4 = "single- or multi-threaded C Set ++ runtime library."
stem.pszDescription = line1||line2||line3||line4;
stem.pszSourceLocation = WFDir"\SMARTS\CPPDLL"
stem.pszInstallScript = WFDir"\SMARTS\SCRIPTS\CPDLLSCR.CMD"
stem.pszInstallParameters = "%project% %location% %catalog%"
rc = iwfUpdateCatalog(stem);
if (rc <> 0) then
call Abort("Unable to update the Project Smarts catalog.");
/* Add a catalog entry. */
stem.pszName = "Data Access Application"
line1 = "A template for an application that uses database classes generated "
line2 = "by the Data Access Builder. You supply your own database and the Data Access Builder generates a C++ interface "
line3 = "for it. The template C++ client source file contains calls to connect to your database "
line4 = "and manipulate its data. \n\n"
line5 = "Note: You must have DB2/2 installed to use this application. "
stem.pszDescription = line1||line2||line3||line4||line5;
stem.pszSourceLocation = WFDir"\SMARTS\DAX"
stem.pszInstallScript = WFDir"\SMARTS\SCRIPTS\DAXSCR.CMD"
stem.pszInstallParameters = "%project% %location% %catalog%"
rc = iwfUpdateCatalog(stem);
if (rc <> 0) then
call Abort("Unable to update the Project Smarts catalog.");
/* Add a catalog entry. */
stem.pszName = "Direct-to-SOM Application"
line1 = "A template for a Direct-to-SOM application that creates three classes "
line2 = "in three DLLs. A client main program then accesses these classes, "
line3 = "two statically, and the other dynamically. "
stem.pszDescription = line1||line2||line3;
stem.pszSourceLocation = WFDir"\SMARTS\DTS"
stem.pszInstallScript = WFDir"\SMARTS\SCRIPTS\DTSSCR.CMD"
stem.pszInstallParameters = "%project% %location% %catalog%"
rc = iwfUpdateCatalog(stem);
if (rc <> 0) then
call Abort("Unable to update the Project Smarts catalog.");
/* Close the catalog. */
rc = iwfCloseCatalog(stem);
if (rc <> 0) then
call Abort("Unable to close the Project Smarts catalog.");
/* We are done. */
call Status("Project Smarts catalog processing completed successfully.");
call Status("OK.");
call Done(0);
Abort:
parse arg abortMessage
call Status("Aborting!")
call Status(abortMessage)
call Done(16)
Status:
parse arg statusMsg
SAY statusMsg
statusMsg = DATE('U')' 'TIME()' 'statusMsg
Call LINEOUT LogFile,statusMsg
return
Done:
arg doneRc
call LINEOUT(LogFile); /* Closes log file */
rc = iwfDropFuncs(); /* Unloads Smarts DLLs */
exit(doneRc)