403Webshell
Server IP : 138.197.176.125  /  Your IP : 216.73.217.55
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.3.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python2.7/dist-packages/gyp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python2.7/dist-packages/gyp/msvs_emulation.pyc
�
�M(^c@sNdZddlZddlZddlZddlZddlmZddlZddl	Zej
d�Zd�Zd�Z
d�Zd�Zd	�Zd
�Zd�Zd�Zd
�Zdefd��YZd�Zdefd��YZead�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#dS(sg
This module helps emulate Visual Studio 2008 behavior on top of other
build systems, primarily ninja.
i����N(t
OrderedSets(\\*)"cCsr|jd�dks*|jd�dkr?tjj|�}ntjd�|�}|jdd�}d|dS(s�Quote a command line argument so that it appears as one argument when
  processed via cmd.exe and parsed by CommandLineToArgvW (as is typical for
  Windows programs).t/iicSsd|jd�dS(Niis\"(tgroup(tmo((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt<lambda>(tt%s%%t"(tfindtcounttostpathtnormpathtwindows_quoter_regextsubtreplace(targ((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytQuoteForRspFiles
*cCs�|s
dS|djd�rV|djdd�\}}|dtjj|�}ntjj|d�}|ddjd�|dD��S(s6Process a list of arguments using QuoteCmdExeArgument.Riscall t icss|]}t|�VqdS(N(R(t.0R((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pys	<genexpr>Fs(t
startswithtsplitR
RRtjoin(targstcalltprogram((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytEncodeRspFileList9scCs5|s
|S|s|St|j|d�||d�S(s�Given a list of dictionary keys |path| and a tree of dicts |root|, find
  value at path, or return |default| if any of the path doesn't exist.ii(t_GenericRetrievetget(troottdefaultR((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyRIs
cCsU|dkr|St|t�s.t|t�rIg|D]}||^q5S||SdS(sDAdd |prefix| to |element| or each subelement if element is iterable.N(tNonet
isinstancetlistttuple(telementtprefixte((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt
_AddPrefixSs
cCs�|dk	r�|dk	r�t|�s0|j}nt|t�sNt|t�rytdg|D]}||�^q[�}q�||�}n|S(s�If |element| then remap it through |map|. If |element| is iterable then
  each item will be remapped. Any elements not found will be removed.N(RtcallableRR R!R"tfilter(R#tmaptelem((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt_DoRemapping^s+cCs^|dk	rV|dk	rVt|t�s6t|t�rF|j|�qZ|j|�n|SdS(s�If |append| is None, simply return |element|. If |append| is not None,
  then add |element| to it, adding each item in |element| if it's a list or
  tuple.N(RR R!R"textendtappend(R-R#((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt_AppendOrReturnks
cCs�ttd�rtjStjjd�}|s�ddddg}tj|dtjdtj�}xG|j	�d	j
�D],}d
|krx|jd�dd
}qxqxWn|t_|S(s�Try to find an installation location for the DirectX SDK. Check for the
  standard environment variable, and if that doesn't exist, try to find
  via the registry. May return None if not found in either location.t	dxsdk_dirt	DXSDK_DIRsreg.exetquerysHKLM\Software\Microsoft\DirectXs/ststdouttstderritInstallPaths    is\(thasattrt_FindDirectXInstallationR/R
tenvironRt
subprocesstPopentPIPEtcommunicatet
splitlinesR(R/tcmdtptline((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyR6xs!!	cCs�i}|j�rH|j�|d<tjj|j�d�d|d<nt�}|r]|nd|d<tjjdd�|d<|S(	s�Get a dict of variables mapping internal VS macro names to their gyp
  equivalents. Returns all variables that are independent of the target.s$(VSInstallDir)tVCs\s$(VCInstallDir)Rs$(DXSDK_DIR)tWDK_DIRs
$(WDK_DIR)(tPathR
RRR6R7R(t
vs_versiontenvR/((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytGetGlobalVSMacroEnv�s&	cCst|djdg��}x4|dD](}|jdg�}|t|�@}q'W|s]dStt|��}tg|D]}t||�^qy�}tg|D]}d|k^q��r�dSxX|D]P}|jdg�}|r�g|D]}	|	|kr�|	^q�}
|
|d<q�q�W|S(s�Finds msvs_system_include_dirs that are common to all targets, removes
  them from all targets, and returns an OrderedSet containing them.itmsvs_system_include_dirsit$N(RRRREtGetVSVersiontExpandMacrostany(tconfigstgenerator_flagstall_system_includestconfigtsystem_includesRDtincludetexpanded_system_includestincludestitnew_includes((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytExtractSharedMSVSSystemIncludes�s$"%
%tMsvsSettingscBs�eZdZd�Zd�Zd.d.d�Zd.d.d�Zd�Zd�Z	de
fd��YZd	�Zd
�Z
d.dd.d.d�Zd.dd.d.d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d,�Z.d-�Z/RS(/s�A class that understands the gyp 'msvs_...' values (especially the
  msvs_settings field). They largely correpond to the VS2008 IDE DOM. This
  class helps map those settings to command line options.c	Cst||_t|�|_dtfdtfdtfdtfdtfdtfdtfdtfg}|d	}xc|D][\}}t||i�x<|j�D].\}}|j||��t	||�|<q�WqwW|jd
dg�|_
dd
g}	g}
xO|	D]G}x>|j�D]0}||kr|
d||dfg7}
qqWqW|
rptdj
|
���ndS(Ntmsvs_configuration_attributest
msvs_settingsRFtmsvs_disabled_warningstmsvs_precompiled_headertmsvs_precompiled_sourcetmsvs_configuration_platformtmsvs_target_platformtconfigurationstmsvs_cygwin_dirst.t
msvs_prebuildtmsvs_postbuilds%s not supported (target %s).ttarget_names
(tspecRHRCtdictR!tstrtsetattrt	iteritemsRtgetattrR_tvaluest	ExceptionR(tselfRdRLtsupported_fieldsRKtfieldRt
confignameRNtunsupported_fieldstunsupported((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt__init__�s4								
*	
 cCs<|jjdd�}|r|Stjjj|jdd�S(s�Returns the extension for the target, with no leading dot.

    Uses 'product_extension' if specified, otherwise uses MSVS defaults based on
    the target type.
    tproduct_extensionttypeRN(RdRRtgyptMSVSUtiltTARGET_TYPE_EXT(Rltext((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytGetExtension�sc	Cs
|j|�dkrdnd}|jjdd�|jjd|jd�}|r`|dnd}d	|j�}||}id
d6dd
6dd6|d6|d6dd6|jdd6|d6|d6|d6|d6tjj||�d6}|jt|j	��|S(sUGet a dict of variables mapping internal VS macro names to their gyp
    equivalents.tx86tWin32tx64tproduct_prefixRtproduct_nameRcs\R`s${root}s$(InputName)s	${source}s$(InputPath)s$!INTERMEDIATE_DIRs	$(IntDir)s
$(OutDir)\s$(PlatformName)s$(ProjectDir)\s$(ProjectName)s
$(TargetDir)\s$(TargetExt)s$(TargetFileName)s
$(TargetName)s
$(TargetPath)(
tGetArchRdRRyR
RRtupdateRERC(	Rlt
base_to_buildRNttarget_platformRct
target_dirt
target_extttarget_file_nametreplacements((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt
GetVSMacroEnv�s*!
cCs"|j|d|�}t||�S(s4Convert from VS macro names to something equivalent.RN(R�RI(RltsR�RNRD((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytConvertVSMacrosscCsg|D]%}|jd�r&|dn|^q}g|D]B}|j�jd�ru|j�jd�ru|dn|^q9S(s2Strip -l from library if it's specified with that.s-lis.libs.obj(Rtlowertendswith(Rlt	librariestlibtlibs((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytAdjustLibrariess2cCs=t|||�}t||�}t||�}t||�S(sRetrieve a value from |field| at |path| or return |default|. If
    |append| is specified, and the item is found, it will be appended to that
    object instead of returned. If |map| is specified, results will be
    remapped through |map| before being returned or appended.(RR+R&R.(RlRnRRR$R-R)tresult((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt_GetAndMungest_GetWrappercBs&eZdd�Zdddd�ZRS(cCs+||_||_|g|_||_dS(N(tparentRnt	base_pathR-(RlR�RnR�R-((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyRr"s		RcCs;|jj|j|j|gd|d|d|jd|�S(NRR$R-R)(R�R�RnR�R-(RltnameR)R$R((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt__call__'sN(t__name__t
__module__RRrR�(((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyR�!scCsW|jj|d�}|jj|d�}|s9|}nidd6dd6j|d�S(srGet architecture based on msvs_configuration_platform and
    msvs_target_platform. Returns either 'x86' or 'x64'.RRzR{R|(R\RR](RlRNtconfiguration_platformtplatform((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyR+s
	cCs�|jjdkr|S|j|�}|dkrN|jd�rN|d7}n|dkr�|jd�r�|jdd�d}n|S(s*Returns the target-specific configuration.i�R|t_x64Rzt_ii(RCt
short_nameRR�trsplit(RlRNtarch((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt
_TargetConfig5s
RcCs#|j|j||||||�S(s_GetAndMunge for msvs_settings.(R�RX(RlRRNRR$R-R)((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt_SettingGscCs#|j|j||||||�S(s/_GetAndMunge for msvs_configuration_attributes.(R�RW(RlRRNRR$R-R)((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt
_ConfigAttribMs
cCse|j|�}||j|}|j|jd|dg��g|D]}|j|d|�^qFS(syUpdates include_dirs to expand VS specific paths, and adds the system
    include dirs used for platform SDK and similar.tVCCLCompilerTooltAdditionalIncludeDirectoriesRRN(R�R�(R�RFR,R�R�(Rltinclude_dirsRNRRR>((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytAdjustIncludeDirsTs
cCse|j|�}||j|}|j|jd|dg��g|D]}|j|d|�^qFS(s~Updates midl_include_dirs to expand VS specific paths, and adds the
    system include dirs used for platform SDK and similar.t
VCMIDLToolR�RRN(R�R�(R�RFR,R�R�(Rltmidl_include_dirsRNRRR>((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytAdjustMidlIncludeDirs]s
cCs�|j|�}g}|jdg|�dkr@|jd
�n|jdg|�dkrk|jd�n|j|jd|d	g��|S(s`Returns the set of defines that are injected to the defines list based
    on other VS settings.tCharacterSett1t_UNICODEtUNICODEt2t_MBCSR�tPreprocessorDefinitionsR(R�R�(R�R�(R�R�R,R-R�(RlRNtdefines((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytGetComputedDefinesfscCsC|j|�}|jd|�}|r?||j|��}n|S(svGet the pdb file name that should be used for compiler invocations, or
    None if there's no explicit name specified.R�tProgramDataBaseFileName(R�R�(R�R�R�(RlRNtexpand_specialtpdbname((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytGetCompilerPdbNamesscCsI|j|�}|jd|�}|rE||j|d|��}n|S(s]Gets the explicitly overriden map file name for a target or returns None
    if it's not set.tVCLinkerTooltMapFileNameRN(R�R�(R�R�R�(RlRNR�tmap_file((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytGetMapFileName}s
cCst|j|�}|jd}|dkr.dnd}|j|df|�}|rp||j|d|��}n|S(scGets the explicitly overridden output name for a target or returns None
    if it's not overridden.Rttstatic_librarytVCLibrarianToolR�t
OutputFileRN(R�RdR�R�(RlRNR�RtRtoutput_file((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt
GetOutputName�s
	cCsm|j|�}|jd|�}|jd|�}|dkre|r^||j|d|��S|SndSdS(	s�Gets the explicitly overridden pdb name for a target or returns
    default if it's not overridden, or if no pdb will be generated.R�tProgramDatabaseFiletGenerateDebugInformationttrueRNN(R�R�(R�R�(R�R�R�R(RlRNR�RR�tgenerate_debug_info((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt
GetPDBName�scCs+|j|�}|jd|�}|dkS(s\If NoImportLibrary: true, ninja will not expect the output to include
    an import library.tNoImportLibraryR�(R�(R�R�(RlRNtnoimplib((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytGetNoImportLibrary�scCsG|j|�}g}|jd|�}|dkrC|jd�n|S(s:Returns the flags that need to be added to ml invocations.tMASMtUseSafeExceptionHandlersR�s/safeseh(R�R�(R�R�R-(RlRNtasmflagstsafeseh((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytGetAsmflags�scCs9|j|�}g}|jg|j|D]}d|^q)�|j||j|dd|�}|ddidd6dd6d	d	6d
d6dd
dd	�|ddd�|ddd�|ddidd6�|ddidd6�|ddidd6dd6dd�|ddidd6dd6dd�|ddidd6d d	6dd
�|d!did"d6d#d6d$d	6dd%dd�|d&didd6d'd6�|d(did)d6�|d*dd+�|d,did-d6�|d.didd6d/d6d0d	6d1d6dd2�|d3did4d6d5d6d6d76dd8�|d9did:d6d;d6�|d<did=d6d>d6�|d?did@d6�|dAdidBd6dCd6�|dDdid d6dEd	6dd6ddF�|dGdidHd6dId6dJd	6dKd6ddL�|dMdidNd6dOd	6ddP�|dQdidRd6�|dSdidd6dd6ddT�|dUdidVd6�|dWdd�|dXdidYd6dZd	6d[d6d\d76d]d^6dd_�|jg|jde|dg�D]}da|^q��|jjdbkr#|jdc�nt	dd�|�}|S(fsCReturns the flags that need to be added to .c and .cc compilations.s/wdR�R-tOptimizationR)tdt0R�R�txt3R$s/ORtInlineFunctionExpansions/ObtDisableSpecificWarningst
StringPoolings/GFR�tEnableFiberSafeOptimizationss/GTtOmitFramePointerst-tfalseRs/OytEnableIntrinsicFunctionss/OitFavorSizeOrSpeedttR�tFloatingPointModeltprecisetstricttfasts/fp:tCompileAsManageds/clrtWholeProgramOptimizations/GLtWarningLevels/WtWarnAsErrors/WXtCallingConventiontrtztvs/GtDebugInformationFormatt7RStIt4s/ZtRuntimeTypeInfos/GRs/GR-tEnableFunctionLevelLinkings/Gys/Gy-tMinimalRebuilds/GmtBufferSecurityChecks/GSs/GS-tBasicRuntimeCheckstus/RTCtRuntimeLibrarytTtTdtDtDds/MtExceptionHandlingtsctas/EHtDefaultCharIsUnsigneds/JtTreatWChar_tAsBuiltInTypes/Zc:wchar_tt
EnablePREfasts/analyzetAdditionalOptionstEnableEnhancedInstructionSettSSEtSSE2tAVXtIA32tAVX2t5s/arch:tForcedIncludeFiless/FIg(@s/FScSs|jd�S(Ns/MP(R(R�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyR�R(R�R(
R�R,RYR�RXR�RCtproject_versionR-R((RlRNtcflagstwtcltf((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt	GetCflags�s^+	/$$$	!	)	"+	)$		)'cCs�|j|�}|j|r�tjj|j|�d}t||�r�|j|}tjj|�d}d|d|d|dgSngS(sLGet the flags to be added to the cflags for precompiled header support.
    is/Yus/FIs/Fp${pchprefix}.s.pch(R�RZR
RtsplitextR[t_LanguageMatchesForPchR(RlRNt	extensiont
source_exttpchtpchbase((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt_GetPchFlags�s

 cCs|j|�}|j|d�S(s;Returns the flags that need to be added to .c compilations.s.c(R�R(RlRN((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt
GetCflagsC�scCs&|j|�}dg|j|d�S(s<Returns the flags that need to be added to .cc compilations.s/TPs.cc(R�R(RlRN((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytGetCflagsCC�scCs�|j|�}|j|df|dg�}g|D]-}tjj||j|d|���^q4}g|D]}d|d^qnS(sPGet and normalize the list of paths in AdditionalLibraryDirectories
    setting.tAdditionalLibraryDirectoriesRRNs
/LIBPATH:"R(R�R�R
RRR�(RlRRNtgyp_to_build_pathtlibpathsR>((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt _GetAdditionalLibraryDirectoriess7cCs�|j|�}g}|j||j|dd|�}|j|jd||��|ddidd6�|ddidd	6d
d6dd
6dd�|d�|S(s8Returns the flags that need to be added to lib commands.R�R-tLinkTimeCodeGenerationR)s/LTCGR�t
TargetMachinetX86R�tX64t17tARMR�R$s	/MACHINE:R�(R�R�RXR,R(RlRNRtlibflagsR�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytGetLibFlagss$
cCs�|j}|dd
kr�g|jdg�D]!}|j�jd�r,|^q,}t|�dkrs||d�St|�dkr�td	��q�ndS(sDReturns the .def file from sources, if any.  Otherwise returns None.Rttshared_librarytloadable_modulet
executabletsourcess.defiisMultiple .def files(R!R"R#N(RdRR�R�tlenRkR(RlRRdR�t	def_files((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt
GetDefFiles	!cCs-|j|�}|r)|jd|�ndS(s�.def files get implicitly converted to a ModuleDefinitionFile for the
    linker in the VS generator. Emulate that behaviour here.s	/DEF:"%s"N(R'R-(RltldflagsRtdef_file((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt_GetDefFileAsLdflags&scCsI|j|�}|jd|�}|rE||j|d|��}n|S(s`Gets the explicitly overridden pgd name for a target or returns None
    if it's not overridden.R�tProfileGuidedDatabaseRN(R�R+(R�R�R�(RlRNR�R�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt
GetPGDName-s	cCs=|j|�}g}|j||j|dd|�}	|j||�|	ddidd6�|	ddidd	6d
d6dd
6dd�|j|jd||��|	ddd�|	ddddidd6dd6�|j||�}
|
r|jd|
�n|j|||d�}|r8|jd|�n|j	||�}|rd|jd|�n|j
||�}
|	ddi|
r�d|
ndd6�|	ddidd6�|	d dd�|jdX|d"d�}|r�d#|}n|	d$did%|d	6d&|d'6dd(�|jdY|d"d�}|r~|jdZ|d"d�}|rdd#|}n|jd+||f�n|	d,didd	6dd'6dd-�|	d.didd	6dd'6dd/�|	d0dd1�|	d2didd	6dd'6dd3�|	d4didd	6dd'6dd5�|	d6didd	6dd'6dd7�|	d8did9d	6d:d'6dd;�|	d<dd=�|	d>did?d	6d@d'6dd;�|	dAdidd	6dBd'6dCd
6dDdE6ddF�|	dGddH�|	dIdidJd6�|	dKddL�|	dMdidNd6�|	dOdidd	6dd'6ddP�|	dQdd�|j|�dRkrld}nd[}|	dSdidd6dd6ddTd"|�tdU�|�}|s�|jd5�ntdV�|�s�|jd7�ntdW�|�}|j||||o||�\}}}|j|�|||fS(\sUReturns the flags that need to be added to link commands, and the
    manifest files.R�R-R�R)s/DEBUGR�RRR�RRRR�R$s	/MACHINE:t
DelayLoadDLLss/DELAYLOAD:tTreatLinkerWarningAsErrorss/WXRs:NOR�s/OUT:s.pdbs/PDB:s/PGD:tGenerateMapFiles/MAP:s/MAPt
MapExportss/MAPINFO:EXPORTSR�tMinimumRequiredVersionRt,t	SubSystems	CONSOLE%ss	WINDOWS%sR�s/SUBSYSTEM:tStackReserveSizetStackCommitSizes/STACK:%s%stTerminalServerAwares/TSAWAREtLinkIncrementals/INCREMENTALtBaseAddresss/BASE:tFixedBaseAddresss/FIXEDtRandomizedBaseAddresss/DYNAMICBASEtDataExecutionPreventions	/NXCOMPATtOptimizeReferencestNOREFtREFs/OPT:tForceSymbolReferencess	/INCLUDE:tEnableCOMDATFoldingtNOICFtICFRs
:PGINSTRUMENTs:PGOPTIMIZEs	:PGUPDATER�s/LTCGtIgnoreDefaultLibraryNamess/NODEFAULTLIB:tResourceOnlyDLLs/NOENTRYtEntryPointSymbols/ENTRY:tProfiles/PROFILEtLargeAddressAwares/LARGEADDRESSAWAREtAdditionalDependenciesRztImageHasSafeExceptionHandlerss/SAFESEHcSsd|kp|dkS(NtDYNAMICBASEs/FIXED((R�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyR�RcSs
d|kS(NtNXCOMPAT((R�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyR�RcSs
|jd�S(Ns/DEF:(R(R�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyR�R(R�R1(R�R4(R�R5N(R�R�RXR*R,RR�R-R�R,R�R�RRR(t_GetLdManifestFlags(RlRNRR�tmanifest_base_nametoutput_namet
is_executablet	build_dirR(tldtouttpdbtpgdR�tminimum_required_versiontstack_reserve_sizetstack_commit_sizetsafeseh_defaultt
base_flagst
have_def_filetmanifest_flagstintermediate_manifesttmanifest_files((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt
GetLdflags8s�$
	
$$$		$$	
					
cCs�|jd|dd�}|dkr4dgggfS|d}dd|g}|jd	�|j|�}|jd|dd�}	g}
d}|	dkr�|jd|dd
�}idd
6dd6dd6}
|jd|dd�}d|
||f}nd}||}|d}tjj||�}tjj|�tjj	|�}|j
|�|j�|g}
|r�|jd�n|
|j||�7}
|||
fS(sjReturns a 3-tuple:
    - the set of flags that need to be added to the link to generate
      a default manifest
    - the intermediate manifest that the linker will generate that should be
      used to assert it doesn't add anything to the merged one.
    - the list of all the manifest files to be merged by the manifest tool and
      included into the link.R�tGenerateManifestRR�s/MANIFEST:NOs.intermediate.manifests	/MANIFESTs/ManifestFile:s/MANIFESTUAC:NOt	EnableUACs�<?xml version='1.0' encoding='UTF-8' standalone='yes'?><assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>%s</assembly>tUACExecutionLevelR�t	asInvokerthighestAvailableR�trequireAdministratorR�tUACUIAccessR�s�
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
  <security>
    <requestedPrivileges>
      <requestedExecutionLevel level='%s' uiAccess='%s' />
    </requestedPrivileges>
  </security>
</trustInfo>Rs.generated.manifests/ALLOWISOLATION(R�R_(R�R`(R�Ra(R�Re(
R�R-R�R
RRRutcommontEnsureDirExiststWriteOnDifftwritetcloset_GetAdditionalManifestFiles(RlRNR�Rtallow_isolationRPtgenerate_manifestRNtflagst
enable_uacR]tgenerated_manifest_outertexecution_leveltexecution_level_mapt	ui_accesstinnertgenerated_manifest_contentstgenerated_nametbuild_dir_generated_nameR
((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyRL�sL			


		
		



	
cCsq|jd|dg�}t|t�r9|jd�}ng|D]-}tjj||j|d|���^q@S(s]Gets additional manifest files that are added to the default one
    generated by the linker.tVCManifestTooltAdditionalManifestFilesRt;RN(RxRy(R�R RfRR
RRR�(RlRNRtfilesR
((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyRk�s	cCs+|j|�}|jd|�}|dkS(szReturns whether the target should be linked via Use Library Dependency
    Inputs (using component .objs of a given .lib).R�tUseLibraryDependencyInputsR�(R�R|(R�R�(RlRNtuldi((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytIsUseLibraryDependencyInputsscCs1|j|�}|jd|dd�}|dkS(s6Returns whether manifest should be linked into binary.Rxt
EmbedManifestRR�(RxR(R�R�(RlRNtembed((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytIsEmbedManifests	cCs+|j|�}|jd|�}|dkS(s:Returns whether the target should be linked incrementally.R�R7R�(R�R7(R�R�(RlRNtlink_inc((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytIsLinkIncrementalscCs�|j|�}g}|j||j|dd|�}|dd|dd�|jd|d��|ddd	�|d
dddd��|S(
sTReturns the flags that need to be added to invocations of the resource
    compiler.tVCResourceCompilerToolR-R�R)R$s/IR`R�s/dtCultures/lcSstt|��dS(Ni(thextint(R�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyR R(R�R�RXR-(RlRNtgyp_to_ninja_pathtrcflagstrc((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt
GetRcflagsscCs�tjjtjj||jd��}d|jdd�}g|D]$}|jdd�jdd�^qE}g|D]}d|jdd	�^qv}d
j|�}d|d||f}|S(
sOBuild a command line that runs args via cygwin bash. We assume that all
    incoming paths are in Windows normpath'd form, so they need to be
    converted to posix style for the part of the command line that's passed to
    bash. We also have to do some Visual Studio macro emulation here because
    various rules use magic VS names for things. Also note that rules that
    contain ninja variables cannot be fixed here (for example ${source}), so
    the outer generator needs to make sure that the paths that are written out
    are in posix style, if the command line will be used here.iscd %ss\RRs\"s'%s't's'\''Rs1call "%s\setup_env.bat" && set CYGWIN=nontsec && sbash -c "%s ; %s"(R
RRRR_R(RlRtpath_to_baset
cygwin_dirtcdR�tbash_cmdR=((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytBuildCygwinBashCommandLine#s		1)cCs+t|jd|jjdd���dkS(skDetermine if an action should be run under cygwin. If the variable is
    unset, or set to 1 we use cygwin.tmsvs_cygwin_shellii(R�RRd(Rltrule((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytIsRuleRunUnderCygwin7scCs5x.|jdg�D]}|d|krtSqWtS(sADetermine if there's an explicit rule for a particular extension.trulesR(RtTruetFalse(RlRdRR�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt_HasExplicitRuleForExtension=scCs5tg|jdg�D]}|jdd�^q�S(s:Determine if an action should not run midl for .idl files.tactionstexplicit_idl_actioni(RJR(RlRdtaction((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt_HasExplicitIdlActionsDscCs|j|d�p|j|�S(s�Determine if there's an explicit rule or action for idl files. When
    there isn't we need to generate implicit rules to build MIDL .idl files.tidl(R�R�(RlRd((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytHasExplicitIdlRulesOrActionsIscCs|j|d�S(s�Determine if there's an explicit rule for asm files. When there isn't we
    need to generate implicit rules to assemble .asm files.tasm(R�(RlRd((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytHasExplicitAsmRulesOscs:�j����j��j�d��d���fd�}|ddd�}|ddd�}|ddd	�}|d
dd�}|ddd
�}|ddd�}	||||g}
d|fd|fd|fd|fd|fg}�j��dkrdnd}ddd|dg}
|	|
||
fS(s�Determine the implicit outputs for an idl file. Returns output
    directory, outputs, and variables and flags that are required.R�cs�j�|d|�d��S(NRRN(R�(R�R(RNtmidl_getRl(s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytmidlYstTypeLibraryNameRs${root}.tlbtHeaderFileNames	${root}.htDLLDataFileNames	dlldata.ctInterfaceIdentifierFileNames${root}_i.ct
ProxyFileNames${root}_p.ctOutputDirectoryRttlbthtdlldatatiidtproxyRztwin32R|s/chartsigneds/envs/OicfN(R�R�RXRR(RltsourceRNR�R�theaderR�R�R�toutdirtoutputt	variablesR�Rn((RNR�Rls6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytGetIdlBuildDataTs$				!N(0R�R�t__doc__RrRyRR�R�R�R�tobjectR�RR�R�R�R�R�R�R�R�R�R�R�R�RRRRRR R'R*R,R^RLRkR~R�R�R�R�R�R�R�R�R�R�(((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyRV�sX	#			

	
						
	
			
					6									g	W											cCs:d}d}||kr$||kp9||ko9||kS(Ns.cs.ccs.cxxs.cpp(s.c(s.ccs.cxxs.cpp((Rtpch_source_exttc_extstcc_exts((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyR
pstPrecompiledHeadercBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(s�Helper to generate dependencies and build rules to handle generation of
  precompiled headers. Interface matches the GCH handler in xcode_emulation.py.
  c	Csi||_||_|jj|j}||�|_tjj|�\}}|||�j�|_dS(N(	tsettingsRNR[t
pch_sourceR
RRR�t
output_obj(	RlR�RNRtgyp_to_unique_outputtobj_extR�tfilenameR�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyRr{s		cCs|jj|jS(sMGet the header that will appear in an #include line for all source
    files.(R�RZRN(Rl((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt
_PchHeader�scCs�|dkst�|j�s"gStjj|j�d}x@|D]8}ttjj|�d|�rBdd|jfgSqBWgS(sGiven a list of sources files and the corresponding object files,
    returns a list of the pch files that should be depended upon. The
    additional wrapping in the return value is for interface compatibility
    with make.py on Mac, and xcode_emulation.py.iN(	RtAssertionErrorR�R
RRR�R
R�(RlR$tobjsR�tpch_extR�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytGetObjDependencies�s
cCsgS(s�Not used on Windows as there are no additional build steps required
    (instead, existing steps are modified in GetFlagsModifications below).((RlR�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytGetPchBuildCommands�sc	Cs�||jkr�d|j�g}|dkrTdt|||�fg|jgfS|dkr�dt|||�fg|jgfSng||fS(sgGet the modified cflags and implicit dependencies that should be used
    for the pch compilation step.s/Yctcxxt	cflags_cctcctcflags_c(R�R�R)R�(	RltinputR�timplicittcommandR�R�R�t
pch_output((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytGetFlagsModifications�s
(R�R�R�RrR�R�R�R�(((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyR�ws					cCs1ts-tjj|jdd�dt�antS(Ntmsvs_versiontautotallow_fallback(RCRutMSVSVersiontSelectVisualStudioVersionRR�(RL((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyRH�s
	cCst|�}|j�S(N(RHtSetupScript(RLR�tvs((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt_GetVsvarsSetupArgs�scCsZd|krVxG|j�D]6\}}d|ks=t|��|j||�}qWn|S(s{Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv
  for the canonical way to retrieve a suitable dict.RGs$((RhR�R(tstringt
expansionstoldtnew((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyRI�s
c	Csd}i}|jd
�dkr4td|��nx�|j�D]�}x�|D]}}tj|d
|j��rN|jd
d
�\}}|dkr�tjj	t
j�tj|}n|||j
�<PqNqNWqAWx-dD]%}||kr�td|��q�q�W|S(s{Extracts environment variables required for the toolchain to run from
  a textual dump output by the cmd.exe 'set' command.sgoma_.*RPR�tlibpathRtpathextt
systemrootttempttmpt=is#Invalid output_of_set. Value is:
%sit
SYSTEMROOTtTEMPtTMPs:Environment variable "%s" required to be set to valid path(	sgoma_.*RPR�R�RR�R�R�R�(R�R�R�(R	RkR<tretmatchR�RR
RtdirnametsysR#tpathseptupper(t
output_of_settenvvars_to_saveRDR?tenvvartvartsettingtrequired((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt_ExtractImportantEnvironment�s2
#
cCsMd}d}x0|j�D]"\}}||d||7}qW||7}|S(s�Format as an 'environment block' directly suitable for CreateProcess.
  Briefly this is a list of key=value, terminated by an additional . See
  CreateProcess documentation for more details.RsR�(Rh(tenvvar_dicttblocktnultkeytvalue((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt_FormatAsEnvironmentBlock�s
cCsDx=|j�j�D])}|jd�r|td�j�SqWdS(s�Gets the path to cl.exe based on the output of calling the environment
  setup batch file, followed by the equivalent of `where`.sLOC:N(tstripR<RR%(toutput_of_whereR?((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt_ExtractCLPath�sc
Cs�d}|jdd�r=i}x|D]}d||<q%W|St|�}i}x||D]t}|j|�}|jd�tj|dtd	tjd
tj�}	|	j	�\}
}|	j
dkr�td||	j
f��nt|
�}|r)|t
|jdd
�jd��B}dj|�|d<nt|�}
|tjj|d|�d�}|j|
�|j�|j|�}|jd�tj|dtd	tj�}	|	j	�\}}t|�||<qVW|S(s�It's not sufficient to have the absolute path to the compiler, linker,
  etc. on Windows, as those tools rely on .dlls being in the PATH. We also
  need to support both x86 and x64 compilers within the same build (to support
  msvs_target_platform hackery). Different architectures require a different
  compiler binary, and different supporting environment variables (INCLUDE,
  LIB, LIBPATH). So, we extract the environment here, wrap all invocations
  of compiler tools (cl, link, lib, rc, midl, etc.) via win_tool.py which
  sets up the environment, and then we do not prefix the compiler with
  an absolute path, instead preferring something like "cl.exe" in the rule
  which will then run whichever the environment setup has put in the path.
  When the following procedure to generate environment files does not
  meet your requirement (e.g. for custom toolchains), you can pass
  "-G ninja_use_custom_environment_files" to the gyp to suppress file
  generation and use custom environment files prepared by yourself.RzR|t"ninja_use_custom_environment_filesiscl.exes&&tsettshellR2R3s"%s" failed with error %dtINCLUDERRzsenvironment.twbtfors%itins(cl.exe)tdos@echos
LOC:%~$PATH:i(RzR|(s&&R�(s&&Rs%iRs(cl.exe)Rs@echos
LOC:%~$PATH:i(RRHR�R,R8R9R�R:tSTDOUTR;t
returncodeRkR�RRRR�R
RRiRjR�(ttoplevel_build_dirRLROtopen_outtarchstcl_pathsR�R�RtpopenR�R�RDt	env_blockR
R�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytGenerateEnvironmentFiles�s@


!"

c
Cs�t|jdd��r�td�|�}g|D]!}tjj|||��^q1}td�|�}|r�g|D]}tjj|�^qw}	tddj|	���q�ndS(seEmulate behavior of msvs_error_on_missing_sources present in the msvs
  generator: Check that all regular source files, i.e. not created at run time,
  exist on disk. Missing files cause needless recompilation when building via
  VS, and we want this check to match for people/bots that build using ninja,
  so they're not surprised when the VS build fails.tmsvs_error_on_missing_sourcesicSs
d|kS(NRG((R�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyR7RcSstjj|�S(N(R
Rtexists(R�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyR9RsMissing input files:
%ss
N(R�RR(R
RRRRk(
R$RPRLtgyp_to_ninjatno_specialsR�trelativetmissingR�t
cleaned_up((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytVerifyMissingSources0s.%cCs�|jdi�}tjj|�}|j�|d<dtjjdd�ksjdtjjdd�krwd|d<n
d	|d<dS(
NRLtMSVS_VERSIONt64tPROCESSOR_ARCHITECTURERtPROCESSOR_ARCHITEW6432i@tMSVS_OS_BITSi (RRutmsvs_emulationRHt	ShortNameR
R7(tdefault_variablestparamsRLR�((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pytCalculateCommonVariablesBs
($R�R
R�R8R�t
gyp.commonRtgyp.MSVSUtilRutgyp.MSVSVersiontcompileR
RRRR&R+R.R6RERUR�RVR
R�RRCRHR�RIR�R�R�RRR(((s6/usr/lib/python2.7/dist-packages/gyp/msvs_emulation.pyt<module>s@	"		
		
	
			���	4					%			7	

Youez - 2016 - github.com/yon3zu
LinuXploit