Changeset 9204 for trunk/tools


Ignore:
Timestamp:
Sep 5, 2002, 3:06:07 AM (23 years ago)
Author:
bird
Message:

Use buildenv.cmd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/DailyBuild/odin32env.cmd

    r8789 r9204  
    1 /* $Id: odin32env.cmd,v 1.25 2002-06-26 22:13:14 bird Exp $
     1/* $Id: odin32env.cmd,v 1.26 2002-09-05 01:06:07 bird Exp $
    22 *
    33 * Sets the build environment.
     
    99 */
    1010
    11 parse arg sCompiler
    12     sCompiler = translate(sCompiler, 'abcdeghijklmnopqrstuvwxyz', 'ABCDEGHIJKLMNOPQRSTUVWXYZ');
    13 
    14     /*
    15      * To use this script you'll have to adjust some paths to match your local
    16      * installation. These paths are (mainly) called s<>Main or s<>Base, and usually
    17      * the only assignment statements in the configuration procedures below.
    18      *
    19      * In addition the CVSROOT, USER and HOME directories right below have to corrected.
    20      */
    21     call EnvVar_Set 0, 'CVSROOT',   ':pserver:bird@www.netlabs.org:/netlabs.cvs/odin32'
    22     call EnvVar_Set 0, 'HOME',      'e:/user/kso'
    23     call EnvVar_Set 0, 'USER',      'bird'
    24     call EnvVar_Set 0, 'HOSTNAME',  'Eniac'
    25     call EnvVar_Set 0, 'MULTIJOBS', '1'
    26 
    27 
    28     /*
    29      * Call the procedures which configure each tool.
    30      * (The order this is done is _very_ important!)
    31      */
    32     /*call Jade 0;
    33     call DocBookXML 0;*/
    34     call WarpIn 0;
    35     call mySQL 0;
    36     call Perl 0;
    37     call CVS 0;
    38     call DDKBase 0;
    39     call MSCV6 0;
    40     call EMX 0;
    41     if (sCompiler = 'watcom') then
    42     do /* watcom */
    43         say 'Watcom';
    44         call VAC308 1;
    45         call VAC365 1;
    46         call VAC40 1;
    47         call VAC365 0;
    48         call WatComC11c 0;
    49         call Toolkit40 0;
    50     end
    51     else if ((sCompiler = 'vac36') | (sCompiler = 'vac365')) then
    52     do /* vac36 */
    53         say 'VAC36(5)';
    54         call VAC308 1;
    55         call WatComC11c 1;
    56         call NetQOS2 0;
    57         call VAC40 1;
    58         call VAC365 0;
    59         call Toolkit40 0;
    60     end
    61     else if (sCompiler = 'vac40') then
    62     do /* vac40 */
    63         say 'VAC40';
    64         call VAC308 1;
    65         call WatComC11c 1;
    66         call NetQOS2 0;
    67         call VAC365 0;
    68         call Toolkit40 0;
    69         call VAC40 0;
    70     end
    71     else
    72     do /* default is vac30 */
    73         say 'VAC30';
    74         call VAC365 1;
    75         call WatComC11c 1;
    76         call VAC40 1;
    77         call VAC308 0;
    78         call Toolkit40 0;
    79     end
    80 
    81     call EnvVar_Set 0, 'DEBUG',      '1'
    82     call EnvVar_Set 0, 'BUILD_MODE', 'DEBUG'
    83     call EnvVar_Set 0, 'BUILD_PLATFORM', 'OS2'
     11    call BuildEnv 'warpin mysql perl cvs ddkbase mscv6 emx vac365õ watcomc11cõ vac40õ vac308 toolkit40 debug'
     12    'Set CVSROOT=:pserver:bird@www.netlabs.org:/netlabs.cvs/odin32';
     13    'Set MULTIJOBS=1';
    8414
    8515    exit(0);
    8616
    8717
    88 /**
    89  * The Directory Configuration Function.
    90  *
    91  * @returns Lower cased, absolute, backward slashed, path to program.
    92  * @param   sProgram    Program identifier. (lowercase!)
    93  *
    94  * @remark
    95  * Unless this causes a lot of trouble, we'll keep it in the script.
    96  * Having this externaly will slow down the script execution
    97  * somewhat I'm afraid. And the script is slow enought as it is.
    98  *
    99  */
    100 QueryPath: procedure
    101     parse arg sProgram
    102 
    103     select
    104         when (sProgram = 'cvs') then        return 'f:\cvs';
    105         when (sProgram = 'emx') then        return 'f:\emx';
    106         when (sProgram = 'emxpgcc') then    return 'f:\emxpgcc';
    107         when (sProgram = 'db2v52') then     return 'f:\sqllib52';
    108         when (sProgram = 'icatgam') then    return 'f:\icatos2';
    109         when (sProgram = 'icatgam406rc1') then return 'f:\icatos2.4.0.6.rc1';
    110         when (sProgram = 'icatpe') then     return 'f:\icatpe';
    111         when (sProgram = 'ida38') then      return 'f:\ida38';
    112         when (sProgram = 'ida40') then      return 'f:\ida401';
    113         when (sProgram = 'ida414') then     return 'f:\ida414';
    114         when (sProgram = 'idasdk') then     return 'f:\idasdk';
    115         when (sProgram = 'ddkbase') then    return 'f:\ddk\base';
    116         when (sProgram = 'mscv6') then      return 'f:\ddktools\toolkits\msc60';
    117         when (sProgram = 'mysql') then      return 'f:\mysql2';
    118         when (sProgram = 'netqos2') then    return 'f:\netqos2';
    119         when (sProgram = 'perl') then       return 'f:\perllib';
    120         when (sProgram = 'python') then     return 'f:\python';
    121         when (sProgram = 'toolkit40') then  return 'f:\toolkit';
    122         when (sProgram = 'toolkit45') then  return 'f:\toolkit45';
    123         when (sProgram = 'unixroot') then   return 'e:\unix';
    124         when (sProgram = 'xfree86') then    return 'e:\xfree86';
    125         when (sProgram = 'vac308') then     return 'f:\ibmcpp';
    126         when (sProgram = 'vac365') then     return 'f:\ibmcxxo';
    127         when (sProgram = 'vac40') then      return 'f:\ibmcpp40';
    128         when (sProgram = 'warpin') then     return 'f:\warpin';
    129         when (sProgram = 'watcom11') then   return 'f:\watcom';
    130         when (sProgram = 'watcom11c') then  return 'f:\watcom11c';
    131 
    132         otherwise
    133         do
    134             say 'Fatal error: Path information for program '''sProgram''' was not found.';
    135             exit(16);
    136         end
    137     end
    138 
    139     /* Should never get here */
    140 return '';
    141 
    142 
    143 
    144 /**
    145  * Environment procedures section
    146  **/
    147 
    148 
    149 /*
    150  * Concurrent Versions System (CVS)
    151  */
    152 CVS: procedure
    153     parse arg fRM
    154 
    155     /*
    156      * Concurrent Versions System (CVS) main directory.
    157      */
    158     sPathCVS    = QueryPath('cvs');
    159     call EnvVar_Set      fRM, 'PATH_CVS',    sPathCVS;
    160     call EnvVar_AddFront fRM, 'path',        sPathCVS'\bin;'
    161     call EnvVar_AddFront fRM, 'bookshelf',   sPathCVS'\book;'
    162 return 0;
    163 
    164 
    165 /*
    166  * EMX
    167  */
    168 EMX: procedure
    169     parse arg fRM
    170 
    171     /*
    172      * EMX/GCC main directory.
    173      */
    174     sEMX        = QueryPath('emx');
    175     sEMXBack    = translate(sEMX, '\', '/');
    176     sEMXForw    = translate(sEMX, '/', '\');
    177     call EnvVar_Set      fRM, 'PATH_EMX', sEMXBack;
    178     call EnvVar_Set      fRM, 'CCENV',      'EMX'
    179     call EnvVar_Set      fRM, 'BUILD_ENV',  'EMX'
    180     call EnvVar_Set      fRM, 'BUILD_PLATFORM', 'OS2'
    181 
    182     call EnvVar_AddFront fRM, 'BEGINLIBPATH',       sEMXBack'\dll;'
    183     call EnvVar_AddFront fRM, 'PATH',               sEMXBack'\bin;'
    184     call EnvVar_AddFront fRM, 'DPATH',              sEMXBack'\book;'
    185     call EnvVar_AddFront fRM, 'BOOKSHELF',          sEMXBack'\book;'
    186     call EnvVar_AddFront fRM, 'HELP',               sEMXBack'\help;'
    187     call EnvVar_AddFront fRM, 'C_INCLUDE_PATH',     sEMXForw'/include'
    188     call EnvVar_AddFront fRM, 'LIBRARY_PATH',       sEMXForw'/lib'
    189     call EnvVar_AddFront fRM, 'CPLUS_INCLUDE_PATH', sEMXForw'/include/cpp;'sEMXForw'/include'
    190     call EnvVar_Set      fRM, 'PROTODIR',           sEMXForw'/include/cpp/gen'
    191     call EnvVar_Set      fRM, 'OBJC_INCLUDE_PATH',  sEMXForw'/include'
    192     call EnvVar_Set      fRM, 'GCCLOAD',            '5'
    193     call EnvVar_Set      fRM, 'GCCOPT',             '-pipe'
    194     call EnvVar_AddFront fRM, 'INFOPATH',           sEMXForw'/info'
    195     call EnvVar_Set      fRM, 'EMXBOOK',            'emxdev.inf+emxlib.inf+emxgnu.inf+emxbsd.inf'
    196     call EnvVar_AddFront fRM, 'HELPNDX',            'emxbook.ndx', '+', 1
    197     call EnvVar_Set      fRM, 'EMXOPT',             '-c -n -h1024'
    198     if EnvVar_Get('TERM') = '' then do
    199         call EnvVar_Set  fRM, 'TERM',               'ansi'
    200         call EnvVar_Set  fRM, 'TERMCAP',            sEMXForw'/etc/termcap.dat'
    201     end
    202 
    203 return 0;
    204 
    205 
    206 /*
    207  * EMX PGCC - must be installed on to the ordinar EMX.
    208  */
    209 EMXPGCC: procedure
    210     parse arg fRM
    211 
    212     /*
    213      * EMX/GCC main directory.
    214      */
    215     sEMXPGCC    = QueryPath('emxpgcc');
    216     sEMXBack    = translate(sEMXPGCC, '\', '/');
    217     sEMXForw    = translate(sEMXPGCC, '/', '\');
    218     call EnvVar_Set      fRM, 'PATH_EMXPGCC',   sEMXBack;
    219     call EnvVar_Set      fRM, 'CCENV',          'EMX'
    220     call EnvVar_Set      fRM, 'BUILD_ENV',      'EMX'
    221     call EnvVar_Set      fRM, 'BUILD_PLATFORM', 'OS2'
    222 
    223     call EnvVar_AddFront fRM, 'BEGINLIBPATH',       sEMXBack'\dll;'
    224     call EnvVar_AddFront fRM, 'PATH',               sEMXBack'\bin;'
    225     call EnvVar_AddFront fRM, 'DPATH',              sEMXBack'\book;'
    226     call EnvVar_AddFront fRM, 'BOOKSHELF',          sEMXBack'\book;'
    227     call EnvVar_AddFront fRM, 'HELP',               sEMXBack'\help;'
    228     call EnvVar_AddFront fRM, 'C_INCLUDE_PATH',     sEMXForw'/include'
    229     call EnvVar_AddFront fRM, 'LIBRARY_PATH',       sEMXForw'/lib'
    230     call EnvVar_AddFront fRM, 'CPLUS_INCLUDE_PATH', sEMXForw'/include/cpp;'sEMXForw'/include'
    231     call EnvVar_Set      fRM, 'PROTODIR',           sEMXForw'/include/cpp/gen'
    232     call EnvVar_Set      fRM, 'OBJC_INCLUDE_PATH',  sEMXForw'/include'
    233     call EnvVar_AddFront fRM, 'INFOPATH',           sEMXForw'/info'
    234     call EnvVar_Set      fRM, 'EMXBOOK',            'emxdev.inf+emxlib.inf+emxgnu.inf+emxbsd.inf'
    235     call EnvVar_AddFront fRM, 'HELPNDX',            'emxbook.ndx', '+', 1
    236 
    237 return 0;
    238 
    239 /*
    240  * IBM DB2 v5.2
    241  */
    242 db2v52: procedure
    243     parse arg fRM
    244     sPathDB2   = QueryPath('db2v52');
    245     call EnvVar_Set      fRm, 'PATH_DB2',    sPathDB2;
    246     call EnvVar_Set      fRm, 'db2path',     sPathDB2;
    247     call EnvVar_AddFront fRm, 'beginlibpath',sPathDB2'\dll;'sPathDB2'\alt;'
    248     call EnvVar_AddFront fRm, 'path',        sPathDB2'\bin;'sPathDB2'\alt;'
    249     call EnvVar_AddFront fRm, 'dpath',       sPathDB2'\bin;'sPathDB2';'
    250     call EnvVar_AddFront fRm, 'help',        sPathDB2'\help;'
    251     call EnvVar_AddEnd   fRm, 'classpath',   '.;'sPathDB2'\JAVA\DB2JAVA.ZIP;'sPathDB2'\JAVA\RUNTIME.ZIP;'sPathDB2'\JAVA\SQLJ.ZIP;'
    252     call EnvVar_Set      fRM, 'db2instace',  'DB2'
    253     /*call EnvVar_Set      fRM, 'odbc_path',   'f:\odbc' -- huh? what's this? */
    254     call EnvVar_AddFront fRM, 'cobcpy',      sPathDB2'\include\cobol_mf'
    255     call EnvVar_Set      fRM, 'finclude',    sPathDB2'\include'
    256     call EnvVar_AddFront fRM, 'include',     sPathDB2'\include;'
    257     call EnvVar_AddFront fRM, 'lib',         sPathDB2'\lib;'
    258 return 0;
    259 
    260 
    261 /*
    262  * ICAT Debugger
    263  */
    264 ICATGam: procedure
    265     parse arg fRM
    266     sPathICAT   = QueryPath('icatgam');
    267     call EnvVar_Set      fRm, 'PATH_ICATGAM', sPathICAT;
    268     call EnvVar_AddFront fRm, 'beginlibpath',sPathICAT'\dll;'
    269     call EnvVar_AddFront fRm, 'path',        sPathICAT'\bin;'
    270     call EnvVar_AddFront fRm, 'dpath',       sPathICAT'\help;'
    271     call EnvVar_AddFront fRm, 'help',        sPathICAT'\help;'
    272 return 0;
    273 
    274 
    275 /*
    276  * ICAT Debugger
    277  */
    278 ICATGam406RC1: procedure
    279     parse arg fRM
    280     sPathICAT   = QueryPath('icatgam406rc1');
    281     call EnvVar_Set      fRm, 'PATH_ICATGAM', sPathICAT;
    282     call EnvVar_AddFront fRm, 'beginlibpath',sPathICAT'\dll;'
    283     call EnvVar_AddFront fRm, 'path',        sPathICAT'\bin;'
    284     call EnvVar_AddFront fRm, 'dpath',       sPathICAT'\help;'
    285     call EnvVar_AddFront fRm, 'help',        sPathICAT'\help;'
    286 return 0;
    287 
    288 
    289 
    290 /*
    291  * ICAT Debugger for PE images.
    292  */
    293 ICATPe: procedure
    294     parse arg fRM
    295     sPathICAT   = QueryPath('icatgam');
    296     sPathICATPe = QueryPath('icatpe');
    297     call EnvVar_Set      fRm, 'PATH_ICATGAM',sPathICAT;
    298     call EnvVar_Set      fRm, 'PATH_ICATPE', sPathICATPe;
    299     call EnvVar_AddFront fRm, 'beginlibpath',sPathICATPe'\bin;'sPathICAT'\dll;'
    300     call EnvVar_AddFront fRm, 'path',        sPathICATPe'\bin;'sPathICAT'\bin;'
    301     call EnvVar_AddFront fRm, 'dpath',       sPathICATPe'\bin;'sPathICAT'\help;'
    302     call EnvVar_AddFront fRm, 'help',        sPathICATPe'\bin;'sPathICAT'\help;'
    303 return 0;
    304 
    305 
    306 
    307 /*
    308  * Interactive Disassembler (IDA) v3.80a
    309  */
    310 IDA38: procedure
    311     parse arg fRM
    312     /*
    313      * IDA main directory.
    314      */
    315     sPathIDA = QueryPath('ida38');
    316     call EnvVar_Set      fRM, 'PATH_IDA',       sPathIDA
    317     call EnvVar_AddFront fRM, 'path',           sPathIDA
    318     call EnvVar_AddFront fRM, 'beginlibpath',   sPathIDA
    319 return 0;
    320 
    321 
    322 /*
    323  * Interactive Disassembler (IDA) v4.01
    324  */
    325 IDA40: procedure
    326     parse arg fRM
    327     /*
    328      * IDA main directory.
    329      */
    330     sPathIDA = QueryPath('ida40');
    331     call EnvVar_Set      fRM, 'PATH_IDA',       sPathIDA
    332     call EnvVar_AddFront fRM, 'path',           sPathIDA
    333     call EnvVar_AddFront fRM, 'beginlibpath',   sPathIDA
    334 return 0;
    335 
    336 
    337 /*
    338  * Interactive Disassembler (IDA) v4.14
    339  */
    340 IDA414: procedure
    341     parse arg fRM
    342     /*
    343      * IDA main directory.
    344      */
    345     sPathIDA = QueryPath('ida414');
    346     call EnvVar_Set      fRM, 'PATH_IDA',       sPathIDA
    347     call EnvVar_AddFront fRM, 'path',           sPathIDA
    348     call EnvVar_AddFront fRM, 'beginlibpath',   sPathIDA
    349 return 0;
    350 
    351 
    352 /*
    353  * Interactive Disassembler (IDA) Plugin SDK (v5.0?)
    354  */
    355 IDASDK: procedure
    356     parse arg fRM
    357     /*
    358      * IDA main directory.
    359      */
    360     sPathIDASDK = QueryPath('idasdk');
    361     call EnvVar_Set      fRM, 'PATH_IDASDK',    sPathIDASDK
    362     call EnvVar_AddFront fRM, 'include',        sPathIDASDK'\include;'
    363     call EnvVar_AddFront fRM, 'lib',            sPathIDASDK'\libwat.os2;'
    364     call EnvVar_AddFront fRM, 'path',           sPathIDASDK'\bin\os2;'
    365     call EnvVar_AddFront fRM, 'beginlibpath',   sPathIDASDK'\bin\os2;'
    366 return 0;
    367 
    368 
    369 /*
    370  *  Device Driver Kit (DDK) base.
    371  */
    372 DDKBase: procedure
    373     parse arg fRM
    374 
    375     /*
    376      * Device Driver Kit (DDK) (v4.0+) base (important not main) directory.
    377      */
    378     sPathDDKBase    = QueryPath('ddkbase');
    379     call EnvVar_Set      fRM, 'PATH_DDKBASE',sPathDDKBase;
    380     call EnvVar_AddFront fRM, 'path',        sPathDDKBase'\tools;'
    381     call EnvVar_AddFront fRM, 'include',     sPathDDKBase'\h;'sPathDDKBase'\inc;'sPathDDKBase'\inc32;'
    382     call EnvVar_AddFront fRM, 'include16',   sPathDDKBase'\h;'
    383     call EnvVar_AddFront fRM, 'lib',         sPathDDKBase'\lib;'
    384     call EnvVar_AddFront fRM, 'bookshelf',   sPathDDKBase'\..\docs;'
    385 
    386 return 0;
    387 
    388 
    389 
    390 /*
    391  * Microsoft C v6.0a
    392  */
    393 MSCV6: procedure
    394     parse arg fRM
    395 
    396     /*
    397      * Microsoft C v6.0a main directory.
    398      */
    399     sPathMSC    = QueryPath('mscv6');
    400     call EnvVar_Set      fRM, 'BUILD_ENV',  'MSCV6'
    401     call EnvVar_Set      fRM, 'BUILD_PLATFORM', 'OS2'
    402     call EnvVar_Set      fRM, 'PATH_MSC',   sPathMSC;
    403     call EnvVar_AddFront fRM, 'path',       sPathMSC'\binp;'
    404     call EnvVar_AddFront fRM, 'include',    sPathMSC'\include;'
    405     call EnvVar_AddFront fRM, 'include16',  sPathMSC'\include;'
    406     call EnvVar_AddFront fRM, 'lib',        sPathMSC'\lib;'
    407 return 0;
    408 
    409 
    410 
    411 /*
    412  * mySQL Database system
    413  */
    414 mySQL: procedure
    415     parse arg fRM
    416 
    417     /*
    418      * mySQL Database system main directory.
    419      */
    420     sPathMySQL    = QueryPath('mysql');
    421     call EnvVar_Set      fRM, 'PATH_MYSQL',     sPathMySQL;
    422     call EnvVar_AddFront fRM, 'path',           sPathMySQL'\bin;'
    423     call EnvVar_AddFront fRM, 'beginlibpath',   sPathMySQL'\dll;'
    424     call EnvVar_AddFront fRM, 'include',        sPathMySQL'\include;'
    425     call EnvVar_AddFront fRM, 'bookshelf',      sPathMySQL'\doc;'sPathMySQL'\book';
    426     /*call EnvVar_AddFront fRM, 'lib',            sPathMySQL'\lib;'*/
    427 return 0;
    428 
    429 
    430 
    431 /*
    432  * NetQOS2 - help subsystem++ for VAC 3.6.5 and VAC 4.0
    433  */
    434 NetQOS2: procedure
    435     sPathNetQOS2 = QueryPath('netqos2');
    436     call EnvVar_Set      fRM, 'PATH_NETQOS2',   sPathNetQOS2
    437     call EnvVar_AddFront fRM, 'path',           sPathNetQOS2';'
    438     call EnvVar_AddFront fRM, 'dpath',          sPathNetQOS2';'
    439     call EnvVar_AddFront fRM, 'beginlibpath',   sPathNetQOS2';'
    440     call EnvVar_Set      fRM, 'imndatasrv',     sPathNetQOS2'\DATA'
    441     call EnvVar_Set      fRM, 'imndatacl',      sPathNetQOS2'\DATA'
    442     call EnvVar_Set      fRM, 'imnworksrv',     sPathNetQOS2'\WORK'
    443     call EnvVar_Set      fRM, 'imnworkcl',      sPathNetQOS2'\WORK'
    444     call EnvVar_Set      fRM, 'imnnlpssrv',     sPathNetQOS2
    445     call EnvVar_Set      fRM, 'imnnlpscl',      sPathNetQOS2
    446     call EnvVar_Set      fRM, 'imncccfgfile',   'NETQ.CFG'
    447     call EnvVar_Set      fRM, 'imncscfgfile',   'NETQ.CFG'
    448     call EnvVar_Set      fRM, 'imqconfigsrv',   sPathNetQOS2'\instance'
    449     call EnvVar_Set      fRM, 'imqconfigcl',    sPathNetQOS2'\instance\dbcshelp'
    450 return 0;
    451 
    452 
    453 
    454 /*
    455  * PERL 5005_53
    456  */
    457 Perl: procedure
    458     parse arg fRM
    459 
    460     /*
    461      * Perl main directory.
    462      */
    463 /* BAD
    464     sPathPerl       = QueryPath('perl');
    465     sPathPerlForw   = translate(sPathPerl, '/', '\');
    466     call EnvVar_Set      fRM, 'PATH_PERL',      sPathPerl;
    467     call EnvVar_AddFront fRM, 'path',           sPathPerl'\bin;'
    468     call EnvVar_AddFront fRM, 'beginlibpath',   sPathPerl'\dll;'
    469     call EnvVar_AddEnd   fRM, 'bookshelf',      sPathPerl'\book;'
    470     call EnvVar_Set      fRM, 'perllib_prefix', sPathPerlForw'/lib;'sPathPerl'\lib'
    471     call EnvVar_Set      fRM, 'perl5lib',       sPathPerlForw'/lib/site_perl/5.00553/os2;'sPathPerlForw'/lib/site_perl/5.00553'
    472     call EnvVar_Set      fRM, 'perl5load',      '2'
    473     call EnvVar_Set      fRM, 'perl_sh_dir',    sPathPerlForw'/bin_sh/sh.exe'
    474     call EnvVar_Set      fRM, 'manpath',        sPathPerlForw'/man'
    475     call EnvVar_Set      fRM, 'perl_badlang',   '0'
    476 /*    call EnvVar_Set      fRM, 'LANG',           'en_US' /* dirty fix... */*/
    477 */
    478 /* seems ok */
    479     sPathPerl       = QueryPath('perl');
    480     sPathPerlForw   = translate(sPathPerl, '/', '\');
    481     call EnvVar_Set      fRM, 'PATH_PERL',      sPathPerl;
    482     call EnvVar_AddFront fRM, 'path',           sPathPerl'\bin;'
    483     call EnvVar_AddFront fRM, 'beginlibpath',   sPathPerl'\dll;'
    484     call EnvVar_AddEnd   fRM, 'bookshelf',      sPathPerl'\book;'
    485     call EnvVar_Set      fRM, 'perllib_prefix', sPathPerlForw'/lib;'sPathPerlForw'/lib'
    486     call EnvVar_Set      fRM, 'perl_sh_dir',    sPathPerlForw'/bin_sh'
    487     call EnvVar_Set      fRM, 'manpath',        sPathPerlForw'/man'
    488     call EnvVar_Set      fRM, 'perl5lib',       sPathPerlForw'/lib'
    489     call EnvVar_Set      fRM, 'perl_badlang',   '0'
    490 return 0;
    491 
    492 
    493 /*
    494  * Python/2 v1.5.2
    495  */
    496 Python: procedure
    497     parse arg fRM
    498 
    499     /*
    500      * The Python Home directory
    501      */
    502     sPythonHome = QueryPath('python');
    503     call EnvVar_Set      fRM, 'PATH_PYTHON',    sPythonHome
    504     call EnvVar_Set      fRM, 'pythonhome',     sPythonHome
    505     call EnvVar_Set      fRM, 'pythonpath',     '.;'sPythonHome'\Lib;'sPythonHome'\Lib\plat-win;'sPythonHome'\Lib\lib-tk;'sPythonHome'\Lib\lib-dynload;'sPythonHome'\Lib\site-packages;'sPythonHome'\Lib\dos-8x3'
    506     call EnvVar_AddFront fRM, 'beginlibpath',   sPythonHome
    507     call EnvVar_AddFront fRM, 'path',           sPythonHome
    508 
    509 return 0;
    510 
    511 
    512 /*
    513  * OS/2 Programmers Toolkit v4.0 (CSD1/4)
    514  */
    515 Toolkit40: procedure
    516     parse arg fRM
    517 
    518     /*
    519      * Toolkit (4.0) main directory.
    520      */
    521     sPathTK    = QueryPath('toolkit40');
    522     call EnvVar_Set      fRM, 'PATH_TOOLKIT',  sPathTK;
    523 
    524     call EnvVar_AddFront fRM, 'beginlibpath',   sPathTK'\BETA\DLL;'sPathTK'\SAMPLES\MM\DLL;'sPathTK'\SAMPLES\OPENDOC\PARTS\DLL;'sPathTK'\SOM\COMMON\DLL;'sPathTK'\SOM\LIB;'sPathTK'\OPENDOC\BASE\DLL;'sPathTK'\OPENDOC\BASE\LOCALE\EN_US;'sPathTK'\DLL;'
    525     call EnvVar_AddFront fRM, 'path',           sPathTK'\BETA\BIN;'sPathTK'\SOM\COMMON;'sPathTK'\SOM\BIN;.;'sPathTK'\OPENDOC\BASE\BIN;'sPathTK'\BIN;'
    526     call EnvVar_AddFront fRM, 'dpath',          sPathTK'\SOM\COMMON\SYSTEM;'sPathTK'\SOM\MSG;'sPathTK'\OPENDOC\BASE\MSG;'sPathTK'\BOOK;'sPathTK'\MSG;'
    527     call EnvVar_AddFront fRM, 'help',           sPathTK'\BETA\HELP;'sPathTK'\OPENDOC\BASE\LOCALE\EN_US;'sPathTK'\HELP;'
    528     call EnvVar_AddFront fRM, 'bookshelf',      sPathTK'\BETA\BOOK;'sPathTK'\BOOK;'sPathTK'\ARCHIVED;'
    529     call EnvVar_AddFront fRM, 'somir',          sPathTK'\SOM\COMMON\ETC\214\SOM.IR;'sPathTK'\OPENDOC\BASE\AVLSHELL.IR;'
    530     call EnvVar_AddEnd   fRM, 'somir',          sPathTK'\OPENDOC\CUSTOM\OD.IR;'sPathTK'\SAMPLES\REXX\SOM\ANIMAL\ORXSMP.IR;'
    531     call EnvVar_AddFront fRM, 'include',        sPathTK'\SPEECH\H;'sPathTK'\BETA\H;'sPathTK'\SAMPLES\OPENDOC\PARTS\INCLUDE;'sPathTK'\SOM\INCLUDE;'sPathTK'\INC;'sPathTK'\H\GL;'sPathTK'\H;'
    532     call EnvVar_AddEnd   fRM, 'include',        sPathTK'\H\LIBC;.;'
    533     call EnvVar_AddFront fRM, 'lib',            sPathTK'\SPEECH\LIB;'sPathTK'\SAMPLES\MM\LIB;'sPathTK'\LIB;'sPathTK'\SOM\LIB;'sPathTK'\OPENDOC\BASE\LIB;'
    534     call EnvVar_AddFront fRM, 'nlspath',        sPathTK'\OPENDOC\BASE\LOCALE\EN_US\%N;'sPathTK'\MSG\%N;C:\MPTN\MSG\NLS\%N;C:\TCPIP\msg\ENUS850\%N;'
    535     call EnvVar_AddFront fRM, 'locpath',        sPathTK'\OPENDOC\BASE\LOCALE;'
    536     call EnvVar_AddFront fRM, 'ipfc',           sPathTK'\IPFC;'
    537     call EnvVar_Set      fRM, 'odbase',         sPathTK'\OPENDOC\BASE'
    538     call EnvVar_Set      fRM, 'odlang',         'en_US'
    539     call EnvVar_AddFront fRM, 'odbasepaths',    sPathTK'\OPENDOC\BASE;'
    540     call EnvVar_Set      fRM, 'odcfg',          sPathTK'\OPENDOC\CUSTOM'
    541     call EnvVar_Set      fRM, 'odtmp',          EnvVar_Get('tmp');
    542     call EnvVar_Set      fRM, 'sombase',        sPathTK'\SOM'
    543     call EnvVar_Set      fRM, 'somruntime',     sPathTK'\SOM\COMMON'
    544 
    545     call EnvVar_Set      fRM, 'cpref',          'CP1.INF+CP2.INF+CP3.INF'
    546     call EnvVar_Set      fRM, 'gpiref',         'GPI1.INF+GPI2.INF+GPI3.INF+GPI4.INF'
    547     call EnvVar_Set      fRM, 'mmref',          'MMREF1.INF+MMREF2.INF+MMREF3.INF'
    548     call EnvVar_Set      fRM, 'pmref',          'PM1.INF+PM2.INF+PM3.INF+PM4.INF+PM5.INF'
    549     call EnvVar_Set      fRM, 'wpsref',         'WPS1.INF+WPS2.INF+WPS3.INF'
    550     call EnvVar_AddFront fRM, 'sminclude',      sPathTK'\H;'sPathTK'\IDL;'sPathTK'\SOM\INCLUDE;.;'sPathTK'\OPENDOC\BASE\INCLUDE;'sPathTK'\SAMPLES\OPENDOC\PARTS\INCLUDE;'
    551     call EnvVar_Set      fRM, 'smaddstar',      '1'
    552     call EnvVar_Set      fRM, 'smemit',         'h;ih;c'
    553     call EnvVar_Set      fRM, 'smtmp',          EnvVar_Get('tmp');
    554     call EnvVar_Set      fRM, 'smclasses',      'WPTYPES.IDL'
    555     call EnvVar_Set      fRM, 'odparts',        sPathTK'\SAMPLES\OPENDOC\PARTS'
    556     call EnvVar_Set      fRM, 'odsrc',          sPathTK'\SAMPLES\OPENDOC\PARTS'
    557     call EnvVar_AddFront fRM, 'odpartspaths',   sPathTK'\SAMPLES\OPENDOC\PARTS;'
    558     call EnvVar_AddFront fRM, 'odsrcpaths',     sPathTK'\SAMPLES\OPENDOC\PARTS;'
    559     /*
    560     call EnvVar_Set      fRM, 'CAT_MACHINE=COM1:57600'
    561     call EnvVar_Set      fRM, 'CAT_HOST_BIN_PATH='sPathTK'\BIN'
    562     call EnvVar_Set      fRM, 'CAT_COMMUNICATION_TYPE=ASYNC_SIGBRK'
    563     call EnvVar_AddFront fRM, 'CAT_HOST_SOURCE_PATH='sPathTK'\BIN;'
    564     */
    565 return 0;
    566 
    567 
    568 
    569 /*
    570  * OS/2 Programmers Toolkit v4.5
    571  */
    572 Toolkit45: procedure
    573     parse arg fRM
    574 
    575     /*
    576      * Toolkit (4.5) main directory.
    577      */
    578      sPathTK    = QueryPath('toolkit45');
    579     call EnvVar_Set      fRM, 'PATH_TOOLKIT',  sPathTK;
    580 
    581     call EnvVar_AddFront fRM, 'path',        sPathTK'\bin;'
    582     call EnvVar_AddFront fRM, 'dpath',       sPathTK'\book;'
    583     call EnvVar_AddFront fRM, 'dpath',       sPathTK'\msg;'
    584     call EnvVar_AddFront fRM, 'beginlibpath', sPathTK'\dll;'
    585     call EnvVar_AddFront fRM, 'help',        sPathTK'\help;'
    586     call EnvVar_AddFront fRM, 'bookshelf',   sPathTK'\archived;'
    587     call EnvVar_AddFront fRM, 'bookshelf',   sPathTK'\book;'
    588     call EnvVar_AddFront fRM, 'nlspath',     sPathTK'\msg\%N;'
    589     call EnvVar_AddEnd   fRM, 'ulspath',     sPathTK'\language;'
    590     call EnvVar_AddFront fRM, 'include',     sPathTK'\H;'
    591     call EnvVar_AddFront fRM, 'include',     sPathTK'\H\GL;'
    592     call EnvVar_AddFront fRM, 'include',     sPathTK'\SPEECH\H;'
    593     call EnvVar_AddFront fRM, 'include',     sPathTK'\H\RPC;'
    594     call EnvVar_AddFront fRM, 'include',     sPathTK'\H\NETNB;'
    595     call EnvVar_AddFront fRM, 'include',     sPathTK'\H\NETINET;'
    596     call EnvVar_AddFront fRM, 'include',     sPathTK'\H\NET;'
    597     call EnvVar_AddFront fRM, 'include',     sPathTK'\H\ARPA;'
    598     call EnvVar_AddFront fRM, 'include',     sPathTK'\INC;'
    599     call EnvVar_AddEnd   fRM, 'lib',         sPathTK'\SAMPLES\MM\LIB;'
    600     call EnvVar_AddEnd   fRM, 'lib',         sPathTK'\SPEECH\LIB;'
    601     call EnvVar_AddFront fRM, 'lib',         sPathTK'\lib;'
    602     call EnvVar_AddFront fRM, 'helpndx',     'EPMKWHLP.NDX+', '+'
    603     call EnvVar_AddFront fRM, 'ipfc',        sPathTK'\ipfc;'
    604     call EnvVar_Set      fRM, 'LANG',        'en_us'
    605     call EnvVar_Set      fRM, 'CPREF',       'CP1.INF+CP2.INF+CP3.INF'
    606     call EnvVar_Set      fRM, 'GPIREF',      'GPI1.INF+GPI2.INF+GPI3.INF+GPI4.INF'
    607     call EnvVar_Set      fRM, 'MMREF',       'MMREF1.INF+MMREF2.INF+MMREF3.INF'
    608     call EnvVar_Set      fRM, 'PMREF',       'PM1.INF+PM2.INF+PM3.INF+PM4.INF+PM5.INF'
    609     call EnvVar_Set      fRM, 'WPSREF',      'WPS1.INF+WPS2.INF+WPS3.INF'
    610     /*
    611     call EnvVar_Set      fRM, 'CAT_MACHINE', 'COM1:57600'
    612     call EnvVar_Set      fRM, 'CAT_HOST_BIN_PATH', TKMAIN'\BIN'
    613     call EnvVar_Set      fRM, 'CAT_COMMUNICATION_TYPE', 'ASYNC_SIGBRK'
    614     call EnvVar_Set      fRM, 'CAT_HOST_SOURCE_PATH',TKMAIN'\BIN;'
    615     */
    616 
    617 return 0;
    618 
    619 
    620 /**
    621  * This will envolve into an full UNIX like environment some day perhaps...
    622  */
    623 Unix: procedure
    624     parse arg fRM
    625 
    626     /*
    627      * Unix root directory.
    628      */
    629     sUnixBack = QueryPath('unixroot');
    630     sUnixForw = translate(sUnixBack, '/', '\');
    631     call EnvVar_Set      fRM, 'PATH_UNIX',          sUnixBack
    632     call EnvVar_Set      fRM, 'unixroot',           sUnixBack
    633     call EnvVar_AddFront fRM, 'path',               sUnixBack'\bin;'sUnixBack'\usr\local\bin;'
    634     call EnvVar_AddFront fRM, 'beginlibpath',       sUnixBack'\dll;'
    635     call EnvVar_Set      fRM, 'groff_font_path',    sUnixForw'/lib/groff/font'
    636     call EnvVar_Set      fRM, 'groff_tmac_path',    sUnixForw'/lib/groff/tmac'
    637     call EnvVar_Set      fRM, 'refer',              sUnixForw'/lib/groff/dict/papers/ind'
    638 
    639     call EnvVar_Set      fRM, 'editor',             'e:/verkty/boxer/b2.exe -Vr25'
    640 
    641     /*
    642      * XFree86 main directory.
    643      */
    644     sXF86Back = QueryPath('xfree86');
    645     sXF86Forw = translate(sXF86Back, '/', '\');
    646     call EnvVar_Set      fRM, 'PATH_XFREE86',       sXF86Back
    647     call EnvVar_AddFront fRM, 'C_INCLUDE_PATH',     sXF86Forw'/include'
    648     call EnvVar_AddFront fRM, 'CPLUS_INCLUDE_PATH', sXF86Forw'/include'
    649     call EnvVar_Set      fRM, 'OBJC_INCLUDE_PATH',  sXF86Forw'/include'
    650     call EnvVar_AddFront fRM, 'LIBRARY_PATH',       sXF86Forw'/lib'
    651 
    652 return EMX(fRM);
    653 
    654 
    655 
    656 /*
    657  * IBM Visual Age for C++ v3.08 for OS/2
    658  */
    659 VAC308: procedure
    660     parse arg fRM
    661 
    662     /*
    663      * IBM Visual Age for C++ Version 3.08 main directory.
    664      */
    665     sPathCPP = QueryPath('vac308');
    666     call EnvVar_Set      fRM, 'PATH_VAC308',    sPathCPP
    667     call EnvVar_Set      fRM, 'CCENV',      'VAC3'
    668     call EnvVar_Set      fRM, 'BUILD_ENV',  'VAC308'
    669     call EnvVar_Set      fRM, 'BUILD_PLATFORM', 'OS2'
    670 
    671     call EnvVar_AddFront fRM, 'beginlibpath',   sPathCPP'\DLL;'sPathCPP'\SAMPLES\TOOLKIT\DLL;'
    672     call EnvVar_AddFront fRM, 'path',           sPathCPP'\BIN;'sPathCPP'\SMARTS\SCRIPTS;'sPathCPP'\HELP;'
    673     call EnvVar_AddFront fRM, 'dpath',          sPathCPP'\HELP;'sPathCPP';'sPathCPP'\LOCALE;'sPathCPP'\MACROS;'sPathCPP'\BND;'
    674     call EnvVar_AddFront fRM, 'help',           sPathCPP'\HELP;'sPathCPP'\SAMPLES\TOOLKIT\HELP;'
    675     call EnvVar_AddFront fRM, 'bookshelf',      sPathCPP'\HELP;'
    676     call EnvVar_AddFront fRM, 'somir',          sPathCPP'\ETC\SOM.IR;'
    677     call EnvVar_AddFront fRM, 'cpphelp_ini',    'C:\OS2\SYSTEM'
    678     call EnvVar_AddFront fRM, 'locpath',        sPathCPP'\LOCALE;%LOCPATH%;'
    679     call EnvVar_AddFront fRM, 'include',        sPathCPP'\INCLUDE;'sPathCPP'\INCLUDE\OS2;'sPathCPP'\INC;'sPathCPP'\INCLUDE\SOM;'
    680     call EnvVar_AddFront fRM, 'sminclude',      sPathCPP'\INCLUDE\OS2;'sPathCPP'\INCLUDE;'sPathCPP'\INCLUDE\SOM;'
    681 
    682     call EnvVar_AddFront fRM, 'vbpath',         '.;'sPathCPP'\DDE4VB;'
    683     call EnvVar_Set      fRM, 'tmpdir',         EnvVar_Get('tmp')
    684     call EnvVar_Set      fRM, 'lxevfref',       'EVFELREF.INF+LPXCREF.INF'
    685     call EnvVar_Set      fRM, 'lxevfhdi',       'EVFELHDI.INF+LPEXHDI.INF'
    686     call EnvVar_AddFront fRM, 'lpath',          sPathCPP'\MACROS;'
    687     call EnvVar_AddFront fRM, 'codelpath',      sPathCPP'\CODE\MACROS;'sPathCPP'\MACROS;'
    688     call EnvVar_Set      fRM, 'clref',          'CPPCLRF.INF+CPPDAT.INF+CPPAPP.INF+CPPWIN.INF+CPPCTL.INF+CPPADV.INF+CPP2DG.INF+CPPDDE.INF+CPPDM.INF+CPPMM.INF+CPPCLRB.INF'
    689     call EnvVar_AddFront fRM, 'ipfc',           sPathCPP'\IPFC'
    690     call EnvVar_AddFront fRM, 'lib',            sPathCPP'\LIB;'sPathCPP'\DLL;'
    691     call EnvVar_Set      fRM, 'cpplocal',       sPathCPP
    692     call EnvVar_Set      fRM, 'cppmain',        sPathCPP
    693     call EnvVar_Set      fRM, 'cppwork',        sPathCPP
    694     call EnvVar_Set      fRM, 'iwf.default_prj','CPPDFTPRJ'
    695 
    696     call EnvVar_Set      fRM, 'iwf.solution_lang_support', 'CPPIBS30;ENG'
    697     call EnvVar_Set      fRM, 'vacpp_shared'    'FALSE'
    698     call EnvVar_Set      fRM, 'iwfhelp',        'IWFHDI.INF'
    699     call EnvVar_Set      fRM, 'iwfopt',         sPathCPP
    700 
    701     call EnvVar_Set      fRM, 'somruntime',     sPathCPP'\DLL'
    702     call EnvVar_Set      fRM, 'smaddstar',      '1'
    703     call EnvVar_Set      fRM, 'smemit',         'h;ih;c'
    704     call EnvVar_Set      fRM, 'sombase',        sPathCPP
    705     call EnvVar_Set      fRM, 'smtmp',          EnvVar_Get('tmp')
    706     call EnvVar_Set      fRM, 'smclasses',      'WPTYPES.IDL'
    707 
    708     /* FIXME THESE USES '+' AS SEPERATOR NOT ';'!!! */
    709     call EnvVar_AddFront fRM, 'helpndx',        'EPMKWHLP.NDX+CPP.NDX+CPPBRS.NDX', '+'
    710     call EnvVar_AddFront fRM, 'ipf_keys',       'SHOWNAV'
    711 
    712 
    713 return 0;
    714 
    715 
    716 
    717 /*
    718  * Visual Age / C and C++ tools v3.6.5 for OS/2
    719  */
    720 VAC365: procedure
    721     parse arg fRM
    722 
    723     /*
    724      * IBM C/C++ Compiler and Tools Version 3.6.5 main directory.
    725      */
    726     sPathCxx    = QueryPath('vac365');
    727     call EnvVar_Set      fRM, 'PATH_VAC365', sPathCxx;
    728     call EnvVar_Set      fRM, 'CCENV',      'VAC36'
    729     call EnvVar_Set      fRM, 'BUILD_ENV',  'VAC365'
    730     call EnvVar_Set      fRM, 'BUILD_PLATFORM', 'OS2'
    731 
    732     call EnvVar_Set      fRM, 'cxxmain',     sPathCxx;
    733     call EnvVar_AddFront fRM, 'path',        sPathCxx'\bin;'
    734     call EnvVar_AddFront fRM, 'dpath',       sPathCxx'\local;'sPathCxx'\help;'
    735     call EnvVar_AddFront fRM, 'beginlibpath',sPathCxx'\dll;'sPathCxx'\runtime;'
    736     call EnvVar_AddFront fRM, 'nlspath',     sPathCxx'\msg\%N;'
    737     call EnvVar_AddFront fRM, 'include',     sPathCxx'\include;'
    738     call EnvVar_AddFront fRM, 'lib',         sPathCxx'\lib;'
    739     call EnvVar_AddFront fRM, 'ipfc',        sPathCxx'\ipfc;'
    740     call EnvVar_Set      fRM, 'LANG',        'en_us'
    741     call EnvVar_Set      fRM, 'CPP_DBG_LANG', 'CPP'
    742 
    743 return 0;
    744 
    745 
    746 /*
    747  * Visual Age for C++ v4.0 for OS/2
    748  */
    749 VAC40: procedure
    750     parse arg fRM
    751 
    752     /*
    753      * IBM VisualAge for C++ v4.0 main directory.
    754      */
    755     sPathCPP    = QueryPath('vac40');
    756     call EnvVar_Set      fRM, 'PATH_VAC40',  sPathCPP;
    757     call EnvVar_Set      fRM, 'CCENV',      'VAC40'
    758     call EnvVar_Set      fRM, 'BUILD_ENV',  'VAC40'
    759     call EnvVar_Set      fRM, 'BUILD_PLATFORM', 'OS2'
    760 
    761     call EnvVar_AddFront fRM, 'path',        sPathCPP'\bin;'
    762     call EnvVar_AddFront fRM, 'dpath',       sPathCPP'\etc;'sPathCPP'\help;'
    763     call EnvVar_AddFront fRM, 'beginlibpath',sPathCPP'\dll;'sPathCPP'\runtime;'
    764     call EnvVar_AddFront fRM, 'help',        sPathCPP'\help;'
    765     call EnvVar_AddFront fRM, 'nlspath',     sPathCPP'\msg\%N;'
    766     call EnvVar_AddFront fRM, 'locpath',     sPathCPP'\locale;'sPathCPP'\runtime\locale;'
    767     call EnvVar_AddFront fRM, 'include',     sPathCPP'\ivb;'sPathCPP'\include;'
    768     call EnvVar_AddFront fRM, 'lib',         sPathCPP'\lib;'
    769     call EnvVar_AddFront fRM, 'ipfc',        sPathCPP'\bin;'
    770     call EnvVar_AddFront fRM, 'cpplpath4',   sPathCPP'\macros;'
    771     call EnvVar_Set      fRM, 'system_ice',  sPathCPP'\etc\system.ice'
    772     call EnvVar_Set      fRM, 'vbpath',      sPathCPP'\ivb'
    773     call EnvVar_Set      fRM, 'vacppmain',   sPathCPP;
    774     call EnvVar_Set      fRM, 'os2',         '1'
    775 
    776 return 0;
    777 
    778 
    779 
    780 
    781 /*
    782  * WarpIn
    783  */
    784 WarpIn: procedure
    785     parse arg fRM
    786 
    787     /*
    788      * WarpIn main directory.
    789      */
    790     sPathWarpIn = QueryPath('warpin');
    791     call EnvVar_Set      fRM, 'PATH_WARPIN', sPathWarpIn;
    792     call EnvVar_AddFront fRM, 'path',        sPathWarpIn';'
    793     call EnvVar_AddFront fRM, 'beginlibpath',sPathWarpIn';'
    794     call EnvVar_AddFront fRM, 'bookshelf',   sPathWarpIn';'
    795 return 0;
    796 
    797 
    798 
    799 /*
    800  * WatCom C/C++ v11.0
    801  */
    802 WatComC11: procedure
    803     parse arg fRM
    804 
    805     /*
    806      * Watcom C/C++ v11.0 main directory
    807      */
    808     sPathWatcom = QueryPath('watcom11');
    809     call EnvVar_Set      fRM, 'PATH_WATCOM', sPathWatcom
    810     call EnvVar_Set      fRM, 'CCENV',      'WAT'
    811     call EnvVar_Set      fRM, 'BUILD_ENV',  'WAT11'
    812     call EnvVar_Set      fRM, 'BUILD_PLATFORM', 'OS2'
    813 
    814     call EnvVar_Set      fRM, 'watcom',      sPathWatcom
    815     call EnvVar_AddFront fRM, 'path',        sPathWatcom'\binp;'sPathWatcom'\binw;'
    816     call EnvVar_AddFront fRM, 'beginlibpath',sPathWatcom'\binp\dll;'
    817     call EnvVar_AddFront fRM, 'help',        sPathWatcom'\binp\help;'
    818     call EnvVar_AddEnd   fRM, 'bookshelf',   sPathWatcom'\binp\help;'
    819     call EnvVar_AddFront fRM, 'include',     sPathWatcom'\h;'sPathWatcom'\h\os2;'sPathWatcom'\h\nt;'
    820     call EnvVar_AddFront fRM, 'lib',         sPathWatcom'\lib386;'sPathWatcom'\lib386\os2;'sPathWatcom'\lib286;'sPathWatcom'\lib286\os2;'
    821     call EnvVar_Set      fRM, 'edpath',      sPathWatcom'EDDAT;'
    822     /*
    823     rem detach %watcom%\BINP\BATSERV.EXE
    824     rem detach %watcom%\BINP\NMPBIND.EXE
    825     */
    826 
    827 return 0;
    828 
    829 /*
    830  * WatCom C/C++ v11.0c
    831  */
    832 WatComC11c: procedure
    833     parse arg fRM
    834 
    835     /*
    836      * Watcom C/C++ v11.0c main directory
    837      */
    838     sPathWatcom = QueryPath('watcom11c');
    839     call EnvVar_Set      fRM, 'PATH_WATCOM', sPathWatcom
    840     call EnvVar_Set      fRM, 'CCENV',      'WAT'
    841     call EnvVar_Set      fRM, 'BUILD_ENV',  'WAT11'
    842     call EnvVar_Set      fRM, 'BUILD_PLATFORM', 'OS2'
    843 
    844     call EnvVar_Set      fRM, 'watcom',      sPathWatcom
    845     call EnvVar_AddFront fRM, 'path',        sPathWatcom'\binp;'sPathWatcom'\binw;'
    846     call EnvVar_AddFront fRM, 'beginlibpath',sPathWatcom'\binp\dll;'
    847     call EnvVar_AddFront fRM, 'help',        sPathWatcom'\binp\help;'
    848     call EnvVar_AddEnd   fRM, 'bookshelf',   sPathWatcom'\binp\help;'
    849     call EnvVar_AddFront fRM, 'include',     sPathWatcom'\h;'sPathWatcom'\h\os2;'sPathWatcom'\h\nt;'
    850     call EnvVar_AddFront fRM, 'lib',         sPathWatcom'\lib386;'sPathWatcom'\lib386\os2;'sPathWatcom'\lib286;'sPathWatcom'\lib286\os2;'
    851     call EnvVar_Set      fRM, 'edpath',      sPathWatcom'EDDAT;'
    852     /*
    853     rem detach %watcom%\BINP\BATSERV.EXE
    854     rem detach %watcom%\BINP\NMPBIND.EXE
    855     */
    856 
    857 return 0;
    858 
    859 
    860 
    861 
    862 
    863 
    864 
    865 
    866 
    867 
    868 
    869 
    870 
    871 /**
    872  * Helper Procedure section
    873  **/
    874 
    875 
    876 /**
    877  * Add sToAdd in front of sEnvVar.
    878  * Note: sToAdd now is allowed to be alist!
    879  *
    880  * Known features: Don't remove sToAdd from original value if sToAdd
    881  *                 is at the end and don't end with a ';'.
    882  */
    883 EnvVar_addFront: procedure
    884     parse arg fRM, sEnvVar, sToAdd, sSeparator
    885 
    886     /* sets default separator if not specified. */
    887     if (sSeparator = '') then sSeparator = ';';
    888 
    889     /* checks that sToAdd ends with an ';'. Adds one if not. */
    890     if (substr(sToAdd, length(sToAdd), 1) <> sSeparator) then
    891         sToAdd = sToAdd || sSeparator;
    892 
    893     /* check and evt. remove ';' at start of sToAdd */
    894     if (substr(sToAdd, 1, 1) = ';') then
    895         sToAdd = substr(sToAdd, 2);
    896 
    897     /* loop thru sToAdd */
    898     rc = 0;
    899     i = length(sToAdd);
    900     do while i > 1 & rc = 0
    901         j = lastpos(sSeparator, sToAdd, i-1);
    902         rc = EnvVar_AddFront2(fRM, sEnvVar, substr(sToAdd, j+1, i - j), sSeparator);
    903         i = j;
    904     end
    905 
    906 return rc;
    907 
    908 /**
    909  * Add sToAdd in front of sEnvVar.
    910  *
    911  * Known features: Don't remove sToAdd from original value if sToAdd
    912  *                 is at the end and don't end with a ';'.
    913  */
    914 EnvVar_AddFront2: procedure
    915     parse arg fRM, sEnvVar, sToAdd, sSeparator
    916 
    917     /* sets default separator if not specified. */
    918     if (sSeparator = '') then sSeparator = ';';
    919 
    920     /* checks that sToAdd ends with a separator. Adds one if not. */
    921     if (substr(sToAdd, length(sToAdd), 1) <> sSeparator) then
    922         sToAdd = sToAdd || sSeparator;
    923 
    924     /* check and evt. remove the separator at start of sToAdd */
    925     if (substr(sToAdd, 1, 1) = sSeparator) then
    926         sToAdd = substr(sToAdd, 2);
    927 
    928     /* Get original variable value */
    929     sOrgEnvVar = EnvVar_Get(sEnvVar);
    930 
    931     /* Remove previously sToAdd if exists. (Changing sOrgEnvVar). */
    932     i = pos(translate(sToAdd), translate(sOrgEnvVar));
    933     if (i > 0) then
    934         sOrgEnvVar = substr(sOrgEnvVar, 1, i-1) || substr(sOrgEnvVar, i + length(sToAdd));
    935 
    936     /* set environment */
    937     if (fRM) then
    938         return EnvVar_Set(0, sEnvVar, sOrgEnvVar);
    939 return EnvVar_Set(0, sEnvVar, sToAdd||sOrgEnvVar);
    940 
    941 
    942 /**
    943  * Add sToAdd as the end of sEnvVar.
    944  * Note: sToAdd now is allowed to be alist!
    945  *
    946  * Known features: Don't remove sToAdd from original value if sToAdd
    947  *                 is at the end and don't end with a ';'.
    948  */
    949 EnvVar_addEnd: procedure
    950     parse arg fRM, sEnvVar, sToAdd, sSeparator
    951 
    952     /* sets default separator if not specified. */
    953     if (sSeparator = '') then sSeparator = ';';
    954 
    955     /* checks that sToAdd ends with a separator. Adds one if not. */
    956     if (substr(sToAdd, length(sToAdd), 1) <> sSeparator) then
    957         sToAdd = sToAdd || sSeparator;
    958 
    959     /* check and evt. remove ';' at start of sToAdd */
    960     if (substr(sToAdd, 1, 1) = sSeparator) then
    961         sToAdd = substr(sToAdd, 2);
    962 
    963     /* loop thru sToAdd */
    964     rc = 0;
    965     i = length(sToAdd);
    966     do while i > 1 & rc = 0
    967         j = lastpos(sSeparator, sToAdd, i-1);
    968         rc = EnvVar_AddEnd2(fRM, sEnvVar, substr(sToAdd, j+1, i - j), sSeparator);
    969         i = j;
    970     end
    971 
    972 return rc;
    973 
    974 /**
    975  * Add sToAdd as the end of sEnvVar.
    976  *
    977  * Known features: Don't remove sToAdd from original value if sToAdd
    978  *                 is at the end and don't end with a ';'.
    979  */
    980 EnvVar_AddEnd2: procedure
    981     parse arg fRM, sEnvVar, sToAdd, sSeparator
    982 
    983     /* sets default separator if not specified. */
    984     if (sSeparator = '') then sSeparator = ';';
    985 
    986     /* checks that sToAdd ends with a separator. Adds one if not. */
    987     if (substr(sToAdd, length(sToAdd), 1) <> sSeparator) then
    988         sToAdd = sToAdd || sSeparator;
    989 
    990     /* check and evt. remove separator at start of sToAdd */
    991     if (substr(sToAdd, 1, 1) = sSeparator) then
    992         sToAdd = substr(sToAdd, 2);
    993 
    994     /* Get original variable value */
    995     sOrgEnvVar = EnvVar_Get(sEnvVar);
    996 
    997     /* Remove previously sToAdd if exists. (Changing sOrgEnvVar). */
    998     i = pos(translate(sToAdd), translate(sOrgEnvVar));
    999     if (i > 0) then
    1000         sOrgEnvVar = substr(sOrgEnvVar, 1, i-1) || substr(sOrgEnvVar, i + length(sToAdd));
    1001 
    1002     /* checks that sOrgEnvVar ends with a separator. Adds one if not. */
    1003     if (substr(sOrgEnvVar, length(sOrgEnvVar), 1) <> sSeparator) then
    1004         sOrgEnvVar = sOrgEnvVar || sSeparator;
    1005 
    1006     /* set environment */
    1007     if (fRM) then return EnvVar_Set(0, sEnvVar, sOrgEnvVar);
    1008 return EnvVar_Set(0, sEnvVar, sOrgEnvVar||sToAdd);
    1009 
    1010 
    1011 /**
    1012  * Sets sEnvVar to sValue.
    1013  */
    1014 EnvVar_Set: procedure
    1015     parse arg fRM, sEnvVar, sValue
    1016 
    1017     /* if we're to remove this, make valuestring empty! */
    1018     if (fRM) then
    1019         sValue = '';
    1020     sEnvVar = translate(sEnvVar);
    1021 
    1022     /*
    1023      * Begin/EndLibpath fix:
    1024      *      We'll have to set internal these using both commandline 'SET'
    1025      *      and internal VALUE in order to export it and to be able to
    1026      *      get it (with EnvVar_Get) again.
    1027      */
    1028     if ((sEnvVar = 'BEGINLIBPATH') | (sEnvVar = 'ENDLIBPATH')) then
    1029     do
    1030         if (length(sValue) >= 1024) then
    1031             say 'Warning: 'sEnvVar' is too long,' length(sValue)' char.';
    1032         return SysSetExtLibPath(sValue, substr(sEnvVar, 1, 1));
    1033     end
    1034 
    1035     if (length(sValue) >= 1024) then
    1036     do
    1037         say 'Warning: 'sEnvVar' is too long,' length(sValue)' char.';
    1038         say '    This may make CMD.EXE unstable after a SET operation to print the environment.';
    1039     end
    1040     sRc = VALUE(sEnvVar, sValue, 'OS2ENVIRONMENT');
    1041 return 0;
    1042 
    1043 /**
    1044  * Gets the value of sEnvVar.
    1045  */
    1046 EnvVar_Get: procedure
    1047     parse arg sEnvVar
    1048     if ((translate(sEnvVar) = 'BEGINLIBPATH') | (translate(sEnvVar) = 'ENDLIBPATH')) then
    1049         return SysQueryExtLibPath(substr(sEnvVar, 1, 1));
    1050 return value(sEnvVar,, 'OS2ENVIRONMENT');
    1051 
    1052 
    1053 /**
    1054  *  Workaround for bug in CMD.EXE.
    1055  *  It messes up when REXX have expanded the environment.
    1056  */
    1057 FixCMDEnv: procedure
    1058     /* check for 4OS2 first */
    1059     Address CMD 'set 4os2test_env=%@eval[2 + 2]';
    1060     if (value('4os2test_env',, 'OS2ENVIRONMENT') = '4') then
    1061         return 0;
    1062 
    1063     /* force environment expansion by setting a lot of variables and freeing them. */
    1064     do i = 1 to 100
    1065         Address CMD 'set dummyenvvar'||i'=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    1066     end
    1067     do i = 1 to 100
    1068         Address CMD 'set dummyenvvar'||i'=';
    1069     end
    1070 return 0;
    1071 
    1072 
    1073 
    1074 /*
    1075  * DocBook 4.1.x XML.
    1076  */
    1077 DocBookXML: procedure
    1078     parse arg fRM
    1079 
    1080     /*
    1081      * DocBook XML dir.
    1082      */
    1083     sDocBookXML = 'e:\coding\DocBook\XML'
    1084 
    1085     call EnvVar_Set      fRM, 'docbookxml',         sDocBookXML
    1086     call EnvVar_AddFront fRM, 'SGML_CATALOG_FILES', sDocBookXML'\docbook.cat;'
    1087 
    1088     return 0;
    1089 
    1090 
    1091 /*
    1092  * Jade 1.2.1 for OS/2.
    1093  */
    1094 Jade: procedure
    1095     parse arg fRM
    1096 
    1097     /*
    1098      * Jade install dir.
    1099      */
    1100     sJadeMain = 'e:\apps\jade'
    1101 
    1102     call EnvVar_Set      fRM, 'jademain',           sJadeMain
    1103     call EnvVar_AddFront fRM, 'path',               sJadeMain';'
    1104     call EnvVar_AddFront fRM, 'SGML_CATALOG_FILES', sJadeMain'\catalog;'
    1105     call EnvVar_AddEnd   fRM, 'SGML_CATALOG_FILES', '.\catalog;'
    1106 
    1107     return 0;
    1108 
    1109 
    1110 
Note: See TracChangeset for help on using the changeset viewer.