³ò ”,9Mc@s‘dZdZddkZddkZddkZddkZddkZddkZd„Z ei dƒZ d„Z ei d„Zd„ZdS( s—SCons.Tool.PharLapCommon This module contains common code used by all Tools for the Phar Lap ETS tool chain. Right now, this is linkloc and 386asm. sEsrc/engine/SCons/Tool/PharLapCommon.py 4629 2010/01/17 22:23:21 sconsiÿÿÿÿNcCsÃtiiptiid‚nyttiitiidƒ}tii|dƒ\}}|idƒ}|djo|| }nt i i |ƒSWn(tii j otii d‚nXdS(s¢Reads the registry to find the installed path of the Phar Lap ETS development kit. Raises UserError if no installed version of Phar Lap can be found.s$No Windows registry module was foundsSOFTWARE\Pharlap\ETStBaseDirtisICannot find Phar Lap ETS path in the registry. Is it installed properly?N(tSConstUtilt can_read_regtErrorst InternalErrort RegOpenKeyExtHKEY_LOCAL_MACHINEtRegQueryValueExtfindtostpathtnormpathtRegErrort UserError(tktvalttypetidx((s=install/lib/scons-1.2.0.d20100117/SCons/Tool/PharLapCommon.pytgetPharLapPath)s   s#define\s+ETS_VER\s+([0-9]+)cCsŠtiitƒtiidƒƒ}tii|ƒptiid‚nt i t |dƒi ƒƒ}|ot |idƒƒSndS(sºReturns the version of the installed ETS Tool Suite as a decimal number. This version comes from the ETS_VER #define in the embkern.h header. For example, '#define ETS_VER 1010' (which is what Phar Lap 10.1 defines) would cause this method to return 1010. Phar Lap 9.1 does not have such a #define, but this method will return 910 as a default. Raises UserError if no installed version of Phar Lap can be found.sinclude/embkern.hsSCannot find embkern.h in ETS include directory. Is Phar Lap ETS installed properly?triiŽ(R R tjoinRR texistsRRRt REGEX_ETS_VERtsearchtopentreadtinttgroup(t include_pathtmo((s=install/lib/scons-1.2.0.d20100117/SCons/Tool/PharLapCommon.pytgetPharLapVersionEs $cCsÏy«d}||}tii||ƒpti||ƒ}d}ntii|ƒttii|ƒjo|g|}n|o|||s