Changeset 9175 for trunk/tools
- Timestamp:
- Aug 30, 2002, 8:28:57 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/bin/buildenv.cmd
r9172 r9175 1 /* $Id: buildenv.cmd,v 1.2 2 2002-08-30 10:35:24bird Exp $1 /* $Id: buildenv.cmd,v 1.23 2002-08-30 18:28:57 bird Exp $ 2 2 * 3 3 * This is the master tools environment script. It contains environment … … 27 27 * Version 28 28 */ 29 sVersion = '1.0. 4 [2002-08-29]';29 sVersion = '1.0.5 [2002-08-30]'; 30 30 31 31 /* … … 107 107 aCfg.i.sId = 'cvs'; aCfg.i.sGrp = 'version'; aCfg.i.sSet = 'CVS'; aCfg.i.sDesc = 'CVS v1.10 or later'; i = i + 1; 108 108 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; 109 110 aCfg.i.sId = 'ddkbase'; aCfg.i.sGrp = 'ddk'; aCfg.i.sSet = 'DDKBase'; aCfg.i.sDesc = 'DDK Base (recent)'; i = i + 1; 110 111 aCfg.i.sId = 'ddkvideo'; aCfg.i.sGrp = 'ddk'; aCfg.i.sSet = 'DDKVideo'; aCfg.i.sDesc = 'DDK Video (recent)'; i = i + 1; … … 340 341 NoValueHandler: 341 342 say 'NoValueHandler: line 'SIGL; 342 return 0; 343 exit(16); 344 343 345 344 346 … … 448 450 * We have to configure it! 449 451 */ 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.'; 451 453 452 454 /* make rexx expression */ … … 576 578 /** 577 579 * 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. 580 583 * @returns TRUE if file exists. 581 584 * FALSE if file doesn't exists. 582 585 */ 583 586 CfgVerifyFile: procedure expose aCfg. aPath. sPathFile 584 parse arg sFile, fQuiet 587 parse arg sFile, fQuiet, fOptional 588 if (fOptional = '') then fOptional = 0; 585 589 rc = stream(sFile, 'c', 'query exist'); 586 590 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 597 return rc <> '' | fOptional; 589 598 590 599 … … 774 783 aPath.0 = aPath.0 - 1; 775 784 end 785 return 0; 786 787 788 /** 789 * Sets a given path. 790 * @param sPathId Path id. 791 * @param sNewPath Path. 792 */ 793 PathSet: procedure expose aCfg. aPath. sPathFile 794 parse 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; 776 814 return 0; 777 815 … … 951 989 if (sOperation <> 'forcedconfig') then 952 990 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)'; 954 992 sAnswer = PullUser(1); 955 993 if (substr(strip(sAnswer),1,1) <> 'Y') then … … 1004 1042 fUpper = 0; 1005 1043 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 1006 1054 if (fUpper) then 1007 pull sAnswer; 1008 else 1009 parse pull sAnswer; 1010 1055 sAnswer = translate(sAnswer); 1056 /* flush input */ 1011 1057 do while (Queued()) 1012 1058 pull dummy; 1013 1059 end 1014 1060 return sAnswer; 1061 1062 1063 /** 1064 * No value handler 1065 */ 1066 PullUser_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 1075 exit(16); 1015 1076 1016 1077 … … 1226 1287 if (sOrgEnvVar <> '') then 1227 1288 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; 1236 1298 end 1237 1299 … … 1554 1616 return 2; 1555 1617 rc = CheckCmdOutput('echo quit | db2', 0, fQuiet, 'Command Line Processor for DB2 SDK 5.2.0'); 1618 return rc; 1619 1620 1621 1622 /* 1623 * Device Driver Kit (DDK) base. 1624 */ 1625 DDK: 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) 1556 1650 return rc; 1557 1651 … … 2423 2517 call EnvAddFront fRM, 'somir', sPathTK'\SOM\COMMON\ETC\214\SOM.IR;'sPathTK'\OPENDOC\BASE\AVLSHELL.IR;' 2424 2518 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;' 2426 2521 call EnvAddEnd fRM, 'include', sPathTK'\H\LIBC;.;' 2427 2522 call EnvAddFront fRM, 'lib', sPathTK'\SPEECH\LIB;'sPathTK'\SAMPLES\MM\LIB;'sPathTK'\LIB;'sPathTK'\SOM\LIB;'sPathTK'\OPENDOC\BASE\LIB;' … … 2520 2615 call EnvAddEnd fRM, 'ulspath', sPathTK'\language;' 2521 2616 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 :-( */ 2524 2619 call EnvAddFront fRM, 'include', sPathTK'\H\RPC;' 2525 2620 call EnvAddFront fRM, 'include', sPathTK'\H\NETNB;' … … 2603 2698 call EnvAddFront fRM, 'nlspath', sPathTK'\msg\%N;' 2604 2699 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;' 2606 2702 call EnvAddFront fRM, 'lib', sPathTK'\lib;'sPathTK'\som\lib;' 2607 2703 call EnvAddEnd fRM, 'lib', sPathTK'\SAMPLES\MM\LIB;'sPathTK'\SPEECH\LIB;' … … 2695 2791 call EnvAddFront fRM, 'nlspath', sPathTK'\msg\%N;' 2696 2792 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;' 2698 2796 call EnvAddFront fRM, 'lib', sPathTK'\lib;'sPathTK'\som\lib;' 2699 2797 call EnvAddEnd fRM, 'lib', sPathTK'\SAMPLES\MM\LIB;'sPathTK'\SPEECH\LIB;' … … 2727 2825 return 0; 2728 2826 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), 2730 2829 | \CfgVerifyFile(sPathTK'\bin\ipfc.exe', fQuiet), 2731 2830 | \CfgVerifyFile(sPathTK'\bin\implib.exe', fQuiet), … … 2746 2845 if (rc = 0) then 2747 2846 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'); 2750 2851 if (rc = 0) then 2751 2852 rc = CheckCmdOutput('ipfc', 0, fQuiet, 'Version 4.00.007 Oct 02 2000'); … … 2803 2904 if (pos('verify', sOperation) <= 0) then 2804 2905 return 0; 2805 if ( \CfgVerifyFile(sUnixBack'\bin\bash.exe', fQuiet ),2906 if ( \CfgVerifyFile(sUnixBack'\bin\bash.exe', fQuiet, 1), 2806 2907 | \CfgVerifyFile(sUnixBack'\bin\sh.exe', fQuiet), 2807 2908 | \CfgVerifyFile(sUnixBack'\bin\yes.exe', fQuiet), 2808 2909 | \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), 2812 2913 ) then 2813 2914 return 2; … … 2898 2999 | \CfgVerifyFile(sPathCPP'\lib\cppon30i.lib', fQuiet), 2899 3000 | \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), 2902 3003 | \CfgVerifyFile(sPathCPP'\include\builtin.h', fQuiet), 2903 3004 | \CfgVerifyFile(sPathCPP'\include\conio.h', fQuiet), … … 3174 3275 | \CfgVerifyFile(sPathWatcom'\lib386\os2\clbrdll.lib', fQuiet), 3175 3276 | \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), 3179 3280 ) then 3180 3281 return 2; … … 3246 3347 | \CfgVerifyFile(sPathWatcom'\lib386\os2\clbrdll.lib', fQuiet), 3247 3348 | \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), 3251 3352 ) then 3252 3353 return 2;
Note:
See TracChangeset
for help on using the changeset viewer.