HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //lib/python2.7/dist-packages/gyp/MSVSVersion.pyc
�
�n�Zc@s�dZddlZddlZddlZddlZddlZddlZddlZd�Zde	fd��YZ
d�Zdd�Z
d�Zd	�Zed
�Zd�Zd�Zd
ed�ZdS(s3Handle version information related to Visual Stuio.i����NcGstjjtjj|��S(N(tostpathtnormpathtjoin(targs((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pytJoinPathstVisualStudioVersioncBs�eZdZddd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�ZRS(s1Information regarding a version of Visual Studio.cCs�||_||_||_||_||_||_||_||_|	|_|
pZg}
|
j	dd�dt
�|
|_dS(NtkeycSst|jdd��S(Ntvt(tfloattreplace(R((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pyt<lambda>$R	treverse(t
short_nametdescriptiontsolution_versiontproject_versiontflat_slntuses_vcxprojRt	sdk_basedtdefault_toolsettsorttTruetcompatible_sdks(tselfRRRRRRRRRR((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pyt__init__s									cCs|jS(N(R(R((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pyt	ShortName'scCs|jS(s(Get the full description of the version.(R(R((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pytDescription*scCs|jS(s(Get the version number of the sln files.(R(R((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pytSolutionVersion.scCs|jS(s6Get the version number of the vcproj or vcxproj files.(R(R((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pytProjectVersion2scCs|jS(N(R(R((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pytFlatSolution6scCs|jS(s1Returns true if this version uses a vcxproj file.(R(R((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pytUsesVcxproj9scCs|jrdpdS(s+Returns the file extension for the project.s.vcxprojs.vcproj(R(R((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pytProjectExtension=scCs|jS(s/Returns the path to Visual Studio installation.(R(R((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pytPathAscCs%tjjtjj|jd|��S(s+Returns the path to a given compiler tool. sVC/bin(RRRR(Rttool((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pytToolPathEscCs|jS(s\Returns the msbuild toolset version that will be used in the absence
    of a user override.(R(R((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pytDefaultToolsetIsc
Cs�|dkstd��tjjdd�}t|dd�}|jrn|rntjj|�rn|d|gStjjd	�d
kp�tjjd�d
k}|jdkrt|jd
ddd�}|r�dnd}|dkr�dnd}|}||kr|d|7}n||gSt|jd
d�}	|dkr�|jdkrr|jddkrr|rr|	dgSt|jddd�gSn>|dkr�d}|jddkr�|r�d}n|	|gSdS(sLReturns a command (with arguments) to be used to set up the
    environment.tx86tx64starget_arch not supportedt
WindowsSDKDirR	tBins
SetEnv.Cmdt/tPROCESSOR_ARCHITECTUREtAMD64tPROCESSOR_ARCHITEW6432t2017tVCt	AuxiliarytBuilds
vcvarsall.battamd64t_t2013i����tet	amd64_x86tCommon7tToolssvsvars32.batt	x86_amd64N(R&R'(	tAssertionErrorRtenvirontgetRRRtexistsR(
Rttarget_archtsdk_dirt
setup_pathtis_host_arch_x64tscript_patht	host_archtmsvc_target_archtargt	vcvarsall((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pyt_SetupScriptInternalOs6!	
"
	cCsB|j|�}|d}tjj|�s>td|��n|S(Nis3%s is missing - make sure VC++ tools are installed.(RGRRR=t	Exception(RR>tscript_dataRB((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pytSetupScript�s

N(t__name__t
__module__t__doc__tNoneRRRRRRR R!R"R$R%RGRJ(((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pyRs											5cCs�tjdkrdStjjtjjdd�|d�d|g}|r_|jd|g�nt	j
|dt	jd	t	j�}|j�d
}|j
r�dS|S(
s�Use reg.exe to read a particular key.

  While ideally we might use the win32 module, we would like gyp to be
  python neutral, so for instance cygwin python lacks this module.

  Arguments:
    sysdir: The system subdirectory to attempt to launch reg.exe from.
    key: The registry key to read from.
    value: The particular value to read.
  Return:
    stdout from reg.exe, or None for failure.
  twin32tcygwintWINDIRR	sreg.exetquerys/vtstdouttstderri(RORPN(tsystplatformRNRRRR;R<textendt
subprocesstPopentPIPEtcommunicatet
returncode(tsysdirRtvaluetcmdtpttext((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pyt_RegistryQueryBase�s$!	cCs`d}ytd||�}Wn=tk
r[}|jtjkrUtd||�}q\�nX|S(s�Use reg.exe to read a particular key through _RegistryQueryBase.

  First tries to launch from %WinDir%\Sysnative to avoid WoW64 redirection. If
  that fails, it falls back to System32.  Sysnative is available on Vista and
  up and available on Windows Server 2003 and XP through KB patch 942589. Note
  that Sysnative will always fail if using 64-bit python due to it being a
  virtual directory and System32 will work correctly in the first place.

  KB 942589 - http://support.microsoft.com/kb/942589/en-us.

  Arguments:
    key: The registry key.
    value: The particular registry value to read (optional).
  Return:
    stdout from reg.exe, or None for failure.
  t	SysnativetSystem32N(RNRbtOSErrorterrnotENOENT(RR^RaR5((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pyt_RegistryQuery�scCs�ddl}y`|jdd�\}}|dks9t�|j|j|��}|j||�dSWdQXWntk
r�dSXdS(sUse the _winreg module to obtain the value of a registry key.

  Args:
    key: The registry key.
    value: The particular registry value to read.
  Return:
    contents of the registry key's value, or None on failure.  Throws
    ImportError if _winreg is unavailable.
  i����Ns\itHKLMi(t_winregtsplitR:tOpenKeytHKEY_LOCAL_MACHINEtQueryValueExtWindowsErrorRN(RR^Rjtroottsubkeythkey((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pyt_RegistryGetValueUsingWinReg�s

cCsgyt||�SWntk
r$nXt||�}|s>dStjd|�}|sZdS|jd�S(s�Use _winreg or reg.exe to obtain the value of a registry key.

  Using _winreg is preferable because it solves an issue on some corporate
  environments where access to reg.exe is locked down. However, we still need
  to fallback to reg.exe for the case where the _winreg module is not available
  (for example in cygwin python).

  Args:
    key: The registry key.
    value: The particular registry value to read.
  Return:
    contents of the registry key's value, or None on failure.
  sREG_\w+\s+([^\r]+)\r\niN(RstImportErrorRhRNtretsearchtgroup(RR^Ratmatch((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pyt_RegistryGetValue�s
cCs�|rtjj|�}nitdddddddtdtd	|d
|ddd
ddg�d6tdddddddtdtd	|d
|dd�d6tdddddddtdtd	|d
|dd�d6tdddddddtdtd	|d
|dd�d6tdddddddtdtd	|d
|dd�d6tdddddddtdtd	|d
|dd�d6tdd dd!dddtdtd	|d
|�d6td"d#dd!dddtdtd	|d
|�d"6td$d%dd&dd'dtdtd	|d
|�d$6td(d%dd&dd'dtdtd	|d
|�d(6td)d*dd'dd+dtdtd	|d
|�d)6td,d*dd'dd+dtdtd	|d
|�d,6}|t|�S(-sSets up MSVS project generation.

  Setup is based off the GYP_MSVS_VERSION environment variable or whatever is
  autodetected if GYP_MSVS_VERSION is not explicitly specified. If a version is
  passed in that doesn't match a value in versions python will throw a error.
  R.sVisual Studio 2017Rs12.00Rs15.0RRRRRtv141Rsv8.1sv10.0t2015sVisual Studio 2015s14.0tv140R4sVisual Studio 2013s13.00s12.0tv120t2013et2012sVisual Studio 2012s4.0tv110t2012et2010sVisual Studio 2010s11.00t2010esVisual C++ Express 2010t2008sVisual Studio 2008s10.00s9.00t2008et2005sVisual Studio 2005s8.00t2005e(RRRRtFalseRtstr(tnameRRtversions((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pyt_CreateVersion�s�










cCsJtjdkrFtjd|gdtj�}|j�dj�}n|S(s.Convert to cygwin path if we are using cygwin.RPtcygpathRSi(RURVRXRYRZR[tstrip(RR`((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pyt_ConvertToCygpathosc
	CsFidd6dd6dd6dd6d	d
6dd6d
d6}g}x|D]�}d|d|d|d|g}x�tt|��D]�}t||d�}|s�qnt|�}tjj|d�}tjj|d�}	|r"tjj|�r"|jt	||tjj|dd���qt
j
|	�r|jt	||dtjj|dd���qqWddddg}x�tt|��D]�}t|||�}|s�q�nt|�}|dkr�tjj|�r:|jt	d
|��q:q�|dkr�|jt	||dtjj|d�dt��q�q�WqDW|S(sXCollect the list of installed visual studio versions.

  Returns:
    A list of visual studio versions installed in descending order of
    usage preference.
    Base this on the registry and a quick check if devenv.exe exists.
    Possibilities are:
      2005(e) - Visual Studio 2005 (8)
      2008(e) - Visual Studio 2008 (9)
      2010(e) - Visual Studio 2010 (10)
      2012(e) - Visual Studio 2012 (11)
      2013(e) - Visual Studio 2013 (12)
      2015    - Visual Studio 2015 (14)
      2017    - Visual Studio 2017 (15)
    Where (e) is e for express editions of MSVS and blank otherwise.
  R�s8.0R�s9.0R�s10.0Rs11.0R4s12.0R{s14.0R.s15.0s'HKLM\Software\Microsoft\VisualStudio\%ss3HKLM\Software\Wow6432Node\Microsoft\VisualStudio\%ss$HKLM\Software\Microsoft\VCExpress\%ss0HKLM\Software\Wow6432Node\Microsoft\VCExpress\%st
InstallDirs
devenv.exes*express.exes..R5s,HKLM\Software\Microsoft\VisualStudio\SxS\VC7s8HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS\VC7s,HKLM\Software\Microsoft\VisualStudio\SxS\VS7s8HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS\VS7R(trangetlenRyR�RRRR=tappendR�tglobR(
tversions_to_checkt
force_expresstversion_to_yearR�tversiontkeystindexRt	full_pathtexpress_path((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pyt_DetectVisualStudioVersionswsV


#	*tautocCsH|dkr$tjjdd�}ni
dd6dd
6dd6dd6d d
6d!d6d"d6d#d6d$d6d%d6d&d6d'd6d(d6}tjjd�}|r�tjjd�}|s�td��nt||dt�St|�}t||d|k�}|s@|std��n|dkr0td
d)�St|d)�Sn|dS(*s�Select which version of Visual Studio projects to generate.

  Arguments:
    version: Hook to allow caller to force a particular version (vs auto).
  Returns:
    An object representing a visual studio project format version.
  R�tGYP_MSVS_VERSIONs15.0s14.0s12.0s10.0s9.0s8.0s11.0R�R�R�R�R�R�RR�R4R~R{R.tGYP_MSVS_OVERRIDE_PATHs`GYP_MSVS_OVERRIDE_PATH requires GYP_MSVS_VERSION to be set to a particular version (e.g. 2010e).RR5s,Could not locate Visual Studio installation.i(s15.0s14.0s12.0s10.0s9.0s8.0s11.0(s8.0(s8.0(s9.0(s9.0(s10.0(s10.0(s11.0(s11.0(s12.0(s12.0(s14.0(s15.0N(	RR;R<t
ValueErrorR�RR�R�RN(R�tallow_fallbacktversion_mapt
override_pathtmsvs_versionR�((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pytSelectVisualStudioVersion�s>	

(RMRfRRuRXRUtgypR�RtobjectRRbRNRhRsRyR�R�R�R�RR�(((s3/usr/lib/python2.7/dist-packages/gyp/MSVSVersion.pyt<module>s"	y			u		I