Changeset 9175 for trunk/tools


Ignore:
Timestamp:
Aug 30, 2002, 8:28:57 PM (23 years ago)
Author:
bird
Message:

DDK and other small addjustments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/bin/buildenv.cmd

    r9172 r9175  
    1 /* $Id: buildenv.cmd,v 1.22 2002-08-30 10:35:24 bird Exp $
     1/* $Id: buildenv.cmd,v 1.23 2002-08-30 18:28:57 bird Exp $
    22 *
    33 * This is the master tools environment script. It contains environment
     
    2727     * Version
    2828     */
    29     sVersion = '1.0.4 [2002-08-29]';
     29    sVersion = '1.0.5 [2002-08-30]';
    3030
    3131    /*
     
    107107    aCfg.i.sId = 'cvs';             aCfg.i.sGrp = 'version';    aCfg.i.sSet = 'CVS';                    aCfg.i.sDesc = 'CVS v1.10 or later';        i = i + 1;
    108108    aCfg.i.sId = 'db2v52';          aCfg.i.sGrp = 'database';   aCfg.i.sSet = 'db2v52';                 aCfg.i.sDesc = 'DB2 v5.2 Dev Edition';      i = i + 1;
     109    aCfg.i.sId = 'ddk';             aCfg.i.sGrp = 'ddk';        aCfg.i.sSet = 'DDK';                    aCfg.i.sDesc = 'OS/2 DDK (recent)';         i = i + 1;
    109110    aCfg.i.sId = 'ddkbase';         aCfg.i.sGrp = 'ddk';        aCfg.i.sSet = 'DDKBase';                aCfg.i.sDesc = 'DDK Base (recent)';         i = i + 1;
    110111    aCfg.i.sId = 'ddkvideo';        aCfg.i.sGrp = 'ddk';        aCfg.i.sSet = 'DDKVideo';               aCfg.i.sDesc = 'DDK Video (recent)';        i = i + 1;
     
    340341NoValueHandler:
    341342    say 'NoValueHandler: line 'SIGL;
    342 return 0;
     343exit(16);
     344
    343345
    344346
     
    448450     * We have to configure it!
    449451     */
    450     say 'Config of the 'aCfg.iTool.sId' ('CfgDesc(aCfg.iTool.sId)') tool.';
     452    say '- Config of the 'aCfg.iTool.sId' ('CfgDesc(aCfg.iTool.sId)') tool.';
    451453
    452454    /* make rexx expression */
     
    576578/**
    577579 * Checks if a file exists.
    578  * @param   sFile   Name of the file to look for.
    579  * @param   fQuiet  Flag which tells whether to be quiet or not.
     580 * @param   sFile       Name of the file to look for.
     581 * @param   fQuiet      Flag which tells whether to be quiet or not.
     582 * @param   fOptional   Flag to say that this file is optiona.
    580583 * @returns TRUE if file exists.
    581584 *          FALSE if file doesn't exists.
    582585 */
    583586CfgVerifyFile: procedure expose aCfg. aPath. sPathFile
    584     parse arg sFile, fQuiet
     587    parse arg sFile, fQuiet, fOptional
     588    if (fOptional = '') then fOptional = 0;
    585589    rc = stream(sFile, 'c', 'query exist');
    586590    if ((rc = '') & \fQuiet) then
    587         say 'Verify existance of '''sFile''' failed.';
    588 return rc <> '';
     591    do
     592        if (fOptional) then
     593            say 'Warning: Installation is missing '''sFile'''.';
     594        else
     595            say 'Verify existance of '''sFile''' failed.';
     596    end
     597return rc <> '' | fOptional;
    589598
    590599
     
    774783        aPath.0 = aPath.0 - 1;
    775784    end
     785return 0;
     786
     787
     788/**
     789 * Sets a given path.
     790 * @param   sPathId     Path id.
     791 * @param   sNewPath    Path.
     792 */
     793PathSet: procedure expose aCfg. aPath. sPathFile
     794parse arg sPathId, sNewPath
     795
     796    /*
     797     * Search for the path.
     798     */
     799    do i = 1 to aPath.0
     800        if (aPath.i.sPId = sPathId) then
     801        do
     802            aPath.i.sPath = sNewPath;
     803            return 0;
     804        end
     805    end
     806
     807    /*
     808     * Not found, so add it.
     809     */
     810    i = aPath.0 + 1;
     811    aPath.i.sPId = sPathId;
     812    aPath.i.sPath = sNewPath;
     813    aPath.0 = i;
    776814return 0;
    777815
     
    951989    if (sOperation <> 'forcedconfig') then
    952990    do
    953         say 'Do you want to configure the path '''sPathId''' for the '''sToolId'''('CfgDesc(sToolId)') tool? (y/N)';
     991        say 'Do you want to configure the path '''sPathId''/* for the '''sToolId'''('CfgDesc(sToolId)') tool?*/ '(y/N)';
    954992        sAnswer = PullUser(1);
    955993        if (substr(strip(sAnswer),1,1) <> 'Y') then
     
    10041042        fUpper = 0;
    10051043
     1044    signal on halt name PullUser_Handler
     1045    signal on syntax name PullUser_Handler
     1046    signal on notready name PullUser_Handler
     1047    parse pull sAnswer;
     1048    signal off syntax
     1049    signal off halt
     1050    signal off notready
     1051    /*say 'Debug: sAnswer='c2x(sAnswer);
     1052    sAnswer = strip(strip(sAnswer, 'T', '0A'x), 'T', '0D'x);*/
     1053
    10061054    if (fUpper) then
    1007         pull sAnswer;
    1008     else
    1009         parse pull sAnswer;
    1010 
     1055        sAnswer = translate(sAnswer);
     1056    /* flush input */
    10111057    do while (Queued())
    10121058        pull dummy;
    10131059    end
    10141060return sAnswer;
     1061
     1062
     1063/**
     1064 * No value handler
     1065 */
     1066PullUser_Handler:
     1067    say 'fatal error: Believe Ctrl-Break/C might have been pressed.';
     1068    signal off syntax
     1069    signal off halt
     1070    signal off syntax
     1071    signal off notready
     1072    do while (Queued())
     1073        pull dummy;
     1074    end
     1075exit(16);
    10151076
    10161077
     
    12261287    if (sOrgEnvVar <> '') then
    12271288    do
    1228     /* Remove previously sToAdd if exists. (Changing sOrgEnvVar). */
    1229     i = pos(translate(sToAdd), translate(sOrgEnvVar));
    1230     if (i > 0) then
    1231         sOrgEnvVar = substr(sOrgEnvVar, 1, i-1) || substr(sOrgEnvVar, i + length(sToAdd));
    1232 
    1233     /* checks that sOrgEnvVar ends with a separator. Adds one if not. */
    1234     if (substr(sOrgEnvVar, length(sOrgEnvVar), 1) <> sSeparator) then
    1235         sOrgEnvVar = sOrgEnvVar || sSeparator;
     1289        /* Remove previously sToAdd if exists. (Changing sOrgEnvVar). */
     1290        i = pos(translate(sToAdd), translate(sOrgEnvVar));
     1291        if (i > 0) then
     1292            sOrgEnvVar = substr(sOrgEnvVar, 1, i-1) || substr(sOrgEnvVar, i + length(sToAdd));
     1293
     1294        /* checks that sOrgEnvVar ends with a separator. Adds one if not. */
     1295        if (sOrgEnvVar = '') then
     1296            if (right(sOrgEnvVar,1) <> sSeparator) then
     1297                sOrgEnvVar = sOrgEnvVar || sSeparator;
    12361298    end
    12371299
     
    15541616        return 2;
    15551617    rc = CheckCmdOutput('echo quit | db2', 0, fQuiet, 'Command Line Processor for DB2 SDK 5.2.0');
     1618return rc;
     1619
     1620
     1621
     1622/*
     1623 *  Device Driver Kit (DDK) base.
     1624 */
     1625DDK: procedure expose aCfg. aPath. sPathFile
     1626    parse arg sToolId,sOperation,fRM,fQuiet
     1627
     1628    /*
     1629     * Device Driver Kit (DDK) (v4.0+) Main Directory.
     1630     */
     1631    sPathDDK    = PathQuery('ddk', sToolId, sOperation);
     1632    if (sPathDDK = '') then
     1633        return 1;
     1634    /* If config operation we're done now. */
     1635    if (pos('config', sOperation) > 0) then
     1636    do
     1637        /* Set the ddk subpaths */
     1638        if (PathQuery('ddkbase', 'ddkbase', 'quietisconfig') = '') then
     1639            call PathSet 'ddkbase', sPathDDK'\base';
     1640        if (PathQuery('ddkvideo', 'ddkvideo', 'quietisconfig') = '') then
     1641            call PathSet 'ddkvideo', sPathDDK'\video';
     1642        if (PathQuery('ddkprint', 'ddkvideo', 'quietisconfig') = '') then
     1643            call PathSet 'ddkprint', sPathDDK'\print';
     1644        return 0;
     1645    end
     1646    call EnvSet      fRM, 'PATH_DDK',    sPathDDK;
     1647    rc = DDKBase('ddkbase',sOperation,fRM,fQuiet)
     1648    if (rc = 0) then
     1649        rc = DDKVideo('ddkvideo',sOperation,fRM,fQuiet)
    15561650return rc;
    15571651
     
    24232517    call EnvAddFront fRM, 'somir',          sPathTK'\SOM\COMMON\ETC\214\SOM.IR;'sPathTK'\OPENDOC\BASE\AVLSHELL.IR;'
    24242518    call EnvAddEnd   fRM, 'somir',          sPathTK'\OPENDOC\CUSTOM\OD.IR;'sPathTK'\SAMPLES\REXX\SOM\ANIMAL\ORXSMP.IR;'
    2425     call EnvAddFront fRM, 'include',        sPathTK'\SPEECH\H;'sPathTK'\BETA\H;'sPathTK'\SAMPLES\OPENDOC\PARTS\INCLUDE;'sPathTK'\SOM\INCLUDE;'sPathTK'\INC;'sPathTK'\H\GL;'sPathTK'\H;'
     2519/*    call EnvAddFront fRM, 'include',        sPathTK'\SPEECH\H;'sPathTK'\BETA\H;'sPathTK'\SAMPLES\OPENDOC\PARTS\INCLUDE;'sPathTK'\SOM\INCLUDE;'sPathTK'\INC;'sPathTK'\H\GL;'sPathTK'\H;' */
     2520    call EnvAddFront fRM, 'include',        /*sPathTK'\SPEECH\H;'*/sPathTK'\BETA\H;'sPathTK'\SAMPLES\OPENDOC\PARTS\INCLUDE;'sPathTK'\SOM\INCLUDE;'sPathTK'\INC;'sPathTK'\H\GL;'sPathTK'\H;'
    24262521    call EnvAddEnd   fRM, 'include',        sPathTK'\H\LIBC;.;'
    24272522    call EnvAddFront fRM, 'lib',            sPathTK'\SPEECH\LIB;'sPathTK'\SAMPLES\MM\LIB;'sPathTK'\LIB;'sPathTK'\SOM\LIB;'sPathTK'\OPENDOC\BASE\LIB;'
     
    25202615    call EnvAddEnd   fRM, 'ulspath',     sPathTK'\language;'
    25212616    call EnvAddFront fRM, 'include',     sPathTK'\H;'
    2522     call EnvAddFront fRM, 'include',     sPathTK'\H\GL;'
    2523     call EnvAddFront fRM, 'include',     sPathTK'\SPEECH\H;'
     2617/*    call EnvAddFront fRM, 'include',     sPathTK'\H\GL;' */
     2618/*    call EnvAddFront fRM, 'include',     sPathTK'\SPEECH\H;' includes tend to get too long :-( */
    25242619    call EnvAddFront fRM, 'include',     sPathTK'\H\RPC;'
    25252620    call EnvAddFront fRM, 'include',     sPathTK'\H\NETNB;'
     
    26032698    call EnvAddFront fRM, 'nlspath',     sPathTK'\msg\%N;'
    26042699    call EnvAddEnd   fRM, 'ulspath',     sPathTK'\language;'
    2605     call EnvAddFront fRM, 'include',     sPathTK'\H\ARPA;'sPathTK'\H\NET;'sPathTK'\H\NETINET;'sPathTK'\H\NETNB;'sPathTK'\H\RPC;'sPathTK'\SPEECH\H;'sPathTK'\H\GL;'sPathTK'\H;'sPathTK'\SOM\INCLUDE;'sPathTK'\INC;'
     2700    /*call EnvAddFront fRM, 'include',     sPathTK'\H\ARPA;'sPathTK'\H\NET;'sPathTK'\H\NETINET;'sPathTK'\H\NETNB;'sPathTK'\H\RPC;'sPathTK'\SPEECH\H;'sPathTK'\H\GL;'sPathTK'\H;'sPathTK'\SOM\INCLUDE;'sPathTK'\INC;'*/
     2701    call EnvAddFront fRM, 'include',     sPathTK'\H\ARPA;'sPathTK'\H\NET;'sPathTK'\H\NETINET;'sPathTK'\H\NETNB;'sPathTK'\H\RPC;'/*sPathTK'\SPEECH\H;'sPathTK'\H\GL;'*/sPathTK'\H;'sPathTK'\SOM\INCLUDE;'sPathTK'\INC;'
    26062702    call EnvAddFront fRM, 'lib',         sPathTK'\lib;'sPathTK'\som\lib;'
    26072703    call EnvAddEnd   fRM, 'lib',         sPathTK'\SAMPLES\MM\LIB;'sPathTK'\SPEECH\LIB;'
     
    26952791    call EnvAddFront fRM, 'nlspath',     sPathTK'\msg\%N;'
    26962792    call EnvAddEnd   fRM, 'ulspath',     sPathTK'\language;'
    2697     call EnvAddFront fRM, 'include',     sPathTK'\H\ARPA;'sPathTK'\H\NET;'sPathTK'\H\NETINET;'sPathTK'\H\NETNB;'sPathTK'\H\RPC;'sPathTK'\SPEECH\H;'sPathTK'\H\GL;'sPathTK'\H;'sPathTK'\SOM\INCLUDE;'sPathTK'\INC;'
     2793    /*call EnvAddFront fRM, 'include',     sPathTK'\H\ARPA;'sPathTK'\H\NET;'sPathTK'\H\NETINET;'sPathTK'\H\NETNB;'sPathTK'\H\RPC;'sPathTK'\SPEECH\H;'sPathTK'\H\GL;'sPathTK'\H;'sPathTK'\SOM\INCLUDE;'sPathTK'\INC;'*/
     2794    /* the include mustn't be too long :-/ */
     2795    call EnvAddFront fRM, 'include',     sPathTK'\H\ARPA;'sPathTK'\H\NET;'sPathTK'\H\NETINET;'sPathTK'\H\NETNB;'sPathTK'\H\RPC;'/*sPathTK'\SPEECH\H;'sPathTK'\H\GL;'*/sPathTK'\H;'sPathTK'\SOM\INCLUDE;'sPathTK'\INC;'
    26982796    call EnvAddFront fRM, 'lib',         sPathTK'\lib;'sPathTK'\som\lib;'
    26992797    call EnvAddEnd   fRM, 'lib',         sPathTK'\SAMPLES\MM\LIB;'sPathTK'\SPEECH\LIB;'
     
    27272825        return 0;
    27282826    if (    \CfgVerifyFile(sPathTK'\bin\alp.exe', fQuiet),
    2729         |   \CfgVerifyFile(sPathTK'\bin\rc.exe', fQuiet),
     2827        /*|   \CfgVerifyFile(sPathTK'\bin\rc.exe', fQuiet)*/,
     2828        |   \CfgVerifyFile(sPathTK'\bin\rc16.exe', fQuiet),
    27302829        |   \CfgVerifyFile(sPathTK'\bin\ipfc.exe', fQuiet),
    27312830        |   \CfgVerifyFile(sPathTK'\bin\implib.exe', fQuiet),
     
    27462845    if (rc = 0) then
    27472846        rc = CheckCmdOutput('sc -V', -1, fQuiet, '", Version: 2.54.');
    2748     if (rc = 0) then
    2749         rc = CheckCmdOutput('rc', 1, fQuiet, 'Version 4.00.011 Oct 04 2001');
     2847    /*if (rc = 0) then
     2848        rc = CheckCmdOutput('rc', 1, fQuiet, 'Version 4.00.011 Oct 04 2001');*/
     2849    if (rc = 0) then
     2850        rc = CheckCmdOutput('rc16', 1, fQuiet, 'Version 4.00.011 Oct 04 2001');
    27502851    if (rc = 0) then
    27512852        rc = CheckCmdOutput('ipfc', 0, fQuiet, 'Version 4.00.007 Oct 02 2000');
     
    28032904    if (pos('verify', sOperation) <= 0) then
    28042905        return 0;
    2805     if (    \CfgVerifyFile(sUnixBack'\bin\bash.exe', fQuiet),
     2906    if (    \CfgVerifyFile(sUnixBack'\bin\bash.exe', fQuiet, 1),
    28062907        |   \CfgVerifyFile(sUnixBack'\bin\sh.exe', fQuiet),
    28072908        |   \CfgVerifyFile(sUnixBack'\bin\yes.exe', fQuiet),
    28082909        |   \CfgVerifyFile(sUnixBack'\bin\rm.exe', fQuiet),
    2809         |   \CfgVerifyFile(sUnixBack'\bin\cp.exe', fQuiet),
    2810         |   \CfgVerifyFile(sUnixBack'\bin\mv.exe', fQuiet),
    2811         |   \CfgVerifyFile(sXF86Back'\bin\xf86config.exe', fQuiet),
     2910        |   \CfgVerifyFile(sUnixBack'\bin\cp.exe', fQuiet, 1),
     2911        |   \CfgVerifyFile(sUnixBack'\bin\mv.exe', fQuiet. 1),
     2912        |   \CfgVerifyFile(sXF86Back'\bin\xf86config.exe', fQuiet, 1),
    28122913        ) then
    28132914        return 2;
     
    28982999        |   \CfgVerifyFile(sPathCPP'\lib\cppon30i.lib', fQuiet),
    28993000        |   \CfgVerifyFile(sPathCPP'\lib\cppon30o.lib', fQuiet),
    2900         |   \CfgVerifyFile(sPathCPP'\lib\_doscall.lib', fQuiet),
    2901         |   \CfgVerifyFile(sPathCPP'\lib\_pmwin.lib', fQuiet),
     3001        |   \CfgVerifyFile(sPathCPP'\lib\_doscall.lib', fQuiet, 1),
     3002        |   \CfgVerifyFile(sPathCPP'\lib\_pmwin.lib', fQuiet, 1),
    29023003        |   \CfgVerifyFile(sPathCPP'\include\builtin.h', fQuiet),
    29033004        |   \CfgVerifyFile(sPathCPP'\include\conio.h', fQuiet),
     
    31743275        |   \CfgVerifyFile(sPathWatcom'\lib386\os2\clbrdll.lib', fQuiet),
    31753276        |   \CfgVerifyFile(sPathWatcom'\lib386\os2\clib3r.lib', fQuiet),
    3176         |   \CfgVerifyFile(sPathWatcom'\lib386\nt\kernel32.lib', fQuiet),
    3177         |   \CfgVerifyFile(sPathWatcom'\lib386\nt\clbrdll.lib', fQuiet),
    3178         |   \CfgVerifyFile(sPathWatcom'\lib386\nt\clib3r.lib', fQuiet),
     3277        |   \CfgVerifyFile(sPathWatcom'\lib386\nt\kernel32.lib', fQuiet,1),
     3278        |   \CfgVerifyFile(sPathWatcom'\lib386\nt\clbrdll.lib', fQuiet,1),
     3279        |   \CfgVerifyFile(sPathWatcom'\lib386\nt\clib3r.lib', fQuiet,1),
    31793280        ) then
    31803281        return 2;
     
    32463347        |   \CfgVerifyFile(sPathWatcom'\lib386\os2\clbrdll.lib', fQuiet),
    32473348        |   \CfgVerifyFile(sPathWatcom'\lib386\os2\clib3r.lib', fQuiet),
    3248         |   \CfgVerifyFile(sPathWatcom'\lib386\nt\kernel32.lib', fQuiet),
    3249         |   \CfgVerifyFile(sPathWatcom'\lib386\nt\clbrdll.lib', fQuiet),
    3250         |   \CfgVerifyFile(sPathWatcom'\lib386\nt\clib3r.lib', fQuiet),
     3349        |   \CfgVerifyFile(sPathWatcom'\lib386\nt\kernel32.lib', fQuiet, 1),
     3350        |   \CfgVerifyFile(sPathWatcom'\lib386\nt\clbrdll.lib', fQuiet, 1),
     3351        |   \CfgVerifyFile(sPathWatcom'\lib386\nt\clib3r.lib', fQuiet, 1),
    32513352        ) then
    32523353        return 2;
Note: See TracChangeset for help on using the changeset viewer.