Changeset 8424 for trunk/tools
- Timestamp:
- May 16, 2002, 1:50:23 PM (23 years ago)
- Location:
- trunk/tools/bin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/bin/CreatePath.cmd
r5030 r8424 1 /* $Id: CreatePath.cmd,v 1. 3 2001-01-26 21:33:13 phallerExp $1 /* $Id: CreatePath.cmd,v 1.4 2002-05-16 11:50:22 bird Exp $ 2 2 * 3 3 * Createpath.cmd <pathname> … … 11 11 12 12 parse arg sArgs 13 return createpath(s Args);13 return createpath(strip(sArgs)); 14 14 15 15 createpath: procedure … … 27 27 */ 28 28 rc = SysMkDir(sDir); 29 /*say 'dir:' sDir '- rc='rc;*/ 29 30 30 31 return 0; -
trunk/tools/bin/Exists.cmd
r5718 r8424 1 /* $Id: Exists.cmd,v 1. 2 2001-05-16 01:17:03 bird Exp $1 /* $Id: Exists.cmd,v 1.3 2002-05-16 11:50:23 bird Exp $ 2 2 * 3 3 * Simple rexx util which checks if a file or directory exists. … … 7 7 * 1 - file doesn't exist. 8 8 * 9 * Copyright (c) 2000-200 1 knut st. osmundsen (knut.stange.osmundsen@mynd.no)9 * Copyright (c) 2000-2002 knut st. osmundsen (bird@anduin.net) 10 10 * 11 * Project Odin Software License can be found in LICENSE.TXT11 * GPL 12 12 * 13 13 */ … … 21 21 if (RxFuncQuery('SysFileTree') = 1) then 22 22 call RxFuncAdd 'SysFileTree', 'RexxUtil', 'SysFileTree'; 23 rc = SysFileTree(sFile, sDirs, 'DO');23 rc = SysFileTree(sFile, 'sDirs', 'DO'); 24 24 if (rc = 0 & sDirs.0 = 1) then 25 25 exit(0); -
trunk/tools/bin/buildenv.cmd
r8357 r8424 1 /* $Id: buildenv.cmd,v 1. 6 2002-04-30 19:52:51bird Exp $1 /* $Id: buildenv.cmd,v 1.7 2002-05-16 11:50:22 bird Exp $ 2 2 * 3 3 * This is the master environment script. It contains settings for many … … 10 10 * 11 11 * 12 * Change the QueryPath function to fit you local environment.13 * Change the QueryPath function to fit you local environment.14 * Change the QueryPath function to fit you local environment.15 *16 *17 12 * Known problems: 18 13 * - LANG is set to en_US by both VAC36 and TOOLKIT45. When unsetting … … 21 16 22 17 Address CMD '@echo off'; 18 19 signal on novalue name NoValueHandler 23 20 24 21 /* … … 53 50 54 51 /* 52 * Configuration - sorted please! 53 */ 54 parse source . . sPathFile . 55 sPathFile = sPathFile||'.paths'; 56 aPath.0 = 0; 57 58 i = 1; 59 /* environment id The function with args. Optional verify data. increment index */ 60 aCfg.i.sId = 'cvs'; aCfg.i.sSet = 'CVS'; aCfg.i.sDesc = 'CVS v1.10 or later'; i = i + 1; 61 aCfg.i.sId = 'db2v52'; aCfg.i.sSet = 'db2v52'; aCfg.i.sDesc = 'DB2 v5.2 Dev Edition'; i = i + 1; 62 aCfg.i.sId = 'ddkbase'; aCfg.i.sSet = 'DDKBase'; aCfg.i.sDesc = 'DDK base (recent)'; i = i + 1; 63 aCfg.i.sId = 'emx'; aCfg.i.sSet = 'EMX'; aCfg.i.sDesc = 'EMX v0.9d fixpack 04'; i = i + 1; 64 aCfg.i.sId = 'emxpgcc'; aCfg.i.sSet = 'EMXPGCC'; aCfg.i.sDesc = 'Pentium Optimized GCC/EMX v1.1.1 r2 with binutils 2.9.1'; i = i + 1; 65 aCfg.i.sId = 'icatgam'; aCfg.i.sSet = 'ICATGam'; aCfg.i.sDesc = 'ICAT for OS/2 latest'; i = i + 1; 66 aCfg.i.sId = 'icatgam406rc1'; aCfg.i.sSet = 'ICATGam406RC1'; aCfg.i.sDesc = 'ICAT for OS/2 v4.0.6 release candidate 1'; i = i + 1; 67 aCfg.i.sId = 'icatpe'; aCfg.i.sSet = 'ICATPe'; aCfg.i.sDesc = 'ICAT for OS/2 with PE support (test version)'; i = i + 1; 68 aCfg.i.sId = 'ida'; aCfg.i.sSet = 'IDA414'; aCfg.i.sDesc = 'Interactive DisAssembler (IDA) (latest)'; i = i + 1; 69 aCfg.i.sId = 'ida38'; aCfg.i.sSet = 'IDA38'; aCfg.i.sDesc = 'Interactive DisAssembler (IDA) v3.80 (historical)'; i = i + 1; 70 aCfg.i.sId = 'ida40'; aCfg.i.sSet = 'IDA40'; aCfg.i.sDesc = 'Interactive DisAssembler (IDA) v4.0 (historical)'; i = i + 1; 71 aCfg.i.sId = 'ida414'; aCfg.i.sSet = 'IDA414'; aCfg.i.sDesc = 'Interactive DisAssembler (IDA) v4.14'; i = i + 1; 72 aCfg.i.sId = 'idasdk'; aCfg.i.sSet = 'IDASDK'; aCfg.i.sDesc = 'Interactive DisAssembler (IDA) SDK'; i = i + 1; 73 aCfg.i.sId = 'mode12050'; aCfg.i.sSet = 'Mode,120,50'; aCfg.i.sDesc = 'mode 120,50'; i = i + 1; 74 aCfg.i.sId = 'mode8050'; aCfg.i.sSet = 'Mode,80,50'; aCfg.i.sDesc = 'mode 80,50'; i = i + 1; 75 /* obsolete id aCfg.i.sId = 'msc60'; aCfg.i.sSet = 'MSCV6_16'; aCfg.i.sDesc = 'MicroSoft C v6.0a 16-bit'; i = i + 1; */ 76 aCfg.i.sId = 'mscv6'; aCfg.i.sSet = 'MSCV6_32'; aCfg.i.sDesc = 'MicroSoft C v6.0 32-bit'; i = i + 1; 77 aCfg.i.sId = 'mscv6-16'; aCfg.i.sSet = 'MSCV6_16'; aCfg.i.sDesc = 'MicroSoft C v6.0a 16-bit'; i = i + 1; 78 aCfg.i.sId = 'mysql'; aCfg.i.sSet = 'mySQL'; aCfg.i.sDesc = 'MySql any version (latest from Yuri is recommended)'; i = i + 1; 79 aCfg.i.sId = 'netqos2'; aCfg.i.sSet = 'NetQOS2'; aCfg.i.sDesc = 'NetQOS2 - help system for VAC40,VAC365,DB2 and more.'; i = i + 1; 80 aCfg.i.sId = 'odin32testcase'; aCfg.i.sSet = 'Odin32Testcase'; aCfg.i.sDesc = 'Odin32 testcase setup'; i = i + 1; 81 aCfg.i.sId = 'perl'; aCfg.i.sSet = 'Perl'; aCfg.i.sDesc = 'Perl v5.0053'; i = i + 1; 82 aCfg.i.sId = 'python'; aCfg.i.sSet = 'Python'; aCfg.i.sDesc = 'Python v1.5'; i = i + 1; 83 aCfg.i.sId = 'toolkit40'; aCfg.i.sSet = 'Toolkit40'; aCfg.i.sDesc = 'Toolkit v4.0 CSD 4'; i = i + 1; 84 aCfg.i.sId = 'toolkit45'; aCfg.i.sSet = 'Toolkit45'; aCfg.i.sDesc = 'Toolkit v4.5'; i = i + 1; 85 aCfg.i.sId = 'toolkit451'; aCfg.i.sSet = 'Toolkit451'; aCfg.i.sDesc = 'Toolkit v4.5.1'; i = i + 1; 86 aCfg.i.sId = 'unix'; aCfg.i.sSet = 'Unix'; aCfg.i.sDesc = 'Misc unix stuff.'; i = i + 1; 87 /* obsolete id aCfg.i.sId = 'vac30'; aCfg.i.sSet = 'VAC308'; aCfg.i.sDesc = 'VisualAge for C++ v3.08'; i = i + 1; */ 88 aCfg.i.sId = 'vac308'; aCfg.i.sSet = 'VAC308'; aCfg.i.sDesc = 'VisualAge for C++ v3.08'; i = i + 1; 89 /* osbolete id aCfg.i.sId = 'vac36'; aCfg.i.sSet = 'VAC365'; aCfg.i.sDesc = ''; i = i + 1; */ 90 aCfg.i.sId = 'vac365'; aCfg.i.sSet = 'VAC365'; aCfg.i.sDesc = 'VisualAge for C++ v3.6.5 FP2 with latest optimizer fixes.'; i = i + 1; 91 aCfg.i.sId = 'vac40'; aCfg.i.sSet = 'VAC40'; aCfg.i.sDesc = 'VisualAge for C++ v4.0 FP2(??)'; i = i + 1; 92 aCfg.i.sId = 'warpin'; aCfg.i.sSet = 'WarpIn'; aCfg.i.sDesc = 'WarpIn 0.9.18+ (for Odin32 18 with fix is required)'; i = i + 1; 93 aCfg.i.sId = 'watcomc11'; aCfg.i.sSet = 'WatComC11,32,'; aCfg.i.sDesc = 'Watcom C/C++ v11.0 32-bit (no fixes)'; i = i + 1; 94 aCfg.i.sId = 'watcomc11-16'; aCfg.i.sSet = 'WatComC11,16'; aCfg.i.sDesc = 'Watcom C/C++ v11.0 16-bit (no fixes)'; i = i + 1; 95 aCfg.i.sId = 'watcomc11c'; aCfg.i.sSet = 'WatComC11c,32'; aCfg.i.sDesc = 'Watcom C/C++ v11.0c 32-bit (beta)'; i = i + 1; 96 aCfg.i.sId = 'watcomc11c-16'; aCfg.i.sSet = 'WatComC11c,16'; aCfg.i.sDesc = 'Watcom C/C++ v11.0c 16-bit (beta)'; i = i + 1; 97 aCfg.0 = i - 1; 98 99 100 101 /* 55 102 * Parse arguments 56 103 */ … … 62 109 /* 63 110 * Get last char. 64 * Dash means remove, pluss means add .111 * Dash means remove, pluss means add, asterix means verify and configure. 65 112 * Pluss is default and optional. 113 * 66 114 */ 67 115 ch = substr(sEnv.i, length(sEnv.i), 1); 68 if ch = '-' then 69 fRM = 1; 70 else 71 fRM = 0; 72 if (ch = '-' | ch = '+') then 116 if (ch = '-' | ch = '+' | ch = '*') then 73 117 sEnv.i = substr(sEnv.i, 1, length(sEnv.i) - 1); 118 fRM = (ch = '-'); 119 fCfg = (ch = '*'); 74 120 75 121 /* … … 78 124 rc = 0; 79 125 select 80 when (sEnv.i = 'mode8050') then Address CMD '@mode 80,50'81 when (sEnv.i = 'mode12050') then Address CMD '@mode 120,50'82 when (sEnv.i = 'cvs') then rc = CVS(fRM);83 when (sEnv.i = 'db2v52') then rc = db2v52(fRM);84 126 when (sEnv.i = 'debug') then do 85 127 rc = EnvVar_Set(0, 'DEBUG','1'); … … 87 129 rc = EnvVar_Set(0, 'BUILD_MODE','DEBUG'); 88 130 end 89 when (sEnv.i = 'ddkbase') then rc = DDKBase(fRM);90 when (sEnv.i = 'emx') then rc = EMX(fRM);91 when (sEnv.i = 'emxpgcc') then rc = EMXPGCC(fRM);92 when (sEnv.i = 'icatgam') then rc = ICATGam(fRM);93 when (sEnv.i = 'icatgam406rc1')then rc = ICATGam406RC1(fRM);94 when (sEnv.i = 'icatpe') then rc = ICATPe(fRM);95 when (sEnv.i = 'ida') then rc = IDA414(fRM);96 when (sEnv.i = 'ida414') then rc = IDA414(fRM);97 when (sEnv.i = 'ida38') then rc = IDA38(fRM);98 when (sEnv.i = 'ida40') then rc = IDA40(fRM);99 when (sEnv.i = 'idasdk') then rc = IDASDK(fRM);100 when (sEnv.i = 'mscv6') then rc = MSCV6_32(fRM);101 when (sEnv.i = 'mscv6-16') then rc = MSCV6_16(fRM);102 when (sEnv.i = 'msc60') then rc = MSCV6_16(fRM);103 when (sEnv.i = 'mysql') then rc = mySQL(fRM);104 when (sEnv.i = 'netqos2') then rc = NetQOS2(fRM);105 when (sEnv.i = 'python') then rc = Python(fRM);106 when (sEnv.i = 'perl') then rc = Perl(fRM);107 131 when (sEnv.i = 'profile') then do 108 132 rc = EnvVar_Set(0, 'DEBUG','1'); … … 115 139 rc = EnvVar_Set(0, 'BUILD_MODE','RELEASE'); 116 140 end 117 when (sEnv.i = 'toolkit45') then rc = Toolkit45(fRM); 118 when (sEnv.i = 'toolkit40') then rc = Toolkit40(fRM); 119 when (sEnv.i = 'unix') then rc = Unix(fRM); 120 when (sEnv.i = 'vac30') then rc = VAC308(fRM); 121 when (sEnv.i = 'vac308') then rc = VAC308(fRM); 122 when (sEnv.i = 'vac36') then rc = VAC365(fRM); 123 when (sEnv.i = 'vac365') then rc = VAC365(fRM); 124 when (sEnv.i = 'vac40') then rc = VAC40(fRM); 125 when (sEnv.i = 'warpin') then rc = WarpIn(fRM); 126 when (sEnv.i = 'watcomc11') then rc = WatComC11(fRM, 32); 127 when (sEnv.i = 'watcomc11c') then rc = WatComC11c(fRM, 32); 128 when (sEnv.i = 'watcomc11-16') then rc = WatComC11(fRM, 16); 129 when (sEnv.i = 'watcomc11c-16') then rc = WatComC11c(fRM, 16); 130 when (sEnv.i = 'odin32testcase') then rc = Odin32Testcase(fRM); 141 142 when (sEnv.i = 'buildsetup') then 143 rc = EnvVar_Set(0, 'BUILD_SETUP_MAK','make\setup.mak'); 131 144 132 145 otherwise 133 say 'error: unknown environment! - 'sEnv.i; 134 exit(1) 135 end 136 137 /* 138 * Check for errors. 139 */ 140 if (rc <> 0) then 141 do 142 say 'Processing '''sEnv.i''' failed with rc='rc'.'; 143 SysSleep(10); 144 exit(rc); 145 end 146 end 146 do 147 fFound = 0; 148 do j = 1 to aCfg.0 149 if (aCfg.j.sId = sEnv.i) then 150 do 151 /* 152 * Found the environment. 153 */ 154 fFound = 1; 155 if (fCfg) then; say 'Verify & Config of the 'sEnv.i' ('CfgDesc(sEnv.i)') environment...'; 156 if (pos(',', aCfg.j.sSet) > 0) then 157 sRexx = substr(aCfg.j.sSet, 1, pos(',', aCfg.j.sSet) - 1) || '(aCfg.j.sSet,fRM,fCfg', 158 || substr(aCfg.j.sSet, pos(',', aCfg.j.sSet)) || ')'; 159 else 160 sRexx = aCfg.j.sSet || '(sEnv.i,fRM,fCfg)'; 161 interpret 'rc = '||sRexx; 162 163 /* 164 * Loop till rc=0 or leave. 165 */ 166 do while (rc <> 0) 167 select 168 when (rc = 1) then 169 do 170 if (fCfg = 0) then 171 do 172 say 'fatal error: One of the paths for environment '''sEnv.i''' wasn'' found.'; 173 say ' Please (re-)configure the environment.'; 174 call SysSleep 5; 175 exit(16); 176 end 177 say 'warning: The user refused to give a path, continuing.'; 178 end 179 180 when (rc = 2) then 181 say 'error: verify failed ''cause some vital file wasn''t found.'; 182 183 when (rc = 49) then 184 say 'error: verify failed ''cause some vital command didn''t return as expected.'; 185 186 when (rc = 99) then 187 say 'error: verify failed ''cause some vital command didn''t return the expected output.'; 188 189 otherwise 190 do 191 say 'internal error: bad return code from '''sRexx''' rc=' rc'.'; 192 call SysSleep 5; 193 exit(16); 194 end 195 end 196 197 /* 198 * Retry the config if the user wan't so. 199 */ 200 fCfg = 3; /* forced reconfig. */ 201 say '(Re)Try to config the environment' sEnv.i '('CfgDesc(sEnv.i)')? (y/N)'; 202 sAnswer = PullUser(1); 203 if (substr(strip(sAnswer),1,1) <> 'Y') then 204 leave; 205 interpret 'rc = '||sRexx; 206 end 207 rc = 0; 208 leave; 209 end 210 end 211 212 if (\fFound) then 213 do 214 say 'error: unknown environment! - 'sEnv.i; 215 call SysSleep 5; 216 exit(16) 217 end 218 end /* otherwise */ 219 end /* select */ 220 end /* sEnv.i loop */ 147 221 148 222 … … 175 249 176 250 /** 251 * No value handler 252 */ 253 NoValueHandler: 254 say 'NoValueHandler: line 'SIGL; 255 return 256 257 258 /** 177 259 * The Directory Configuration Function. 178 260 * 179 261 * @returns Lower cased, absolute, backward slashed, path to program. 180 * @param sP rogramProgram identifier. (lowercase!)262 * @param sPathId Program identifier. (lowercase!) 181 263 * 182 264 * @remark … … 186 268 * 187 269 */ 188 QueryPath: procedure 189 parse arg sProgram 190 191 select 192 when (sProgram = 'cvs') then return 'f:\cvs'; 193 when (sProgram = 'emx') then return 'f:\emx'; 194 when (sProgram = 'emxpgcc') then return 'f:\emxpgcc'; 195 when (sProgram = 'db2v52') then return 'f:\sqllib52'; 196 when (sProgram = 'icatgam') then return 'f:\icatos2'; 197 when (sProgram = 'icatgam406rc1') then return 'f:\icatos2.4.0.6.rc1'; 198 when (sProgram = 'icatpe') then return 'f:\icatpe'; 199 when (sProgram = 'ida38') then return 'f:\ida38'; 200 when (sProgram = 'ida40') then return 'f:\ida401'; 201 when (sProgram = 'ida414') then return 'f:\ida414'; 202 when (sProgram = 'idasdk') then return 'f:\idasdk'; 203 when (sProgram = 'ddkbase') then return 'f:\ddk\base'; 204 when (sProgram = 'mscv6-16') then return 'f:\ddktools\toolkits\msc60'; 205 when (sProgram = 'mysql') then return 'f:\mysql2'; 206 when (sProgram = 'netqos2') then return 'f:\netqos2'; 207 when (sProgram = 'perl') then return 'f:\perllib'; 208 when (sProgram = 'python') then return 'f:\python'; 209 when (sProgram = 'toolkit40') then return 'f:\toolkit'; 210 when (sProgram = 'toolkit45') then return 'f:\toolkit45'; 211 when (sProgram = 'unixroot') then return 'e:\unix'; 212 when (sProgram = 'xfree86') then return 'e:\xfree86'; 213 when (sProgram = 'vac308') then return 'f:\ibmcpp'; 214 when (sProgram = 'vac365') then return 'f:\ibmcxxo'; 215 when (sProgram = 'vac40') then return 'f:\ibmcpp40'; 216 when (sProgram = 'warpin') then return 'f:\warpin'; 217 when (sProgram = 'watcom11') then return 'f:\watcom'; 218 when (sProgram = 'watcom11c') then return 'f:\watcom11c'; 270 PathQuery: procedure expose aCfg. aPath. sPathFile 271 parse arg sPathId, sEnvId, fCfg, fOptional 272 273 if (fOptional = '') then 274 fOptional = 0; 275 276 if (aPath.0 = 0) then 277 do /* 278 * Read path config file 279 */ 280 call PathRead; 219 281 220 282 /* 221 * Testcase stuff for odin.283 * If no data found fill in defaults. 222 284 */ 223 when (sProgram = 'testcase_drive_unused') then return 'l'; /* reqired */ 224 when (sProgram = 'testcase_drive_fixed') then return 'c'; /* reqired */ 225 when (sProgram = 'testcase_drive_floppy') then return 'a'; /* reqired */ 226 when (sProgram = 'testcase_drive_cdrom') then return 'k'; /* optional */ 227 when (sProgram = 'testcase_drive_network') then return 's'; /* optional */ 228 when (sProgram = 'testcase_drive_ramdisk') then return ''; /* optional */ 229 /* when (sProgram = '') then return ''; 230 when (sProgram = '') then return ''; 231 when (sProgram = '') then return ''; 232 when (sProgram = '') then return '';*/ 233 234 235 otherwise 285 if (aPath.0 = 0) then 236 286 do 237 say 'Fatal error: Path information for program '''sProgram''' was not found.'; 238 exit(16); 287 say 'Info: No or empty path file, using defaults.'; 288 i = 1; 289 aPath.i.sPId = 'cvs'; aPath.i.sPath = 'f:\cvs'; i = i + 1; 290 aPath.i.sPId = 'emx'; aPath.i.sPath = 'f:\emx'; i = i + 1; 291 aPath.i.sPId = 'emxpgcc'; aPath.i.sPath = 'f:\emxpgcc'; i = i + 1; 292 aPath.i.sPId = 'db2v52'; aPath.i.sPath = 'f:\sqllib52'; i = i + 1; 293 aPath.i.sPId = 'icatgam'; aPath.i.sPath = 'f:\icatos2'; i = i + 1; 294 aPath.i.sPId = 'icatgam406rc1'; aPath.i.sPath = 'f:\icatos2.4.0.6.rc1'; i = i + 1; 295 aPath.i.sPId = 'icatpe'; aPath.i.sPath = 'f:\icatpe'; i = i + 1; 296 aPath.i.sPId = 'ida38'; aPath.i.sPath = 'f:\ida38'; i = i + 1; 297 aPath.i.sPId = 'ida40'; aPath.i.sPath = 'f:\ida401'; i = i + 1; 298 aPath.i.sPId = 'ida414'; aPath.i.sPath = 'f:\ida414'; i = i + 1; 299 aPath.i.sPId = 'idasdk'; aPath.i.sPath = 'f:\idasdk'; i = i + 1; 300 aPath.i.sPId = 'ddkbase'; aPath.i.sPath = 'f:\ddk\base'; i = i + 1; 301 aPath.i.sPId = 'home'; aPath.i.sPath = 'e:\user\kso'; i = i + 1; 302 aPath.i.sPId = 'mscv6-16'; aPath.i.sPath = 'f:\ddktools\toolkits\msc60'; i = i + 1; 303 aPath.i.sPId = 'mysql'; aPath.i.sPath = 'f:\mysql2'; i = i + 1; 304 aPath.i.sPId = 'netqos2'; aPath.i.sPath = 'f:\netqos2'; i = i + 1; 305 aPath.i.sPId = 'perl'; aPath.i.sPath = 'f:\perllib'; i = i + 1; 306 aPath.i.sPId = 'python'; aPath.i.sPath = 'f:\python'; i = i + 1; 307 aPath.i.sPId = 'toolkit40'; aPath.i.sPath = 'f:\toolkit'; i = i + 1; 308 aPath.i.sPId = 'toolkit45'; aPath.i.sPath = 'f:\toolkit45'; i = i + 1; 309 aPath.i.sPId = 'toolkit451'; aPath.i.sPath = 'f:\toolkit451'; i = i + 1; 310 aPath.i.sPId = 'unixroot'; aPath.i.sPath = 'e:\unix'; i = i + 1; 311 aPath.i.sPId = 'xfree86'; aPath.i.sPath = 'e:\xfree86'; i = i + 1; 312 aPath.i.sPId = 'vac308'; aPath.i.sPath = 'f:\ibmcpp'; i = i + 1; 313 aPath.i.sPId = 'vac365'; aPath.i.sPath = 'f:\ibmcxxo'; i = i + 1; 314 aPath.i.sPId = 'vac40'; aPath.i.sPath = 'f:\ibmcpp40'; i = i + 1; 315 aPath.i.sPId = 'warpin'; aPath.i.sPath = 'f:\warpin'; i = i + 1; 316 aPath.i.sPId = 'watcom11'; aPath.i.sPath = 'f:\watcom'; i = i + 1; 317 aPath.i.sPId = 'watcom11c'; aPath.i.sPath = 'f:\watcom11c'; i = i + 1; 318 aPath.i.sPId = 'testcase_drive_unused'; aPath.i.sPath = 'l'; /* reqired */ i = i + 1; 319 aPath.i.sPId = 'testcase_drive_fixed'; aPath.i.sPath = 'c'; /* reqired */ i = i + 1; 320 aPath.i.sPId = 'testcase_drive_floppy'; aPath.i.sPath = 'a'; /* reqired */ i = i + 1; 321 aPath.i.sPId = 'testcase_drive_cdrom'; aPath.i.sPath = 'k'; /* optional */ i = i + 1; 322 aPath.i.sPId = 'testcase_drive_network'; aPath.i.sPath = 's'; /* optional */ i = i + 1; 323 /*aPath.i.sPId = 'testcase_drive_ramdisk'; aPath.i.sPath = ''; /* optional */ i = i + 1;*/ 324 /*aPath.i.sPId = ''; aPath.i.sPath = i = i + 1;*/ 325 aPath.0 = i - 1; 326 327 /* 328 * Write to file. 329 */ 330 call PathWrite; 239 331 end 240 332 end 241 333 242 /* Should never get here */ 334 /* 335 * Check for forced config. 336 */ 337 if (fCfg = 3) then 338 call PathRemove sPathId; 339 else 340 do 341 /* 342 * Search for the path. 343 */ 344 do i = 1 to aPath.0 345 if (aPath.i.sPId = sPathId) then 346 do 347 return aPath.i.sPath; 348 leave; 349 end 350 end 351 end 352 353 /* 354 * Configure then we'll ask the user. 355 */ 356 if (fCfg > 0) then 357 return PathConfig(fCfg, sPathId, sEnvId); 358 359 /* 360 * Error 361 */ 362 if (\fOptional) then 363 do 364 say 'Fatal error: Path information for program '''sPathId''' was not found.'; 365 call SysSleep 5; 366 exit(16); 367 end 368 243 369 return ''; 244 370 371 372 /** 373 * Reads the path file into the 'aPath.' stem. 374 */ 375 PathRead: procedure expose aCfg. aPath. sPathFile 376 377 i = 1; /* Path index */ 378 iLine = 0; /* Line # in file */ 379 380 /* 381 * Read loop. 382 */ 383 do while (lines(sPathFile) > 0) 384 iLine = iLine + 1; 385 sLine = strip(linein(sPathFile)); 386 387 /* 388 * Skip empty lines and comment lines, ie. starting with '#' or ';'. 389 */ 390 if ((sLine <> '') & (substr(sLine, 1, 1) <> '#') & (substr(sLine, 1, 1) <> ';')) then 391 do 392 /* 393 * Parse the line. 394 */ 395 parse var sLine aPath.i.sPId '=' aPath.i.sPath 396 aPath.i.sPId = strip(aPath.i.sPId); 397 aPath.i.sPath = strip(aPath.i.sPath); 398 399 /* 400 * Validate the input. 401 */ 402 if ((aPath.i.sPath = '') | (aPath.i.sPId = '') | (translate(sLine,'','#!$@%|<>;õ&Ï') <> sLine) ) then 403 do 404 say 'fatal error: missformed line in path file at line 'iLine'!' 405 call stream sPathFile, 'c', 'close'; 406 call SysSleep 5; 407 exit(16); 408 end 409 i = i + 1; 410 end 411 end 412 call stream sPathFile, 'c', 'close'; 413 aPath.0 = i - 1; 414 return 0; 415 416 417 /** 418 * Writes the path file from what's in the 'aPath.' stem. 419 */ 420 PathWrite: procedure expose aCfg. aPath. sPathFile 421 call SysFileDelete(sPathFile); 422 do i = 1 to aPath.0 423 /* skip if already written */ 424 j = 1; 425 do while (aPath.j.sPId <> aPath.i.sPId) 426 j = j + 1; 427 end 428 if (j >= i) then 429 call lineout sPathFile, aPath.i.sPId'='aPath.i.sPath; 430 end 431 call stream sPathFile, 'c', 'close'; 432 return 0; 433 434 435 /** 436 * Remove a path from the 'aPath.' stem. 437 * @returns 0 438 * @param sPathId The id of the path to remove. 439 */ 440 PathRemove: procedure expose aCfg. aPath. sPathFile 441 parse arg sPathId 442 443 /* 444 * Find. 445 */ 446 i = 1; 447 do while (i <= aPath.0) 448 if (aPath.i.sPId = sPathId) then 449 leave; 450 i = i + 1; 451 end 452 453 /* 454 * Move. 455 */ 456 if (i <= aPath.0) then 457 do 458 j = i + 1; 459 do while (j <= aPath.0) 460 aPath.i.sPId = aPath.j.sPId; 461 aPath.i.sPath = aPath.j.sPath; 462 j = j + 1; 463 i = i + 1; 464 end 465 aPath.0 = aPath.0 - 1; 466 end 467 return 0; 468 469 470 /** 471 * Configure a path. 472 * @returns Path on success. 473 * '' on failure. 474 * @param fCfg The config flags. 475 * 1 = configure if needed. 476 * 3 = force config. 477 * @param sPathId The path to configure. 478 * @param sEnvId The environment Id. 479 */ 480 PathConfig: procedure expose aCfg. aPath. sPathFile 481 parse arg fCfg, sPathId, sEnvId 482 483 /* 484 * Config loop. 485 */ 486 if (fCfg = 1) then 487 do 488 say 'Do you want to configure the path '''sPathId''' for the '''sEnvId'''('CfgDesc(sEnvId)') environment? (y/N)'; 489 sAnswer = PullUser(1); 490 if (substr(strip(sAnswer),1,1) <> 'Y') then 491 return ''; 492 end 493 do i = 1 to 128 494 495 say 'Give us the path then:' 496 sThePath = translate(strip(strip(strip(PullUser()), 'T','\'),'T','/'), '\', '/'); 497 /*say 'Debug: sThePath='sThePath;*/ 498 if ((sThePath <> '') & (sThePath = translate(sThePath,'','#!$@%|<>;õ&Ï='))) then 499 do 500 /* 501 * Add it to internal struct. 502 */ 503 call PathRemove(sPathId); 504 j = aPath.0 + 1; 505 aPath.j.sPId = strip(sPathId); 506 aPath.j.sPath = translate(strip(strip(strip(sThePath), 'T','\'),'T','/'), '\', '/'); 507 aPath.0 = j; 508 509 /* 510 * Write to file and return successfully. 511 */ 512 call PathWrite; 513 return sThePath; 514 end 515 else 516 say 'error: invalid path name.'; 517 518 /* ask if retry */ 519 if (i >= 2) then 520 say 'You''re not trying hard, are you?'; 521 say 'Wanna try giving us an *valid* path for the path '''sPathId''' for the '''sEnvId'''('CfgDesc(sEnvId)') environment? (y/N)'; 522 sAnswer = PullUser(1); 523 if (substr(strip(sAnswer),1,1) <> 'Y') then 524 leave; 525 end 526 527 say 'Giving up!'; 528 return ''; 529 530 531 /** 532 * Get the description of an environment. 533 * @returns Description string. 534 * '' if not found. 535 * @param sEnvId Environment id. 536 */ 537 CfgDesc: procedure expose aCfg. aPath. sPathFile 538 parse arg sEnvId 539 do i = 1 to aCfg.0 540 if (aCfg.i.sId = sEnvId) then 541 return aCfg.i.sDesc; 542 end 543 return sEnvId; 544 545 546 /** 547 * Lookups up an env. config in the aCfg. array. 548 * @return Index of sEnvId. 549 * aCfg.0+1 on error. 550 * @param sEnvId Environment id. 551 */ 552 CfgLookup: procedure expose aCfg. aPath. sPathFile 553 parse arg sEnvId 554 iEnv = 1; 555 do while ((iEnv <= aCfg.0) & (aCfg.iEnv.sId <> sEnvId)) 556 iEnv = iEnv + 1; 557 end 558 return iEnv; 559 560 561 /** 562 * Get user response and empties the input queue. 563 * @returns User input. 564 * @param fUpper If present and set uppercase the user response. 565 */ 566 PullUser: procedure 567 parse arg fUpper 568 if (fUpper = '') then 569 fUpper = 0; 570 571 if (fUpper) then 572 pull sAnswer; 573 else 574 parse pull sAnswer; 575 576 do while (Queued()) 577 pull dummy; 578 end 579 return sAnswer; 580 581 582 /** 583 * Checks if a file exists. 584 * @param sFile Name of the file to look for. 585 * @param sComplain Complaint text. Complain if non empty and not found. 586 * @returns TRUE if file exists. 587 * FALSE if file doesn't exists. 588 */ 589 FileExists: procedure 590 parse arg sFile, sComplain 591 rc = stream(sFile, 'c', 'query exist'); 592 if ((rc = '') & (sComplain <> '')) then 593 say sComplain ''''sFile'''.'; 594 return rc <> ''; 595 596 597 /** 598 * Checks if a directory exists. 599 * @param sDir Name of the directory to look for. 600 * @param sComplain Complaint text. Complain if non empty and not found. 601 * @returns TRUE if file exists. 602 * FALSE if file doesn't exists. 603 */ 604 DirExists: procedure 605 parse arg sDir, sComplain 606 rc = SysFileTree(sDir, 'sDirs', 'DO'); 607 if (rc = 0 & sDirs.0 = 1) then 608 return 1; 609 say sComplain ''''sDir'''.'; 610 return 0; 611 612 613 /** 614 * Execute a command and match output and return code. 615 * 616 * @returns 0 on match. 617 * 49 on return code mismatch. 618 * 99 on output mistmatch. 619 * @param sCmd The command to execute. 620 * @param rcCmdExepcted The expected return code from the command. 621 * @param sOutputPartExpected A 'needle' of the output 'haystack'. 622 */ 623 CheckCmdOutput: procedure 624 parse arg sCmd, rcCmdExpected, sOutputPartExpected 625 626 /* 627 * Try execute the command 628 */ 629 queTmp = RxQueue('Create'); 630 queOld = RxQueue('Set', queTmp); 631 Address CMD sCmd || ' 2>&1 | RxQueue' queTmp; 632 rcCmd = rc; 633 634 /* get output */ 635 sOutput = ''; 636 do while (queued() > 0) 637 parse pull sLine 638 sOutput = sOutput || sLine || '0d0a'x 639 end 640 call RxQueue 'Delete', RxQueue('Set', queOld); 641 642 /* 643 * If command 644 */ 645 rc = 0 646 if (rcCmd = rcCmdExpected) then 647 do 648 if (pos(sOutputPartExpected, sOutput) <= 0) then 649 do 650 say 'Debug - start' 651 say 'Debug:' sOutputPartExpected 652 say 'Debug: not found in:' 653 say sOutput 654 say 'Debug - end' 655 rc = 99 656 end 657 end 658 else 659 rc = 49 660 if (rc <> 0) then 661 say 'Debug:' sCmd 'rc='rc' rcCmd='rcCmd; 662 return rc; 245 663 246 664 247 665 /** 248 666 * Environment procedures section 667 * @returns 0 on success. 668 * 1 if PathQuery() failed. 669 * 2 if some vital file wasn't found in the config verify. 670 * 49 if verify command rc mismatched. 671 * 99 if verify command output mismatched. 249 672 **/ 250 673 … … 253 676 * Concurrent Versions System (CVS) 254 677 */ 255 CVS: procedure 256 parse arg fRM 678 CVS: procedure expose aCfg. aPath. sPathFile 679 parse arg sEnvId,fRM,fCfg 680 257 681 258 682 /* 259 683 * Concurrent Versions System (CVS) main directory. 260 684 */ 261 sPathCVS = QueryPath('cvs'); 685 sPathCVS = PathQuery('cvs', sEnvId, fCfg); 686 if (sPathCVS = '') then 687 return 1; 688 sPathHome = PathQuery('home', sEnvId, fCfg); 689 if (sPathHome = '') then 690 return 1; 691 262 692 call EnvVar_Set fRM, 'PATH_CVS', sPathCVS; 263 693 call EnvVar_AddFront fRM, 'path', sPathCVS'\bin;' 264 694 call EnvVar_AddFront fRM, 'bookshelf', sPathCVS'\book;' 695 call EnvVar_AddFront fRM, 'bookshelf', sPathCVS'\book;' 696 call EnvVar_Set fRM, 'home', translate(sPathHome, '/','\'); 697 698 /* verify */ 699 if (fCfg > 0) then 700 do 701 if (\FileExists(sPathCVS'\bin\cvs.exe', 'error: verify didn''t find')) then 702 return 2; 703 if (length(sPathHome) <= 2) then 704 do 705 say 'Error: The home directory is to short!'; 706 return 2; 707 end 708 if (\DirExists(sPathHome)) then 709 do 710 say 'Error: The home directory must exist!'; 711 return 2; 712 end 713 return CheckCmdOutput('cvs --version', 0, 'Concurrent Versions System (CVS) 1.1'); 714 end 265 715 return 0; 266 716 … … 269 719 * EMX 270 720 */ 271 EMX: procedure 272 parse arg fRM721 EMX: procedure expose aCfg. aPath. sPathFile 722 parse arg sEnvId,fRM,fCfg 273 723 274 724 /* 275 725 * EMX/GCC main directory. 276 726 */ 277 sEMX = QueryPath('emx'); 727 sEMX = PathQuery('emx', sEnvId, fCfg); 728 if (sEMX = '') then 729 return 1; 730 278 731 sEMXBack = translate(sEMX, '\', '/'); 279 732 sEMXForw = translate(sEMX, '/', '\'); … … 304 757 end 305 758 759 /* verify */ 760 if (fCfg > 0) then 761 do 762 if ( \FileExists(sEmxBack'\bin\gcc.exe', 'error: verify didn''t find'), 763 | \FileExists(sEmxBack'\bin\emxomf.exe', 'error: verify didn''t find'), 764 | \FileExists(sEmxBack'\bin\emxrev.cmd', 'error: verify didn''t find'), 765 | \FileExists(sEmxBack'\lib\mt\c.a', 'error: verify didn''t find'), 766 | \FileExists(sEmxBack'\lib\mt\c.lib', 'error: verify didn''t find'), 767 | \FileExists(sEmxBack'\lib\mt\sys.lib', 'error: verify didn''t find'), 768 | \FileExists(sEmxBack'\lib\mt\emx.a', 'error: verify didn''t find'), 769 | \FileExists(sEmxBack'\lib\mt\emx.lib', 'error: verify didn''t find'), 770 | \FileExists(sEmxBack'\lib\mt\c_import.a', 'error: verify didn''t find'), 771 | \FileExists(sEmxBack'\lib\mt\c_import.lib', 'error: verify didn''t find'), 772 | \FileExists(sEmxBack'\lib\c_alias.a', 'error: verify didn''t find'), 773 | \FileExists(sEmxBack'\lib\c_alias.lib', 'error: verify didn''t find'), 774 | \FileExists(sEmxBack'\lib\emx2.a', 'error: verify didn''t find'), 775 | \FileExists(sEmxBack'\lib\emx2.lib', 'error: verify didn''t find'), 776 ) then 777 return 2; 778 rc = CheckCmdOutput('gcc --version', 0, '2.8.1'); 779 if (rc = 0) then 780 rc = CheckCmdOutput('emxrev.cmd', 0,, 781 'EMX : revision = 61'||'0d0a'x ||, 782 'EMXIO : revision = 60'||'0d0a'x||, 783 'EMXLIBC : revision = 63'||'0d0a'x||, 784 'EMXLIBCM : revision = 64'||'0d0a'x||, 785 'EMXLIBCS : revision = 64'||'0d0a'x||, 786 'EMXWRAP : revision = 60'||'0d0a'x); 787 return rc; 788 end 306 789 return 0; 307 790 … … 310 793 * EMX PGCC - must be installed on to the ordinar EMX. 311 794 */ 312 EMXPGCC: procedure 313 parse arg fRM795 EMXPGCC: procedure expose aCfg. aPath. sPathFile 796 parse arg sEnvId,fRM,fCfg 314 797 315 798 /* 316 799 * EMX/GCC main directory. 317 800 */ 318 sEMXPGCC = QueryPath('emxpgcc'); 801 sEMXPGCC = PathQuery('emxpgcc', sEnvId, fCfg); 802 if (sEMXPGCC = '') then 803 return 1; 319 804 sEMXBack = translate(sEMXPGCC, '\', '/'); 320 805 sEMXForw = translate(sEMXPGCC, '/', '\'); … … 338 823 call EnvVar_AddFront fRM, 'HELPNDX', 'emxbook.ndx', '+', 1 339 824 825 /* verify */ 826 if (fCfg > 0) then 827 do 828 if ( \FileExists(sEmxBack'\bin\gcc.exe', 'error: verify didn''t find'), 829 | \FileExists(sEmxBack'\bin\g++.exe', 'error: verify didn''t find'), 830 | \FileExists(sEmxBack'\bin\as.exe', 'error: verify didn''t find'), 831 | \FileExists(sEmxBack'\bin\emxomf.exe', 'error: verify didn''t find'), 832 | \FileExists(sEmxBack'\lib\gcc29160.a', 'error: verify didn''t find'), 833 | \FileExists(sEmxBack'\lib\gcc29160.lib', 'error: verify didn''t find'), 834 | \FileExists(sEmxBack'\lib\iberty.a', 'error: verify didn''t find'), 835 | \FileExists(sEmxBack'\lib\iberty.lib', 'error: verify didn''t find'), 836 | \FileExists(sEmxBack'\lib\iberty_s.a', 'error: verify didn''t find'), 837 | \FileExists(sEmxBack'\lib\iberty_s.lib', 'error: verify didn''t find'), 838 | \FileExists(sEmxBack'\lib\opcodes.a', 'error: verify didn''t find'), 839 | \FileExists(sEmxBack'\lib\opcodes.lib', 'error: verify didn''t find'), 840 | \FileExists(sEmxBack'\lib\opcodes_s.a', 'error: verify didn''t find'), 841 | \FileExists(sEmxBack'\lib\opcodes_s.lib', 'error: verify didn''t find'), 842 ) then 843 return 2; 844 rc = CheckCmdOutput('gcc --version', 0, 'pgcc-2.95.2'); 845 if (rc = 0) then 846 rc = CheckCmdOutput('g++ --version', 0, 'pgcc-2.95.2'); 847 if (rc = 0) then 848 rc = CheckCmdOutput('as --version', 0, 'GNU assembler 2.9.1'); 849 return rc; 850 end 340 851 return 0; 341 852 … … 343 854 * IBM DB2 v5.2 344 855 */ 345 db2v52: procedure 346 parse arg fRM 347 sPathDB2 = QueryPath('db2v52'); 856 db2v52: procedure expose aCfg. aPath. sPathFile 857 parse arg sEnvId,fRM,fCfg 858 sPathDB2 = PathQuery('db2v52', sEnvId, fCfg); 859 if (sPathDB2 = '') then 860 return 1; 348 861 call EnvVar_Set fRm, 'PATH_DB2', sPathDB2; 349 862 call EnvVar_Set fRm, 'db2path', sPathDB2; … … 359 872 call EnvVar_AddFront fRM, 'include', sPathDB2'\include;' 360 873 call EnvVar_AddFront fRM, 'lib', sPathDB2'\lib;' 874 875 /* verify */ 876 if (fCfg > 0) then 877 do 878 if ( \FileExists(sPathDB2'\bin\db2.exe', 'error: verify didn''t find'), 879 | \FileExists(sPathDB2'\bin\sqlbind.exe', 'error: verify didn''t find'), 880 | \FileExists(sPathDB2'\bin\sqlprep.exe', 'error: verify didn''t find'), 881 | \FileExists(sPathDB2'\lib\db2api.lib', 'error: verify didn''t find'), 882 | \FileExists(sPathDB2'\lib\db2cli.lib', 'error: verify didn''t find'), 883 | \FileExists(sPathDB2'\lib\db2gmf32.lib', 'error: verify didn''t find'), 884 | \FileExists(sPathDB2'\include\sql.h', 'error: verify didn''t find'), 885 | \FileExists(sPathDB2'\include\sqlcodes.h', 'error: verify didn''t find'), 886 | \FileExists(sPathDB2'\include\sqlsystm.h', 'error: verify didn''t find'), 887 | \FileExists(sPathDB2'\include\sqlcli.h', 'error: verify didn''t find'), 888 ) then 889 return 2; 890 rc = CheckCmdOutput('echo quit | db2', 0, 'Command Line Processor for DB2 SDK 5.2.0'); 891 return rc; 892 end 893 return 0; 894 895 896 /* 897 * Device Driver Kit (DDK) base. 898 */ 899 DDKBase: procedure expose aCfg. aPath. sPathFile 900 parse arg sEnvId,fRM,fCfg 901 902 /* 903 * Device Driver Kit (DDK) (v4.0+) base (important not main) directory. 904 */ 905 sPathDDKBase = PathQuery('ddkbase', sEnvId, fCfg); 906 if (sPathDDKBase = '') then 907 return 1; 908 call EnvVar_Set fRM, 'PATH_DDKBASE',sPathDDKBase; 909 call EnvVar_AddFront fRM, 'path', sPathDDKBase'\tools;' 910 call EnvVar_AddFront fRM, 'include', sPathDDKBase'\h;'sPathDDKBase'\inc;'sPathDDKBase'\inc32;' 911 call EnvVar_AddFront fRM, 'include16', sPathDDKBase'\h;' 912 call EnvVar_AddFront fRM, 'lib', sPathDDKBase'\lib;' 913 call EnvVar_AddFront fRM, 'bookshelf', sPathDDKBase'\..\docs;' 914 915 /* verify */ 916 if (fCfg > 0) then 917 do 918 if ( \FileExists(sPathDDKBase'\tools\link.exe', 'error: verify didn''t find'), 919 | \FileExists(sPathDDKBase'\tools\link386.exe', 'error: verify didn''t find'), 920 | \FileExists(sPathDDKBase'\tools\cl386.exe', 'error: verify didn''t find'), 921 | \FileExists(sPathDDKBase'\tools\masm.exe', 'error: verify didn''t find'), 922 | \FileExists(sPathDDKBase'\tools\h2inc.exe', 'error: verify didn''t find'), 923 | \FileExists(sPathDDKBase'\tools\lib.exe', 'error: verify didn''t find'), 924 | \FileExists(sPathDDKBase'\lib\os2286.lib', 'error: verify didn''t find'), 925 | \FileExists(sPathDDKBase'\lib\os2286p.lib', 'error: verify didn''t find'), 926 | \FileExists(sPathDDKBase'\lib\os2386.lib', 'error: verify didn''t find'), 927 | \FileExists(sPathDDKBase'\lib\os2386p.lib', 'error: verify didn''t find'), 928 | \FileExists(sPathDDKBase'\lib\doscalls.lib', 'error: verify didn''t find'), 929 | \FileExists(sPathDDKBase'\lib\dhcalls.lib', 'error: verify didn''t find'), 930 | \FileExists(sPathDDKBase'\lib\addcalls.lib', 'error: verify didn''t find'), 931 | \FileExists(sPathDDKBase'\lib\rmcalls.lib', 'error: verify didn''t find'), 932 | \FileExists(sPathDDKBase'\lib\vdh.lib', 'error: verify didn''t find'), 933 | \FileExists(sPathDDKBase'\h\infoseg.h', 'error: verify didn''t find'), 934 | \FileExists(sPathDDKBase'\h\include.h', 'error: verify didn''t find'), 935 | \FileExists(sPathDDKBase'\h386\pmddi.h', 'error: verify didn''t find'), 936 | \FileExists(sPathDDKBase'\h386\pmddim.h', 'error: verify didn''t find'), 937 | \FileExists(sPathDDKBase'\h386\limits.h', 'error: verify didn''t find'), 938 | \FileExists(sPathDDKBase'\h386\string.h', 'error: verify didn''t find'), 939 | \FileExists(sPathDDKBase'\inc\v8086.inc', 'error: verify didn''t find'), 940 | \FileExists(sPathDDKBase'\inc\sas.inc', 'error: verify didn''t find'), 941 | \FileExists(sPathDDKBase'\inc\pmwinx.inc', 'error: verify didn''t find'), 942 | \FileExists(sPathDDKBase'\inc\infoseg.inc', 'error: verify didn''t find'), 943 | \FileExists(sPathDDKBase'\inc\devhlp.inc', 'error: verify didn''t find'), 944 | \FileExists(sPathDDKBase'\inc\devhlpp.inc', 'error: verify didn''t find'), 945 ) then 946 return 2; 947 rc = CheckCmdOutput('cl386', 0, 'Microsoft (R) Microsoft 386 C Compiler. Version 6.00.054'); 948 if (rc = 0) then 949 rc = CheckCmdOutput('masm nul,nul,nul,nul;', 2, 'Microsoft (R) Macro Assembler Version 5.10A.15 Jul 07 15:25:03 1989'); 950 if (rc = 0) then 951 rc = CheckCmdOutput('h2inc -?', 0, 'h2inc - .H to .INC file translator (version 13.29)'); 952 if (rc = 0) then 953 rc = CheckCmdOutput('type' sPathDDKBase'\inc\devhlp.inc', 0, 'DevHlp_ReadFileAt'); 954 return rc; 955 end 361 956 return 0; 362 957 … … 365 960 * ICAT Debugger 366 961 */ 367 ICATGam: procedure 368 parse arg fRM 369 sPathICAT = QueryPath('icatgam'); 962 ICATGam: procedure expose aCfg. aPath. sPathFile 963 parse arg sEnvId,fRM,fCfg 964 sPathICAT = PathQuery('icatgam', sEnvId, fCfg); 965 if (sPathICAT = '') then 966 return 1; 370 967 call EnvVar_Set fRm, 'PATH_ICATGAM', sPathICAT; 371 968 call EnvVar_AddFront fRm, 'beginlibpath',sPathICAT'\dll;' … … 373 970 call EnvVar_AddFront fRm, 'dpath', sPathICAT'\help;' 374 971 call EnvVar_AddFront fRm, 'help', sPathICAT'\help;' 972 973 /* verify */ 974 if (fCfg > 0) then 975 do 976 if ( \FileExists(sPathICAT'\bin\icatgam.exe', 'error: verify didn''t find'), 977 | \FileExists(sPathICAT'\dll\gamoou3.dll', 'error: verify didn''t find'), 978 | \FileExists(sPathICAT'\dll\gam5lde.dll', 'error: verify didn''t find'), 979 | \FileExists(sPathICAT'\dll\gam5cx.dll', 'error: verify didn''t find'), 980 ) then 981 return 2; 982 return 0; 983 end 375 984 return 0; 376 985 … … 379 988 * ICAT Debugger 380 989 */ 381 ICATGam406RC1: procedure 382 parse arg fRM 383 sPathICAT = QueryPath('icatgam406rc1'); 990 ICATGam406RC1: procedure expose aCfg. aPath. sPathFile 991 parse arg sEnvId,fRM,fCfg 992 sPathICAT = PathQuery('icatgam406rc1', sEnvId, fCfg); 993 if (sPathICAT = '') then 994 return 1; 384 995 call EnvVar_Set fRm, 'PATH_ICATGAM', sPathICAT; 385 996 call EnvVar_AddFront fRm, 'beginlibpath',sPathICAT'\dll;' … … 387 998 call EnvVar_AddFront fRm, 'dpath', sPathICAT'\help;' 388 999 call EnvVar_AddFront fRm, 'help', sPathICAT'\help;' 1000 1001 /* verify */ 1002 if (fCfg > 0) then 1003 do 1004 if ( \FileExists(sPathICAT'\bin\icatgam.exe', 'error: verify didn''t find'), 1005 | \FileExists(sPathICAT'\dll\gamoou3.dll', 'error: verify didn''t find'), 1006 | \FileExists(sPathICAT'\dll\gam5lde.dll', 'error: verify didn''t find'), 1007 | \FileExists(sPathICAT'\dll\gam5cx.dll', 'error: verify didn''t find'), 1008 ) then 1009 return 2; 1010 return 0; 1011 end 389 1012 return 0; 390 1013 … … 394 1017 * ICAT Debugger for PE images. 395 1018 */ 396 ICATPe: procedure 397 parse arg fRM 398 sPathICAT = QueryPath('icatgam'); 399 sPathICATPe = QueryPath('icatpe'); 1019 ICATPe: procedure expose aCfg. aPath. sPathFile 1020 parse arg sEnvId,fRM,fCfg 1021 sPathICAT = PathQuery('icatgam', sEnvId, fCfg); 1022 if (sPathICAT = '') then 1023 return 1; 1024 sPathICATPe = PathQuery('icatpe', sEnvId, fCfg); 1025 if (sPathICATPe = '') then 1026 return 1; 400 1027 call EnvVar_Set fRm, 'PATH_ICATGAM',sPathICAT; 401 1028 call EnvVar_Set fRm, 'PATH_ICATPE', sPathICATPe; … … 404 1031 call EnvVar_AddFront fRm, 'dpath', sPathICATPe'\bin;'sPathICAT'\help;' 405 1032 call EnvVar_AddFront fRm, 'help', sPathICATPe'\bin;'sPathICAT'\help;' 1033 1034 /* verify */ 1035 if (fCfg > 0) then 1036 do 1037 if ( \FileExists(sPathICAT'\bin\icatgam.exe', 'error: verify didn''t find'), 1038 | \FileExists(sPathICAT'\dll\gamoou3.dll', 'error: verify didn''t find'), 1039 | \FileExists(sPathICAT'\dll\gam5lde.dll', 'error: verify didn''t find'), 1040 | \FileExists(sPathICAT'\dll\gam5cx.dll', 'error: verify didn''t find'), 1041 | \FileExists(sPathICATPe'\bin\icatgam.exe', 'error: verify didn''t find'), 1042 | \FileExists(sPathICATPe'\bin\gamoou3.dll', 'error: verify didn''t find'), 1043 | \FileExists(sPathICATPe'\bin\gam5lde.dll', 'error: verify didn''t find'), 1044 | \FileExists(sPathICATPe'\bin\gam5cx.dll', 'error: verify didn''t find'), 1045 ) then 1046 return 2; 1047 return 0; 1048 end 406 1049 return 0; 407 1050 … … 411 1054 * Interactive Disassembler (IDA) v3.80a 412 1055 */ 413 IDA38: procedure 414 parse arg fRM1056 IDA38: procedure expose aCfg. aPath. sPathFile 1057 parse arg sEnvId,fRM,fCfg 415 1058 /* 416 1059 * IDA main directory. 417 1060 */ 418 sPathIDA = QueryPath('ida38'); 1061 sPathIDA = PathQuery('ida38', sEnvId, fCfg); 1062 if (sPathIDA = '') then 1063 return 1; 419 1064 call EnvVar_Set fRM, 'PATH_IDA', sPathIDA 420 1065 call EnvVar_AddFront fRM, 'path', sPathIDA 421 1066 call EnvVar_AddFront fRM, 'beginlibpath', sPathIDA 1067 1068 /* verify */ 1069 if (fCfg > 0) then 1070 do 1071 if ( \FileExists(sPathIDA'\ida2.exe', 'error: verify didn''t find'), 1072 | \FileExists(sPathIDA'\idaw.exe', 'error: verify didn''t find'), 1073 | \FileExists(sPathIDA'\ida.dll', 'error: verify didn''t find'), 1074 | \FileExists(sPathIDA'\pc.dll', 'error: verify didn''t find'), 1075 ) then 1076 return 2; 1077 return 0; 1078 end 422 1079 return 0; 423 1080 … … 426 1083 * Interactive Disassembler (IDA) v4.01 427 1084 */ 428 IDA40: procedure 429 parse arg fRM1085 IDA40: procedure expose aCfg. aPath. sPathFile 1086 parse arg sEnvId,fRM,fCfg 430 1087 /* 431 1088 * IDA main directory. 432 1089 */ 433 sPathIDA = QueryPath('ida40'); 1090 sPathIDA = PathQuery('ida40', sEnvId, fCfg); 1091 if (sPathIDA = '') then 1092 return 1; 434 1093 call EnvVar_Set fRM, 'PATH_IDA', sPathIDA 435 1094 call EnvVar_AddFront fRM, 'path', sPathIDA 436 1095 call EnvVar_AddFront fRM, 'beginlibpath', sPathIDA 1096 1097 /* verify */ 1098 if (fCfg > 0) then 1099 do 1100 if ( \FileExists(sPathIDA'\ida2.exe', 'error: verify didn''t find'), 1101 | \FileExists(sPathIDA'\idaw.exe', 'error: verify didn''t find'), 1102 | \FileExists(sPathIDA'\ida.dll', 'error: verify didn''t find'), 1103 | \FileExists(sPathIDA'\pc.dll', 'error: verify didn''t find'), 1104 ) then 1105 return 2; 1106 return 0; 1107 end 437 1108 return 0; 438 1109 … … 441 1112 * Interactive Disassembler (IDA) v4.14 442 1113 */ 443 IDA414: procedure 444 parse arg fRM1114 IDA414: procedure expose aCfg. aPath. sPathFile 1115 parse arg sEnvId,fRM,fCfg 445 1116 /* 446 1117 * IDA main directory. 447 1118 */ 448 sPathIDA = QueryPath('ida414'); 1119 sPathIDA = PathQuery('ida414', sEnvId, fCfg); 1120 if (sPathIDA = '') then 1121 return 1; 449 1122 call EnvVar_Set fRM, 'PATH_IDA', sPathIDA 450 1123 call EnvVar_AddFront fRM, 'path', sPathIDA 451 1124 call EnvVar_AddFront fRM, 'beginlibpath', sPathIDA 1125 1126 /* verify */ 1127 if (fCfg > 0) then 1128 do 1129 if ( \FileExists(sPathIDA'\ida2.exe', 'error: verify didn''t find'), 1130 | \FileExists(sPathIDA'\idaw.exe', 'error: verify didn''t find'), 1131 | \FileExists(sPathIDA'\ida.dll', 'error: verify didn''t find'), 1132 | \FileExists(sPathIDA'\pc.dll', 'error: verify didn''t find'), 1133 ) then 1134 return 2; 1135 return 0; 1136 end 452 1137 return 0; 453 1138 … … 456 1141 * Interactive Disassembler (IDA) Plugin SDK (v5.0?) 457 1142 */ 458 IDASDK: procedure 459 parse arg fRM1143 IDASDK: procedure expose aCfg. aPath. sPathFile 1144 parse arg sEnvId,fRM,fCfg 460 1145 /* 461 1146 * IDA main directory. 462 1147 */ 463 sPathIDASDK = QueryPath('idasdk'); 1148 sPathIDASDK = PathQuery('idasdk', sEnvId, fCfg); 1149 if (sPathIDASDK = '') then 1150 return 1; 464 1151 call EnvVar_Set fRM, 'PATH_IDASDK', sPathIDASDK 465 1152 call EnvVar_AddFront fRM, 'include', sPathIDASDK'\include;' … … 467 1154 call EnvVar_AddFront fRM, 'path', sPathIDASDK'\bin\os2;' 468 1155 call EnvVar_AddFront fRM, 'beginlibpath', sPathIDASDK'\bin\os2;' 469 return 0; 470 471 472 /* 473 * Device Driver Kit (DDK) base. 474 */ 475 DDKBase: procedure 476 parse arg fRM 477 478 /* 479 * Device Driver Kit (DDK) (v4.0+) base (important not main) directory. 480 */ 481 sPathDDKBase = QueryPath('ddkbase'); 482 call EnvVar_Set fRM, 'PATH_DDKBASE',sPathDDKBase; 483 call EnvVar_AddFront fRM, 'path', sPathDDKBase'\tools;' 484 call EnvVar_AddFront fRM, 'include', sPathDDKBase'\h;'sPathDDKBase'\inc;'sPathDDKBase'\inc32;' 485 call EnvVar_AddFront fRM, 'include16', sPathDDKBase'\h;' 486 call EnvVar_AddFront fRM, 'lib', sPathDDKBase'\lib;' 487 call EnvVar_AddFront fRM, 'bookshelf', sPathDDKBase'\..\docs;' 488 489 return 0; 490 1156 1157 /* verify */ 1158 if (fCfg > 0) then 1159 do 1160 if ( \FileExists(sPathIDASDK'\os2wat.cfg', 'error: verify didn''t find'), 1161 | \FileExists(sPathIDASDK'\d32wat.cfg', 'error: verify didn''t find'), 1162 | \FileExists(sPathIDASDK'\include\exehdr.h', 'error: verify didn''t find'), 1163 | \FileExists(sPathIDASDK'\include\ida.hpp', 'error: verify didn''t find'), 1164 | \FileExists(sPathIDASDK'\include\vm.hpp', 'error: verify didn''t find'), 1165 | \FileExists(sPathIDASDK'\libwat.os2\ida.lib', 'error: verify didn''t find'), 1166 | \FileExists(sPathIDASDK'\libwat.d32\ida.lib', 'error: verify didn''t find'), 1167 | \FileExists(sPathIDASDK'\libwat.d32\INIRT386.OBJ', 'error: verify didn''t find'), 1168 | \FileExists(sPathIDASDK'\libbor.d32\ida.lib', 'error: verify didn''t find'), 1169 ) then 1170 return 2; 1171 return 0; 1172 end 1173 return 0; 1174 1175 1176 /* 1177 * Mode commandline. 1178 */ 1179 Mode: procedure expose aCfg. aPath. sPathFile 1180 parse arg sEnvId,fRM,fCfg,cols,rows 1181 if (fRM) then 1182 do 1183 cols = 80; 1184 rows = 25; 1185 end 1186 Address CMD 'mode' cols','rows 1187 return 0; 491 1188 492 1189 … … 494 1191 * Microsoft C v6.0a 16-bit 495 1192 */ 496 MSCV6_16: procedure 497 parse arg fRM1193 MSCV6_16: procedure expose aCfg. aPath. sPathFile 1194 parse arg sEnvId,fRM,fCfg 498 1195 499 1196 /* 500 1197 * Microsoft C v6.0a main directory. 501 1198 */ 502 sPathMSC = QueryPath('mscv6-16'); 1199 sPathMSC = PathQuery('mscv6-16', sEnvId, fCfg); 1200 if (sPathMSC = '') then 1201 return 1; 503 1202 call EnvVar_Set fRM, 'BUILD_ENV', 'MSCV6-16' 504 1203 call EnvVar_Set fRM, 'BUILD_PLATFORM', 'OS2' … … 509 1208 call EnvVar_AddFront fRM, 'lib', sPathMSC'\lib;' 510 1209 1210 /* verify */ 1211 if (fCfg > 0) then 1212 do 1213 if ( \FileExists(sPathMSC'\binp\cl.exe', 'error: verify didn''t find'), 1214 | \FileExists(sPathMSC'\lib\clibcep.lib', 'error: verify didn''t find'), 1215 | \FileExists(sPathMSC'\lib\llibcep.lib', 'error: verify didn''t find'), 1216 | \FileExists(sPathMSC'\lib\mlibcep.lib', 'error: verify didn''t find'), 1217 | \FileExists(sPathMSC'\lib\slibcep.lib', 'error: verify didn''t find'), 1218 | \FileExists(sPathMSC'\include\sysbits.h', 'error: verify didn''t find'), 1219 | \FileExists(sPathMSC'\include\dos.h', 'error: verify didn''t find'), 1220 | \FileExists(sPathMSC'\include\bios.h', 'error: verify didn''t find'), 1221 | \FileExists(sPathMSC'\include\string.h', 'error: verify didn''t find'), 1222 | \FileExists(sPathMSC'\include\stdio.h', 'error: verify didn''t find'), 1223 ) then 1224 return 2; 1225 rc = CheckCmdOutput('cl', 0, 'Microsoft (R) C Optimizing Compiler Version 6.00A.04'); 1226 return rc; 1227 end 511 1228 return 0; 512 1229 … … 515 1232 * Microsoft C v6.0a 32-bit 516 1233 */ 517 MSCV6_32: procedure 518 parse arg fRM1234 MSCV6_32: procedure expose aCfg. aPath. sPathFile 1235 parse arg sEnvId,fRM,fCfg 519 1236 520 1237 /* 521 1238 * This is where the compiler really is. 522 1239 */ 523 call DDKBase fRM;1240 call DDKBase 'ddkbase',fRM,fCfg; 524 1241 525 1242 /* 526 1243 * Microsoft C v6.0a 32-bit main directory. 527 1244 */ 528 sPathDDKBase = QueryPath('ddkbase'); 1245 sPathDDKBase = PathQuery('ddkbase', sEnvId, fCfg); 1246 if (sPathDDKBase = '') then 1247 return 1; 529 1248 call EnvVar_Set fRM, 'BUILD_ENV', 'MSCV6' 530 1249 call EnvVar_Set fRM, 'BUILD_PLATFORM', 'OS2' 531 1250 call EnvVar_Set fRM, 'PATH_MSC', sPathDDKBase; 532 call EnvVar_AddFront fRM, 'include', sPathDDKBase'\h3 2;'1251 call EnvVar_AddFront fRM, 'include', sPathDDKBase'\h386;' 533 1252 call EnvVar_AddFront fRM, 'lib', sPathDDKBase'\lib;' 1253 1254 /* verify */ 1255 if (fCfg > 0) then 1256 do 1257 if ( \FileExists(sPathDDKBase'\tools\cl386.exe', 'error: verify didn''t find'), 1258 | \FileExists(sPathDDKBase'\h386\limits.h', 'error: verify didn''t find'), 1259 | \FileExists(sPathDDKBase'\h386\string.h', 'error: verify didn''t find'), 1260 ) then 1261 return 2; 1262 rc = CheckCmdOutput('cl386', 0, 'Microsoft (R) Microsoft 386 C Compiler. Version 6.00.054'); 1263 return rc; 1264 end 534 1265 return 0; 535 1266 … … 538 1269 * mySQL Database system 539 1270 */ 540 mySQL: procedure 541 parse arg fRM1271 mySQL: procedure expose aCfg. aPath. sPathFile 1272 parse arg sEnvId,fRM,fCfg 542 1273 543 1274 /* 544 1275 * mySQL Database system main directory. 545 1276 */ 546 sPathMySQL = QueryPath('mysql'); 1277 sPathMySQL = PathQuery('mysql', sEnvId, fCfg); 1278 if (sPathMySQL = '') then 1279 return 1; 547 1280 call EnvVar_Set fRM, 'PATH_MYSQL', sPathMySQL; 548 1281 call EnvVar_AddFront fRM, 'path', sPathMySQL'\bin;' … … 551 1284 call EnvVar_AddFront fRM, 'bookshelf', sPathMySQL'\doc;'sPathMySQL'\book'; 552 1285 /*call EnvVar_AddFront fRM, 'lib', sPathMySQL'\lib;'*/ 1286 1287 /* verify */ 1288 if (fCfg > 0) then 1289 do 1290 if ( \FileExists(sPathMySQL'\bin\mysql.exe', 'error: verify didn''t find'), 1291 | \FileExists(sPathMySQL'\bin\mysqld.exe', 'error: verify didn''t find'), 1292 | \FileExists(sPathMySQL'\bin\mysqladmin.exe', 'error: verify didn''t find'), 1293 | \FileExists(sPathMySQL'\dll\mysql.dll', 'error: verify didn''t find'), 1294 | \FileExists(sPathMySQL'\include\mysql.h', 'error: verify didn''t find'), 1295 | \FileExists(sPathMySQL'\include\mysql_com.h', 'error: verify didn''t find'), 1296 | \FileExists(sPathMySQL'\include\mysql_version.h', 'error: verify didn''t find'), 1297 ) then 1298 return 2; 1299 rc = CheckCmdOutput('mysql --version', 0, ', for '); 1300 return rc; 1301 end 553 1302 return 0; 554 1303 … … 558 1307 * NetQOS2 - help subsystem++ for VAC 3.6.5 and VAC 4.0 559 1308 */ 560 NetQOS2: procedure 561 sPathNetQOS2 = QueryPath('netqos2'); 1309 NetQOS2: procedure expose aCfg. aPath. sPathFile 1310 parse arg sEnvId,fRM,fCfg 1311 sPathNetQOS2 = PathQuery('netqos2', sEnvId, fCfg); 1312 if (sPathNetQOS2 = '') then 1313 return 1; 562 1314 call EnvVar_Set fRM, 'PATH_NETQOS2', sPathNetQOS2 563 1315 call EnvVar_AddFront fRM, 'path', sPathNetQOS2';' … … 574 1326 call EnvVar_Set fRM, 'imqconfigsrv', sPathNetQOS2'\instance' 575 1327 call EnvVar_Set fRM, 'imqconfigcl', sPathNetQOS2'\instance\dbcshelp' 1328 1329 /* verify */ 1330 if (fCfg > 0) then 1331 do 1332 if ( \FileExists(sPathNetQOS2'\netq.exe', 'error: verify didn''t find'), 1333 ) then 1334 return 2; 1335 rc = CheckCmdOutput('netq', 999, 'NETQ {START | STOP'); 1336 return rc; 1337 end 576 1338 return 0; 577 1339 … … 580 1342 * Odin32 testcase setup. 581 1343 */ 582 Odin32Testcase: procedure 583 parse arg fRM 584 call EnvVar_Set fRM, 'odin32_testcase_drive_unused', QueryPath('testcase_drive_unused'); 585 call EnvVar_Set fRM, 'odin32_testcase_drive_fixed', QueryPath('testcase_drive_fixed') 586 call EnvVar_Set fRM, 'odin32_testcase_drive_floppy', QueryPath('testcase_drive_floppy') 587 call EnvVar_Set fRM, 'odin32_testcase_drive_cdrom', QueryPath('testcase_drive_cdrom') 588 call EnvVar_Set fRM, 'odin32_testcase_drive_network', QueryPath('testcase_drive_network') 589 call EnvVar_Set fRM, 'odin32_testcase_drive_ramdisk', QueryPath('testcase_drive_ramdisk') 1344 Odin32Testcase: procedure expose aCfg. aPath. sPathFile 1345 parse arg sEnvId,fRM,fCfg 1346 if ( PathQuery('testcase_drive_unused', sEnvId, fCfg) = '', 1347 | PathQuery('testcase_drive_fixed', sEnvId, fCfg) = '', 1348 | PathQuery('testcase_drive_floppy', sEnvId, fCfg) = '', 1349 | PathQuery('testcase_drive_cdrom', sEnvId, fCfg) = '', 1350 ) then 1351 return 1; 1352 1353 call EnvVar_Set fRM, 'odin32_testcase_drive_unused', PathQuery('testcase_drive_unused', sEnvId, fCfg); 1354 call EnvVar_Set fRM, 'odin32_testcase_drive_fixed', PathQuery('testcase_drive_fixed', sEnvId, fCfg); 1355 call EnvVar_Set fRM, 'odin32_testcase_drive_floppy', PathQuery('testcase_drive_floppy', sEnvId, fCfg); 1356 call EnvVar_Set fRM, 'odin32_testcase_drive_cdrom', PathQuery('testcase_drive_cdrom', sEnvId, fCfg); 1357 call EnvVar_Set fRM, 'odin32_testcase_drive_network', PathQuery('testcase_drive_network', sEnvId, fCfg, 1); 1358 call EnvVar_Set fRM, 'odin32_testcase_drive_ramdisk', PathQuery('testcase_drive_ramdisk', sEnvId, fCfg, 1); 590 1359 return 0; 591 1360 … … 593 1362 * PERL 5005_53 594 1363 */ 595 Perl: procedure 596 parse arg fRM1364 Perl: procedure expose aCfg. aPath. sPathFile 1365 parse arg sEnvId,fRM,fCfg 597 1366 598 1367 /* … … 600 1369 */ 601 1370 /* BAD 602 sPathPerl = QueryPath('perl'); 1371 sPathPerl = PathQuery('perl', sEnvId, fCfg); 1372 if (sPathPerl = '') then 1373 return 1; 603 1374 sPathPerlForw = translate(sPathPerl, '/', '\'); 604 1375 call EnvVar_Set fRM, 'PATH_PERL', sPathPerl; … … 615 1386 */ 616 1387 /* seems ok */ 617 sPathPerl = QueryPath('perl'); 1388 sPathPerl = PathQuery('perl', sEnvId, fCfg); 1389 if (sPathPerl = '') then 1390 return 1; 618 1391 sPathPerlForw = translate(sPathPerl, '/', '\'); 619 1392 call EnvVar_Set fRM, 'PATH_PERL', sPathPerl; … … 626 1399 call EnvVar_Set fRM, 'perl5lib', sPathPerlForw'/lib' 627 1400 call EnvVar_Set fRM, 'perl_badlang', '0' 1401 1402 /* verify */ 1403 if (fCfg > 0) then 1404 do 1405 if ( \FileExists(sPathPerl'\bin\perl.exe', 'error: verify didn''t find'), 1406 | \FileExists(sPathPerl'\dll\perlE0AC.dll', 'error: verify didn''t find'), 1407 ) then 1408 return 2; 1409 rc = CheckCmdOutput('perl --version', 0, 'This is perl, version 5.005_53 built for os2'); 1410 return rc; 1411 end 628 1412 return 0; 629 1413 … … 632 1416 * Python/2 v1.5.2 633 1417 */ 634 Python: procedure 635 parse arg fRM1418 Python: procedure expose aCfg. aPath. sPathFile 1419 parse arg sEnvId,fRM,fCfg 636 1420 637 1421 /* 638 1422 * The Python Home directory 639 1423 */ 640 sPythonHome = QueryPath('python'); 1424 sPythonHome = PathQuery('python', sEnvId, fCfg); 1425 if (sPythonHome = '') then 1426 return 1; 641 1427 call EnvVar_Set fRM, 'PATH_PYTHON', sPythonHome 642 1428 call EnvVar_Set fRM, 'pythonhome', sPythonHome … … 645 1431 call EnvVar_AddFront fRM, 'path', sPythonHome 646 1432 1433 /* verify */ 1434 if (fCfg > 0) then 1435 do 1436 if ( \FileExists(sPythonHome'\Python.exe', 'error: verify didn''t find'), 1437 | \FileExists(sPythonHome'\Python15.dll', 'error: verify didn''t find'), 1438 ) then 1439 return 2; 1440 rc = CheckCmdOutput('echo print "hello world" | python', 0, 'hello world'); 1441 return rc; 1442 end 647 1443 return 0; 648 1444 … … 651 1447 * OS/2 Programmers Toolkit v4.0 (CSD1/4) 652 1448 */ 653 Toolkit40: procedure 654 parse arg fRM1449 Toolkit40: procedure expose aCfg. aPath. sPathFile 1450 parse arg sEnvId,fRM,fCfg 655 1451 656 1452 /* 657 1453 * Toolkit (4.0) main directory. 658 1454 */ 659 sPathTK = QueryPath('toolkit40'); 1455 sPathTK = PathQuery('toolkit40', sEnvId, fCfg); 1456 if (sPathTK = '') then 1457 return 1; 660 1458 call EnvVar_Set fRM, 'PATH_TOOLKIT', sPathTK; 661 1459 … … 701 1499 call EnvVar_AddFront fRM, 'CAT_HOST_SOURCE_PATH='sPathTK'\BIN;' 702 1500 */ 1501 1502 /* verify */ 1503 if (fCfg > 0) then 1504 do 1505 if ( \FileExists(sPathTK'\bin\alp.exe', 'error: verify didn''t find'), 1506 | \FileExists(sPathTK'\bin\rc.exe', 'error: verify didn''t find'), 1507 | \FileExists(sPathTK'\bin\ipfc.exe', 'error: verify didn''t find'), 1508 | \FileExists(sPathTK'\bin\implib.exe', 'error: verify didn''t find'), 1509 | \FileExists(sPathTK'\bin\mkmsgf.exe', 'error: verify didn''t find'), 1510 | \FileExists(sPathTK'\bin\mapsym.exe', 'error: verify didn''t find'), 1511 | \FileExists(sPathTK'\lib\os2386.lib', 'error: verify didn''t find'), 1512 | \FileExists(sPathTK'\lib\pmbidi.lib', 'error: verify didn''t find'), 1513 | \FileExists(sPathTK'\lib\tcpip32.lib', 'error: verify didn''t find'), 1514 | \FileExists(sPathTK'\h\os2.h', 'error: verify didn''t find'), 1515 | \FileExists(sPathTK'\h\os2win.h', 'error: verify didn''t find'), 1516 | \FileExists(sPathTK'\h\stack16\pmwsock.h', 'error: verify didn''t find'), 1517 | \FileExists(sPathTK'\som\bin\sc.exe', 'error: verify didn''t find'), 1518 ) then 1519 return 2; 1520 rc = CheckCmdOutput('syslevel '||sPathTK||'\bin', 0, 'IBM Developer''s Toolkit for OS/2 Warp Version 4'||'0d0a'x||'Version 4.00.'); 1521 if (rc = 0) then 1522 rc = CheckCmdOutput('sc -V', -1, '", Version: 2.54.'); 1523 if (rc = 0) then 1524 rc = CheckCmdOutput('rc', 0, 'IBM RC (Resource Compiler) Version 5.00.00'); 1525 if (rc = 0) then 1526 rc = CheckCmdOutput('ipfc', 0, 'Version 4.00.00'); 1527 1528 return rc; 1529 end 703 1530 return 0; 704 1531 … … 708 1535 * OS/2 Programmers Toolkit v4.5 709 1536 */ 710 Toolkit45: procedure 711 parse arg fRM1537 Toolkit45: procedure expose aCfg. aPath. sPathFile 1538 parse arg sEnvId,fRM,fCfg 712 1539 713 1540 /* 714 1541 * Toolkit (4.5) main directory. 715 1542 */ 716 sPathTK = QueryPath('toolkit45'); 1543 sPathTK = PathQuery('toolkit45', sEnvId, fCfg); 1544 if (sPathTK = '') then 1545 return 1; 717 1546 call EnvVar_Set fRM, 'PATH_TOOLKIT', sPathTK; 718 1547 … … 753 1582 */ 754 1583 755 return 0; 1584 /* verify */ 1585 if (fCfg > 0) then 1586 do 1587 if ( \FileExists(sPathTK'\bin\alp.exe', 'error: verify didn''t find'), 1588 | \FileExists(sPathTK'\bin\rc.exe', 'error: verify didn''t find'), 1589 | \FileExists(sPathTK'\bin\ipfc.exe', 'error: verify didn''t find'), 1590 | \FileExists(sPathTK'\bin\implib.exe', 'error: verify didn''t find'), 1591 | \FileExists(sPathTK'\bin\mkmsgf.exe', 'error: verify didn''t find'), 1592 | \FileExists(sPathTK'\bin\mapsym.exe', 'error: verify didn''t find'), 1593 | \FileExists(sPathTK'\lib\os2386.lib', 'error: verify didn''t find'), 1594 | \FileExists(sPathTK'\lib\pmbidi.lib', 'error: verify didn''t find'), 1595 | \FileExists(sPathTK'\lib\tcpip32.lib', 'error: verify didn''t find'), 1596 | \FileExists(sPathTK'\h\os2.h', 'error: verify didn''t find'), 1597 | \FileExists(sPathTK'\h\os2win.h', 'error: verify didn''t find'), 1598 | \FileExists(sPathTK'\h\stack16\pmwsock.h', 'error: verify didn''t find'), 1599 | FileExists(sPathTK'\som\bin\sc.exe'), 1600 ) then 1601 return 2; 1602 rc = CheckCmdOutput('syslevel '||sPathTK||'\bin', 0, 'IBM OS/2 Developer''s Toolkit Version 4.5'||'0d0a'x||'Version 4.50 Component ID 5639F9300'); 1603 if (rc = 0) then 1604 rc = CheckCmdOutput('rc', 0, 'IBM RC (Resource Compiler) Version 5.00.004'); 1605 if (rc = 0) then 1606 rc = CheckCmdOutput('ipfc', 0, 'Version 4.00.006 July 21 1998'); 1607 return rc; 1608 end 1609 return 0; 1610 1611 1612 /* 1613 * OS/2 Programmers Toolkit v4.5.1 1614 */ 1615 Toolkit451: procedure expose aCfg. aPath. sPathFile 1616 parse arg sEnvId,fRM,fCfg 1617 1618 /* 1619 * Toolkit (4.5.1) main directory. 1620 */ 1621 sPathTK = PathQuery('toolkit451', sEnvId, fCfg); 1622 if (sPathTK = '') then 1623 return 1; 1624 call EnvVar_Set fRM, 'PATH_TOOLKIT', sPathTK; 1625 1626 call EnvVar_AddFront fRM, 'path', sPathTK'\bin;'sPathTK'\som\common;'sPathTK'\som\bin' 1627 call EnvVar_AddFront fRM, 'dpath', sPathTK'\msg;'sPathTK'\book;'sPathTK'\SOM\COMMON\SYSTEM;'sPathTK'\SOM\MSG;' 1628 call EnvVar_AddFront fRM, 'beginlibpath', sPathTK'\dll;'sPathTK'\som\common\dll;'sPathTK'\som\lib;' 1629 call EnvVar_AddFront fRM, 'help', sPathTK'\help;' 1630 call EnvVar_AddFront fRM, 'bookshelf', sPathTK'\book;'sPathTK'\archived;' 1631 call EnvVar_AddFront fRM, 'somir', sPathTK'\SOM\COMMON\ETC\214\SOM.IR;' 1632 call EnvVar_AddEnd fRM, 'somir', sPathTK'\SAMPLES\REXX\SOM\ANIMAL\ORXSMP.IR;' 1633 call EnvVar_AddFront fRM, 'nlspath', sPathTK'\msg\%N;' 1634 call EnvVar_AddEnd fRM, 'ulspath', sPathTK'\language;' 1635 call EnvVar_AddFront 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;' 1636 call EnvVar_AddFront fRM, 'lib', sPathTK'\lib;' 1637 call EnvVar_AddEnd fRM, 'lib', sPathTK'\SAMPLES\MM\LIB;'sPathTK'\SPEECH\LIB;' 1638 call EnvVar_AddFront fRM, 'helpndx', 'EPMKWHLP.NDX+', '+' 1639 call EnvVar_AddFront fRM, 'ipfc', sPathTK'\ipfc;' 1640 call EnvVar_Set fRM, 'sombase', sPathTK'\SOM' 1641 call EnvVar_Set fRM, 'somruntime', sPathTK'\SOM\COMMON' 1642 call EnvVar_Set fRM, 'LANG', 'en_us' 1643 1644 call EnvVar_Set fRM, 'CPREF', 'CP1.INF+CP2.INF+CP3.INF' 1645 call EnvVar_Set fRM, 'GPIREF', 'GPI1.INF+GPI2.INF+GPI3.INF+GPI4.INF' 1646 call EnvVar_Set fRM, 'MMREF', 'MMREF1.INF+MMREF2.INF+MMREF3.INF' 1647 call EnvVar_Set fRM, 'PMREF', 'PM1.INF+PM2.INF+PM3.INF+PM4.INF+PM5.INF' 1648 call EnvVar_Set fRM, 'WPSREF', 'WPS1.INF+WPS2.INF+WPS3.INF' 1649 call EnvVar_AddFront fRM, 'sminclude', sPathTK'\H;'sPathTK'\IDL;'sPathTK'\SOM\INCLUDE;.;' 1650 call EnvVar_Set fRM, 'smaddstar', '1' 1651 call EnvVar_Set fRM, 'smemit', 'h;ih;c' 1652 call EnvVar_Set fRM, 'smtmp', EnvVar_Get('tmp'); 1653 call EnvVar_Set fRM, 'smclasses', 'WPTYPES.IDL' 1654 /* 1655 call EnvVar_Set fRM, 'CAT_MACHINE', 'COM1:57600' 1656 call EnvVar_Set fRM, 'CAT_HOST_BIN_PATH', TKMAIN'\BIN' 1657 call EnvVar_Set fRM, 'CAT_COMMUNICATION_TYPE', 'ASYNC_SIGBRK' 1658 call EnvVar_Set fRM, 'CAT_HOST_SOURCE_PATH',TKMAIN'\BIN;' 1659 */ 1660 1661 /* verify */ 1662 if (fCfg > 0) then 1663 do 1664 if ( \FileExists(sPathTK'\bin\alp.exe', 'error: verify didn''t find'), 1665 | \FileExists(sPathTK'\bin\rc.exe', 'error: verify didn''t find'), 1666 | \FileExists(sPathTK'\bin\ipfc.exe', 'error: verify didn''t find'), 1667 | \FileExists(sPathTK'\bin\implib.exe', 'error: verify didn''t find'), 1668 | \FileExists(sPathTK'\bin\mkmsgf.exe', 'error: verify didn''t find'), 1669 | \FileExists(sPathTK'\bin\mapsym.exe', 'error: verify didn''t find'), 1670 | \FileExists(sPathTK'\bin\nmake.exe', 'error: verify didn''t find'), 1671 | \FileExists(sPathTK'\bin\nmake32.exe', 'error: verify didn''t find'), 1672 | \FileExists(sPathTK'\lib\os2386.lib', 'error: verify didn''t find'), 1673 | \FileExists(sPathTK'\lib\pmbidi.lib', 'error: verify didn''t find'), 1674 | \FileExists(sPathTK'\lib\tcpip32.lib', 'error: verify didn''t find'), 1675 | \FileExists(sPathTK'\h\os2.h', 'error: verify didn''t find'), 1676 | \FileExists(sPathTK'\h\os2win.h', 'error: verify didn''t find'), 1677 | \FileExists(sPathTK'\h\stack16\pmwsock.h', 'error: verify didn''t find'), 1678 | \FileExists(sPathTK'\som\bin\sc.exe', 'error: verify didn''t find'), 1679 ) then 1680 return 2; 1681 rc = CheckCmdOutput('syslevel '||sPathTK||'\bin', 0, 'IBM OS/2 Developer''s Toolkit Version 4.5'||'0d0a'x||'Version 4.50.1 Component ID 5639F9300'); 1682 if (rc = 0) then 1683 rc = CheckCmdOutput('sc -V', -1, '", Version: 2.54.'); 1684 if (rc = 0) then 1685 rc = CheckCmdOutput('rc', 0, 'IBM RC (Resource Compiler) Version 5.00.006 Oct 20 2000'); 1686 if (rc = 0) then 1687 rc = CheckCmdOutput('ipfc', 0, 'Version 4.00.007 Oct 02 2000'); 1688 if (rc = 0) then 1689 rc = CheckCmdOutput('nmake', 2, 'Version 4.00.000 Oct 20 2000'); 1690 if (rc = 0) then 1691 rc = CheckCmdOutput('nmake32', 0, 'Version 5.00.003 Oct 20 2000'); 1692 return rc; 1693 end 1694 return 0; 1695 756 1696 757 1697 … … 759 1699 * This will envolve into an full UNIX like environment some day perhaps... 760 1700 */ 761 Unix: procedure 762 parse arg fRM1701 Unix: procedure expose aCfg. aPath. sPathFile 1702 parse arg sEnvId,fRM,fCfg 763 1703 764 1704 /* 765 1705 * Unix root directory. 766 1706 */ 767 sUnixBack = QueryPath('unixroot'); 1707 sUnixBack = PathQuery('unixroot', sEnvId, fCfg); 1708 if (sUnixBack = '') then 1709 return 1; 768 1710 sUnixForw = translate(sUnixBack, '/', '\'); 769 1711 call EnvVar_Set fRM, 'PATH_UNIX', sUnixBack … … 780 1722 * XFree86 main directory. 781 1723 */ 782 sXF86Back = QueryPath('xfree86'); 1724 sXF86Back = PathQuery('xfree86', sEnvId, fCfg); 1725 if (sXF86Back = '') then 1726 return 1; 783 1727 sXF86Forw = translate(sXF86Back, '/', '\'); 784 1728 call EnvVar_Set fRM, 'PATH_XFREE86', sXF86Back … … 788 1732 call EnvVar_AddFront fRM, 'LIBRARY_PATH', sXF86Forw'/lib' 789 1733 1734 /* verify */ 1735 if (fCfg > 0) then 1736 do 1737 if ( \FileExists(sUnixBack'\bin\bash.exe', 'error: verify didn''t find'), 1738 | \FileExists(sUnixBack'\bin\sh.exe', 'error: verify didn''t find'), 1739 | \FileExists(sUnixBack'\bin\yes.exe', 'error: verify didn''t find'), 1740 | \FileExists(sUnixBack'\bin\rm.exe', 'error: verify didn''t find'), 1741 | \FileExists(sUnixBack'\bin\cp.exe', 'error: verify didn''t find'), 1742 | \FileExists(sUnixBack'\bin\mv.exe', 'error: verify didn''t find'), 1743 | \FileExists(sXF86Back'\bin\xf86config.exe', 'error: verify didn''t find'), 1744 ) then 1745 return 2; 1746 return rc; 1747 end 790 1748 return EMX(fRM); 791 1749 … … 795 1753 * IBM Visual Age for C++ v3.08 for OS/2 796 1754 */ 797 VAC308: procedure 798 parse arg fRM1755 VAC308: procedure expose aCfg. aPath. sPathFile 1756 parse arg sEnvId,fRM,fCfg 799 1757 800 1758 /* 801 1759 * IBM Visual Age for C++ Version 3.08 main directory. 802 1760 */ 803 sPathCPP = QueryPath('vac308'); 1761 sPathCPP = PathQuery('vac308', sEnvId, fCfg); 1762 if (sPathCPP = '') then 1763 return 1; 804 1764 call EnvVar_Set fRM, 'PATH_VAC308', sPathCPP 805 1765 call EnvVar_Set fRM, 'CCENV', 'VAC3' … … 844 1804 call EnvVar_Set fRM, 'smclasses', 'WPTYPES.IDL' 845 1805 846 /* FIXME THESE USES '+' AS SEPERATOR NOT ';'!!! */847 1806 call EnvVar_AddFront fRM, 'helpndx', 'EPMKWHLP.NDX+CPP.NDX+CPPBRS.NDX', '+' 848 1807 call EnvVar_AddFront fRM, 'ipf_keys', 'SHOWNAV' 849 1808 850 1809 /* verify */ 1810 if (fCfg > 0) then 1811 do 1812 if ( \FileExists(sPathCPP'\bin\icc.exe', 'error: verify didn''t find'), 1813 | \FileExists(sPathCPP'\bin\ilib.exe', 'error: verify didn''t find'), 1814 | \FileExists(sPathCPP'\bin\ilink.exe', 'error: verify didn''t find'), 1815 | \FileExists(sPathCPP'\bin\icsperf.exe', 'error: verify didn''t find'), 1816 | \FileExists(sPathCPP'\bin\icsdebug.exe', 'error: verify didn''t find'), 1817 | \FileExists(sPathCPP'\bin\cppfilt.exe', 'error: verify didn''t find'), 1818 | \FileExists(sPathCPP'\bin\dllrname.exe', 'error: verify didn''t find'), 1819 | \FileExists(sPathCPP'\lib\demangl.lib', 'error: verify didn''t find'), 1820 | \FileExists(sPathCPP'\lib\cppom30.lib', 'error: verify didn''t find'), 1821 | \FileExists(sPathCPP'\lib\cppom30i.lib', 'error: verify didn''t find'), 1822 | \FileExists(sPathCPP'\lib\cppom30o.lib', 'error: verify didn''t find'), 1823 | \FileExists(sPathCPP'\lib\cppon30i.lib', 'error: verify didn''t find'), 1824 | \FileExists(sPathCPP'\lib\cppon30o.lib', 'error: verify didn''t find'), 1825 | \FileExists(sPathCPP'\lib\_doscall.lib', 'error: verify didn''t find'), 1826 | \FileExists(sPathCPP'\lib\_pmwin.lib', 'error: verify didn''t find'), 1827 | \FileExists(sPathCPP'\include\builtin.h', 'error: verify didn''t find'), 1828 | \FileExists(sPathCPP'\include\conio.h', 'error: verify didn''t find'), 1829 | \FileExists(sPathCPP'\include\ismkss.h', 'error: verify didn''t find'), 1830 | FileExists(sPathCPP'\include\os2.h'), 1831 | FileExists(sPathCPP'\include\os2win.h'), 1832 | FileExists(sPathCPP'\include\pm.h'), 1833 | \FileExists(sPathCPP'\include\sys\utime.h', 'error: verify didn''t find'), 1834 | \FileExists(sPathCPP'\help\cpplib.inf', 'error: verify didn''t find'), 1835 ) then 1836 return 2; 1837 rc = CheckCmdOutput('syslevel '||sPathCPP||'\syslevel', 0, 'Version 3.00 Component ID 562201703'||'0d0a'x||'Current CSD level: CTC308'); 1838 if (rc = 0) then 1839 rc = CheckCmdOutput('syslevel '||sPathCPP||'\syslevel', 0, 'Version 3.00 Component ID 562201704'||'0d0a'x||'Current CSD level: CTU308'); 1840 if (rc = 0) then 1841 rc = CheckCmdOutput('syslevel '||sPathCPP||'\syslevel', 0, 'Version 3.00 Component ID 562201707'||'0d0a'x||'Current CSD level: CTV308'); 1842 if (rc = 0) then 1843 rc = CheckCmdOutput('syslevel '||sPathCPP||'\syslevel', 0, 'Version 3.00 Component ID 562201708'||'0d0a'x||'Current CSD level: CTD308'); 1844 if (rc = 0) then 1845 rc = CheckCmdOutput('syslevel '||sPathCPP||'\syslevel', 0, 'Version 3.00 Component ID 562201605'||'0d0a'x||'Current CSD level: CTC308'); 1846 if (rc = 0) then 1847 rc = CheckCmdOutput('syslevel '||sPathCPP||'\syslevel', 0, 'Version 3.00 Component ID 562201602'||'0d0a'x||'Current CSD level: CTO308'); 1848 if (rc = 0) then 1849 rc = CheckCmdOutput('icc', 0, 'IBM VisualAge C++ for OS/2, Version 3'); 1850 if (rc = 0) then 1851 rc = CheckCmdOutput('ilink', 16, 'IBM(R) Linker for OS/2(R), Version 01.08.r1a_CTC308c'); 1852 if (rc = 0) then 1853 rc = CheckCmdOutput('ilib /?', 8, 'IBM(R) Library Manager for OS/2(R), Version 01.00.03 cc_CTC308c'); 1854 return rc; 1855 end 851 1856 return 0; 852 1857 … … 856 1861 * Visual Age / C and C++ tools v3.6.5 for OS/2 857 1862 */ 858 VAC365: procedure 859 parse arg fRM1863 VAC365: procedure expose aCfg. aPath. sPathFile 1864 parse arg sEnvId,fRM,fCfg 860 1865 861 1866 /* 862 1867 * IBM C/C++ Compiler and Tools Version 3.6.5 main directory. 863 1868 */ 864 sPathCxx = QueryPath('vac365'); 1869 sPathCxx = PathQuery('vac365', sEnvId, fCfg); 1870 if (sPathCxx = '') then 1871 return 1; 865 1872 call EnvVar_Set fRM, 'PATH_VAC365', sPathCxx; 866 1873 call EnvVar_Set fRM, 'CCENV', 'VAC36' … … 879 1886 call EnvVar_Set fRM, 'CPP_DBG_LANG', 'CPP' 880 1887 1888 /* verify */ 1889 if (fCfg > 0) then 1890 do 1891 if ( \FileExists(sPathCxx'\bin\icc.exe', 'error: verify didn''t find'), 1892 | \FileExists(sPathCxx'\bin\ilib.exe', 'error: verify didn''t find'), 1893 | \FileExists(sPathCxx'\bin\ilink.exe', 'error: verify didn''t find'), 1894 | \FileExists(sPathCxx'\bin\idebug.exe', 'error: verify didn''t find'), 1895 | \FileExists(sPathCxx'\bin\cppfilt.exe', 'error: verify didn''t find'), 1896 | \FileExists(sPathCxx'\bin\dllrname.exe', 'error: verify didn''t find'), 1897 | \FileExists(sPathCxx'\bin\cppcbe36.exe', 'error: verify didn''t find'), 1898 | \FileExists(sPathCxx'\lib\cpprms36.lib', 'error: verify didn''t find'), 1899 | \FileExists(sPathCxx'\lib\cpprmi36.lib', 'error: verify didn''t find'), 1900 | \FileExists(sPathCxx'\lib\cpprmo36.lib', 'error: verify didn''t find'), 1901 | \FileExists(sPathCxx'\lib\cpprni36.lib', 'error: verify didn''t find'), 1902 | \FileExists(sPathCxx'\lib\cpprds36.lib', 'error: verify didn''t find'), 1903 | \FileExists(sPathCxx'\include\builtin.h', 'error: verify didn''t find'), 1904 | \FileExists(sPathCxx'\include\conio.h', 'error: verify didn''t find'), 1905 | \FileExists(sPathCxx'\include\ismavl.h', 'error: verify didn''t find'), 1906 | FileExists(sPathCxx'\include\os2.h'), 1907 | FileExists(sPathCxx'\include\os2win.h'), 1908 | FileExists(sPathCxx'\include\pm.h'), 1909 | \FileExists(sPathCxx'\include\sys\utime.h', 'error: verify didn''t find'), 1910 | \FileExists(sPathCxx'\help\cpplbm36.msg', 'error: verify didn''t find'), 1911 ) then 1912 return 2; 1913 rc = CheckCmdOutput('icc', 0, 'IBM* C and C++ Compilers for OS/2*, AIX* and for Windows NT**, Version 3.6'); 1914 if (rc = 0) then 1915 rc = CheckCmdOutput('ilink', 16, 'IBM(R) Linker for OS/2(R), Version 03.06.PPK1990125'); 1916 if (rc = 0) then 1917 rc = CheckCmdOutput('ilib /?', 0, 'IBM Librarian for OS/2(R) Version 03.99.PPK1990310'); 1918 if (stream(sPathCxx'\bin\cppcbe36.exe', 'c', 'query size') <> 603122) then 1919 do 1920 say 'Error!!! Get latest vac365 optimizer fixes from the OS2 Mozilla project.'; 1921 say ' http://www.mozilla.org/ports/os2/setup.html'; 1922 rc = 99; 1923 end 1924 return rc; 1925 end 881 1926 return 0; 882 1927 … … 885 1930 * Visual Age for C++ v4.0 for OS/2 886 1931 */ 887 VAC40: procedure 888 parse arg fRM1932 VAC40: procedure expose aCfg. aPath. sPathFile 1933 parse arg sEnvId,fRM,fCfg 889 1934 890 1935 /* 891 1936 * IBM VisualAge for C++ v4.0 main directory. 892 1937 */ 893 sPathCPP = QueryPath('vac40'); 1938 sPathCPP = PathQuery('vac40', sEnvId, fCfg); 1939 if (sPathCPP = '') then 1940 return 1; 894 1941 call EnvVar_Set fRM, 'PATH_VAC40', sPathCPP; 895 1942 call EnvVar_Set fRM, 'CCENV', 'VAC40' … … 912 1959 call EnvVar_Set fRM, 'os2', '1' 913 1960 1961 /* verify */ 1962 if (fCfg > 0) then 1963 do 1964 if ( \FileExists(sPathCPP'\bin\iccv4.exe', 'error: verify didn''t find'), 1965 | \FileExists(sPathCPP'\bin\ilib.exe', 'error: verify didn''t find'), 1966 | \FileExists(sPathCPP'\bin\ire.exe', 'error: verify didn''t find'), 1967 | \FileExists(sPathCPP'\bin\vacide.exe', 'error: verify didn''t find'), 1968 | \FileExists(sPathCPP'\bin\cppfilt.exe', 'error: verify didn''t find'), 1969 | \FileExists(sPathCPP'\bin\dllrname.exe', 'error: verify didn''t find'), 1970 | \FileExists(sPathCPP'\bin\patrace.exe', 'error: verify didn''t find'), 1971 | \FileExists(sPathCPP'\lib\cpprms40.lib', 'error: verify didn''t find'), 1972 | \FileExists(sPathCPP'\lib\cpprmi40.lib', 'error: verify didn''t find'), 1973 | \FileExists(sPathCPP'\lib\cpprmo40.lib', 'error: verify didn''t find'), 1974 | \FileExists(sPathCPP'\lib\cpprni40.lib', 'error: verify didn''t find'), 1975 | \FileExists(sPathCPP'\lib\cpprds40.lib', 'error: verify didn''t find'), 1976 | \FileExists(sPathCPP'\include\builtin.h', 'error: verify didn''t find'), 1977 | \FileExists(sPathCPP'\include\conio.h', 'error: verify didn''t find'), 1978 | \FileExists(sPathCPP'\include\ismavl.h', 'error: verify didn''t find'), 1979 | FileExists(sPathCPP'\include\os2.h'), 1980 | FileExists(sPathCPP'\include\os2win.h'), 1981 | FileExists(sPathCPP'\include\pm.h'), 1982 | \FileExists(sPathCPP'\include\sys\utime.h', 'error: verify didn''t find'), 1983 | \FileExists(sPathCPP'\help\cpplbm40.msg', 'error: verify didn''t find'), 1984 ) then 1985 return 2; 1986 rc = CheckCmdOutput('iccv4', 0, 'IBM VisualAge for C++ Version 4.0 C Compiler'); 1987 if (rc = 0) then 1988 rc = CheckCmdOutput('ilib /?', 0, 'IBM Librarian for OS/2(R) Version 03.99.cc_981110'); /* is this really FP2?????? */ 1989 if (rc = 0) then 1990 rc = CheckCmdOutput('vacbld -?', 0, 'IBM(R) VisualAge(R) C++ Professional, Version 4.0 (981117)'); /* is this really FP2?????? */ 1991 return rc; 1992 end 914 1993 return 0; 915 1994 … … 920 1999 * WarpIn 921 2000 */ 922 WarpIn: procedure 923 parse arg fRM2001 WarpIn: procedure expose aCfg. aPath. sPathFile 2002 parse arg sEnvId,fRM,fCfg 924 2003 925 2004 /* 926 2005 * WarpIn main directory. 927 2006 */ 928 sPathWarpIn = QueryPath('warpin'); 2007 sPathWarpIn = PathQuery('warpin', sEnvId, fCfg); 2008 if (sPathWarpIn = '') then 2009 return 1; 929 2010 call EnvVar_Set fRM, 'PATH_WARPIN', sPathWarpIn; 930 2011 call EnvVar_AddFront fRM, 'path', sPathWarpIn';' 2012 call EnvVar_AddFront fRM, 'beginlibpath',sPathWarpIn';' 931 2013 call EnvVar_AddFront fRM, 'bookshelf', sPathWarpIn';' 2014 2015 /* verify */ 2016 if (fCfg > 0) then 2017 do 2018 if ( \FileExists(sPathWarpIn'\wic.exe', 'error: verify didn''t find'), 2019 | \FileExists(sPathWarpIn'\wpirtl.dll', 'error: verify didn''t find'), 2020 | \FileExists(sPathWarpIn'\warpin.exe', 'error: verify didn''t find'), 2021 ) then 2022 return 2; 2023 rc = CheckCmdOutput('wic', 1, '2002 - WarpIn archive creation and maintenance'); 2024 return rc; 2025 end 932 2026 return 0; 933 2027 … … 937 2031 * WatCom C/C++ v11.0 938 2032 */ 939 WatComC11: procedure 940 parse arg fRM, iBits2033 WatComC11: procedure expose aCfg. aPath. sPathFile 2034 parse arg sEnvId,fRM,fCfg, iBits 941 2035 942 2036 /* 943 2037 * Watcom C/C++ v11.0 main directory 944 2038 */ 945 sPathWatcom = QueryPath('watcom11'); 2039 sPathWatcom = PathQuery('watcom11', sEnvId, fCfg); 2040 if (sPathWatcom = '') then 2041 return 1; 946 2042 call EnvVar_Set fRM, 'PATH_WATCOM', sPathWatcom 947 2043 call EnvVar_Set fRM, 'CCENV', 'WAT' … … 964 2060 */ 965 2061 2062 /* verify */ 2063 if (fCfg > 0) then 2064 do 2065 if ( \FileExists(sPathWatcom'\binp\wpp.exe', 'error: verify didn''t find'), 2066 | \FileExists(sPathWatcom'\binp\wcc.exe', 'error: verify didn''t find'), 2067 | \FileExists(sPathWatcom'\binp\wcc386.exe', 'error: verify didn''t find'), 2068 | \FileExists(sPathWatcom'\binp\wpp386.exe', 'error: verify didn''t find'), 2069 | \FileExists(sPathWatcom'\binp\wlink.exe', 'error: verify didn''t find'), 2070 | \FileExists(sPathWatcom'\lib286\os2\os2.lib', 'error: verify didn''t find'), 2071 | \FileExists(sPathWatcom'\lib386\os2\clbrdll.lib', 'error: verify didn''t find'), 2072 | \FileExists(sPathWatcom'\lib386\os2\clib3r.lib', 'error: verify didn''t find'), 2073 | \FileExists(sPathWatcom'\lib386\nt\kernel32.lib', 'error: verify didn''t find'), 2074 | \FileExists(sPathWatcom'\lib386\nt\clbrdll.lib', 'error: verify didn''t find'), 2075 | \FileExists(sPathWatcom'\lib386\nt\clib3r.lib', 'error: verify didn''t find'), 2076 ) then 2077 return 2; 2078 rc = CheckCmdOutput('wcc', 8, 'Watcom C16 Optimizing Compiler Version 11.0 '||'0d0a'x); 2079 if (rc = 0) then 2080 rc = CheckCmdOutput('wpp', 8, 'Watcom C++16 Optimizing Compiler Version 11.0 '||'0d0a'x); 2081 if (rc = 0) then 2082 rc = CheckCmdOutput('wcc386', 8, 'Watcom C32 Optimizing Compiler Version 11.0 '||'0d0a'x); 2083 if (rc = 0) then 2084 rc = CheckCmdOutput('wpp386', 8, 'Watcom C++32 Optimizing Compiler Version 11.0 '||'0d0a'x); 2085 if (rc = 0) then 2086 rc = CheckCmdOutput('wlink form ELF', 1, 'WATCOM Linker Version 11.0'||'0d0a'x); 2087 return rc; 2088 end 966 2089 return 0; 967 2090 … … 969 2092 * WatCom C/C++ v11.0c 970 2093 */ 971 WatComC11c: procedure 972 parse arg fRM, iBits2094 WatComC11c: procedure expose aCfg. aPath. sPathFile 2095 parse arg sEnvId,fRM,fCfg, iBits 973 2096 974 2097 /* 975 2098 * Watcom C/C++ v11.0c main directory 976 2099 */ 977 sPathWatcom = QueryPath('watcom11c'); 2100 sPathWatcom = PathQuery('watcom11c', sEnvId, fCfg); 2101 if (sPathWatcom = '') then 2102 return 1; 2103 978 2104 call EnvVar_Set fRM, 'PATH_WATCOM', sPathWatcom 979 2105 call EnvVar_Set fRM, 'CCENV', 'WAT' … … 988 2114 call EnvVar_AddFront fRM, 'help', sPathWatcom'\binp\help;' 989 2115 call EnvVar_AddEnd fRM, 'bookshelf', sPathWatcom'\binp\help;' 990 call EnvVar_AddFront fRM, 'include', sPathWatcom'\h;'sPathWatcom'\h\os2;'sPathWatcom'\h\nt;' 2116 if (iBits = 16) then 2117 call EnvVar_AddFront fRM, 'include', sPathWatcom'\h;'sPathWatcom'\h\os21x;' 2118 else 2119 call EnvVar_AddFront fRM, 'include', sPathWatcom'\h;'sPathWatcom'\h\os2;'sPathWatcom'\h\nt;' 991 2120 call EnvVar_AddFront fRM, 'lib', sPathWatcom'\lib386;'sPathWatcom'\lib386\os2;'sPathWatcom'\lib286;'sPathWatcom'\lib286\os2;' 992 2121 call EnvVar_Set fRM, 'edpath', sPathWatcom'EDDAT;' … … 996 2125 */ 997 2126 2127 /* verify */ 2128 if (fCfg > 0) then 2129 do 2130 if ( \FileExists(sPathWatcom'\binp\wpp.exe', 'error: verify didn''t find'), 2131 | \FileExists(sPathWatcom'\binp\wcc.exe', 'error: verify didn''t find'), 2132 | \FileExists(sPathWatcom'\binp\wcc386.exe', 'error: verify didn''t find'), 2133 | \FileExists(sPathWatcom'\binp\wpp386.exe', 'error: verify didn''t find'), 2134 | \FileExists(sPathWatcom'\binp\wlink.exe', 'error: verify didn''t find'), 2135 | \FileExists(sPathWatcom'\lib286\os2\os2.lib', 'error: verify didn''t find'), 2136 | \FileExists(sPathWatcom'\lib386\os2\clbrdll.lib', 'error: verify didn''t find'), 2137 | \FileExists(sPathWatcom'\lib386\os2\clib3r.lib', 'error: verify didn''t find'), 2138 | \FileExists(sPathWatcom'\lib386\nt\kernel32.lib', 'error: verify didn''t find'), 2139 | \FileExists(sPathWatcom'\lib386\nt\clbrdll.lib', 'error: verify didn''t find'), 2140 | \FileExists(sPathWatcom'\lib386\nt\clib3r.lib', 'error: verify didn''t find'), 2141 ) then 2142 return 2; 2143 rc = CheckCmdOutput('wcc', 8, 'Watcom C16 Optimizing Compiler Version 11.0c'); 2144 if (rc = 0) then 2145 rc = CheckCmdOutput('wpp', 8, 'Watcom C++16 Optimizing Compiler Version 11.0c'); 2146 if (rc = 0) then 2147 rc = CheckCmdOutput('wcc386', 8, 'Watcom C32 Optimizing Compiler Version 11.0c'); 2148 if (rc = 0) then 2149 rc = CheckCmdOutput('wpp386', 8, 'Watcom C++32 Optimizing Compiler Version 11.0c'); 2150 if (rc = 0) then 2151 rc = CheckCmdOutput('wlink form ELF', 1, 'WATCOM Linker Version 11.0c'); 2152 return rc; 2153 end 998 2154 return 0; 999 2155
Note:
See TracChangeset
for help on using the changeset viewer.