ó âqLc@s…dZdZddlZddlZddlZddlZddlZd„Zej dƒZ d„Z ej d„Z d„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 5023 2010/06/14 22:05:46 sconsiÿÿÿÿNcCsÃtjjs!tjjdƒ‚nyrtjjtjjdƒ}tjj|dƒ\}}|jdƒ}|dkr‚|| }nt j j |ƒSWn)tjj k r¾tjj 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((sh/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/PharLapCommon.pytgetPharLapPath(s    s#define\s+ETS_VER\s+([0-9]+)cCs†tjjtƒtjjdƒƒ}tjj|ƒsKtjjdƒ‚nt j t |dƒj ƒƒ}|r‚t |jdƒƒSdS(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((sh/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/PharLapCommon.pytgetPharLapVersionDs $cCsÇy¥d}||}tjj||ƒsA|j|ƒ}d}ntjj|ƒtttjj|ƒƒkr~|g|}n|r‘|||s