%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/
Upload File :
Create Path :
Current File : //lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.pyo

�
vפ\c@sKddlZddlZddlZddlZddlZddlZddlZddlZddl	j
Z
ddljj
ZddljZddljZddljZddljZddljZddljZddljZddlmZddlmZd�Ze�Z ej!d�Z"idd6dd	6dd
6dd6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6d$d%6Z#d&d'gZ$d&d(d)d*d+d,d-d.d/d0d1d2d3d4d5gZ%d6d7gZ&da(da)d8�Z*da+d9�Z,d:�Z-d;�Z.dde/dd<�Z0e1d=�Z2e1d>�Z3d?�Z4d@�Z5dA�Z6dB�Z7dC�Z8dD�Z9dE�Z:dF�Z;dG�Z<dH�Z=dI�Z>dJ�Z?dK�Z@dL�ZAdM�ZBej!dN�ZCdO�ZDej!dP�ZEdQ�ZFdR�ZGej!dS�ZHdT�ZIdU�ZJdV�ZKdW�ZLdX�ZMdY�ZNdZ�ZOd[�ZPd\�ZQd]�ZRd^�ZSd_�ZTd`�ZUda�ZVdb�ZWdc�ZXdd�ZYde�ZZdf�Z[dg�Z\dh�Z]di�Z^dj�Z_dk�Z`dl�Zadm�Zbdn�Zcdo�Zddp�Zedq�Zfdr�Zgds�Zhdt�Zidu�Zjdv�Zkdw�Zldx�Zmdy�Zndz�Zod{�Zpd|�Zqd}�Zrd~�Zsd�Ztd��Zud��Zvd��Zwd��Zxd��Zyd��Zzd��Z{d��Z|d��Z}d��Z~d��Zd�e�fd���YZ�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�d��Z�ej!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�dS(�i����N(tGypError(t
OrderedSetcCsBddl}y|jSWn$tk
r=ddl}|jjSXdS(Ni����(tcollectionstOrderedDicttAttributeErrortgyp.ordered_dicttordered_dict(Rtgyp((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_import_OrderedDicts
s
^[A-F0-9\-]+$ttEXECUTABLE_PREFIXs.exetEXECUTABLE_SUFFIXtSTATIC_LIB_PREFIXtSHARED_LIB_PREFIXs.libtSTATIC_LIB_SUFFIXs.dlltSHARED_LIB_SUFFIXs	$(IntDir)tINTERMEDIATE_DIRs $(OutDir)obj/global_intermediatetSHARED_INTERMEDIATE_DIRtwintOSs	$(OutDir)tPRODUCT_DIRs$(OutDir)libtLIB_DIRs$(InputName)tRULE_INPUT_ROOTs$(InputDir)tRULE_INPUT_DIRNAMEs$(InputExt)tRULE_INPUT_EXTs$(InputFileName)tRULE_INPUT_NAMEs$(InputPath)tRULE_INPUT_PATHs$(ConfigurationName)tCONFIGURATION_NAMEtmsvs_cygwin_dirst
msvs_propstmsvs_cygwin_shelltmsvs_large_pdbt
msvs_shardtmsvs_external_buildertmsvs_external_builder_out_dirtmsvs_external_builder_build_cmdtmsvs_external_builder_clean_cmdt#msvs_external_builder_clcompile_cmdtmsvs_enable_winrttmsvs_requires_importlibrarytmsvs_enable_winphonetmsvs_application_type_revisiontmsvs_target_platform_versiontmsvs_target_platform_minversiontmsvs_precompiled_headertmsvs_precompiled_sourcecCstjdkrdSts!trtjjd�}tjjd�}|sS|r�tjdddgd	tj	�}|j
�d
}tjdtj
�}|j|�}|r�|jd�}ntjd
tj
�}|j|�}|r�|jd�}q�n|a|anttfS(Ntwin32tcygwintDOMAINtUSERNAMEt
USERDOMAINtnettconfigtWorkstationtstdoutis^User name\s+(\S+)is^Logon domain\s+(\S+)(swin32scygwin(R0R1(tsystplatformt
cached_domaintcached_usernametostenvirontgett
subprocesstPopentPIPEtcommunicatetretcompilet	MULTILINEtsearchtgroup(tdomaintusernametcallR4tusername_retusername_matcht	domain_retdomain_match((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetDomainAndUserNameps(	cCs=tjj|�}|jd�|jd�kr9|}n|S(s�Normalize the path.

  But not if that gets rid of a variable, as this may expand to something
  larger than one directory.

  Arguments:
      source: The path to be normalize.d

  Returns:
      The normalized path.
  t$(R;tpathtnormpathtcount(tsourcet
normalized((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_NormalizedSource�s	cCs�trH|rHtjj|�rH|ddkrHtjjt|�}n|jdd�}t|�}|r�|ddkr�|d }n|S(s�Convert paths to a form that will make sense in a vcproj file.

  Arguments:
    path: The path to convert, may contain / etc.
  Returns:
    The path with all slashes made into backslashes.
  iROt/s\i����(tfixpath_prefixR;RPtisabstjointreplaceRU(RP((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_FixPath�s0
cCsg|D]}t|�^qS(s"Fix each of the paths of the list.(R[(tpathsti((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt	_FixPaths�sc

Cs�|sg}ng}g}t�}x|D]	}t|�dkr�tdj||��}	|	|krx|j|	�q4|j|	�q+|r�|j�r�|j|d�s�g||d<n||dj|d�q+t|dg||dgd|d|d|�}
tj	|dd|
�}
|j|
�q+W|ri|ritj	dd|�}|j|�n|r|j�r|Sx_|D]W}t||d	||gd|d|d|�}
tj	|d|
�}
|j|
�q�W|S(
s�Converts a list split source file paths into a vcproj folder hierarchy.

  Arguments:
    sources: A list of source file paths split.
    prefix: A list of source file path layers meant to apply to each of sources.
    excluded: A set of excluded files.
    msvs_version: A MSVSVersion object.

  Returns:
    A hierarchy of filenames and MSVSProject.Filter objects that matches the
    layout of the source tree.
    For example:
    _ConvertSourcesToFilterHierarchy([['a', 'bob1.c'], ['b', 'bob2.c']],
                                     prefix=['joe'])
    -->
    [MSVSProject.Filter('a', contents=['joe\a\bob1.c']),
     MSVSProject.Filter('b', contents=['joe\b\bob2.c'])]
  is\itexcludedt
list_excludedtmsvs_versiontcontentst_excluded_filestprefix(
RtlenRURYtappendtUsesVcxprojR=t _ConvertSourcesToFilterHierarchytMSVSProjecttFilter(
tsourcesRdR_R`Ratresulttexcluded_resulttfolderststfilenameRbtexcluded_foldertf((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRh�sF		
		
	cCs$|s
dSt|||||�dS(N(t_ToolSetOrAppend(ttoolst	tool_nametsettingtvaluet
only_if_unset((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_ToolAppend�sc
Csd|ksd|krgt|�tkr?|jdd�}qgg|D]}|jdd�^qF}n|j|�s�t�||<n||}|j|�r
|r�dSt||�tkr�t|�tkr�||c|7<qtd|||t||�f��n
|||<dS(NtDirectoriestDependenciesRVs\sZAppending "%s" to a non-list setting "%s" for tool "%s" is not allowed, previous value: %s(ttypetstrRZR=tdicttlistt	TypeError(RtRuRvRwRxR]ttool((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRs�s (
(#cCs|jdd�S(Ntmsvs_configuration_platformtWin32(R=(tconfig_data((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_ConfigPlatformscCs1|jd|�r)|dt|�d!S|SdS(Nt_ii(tendswithRe(tconfig_namet
platform_name((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_ConfigBaseNamescCs#t|�}dt||�|fS(Ns%s|%s(R�R�(R�R�R�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_ConfigFullNamesc
Csg|D]}d|kr|^qr.d}nd}|rt|jddg�d�}|}	g|	D]}
|
jdd�^qf}	g|	D]}
|
jd	d
�^q�}	g|	D]}
|
jdd�^q�}	|r�g|	D]}
|
jdd
�^q�}	ng|	D]}
d|
jdd�^q}	dj|	�}	d}|rM|d7}n|d7}|	jd�dkry|d7}n|	jd�dkr�|d7}n|	jd�dkr�|d7}n|r�|	jd�dkr�|d7}n|d7}|i|d6|	d6}||S|ddkr+d g}n|djd!d"�g}|jdd#�g|d$D](}
|
d$ d%kr{|
n	t|
�^q_}g|D]}
|
jdd&�^q�}g|D]}
tj|
�^q�}|r�g|D]}
d'|
^q�}n|dj||�SdS((Ns$(InputDir)s_set INPUTDIR=$(InputDir)
if NOT DEFINED INPUTDIR set INPUTDIR=.\
set INPUTDIR=%INPUTDIR:~0,-1%
R	Rt.is	$(IntDir)s`cygpath -m "${INTDIR}"`s	$(OutDir)s`cygpath -m "${OUTDIR}"`s`cygpath -m "${INPUTDIR}"`s$(InputPath)s`cygpath -m "${INPUTPATH}"`s\"%s\"t"s\\\"t s4call "$(ProjectDir)%(cygwin_dir)s\setup_env.bat" && sset CYGWIN=nontsec&& tNUMBER_OF_PROCESSORSs@set /a NUMBER_OF_PROCESSORS_PLUS_1=%%NUMBER_OF_PROCESSORS%%+1&& tINTDIRsset INTDIR=$(IntDir)&& tOUTDIRsset OUTDIR=$(OutDir)&& t	INPUTPATHsset INPUTPATH=$(InputPath) && sbash -c "%(cmd)s"t
cygwin_dirtcmdtcatR|RVs\RIis/-s
%INPUTDIR%s"%s"(R[R=RZRYtfindtinserttMSVSSettingstFixVCMacroSlashes(
tspecR�tcygwin_shellthas_input_patht	quote_cmdtdo_setup_envtxtinput_dir_preambleR�t
direct_cmdR]tcommandt	arguments((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_BuildCommandLineForRuleRaw sV%	"""%)







9%" cCs�|jd�}|dkr6t|jdd��}nt|t�rTt|�}nt|jdd��}t||d|||d|�S(NRitmsvs_quote_cmdtactionR�(R=tNonetintt
isinstanceR}R�(R�truleR�R�tmcsR�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_BuildCommandLineForRulekscCsZi|d6|d6|d6|d6}|d}||krEg||<n||j|�dS(s�Merge action into an existing list of actions.

  Care must be taken so that actions which have overlapping inputs either don't
  get assigned to the same input, or get collapsed into one.

  Arguments:
    actions_dict: dictionary keyed on input name, which maps to a list of
      dicts describing the actions attached to that input file.
    inputs: list of inputs
    outputs: list of outputs
    description: description of the action
    command: command line to execute
  tinputstoutputstdescriptionR�iN(Rf(tactions_dictR�R�R�R�R�tchosen_input((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_AddActionStepzs


c
Cs�t|�}t|�}tjdi|d6dj|�d6dj|�d6|d6�}xF|dj�D]4\}}	|jt|�t||	�d|g�qiWd	S(
s8Add a custom build tool to execute something.

  Arguments:
    p: the target project
    spec: the target project dict
    primary_input: input file to attach the build tool to
    inputs: list of inputs
    outputs: list of outputs
    description: description of the action
    cmd: command line to execute
  tVCCustomBuildTooltDescriptiont;tAdditionalDependenciestOutputstCommandLinetconfigurationsRtN(R^RitToolRYt	iteritemst
AddFileConfigR[R�(
tpR�t
primary_inputR�R�R�R�R�R�tc_data((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_AddCustomBuildToolForMSVS�s


cCs�x�|D]�}t�}t�}g}g}xb||D]V}|jt|d��|jt|d��|j|d�|j|d�q6Wdj|�}	dj|�}
t||d|d|d|d|	d|
�qWd	S(
sAdd actions accumulated into an actions_dict, merging as needed.

  Arguments:
    p: the target project
    spec: the target project dict
    actions_dict: dictionary keyed on input name, which maps to a list of
        dicts describing the actions attached to that input file.
  R�R�R�R�s, and also s
R�R�N(RtupdateRfRYR�(R�R�R�R�R�R�tdescriptionstcommandsR�R�R�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_AddAccumulatedActionsToMSVS�s$	
		cCs�|jdtjjtjj|�d�d�}|jdtjj|��}|jdtjjtjj|�d�d�}|jdtjj|�d�}|jd|�}|S(s�Given the input file to which a rule applied, string substitute a path.

  Arguments:
    path: a path to string expand
    input_file: the file to which the rule applied.
  Returns:
    The string substituted path.
  s$(InputName)iis$(InputDir)s$(InputExt)s$(InputFileName)s$(InputPath)(RZR;RPtsplitexttsplittdirname(RPt
input_file((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_RuleExpandPath�s		)	)"cCs|jdg�S(s�Find the list of files which a particular rule applies to.

  Arguments:
    rule: the rule in question
    sources: the set of all known source files for this project
  Returns:
    The list of sources that trigger a particular rule.
  trule_sources(R=(R�Rk((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_FindRuleTriggerFiles�s	cCs�t|jdg��}t|jdg��}t�}t�}|j|�x$|D]}|jt||��qVWx$|D]}|jt||��q}W||fS(s�Find the inputs and outputs generated by a rule.

  Arguments:
    rule: the rule in question.
    trigger_file: the main trigger for this rule.
  Returns:
    The pair of (inputs, outputs) involved in this rule.
  R�R�(R^R=RtaddR�(R�ttrigger_filet
raw_inputstraw_outputsR�R�R]to((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_RuleInputsAndOutputs�s			


c
Cs)d|d|jf}tjtjj||�|d�}x�|D]�}|d}|d}	t|jdg��}
t|jdg��}d|kr�|jdg�r�qCnt||d	t	d
t	�}|j
d|d|jd
|�d|	gd|
d|d|�qCW|j�|j|�dS(s�Generate a native rules file.

  Arguments:
    p: the target project
    rules: the set of rules to include
    output_dir: the directory in which the project/gyp resides
    spec: the project dict
    options: global generator options
  s
%s%s.rulesttarget_namet	rule_namet	extensionR�R�R�R�R�R�tnameR�tmessaget
extensionstadditional_dependenciesR�N(
tsuffixtMSVSToolFiletWriterR;RPRYR^R=R�tTruetAddCustomBuildRuletWriteIfChangedtAddToolFile(
R�trulest
output_dirR�toptionstrules_filenamet
rules_filetrR�trule_extR�R�R�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GenerateNativeRulesForMSVSs*






		
cCs(|jdd�}|jdd�}|S(Ns	$(OutDir)s$(OutDirCygwin)s	$(IntDir)s$(IntDirCygwin)(RZ(RP((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt
_Cygwinify1sc
Csad|d|jf}tjjtjj||��}|jd�|jd�t�}t�}	t�}
g}x�|D]�}t	||�}
x�|
D]�}t
||�\}}|jt|��|	jt|��|jt
|�d�g|D]}tjj|�d^q�}x|D]}|
j|�qWq�WqzWg|D]}t|�^qD}|jddj|��x(|
D] }|r}|jd|�q}q}W|jd	�x
|D]}t	||�}
x�|
D]�}t
||�\}}g|D]}t|�^q�}g|D]}t|�^q}g|d
D]}t||�^q5}g|D]}d|^qW}dj|�}|jddj|�dj|�f�|jd
|�q�Wq�W|j�|j|�dddddd|g}t||tttt�}t
|�}|jd|�t|dt|�dt|	�dd|dd|�dS(sGGenerate an external makefile to do a set of rules.

  Arguments:
    rules: the list of rules to include
    output_dir: path containing project and gyp files
    spec: project specification data
    sources: set of sources known
    options: global generator options
    actions_to_add: The list of actions we will add to.
  s
%s_rules%s.mkR�s.OutDirCygwin:=$(shell cygpath -u "$(OutDir)")
s.IntDirCygwin:=$(shell cygpath -u "$(IntDir)")
isall: %s
R�s	mkdir -p `cygpath -u "%s"`
s
R�s"%s"s%s: %s
s	%s

tmakesOutDir=$(OutDir)sIntDir=$(IntDir)s-js${NUMBER_OF_PROCESSORS_PLUS_1}s-fR�R�R�sRunning external rules for %sR�N(R�RtcommontWriteOnDiffR;RPRYtwriteRR�R�R�RfRR�R�R�R�tcloseR�R�tFalseR�R�R^(R�R�R�RkR�tactions_to_addRptmk_filet
all_inputstall_outputstall_output_dirst
first_outputsR�t
trigger_filesttfR�R�R]toutput_dirstodtfirst_outputs_cygtcR�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GenerateExternalRules7sf!

			

)




&)

	cCs|jdd�}|S(s�Escapes % characters.

  Escapes any % characters so that Windows-style environment variable
  expansions will leave them alone.
  See http://connect.microsoft.com/VisualStudio/feedback/details/106127/cl-d-name-text-containing-percentage-characters-doesnt-compile
  to understand why we have to do this.

  Args:
      s: The string to be escaped.

  Returns:
      The escaped string.
  t%s%%(RZ(Ro((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt#_EscapeEnvironmentVariableExpansion�ss(\\*)"cCs-d�}tj||�}d|d}|S(swEscapes a Windows command-line argument.

  So that the Win32 CommandLineToArgv function will turn the escaped result back
  into the original string.
  See http://msdn.microsoft.com/en-us/library/17w5ykft.aspx
  ("Parsing C++ Command-Line Arguments") to understand why we have to do
  this.

  Args:
      s: the string to be escaped.
  Returns:
      the escaped string.
  cSsd|jd�dS(Niis\"(RF(tmatch((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_Replace�sR�(tquote_replacer_regextsub(RoR�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt!_EscapeCommandLineArgumentForMSVS�s	s(\\*)([,;]+)cCs�d�}|jd�}x:tdt|�d�D] }tj|||�||<q1Wdj|�}t|�ddkr�tjdd|IJn|S(s�Escapes command line arguments for MSVS.

  The VCProj format stores string lists in a single string using commas and
  semi-colons as separators, which must be quoted if they are to be
  interpreted literally. However, command-line arguments may already have
  quotes, and the VCProj parser is ignorant of the backslash escaping
  convention used by CommandLineToArgv, so the command-line quotes and the
  VCProj quotes may not be the same quotes. So to store a general
  command-line argument in a VCProj list, we need to parse the existing
  quoting according to VCProj's convention and quote any delimiters that are
  not already quoted by that convention. The quotes that we add will also be
  seen by CommandLineToArgv, so if backslashes precede them then we also have
  to escape those backslashes according to the CommandLineToArgv
  convention.

  Args:
      s: the string to be escaped.
  Returns:
      the escaped string.
  cSs&d|jd�d|jd�dS(NiiR�(RF(R�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR��sR�iis1Warning: MSVS may misinterpret the odd number of s
quotes in (R�trangeRetdelimiters_replacer_regexRRYR7tstderr(RoR�tsegmentsR]((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt#_EscapeVCProjCommandLineArgListItem�s	cCsDt|�}t|�}t|�}|jddtd��}|S(sBEscapes a CPP define so that it will reach the compiler unaltered.t#s\%03o(R�RRRZtord(Ro((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_EscapeCppDefineForMSVS�s
s(\\+)"cCsd�}tj||�}|S(s;Escapes a Windows command-line argument for use by MSBuild.cSs#t|jd��ddddS(Niiis\s\"(ReRF(R�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR��s(tquote_replacer_regex2R(RoR�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt$_EscapeCommandLineArgumentForMSBuild�s	cCsiidd6dd6dd6dd6d	d
6dd6d
d6}djg|D]}|j||�^qD�}|S(Ns%25R�s%24ROs%40t@s%27t's%3BR�s%3Ft?s%2At*R	(RYR=(Rotescape_dictionaryR�Rl((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_EscapeMSBuildSpecialCharacterss
.cCsDt|�}t|�}t|�}|jddtd��}|S(sBEscapes a CPP define so that it will reach the compiler unaltered.Rs\%03o(R�RRRZR	(Ro((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_EscapeCppDefineForMSBuilds
cCs�|jdg�}g|D]$}t|jdd��s|^q}	g|D]$}t|jdd��rJ|^qJ}
|	r�t||	|||�n|
r�t|
|||||�nt|||t�dS(s�Generate all the rules for a particular project.

  Arguments:
    p: the project
    output_dir: directory to emit rules to
    options: global options passed to the generator
    spec: the specification for this project
    sources: the set of all known source files in this project
    excluded_sources: the set of sources excluded from normal processing
    actions_to_add: deferred list of actions to add in
  R�tmsvs_external_ruleiN(R=R�R�R�t_AdjustSourcesForRulesR�(R�R�R�R�Rktexcluded_sourcesR�R�R�trules_nativetrules_external((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GenerateRulesForMSVSs11c	Cs�x�|D]�}t||�}x�|D]�}|jt|��t|jdt��r#t||�\}}tt|��}tt|��}|j	t|��|j
|�|s�|j
|�n|j
|�q#q#WqWdS(Ntprocess_outputs_as_sources(R�tdiscardR[R�R=R�R�RR^tremoveR�(	R�RkRt
is_msbuildR�R�R�R�R�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR:s


cCs;tt|j���}g|D]}||kr|^qS(s*Take inputs with actions attached out of the list of exclusions.

  Arguments:
    excluded_sources: list of source files not to be built.
    actions_to_add: dict of actions keyed on source file they're attached to.
  Returns:
    excluded_sources with files that have actions attached removed.
  (RR^tkeys(RR�t	must_keepRo((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_FilterActionsFromExcludedPs	cCs|d|dS(NR�tdefault_configuration((R�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetDefaultConfiguration]scCsxt|�}|jd�}|r_tj|�dkrRtd|tjf��nd|}n|pqtj|�}|S(sGet the guid for the project.

  Arguments:
    proj_path: Path of the vcproj or vcxproj file to generate.
    spec: The target dictionary containing the properties of the target.
  Returns:
    the guid.
  Raises:
    ValueError: if the specified GUID is invalid.
  t	msvs_guids1Invalid MSVS guid: "%s".  Must match regex: "%s".s{%s}N(	R"R=tVALID_MSVS_GUID_CHARSR�R�t
ValueErrortpatterntMSVSNewtMakeGuid(t	proj_pathR�tdefault_configtguid((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetGuidOfProjectas
cCsAt|�}|jd�}|r=|j�r=|j�}n|S(sGet the platform toolset for the project.

  Arguments:
    proj_path: Path of the vcproj or vcxproj file to generate.
    spec: The target dictionary containing the properties of the target.
    version: The MSVSVersion object.
  Returns:
    the platform toolset string or None.
  tmsbuild_toolset(R"R=tDefaultToolset(R)R�tversionR*ttoolset((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetMsbuildToolsetOfProjectys
cCsXt|j�}|jd�r"gS|j�rAt||||�St||||�SdS(sGenerates a vcproj file.

  Arguments:
    project: the MSVSProject object.
    options: global generator options.
    version: the MSVSVersion object.
    generator_flags: dict of generator-specific flags.
  Returns:
    A list of source files that cannot be found on disk.
  tmsvs_existing_vcprojN(R"R�R=Rgt_GenerateMSBuildProjectt_GenerateMSVSProject(tprojectR�R/tgenerator_flagsR*((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GenerateProject�sc
Cs#|jdd�dkrdS|jdg�}i}xi|D]a}tjj|�\}}|dk}|sqq;ntjj|�}|j|g�j|�q;Wd}	xL|j�D]>\}}
t	|
�dkr�|	d|dj
|
�f7}	q�q�W|	rd|d|	dGHtd��ndS(s�Makes sure if duplicate basenames are not specified in the source list.

  Arguments:
    spec: The target dictionary containing the properties of the target.
    version: The VisualStudioVersion object.
  R|tstatic_librarytshared_libraryNRks.cs.ccs.cpps.cxxs.ms.mms.ss.SR	is	  %s: %s
R�s<static library %s has several files with the same basename:
R�sMSVC08 cannot handle that.s6Duplicate basenames in sources section, see list above(R8R9(s.cs.ccs.cpps.cxxs.ms.mms.ss.S(R=R�R;RPR�tbasenamet
setdefaultRfR�ReRYR(R�R/Rkt	basenamesRSR�texttis_compiled_fileR:terrortfiles((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_ValidateSourcesForMSVSProject�s&
	$cCs|j}tjj|j�t|�}tj|j||d|j|�}t	jj
|j�d}t|j�}tjj
||�}	t||j�}
x4|dj�D]"\}}t|||
||�q�Wt||�t	jj
|j�d}
t|||
�\}}i}t|||||||�|jdt�}t|||||||�\}}}t||�}|j|�t||�t|||�t|||	�t||�t|j||�t||�}t|||||�t |||�|j!�|S(s-Generates a .vcproj file.  It may create .rules and .user files too.

  Arguments:
    project: The project object we will generate the file for.
    options: Global options passed to the generator.
    version: The VisualStudioVersion object.
    generator_flags: dict of generator-specific flags.
  R�iR�itmsvs_list_excluded_files("R�RR�tEnsureDirExistsRPt_GetUniquePlatformsRiR�R+R;R�RUt
build_filetRelativePatht_GetMSVSConfigurationTypeR�t_AddConfigurationToMSVSProjectRAt_PrepareListOfSourcesRR=R�t)_AdjustSourcesAndConvertToFilterHierarchyt_VerifySourcesExisttAddFilest_AddToolFilesToMSVSt_HandlePreCompiledHeaderst_AddActionst
_AddCopiest_WriteMSVSUserFileR t_ExcludeFilesFromBeingBuiltR�R�(R5R�R/R6R�t	platformsR�tproject_dirtgyp_pathtrelative_path_of_gyp_filetconfig_typeR�R4tgyp_fileRkRR�R`texcluded_idltmissing_sources((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR4�sJ		
	



cCsIt�}x-|dD]!}|jt|d|��qWt|�}|S(s�Returns the list of unique platforms for this spec, e.g ['win32', ...].

  Arguments:
    spec: The target dictionary containing the properties of the target.
  Returns:
    The MSVSUserFile object created.
  R�(RR�R�R(R�RSt
configuration((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRDs
		cCsGt�\}}dj|||dg�}tj|||d�}|S(s�Generates a .user file for the user running this Gyp program.

  Arguments:
    proj_path: The path of the project file being created.  The .user file
               shares the same path (with an appropriate suffix).
    version: The VisualStudioVersion object.
    spec: The target dictionary containing the properties of the target.
  Returns:
    The MSVSUserFile object created.
  R�tuserR�(RNRYtMSVSUserFileR�(R)R/R�RGRHtvcuser_filenamet	user_file((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_CreateMSVSUserFiles

cCs�y5idd6dd6dd6dd6dd	6|d
}Wn^tk
r�|jd
�rxtd|d
|d|f��q�td
|d|f��nX|S(s(Returns the configuration type for this project.

  It's a number defined by Microsoft.  May raise an exception.

  Args:
      spec: The target dictionary containing the properties of the target.
      build_file: The path of the gyp file.
  Returns:
      An integer, the configuration type.
  t1t
executablet2R9tloadable_modulet4R8t10tnoneR|s>Target type %s is not a valid target type for target %s in %s.R�s'Missing type field for target %s in %s.(tKeyErrorR=R(R�RERW((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRG.s
cCs�t|�\}}}t|�}t|�}	t|dt�\}
}}t|�}
g|
D]}t|�^q[}
t|�}|jd�}|jd�}t	|�}|jd�}t
�}|jdi�}tj|�t
|dddg�xD|D]<}|d|}x%|D]}t
|||||�qWq�Wt
|d	d
|�t
|dd
|�t
|dd
|�t
|dd|�t
|dd
|	�|
r�t
||d|
dt�nt
|d	d|
�t
|dd|
�t
|d	dddt�t
|d	d|�t
|dd|�t
|dd|�|r�tjj|�d}t
|d	dd�t
|d	d|�t
|d	d|�n|ddkr�t
|ddd�n|r�t
|dd |�nt||||||�d!S("s+Adds a configuration to the MSVS project.

  Many settings in a vcproj file are specific to a configuration.  This
  function the main part of the vcproj file that's configuration specific.

  Arguments:
    p: The target project being generated.
    spec: The target dictionary containing the properties of the target.
    config_type: The configuration type, a number as defined by Microsoft.
    config_name: The name of the configuration.
    config: The dictionary that defines the special processing to be done
            for this configuration.
  tmsbuildt
msvs_prebuildtmsvs_postbuildR,t
msvs_settingstVCLinkerToolR�s$(NOINHERIT)tVCCLCompilerTooltAdditionalIncludeDirectoriest
VCMIDLTooltVCResourceCompilerTooltAdditionalLibraryDirectoriest
OutputFileRxtPreprocessorDefinitionstProgramDataBaseFileNames $(IntDir)$(ProjectName)\vc80.pdbtDisableSpecificWarningstVCPreBuildEventToolR�tVCPostBuildEventToolitUsePrecompiledHeaderRctPrecompiledHeaderThroughtForcedIncludeFilesR|RdtIgnoreImportLibraryttruetModuleDefinitionFileN(t_GetIncludeDirst
_GetLibrariest_GetLibraryDirst_GetOutputFilePathAndToolR�t_GetDefinesR
t_GetDisabledWarningsR=t_GetModuleDefinitionR~R�tValidateMSVSSettingsRyR�R;RPR�t_AddConfigurationToMSVS(R�R�RWR�R4tinclude_dirstmidl_include_dirstresource_include_dirst	librariestlibrary_dirstout_filetvc_toolR�tdefinestdtdisabled_warningstprebuildt	postbuildtdef_filetprecompiled_headerRtRlR�tsettingsRv((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRHLsf	


	
	
	

	
	
	
cCs�|jdg�|jdg�}|jdg�|jdg�}|jd|�}t|�}t|�}t|�}|||fS(s�Returns the list of directories to be used for #include directives.

  Arguments:
    config: The dictionary that defines the special processing to be done
            for this configuration.
  Returns:
    The list of directory paths.
  R�tmsvs_system_include_dirsR�R�(R=R^(R4R�R�R�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�scCs"|jdg�}t|�}|S(s�Returns the list of directories to be used for library search paths.

  Arguments:
    config: The dictionary that defines the special processing to be done
            for this configuration.
  Returns:
    The list of directory paths.
  R�(R=R^(R4R�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR��s
cCs�|jdg�}t�}g}xut|�D]g}tjdd|�}tjj|�dsl|d7}n||kr.|j|�|j	|�q.q.W|j
�|S(s�Returns the list of libraries for this configuration.

  Arguments:
    spec: The target dictionary containing the properties of the target.
  Returns:
    The list of directory paths.
  R�s^\-lR	is.lib(R=RtreversedRBRR;RPR�R�Rftreverse(R�R�tfoundtunique_libraries_listtentrytlibrary((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR��s	


cCs#d}d}d}idd6dd6dd	6dd6}|j|d�}|rt|jdd��r|\}}}}|jdd�r�d}n|jd|�}|jd�}	|	r�d|	}n|r�d}n|jdd�}
|jdd�}tj||
||�}n|||fS(sNReturns the path and tool to use for this target.

  Figures out the path of the file this spec will create and the name of
  the VC tool that will create it.

  Arguments:
    spec: The target dictionary containing the properties of the target.
  Returns:
    A triple of (file path, name of the vc tool, name of the msbuild tool)
  R	RmtLinks	$(OutDir)s.exeRbs.dllR9RdtVCLibrarianTooltLibs
$(OutDir)lib\s.libR8R|tmsvs_auto_output_fileitstandalone_static_libraryitproduct_dirtproduct_extensionR�s$(TargetExt)tproduct_prefixtproduct_names$(ProjectName)(sVCLinkerToolR�s	$(OutDir)s.exe(sVCLinkerToolR�s	$(OutDir)s.dll(sVCLinkerToolR�s	$(OutDir)s.dll(R�sLibs
$(OutDir)lib\s.lib(R=R�tntpathRY(R�RiR�R�tmsbuild_tooltoutput_file_maptoutput_file_propstout_dirR�R�RdR�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR��s.
	
	cCs!|jd�}|rd|SdS(sqReturns the extension for this target, including the dot

  If product_extension is specified, set target_extension to this to avoid
  MSB8012, returns None otherwise. Ignores any target_extension settings in
  the input files.

  Arguments:
    spec: The target dictionary containing the properties of the target.
  Returns:
    A string with the extension, or None
  R�R�N(R=R�(R�ttarget_extension((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetOutputTargetExt
scCs}g}xp|jdg�D]\}t|�tkr\djg|D]}t|�^q>�}nt|�}|j|�qW|S(s�Returns the list of preprocessor definitions for this configuation.

  Arguments:
    config: The dictionary that defines the special processing to be done
            for this configuration.
  Returns:
    The list of preprocessor definitions.
  R�t=(R=R|RRYR}Rf(R4R�R�tdparttfd((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�s	+cCs)g|jdg�D]}t|�^qS(Ntmsvs_disabled_warnings(R=R}(R4R]((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�/scCs�d}|dd
kr�g|jdg�D]}|jd�r)|^q)}t|�dkrot|d	�}q�|r�td
|ddj|�f��q�n|S(NR	R|R9RdRbRks.defiisWMultiple module definition files in one target, target %s lists multiple .def files: %sR�R�(sshared_librarysloadable_modules
executable(R=R�ReR[R%RY(R�R�Rot	def_files((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�3s4#cCs�g}x�|j�D]�\}}i}x�|j�D]x\}}t|�tkr�|dkrh|dkst|dkr�dj|�||<q�dj|�||<q2|||<q2W|jtj||��qW|S(s�Convert tools to a form expected by Visual Studio.

  Arguments:
    tools: A dictionary of settings; the tool name is the key.
  Returns:
    A list of Tool objects.
  RmR�tAdditionalOptionsR�R�(R�R|RRYRfRiR�(Rtt	tool_listR�R�tsettings_fixedRvRw((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_ConvertToolsToExpectedFormAscCsDt|||�}t|�}|jt||�d|d|�dS(s�Add to the project file the configuration specified by config.

  Arguments:
    p: The target project being generated.
    spec: the target project dict.
    tools: A dictionary of settings; the tool name is the key.
    config: The dictionary that defines the special processing to be done
            for this configuration.
    config_type: The configuration type, a number as defined by Microsoft.
    config_name: The name of the configuration.
  tattrsRtN(t_GetMSVSAttributesR�t	AddConfigR�(R�R�RtR4RWR�t
attributesR�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�\sc	Cs�i}|jdi�}x|D]}||||<qW|jdg�}t|�}|rqdj|�|d<n||d<|jdd�}t|�d|d<d	|kr�d
}t|�d|d	<n-t|d	�d}tj|�}||d	<|S(Ntmsvs_configuration_attributesRR�tInheritedPropertySheetstConfigurationTypetOutputDirectorys"$(SolutionDir)$(ConfigurationName)s\tIntermediateDirectorys'$(ConfigurationName)\obj\$(ProjectName)(R=R^RYR[R�R�(	R�R4RWtprepared_attrstsource_attrstatvsprops_dirsR�tintermediate((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�os&

		
cCs|jd�|D��dS(Ncss|]}t|�VqdS(N(RU(t.0Ro((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pys	<genexpr>�s(R�(tsources_sett
sources_array((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_AddNormalizedSources�sc	Cs<t�}t||jdg��t�}|jd�sJ|j|�nx�|jdg�D]�}|d}g|D]}t|�^qt}t|�}|j|�|jd�s�|j|�nt|jdt��r]t||jdg��q]q]Wx3|jdg�D]}t||jd	g��qW||fS(
s.Prepare list of sources and excluded sources.

  Besides the sources specified directly in the spec, adds the gyp file so
  that a change to it will cause a re-compile. Also adds appropriate sources
  for actions and copies. Assumes later stage will un-exclude files which
  have custom build steps attached.

  Arguments:
    spec: The target dictionary containing the properties of the target.
    gyp_file: The name of the gyp file.
  Returns:
    A pair of (list of sources, list of excluded sources).
    The sources will be relative to the gyp file.
  Rkt
standalonetactionsR�R!RR�tcopiesR@(RR�R=R�RUR�R�R�(	R�R6RXRkRR�R�R]tcpy((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRI�s"		

 cCs�|jt|jdg���|j|�t|�}t|�}t||�}t|�}g|D]}	|	|krf|	^qf}
g|D]}	|	jd�^q�}t|d|
d|d|�}|j�rSx�t	g|D]}t
|tj�^q��rOt
tg|D]}|j^q��dkrOg|D]}|jd^q3}q�Wn<x9t
|�dkr�t
|dtj�r�|dj}qVW|||fS(s&Adjusts the list of sources and excluded sources.

  Also converts the sets to lists.

  Arguments:
    spec: The target dictionary containing the properties of the target.
    options: Global generator options.
    gyp_dir: The path to the gyp file being processed.
    sources: A set of sources to be included for this project.
    excluded_sources: A set of sources to be excluded for this project.
    version: A MSVSVersion object.
  Returns:
    A trio of (list of sources, list of excluded sources,
               path of excluded IDL file)
  tsources_excludeds\R_R`Raii(R�RR=R^t_IdlFilesHandledNonNativelyt_GetPrecompileRelatedFilesR�RhRgtallR�RiRjRetsetR�Rb(R�R�tgyp_dirRkRR`R/RYtprecompiled_relatedR]tfully_excludedRo((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRJ�s$
%"	..'+cCs�t}xL|jdg�D]8}|ddkrt|jdd��rt}PqqW|r�g|D]}|jd�rb|^qb}ng}|S(NR�R�tidlRis.idl(R�R=R�R�R�(R�Rkt	using_idlR�R]RY((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR��s(+cCsgg}xZ|dj�D]H\}}x9tD]1}|j|�}|r*|jt|��q*q*WqW|S(NR�(R�tprecomp_keysR=RfR[(R�R�R�R4tkRr((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR��s
c
	Cs�t|||�}xz|j�D]l\}}|rQt|�t|d�krQqx7|D]/\}}	|j|t||	�idd6�qXWqWdS(NR�R}tExcludedFromBuild(t_GetExcludedFilesFromBuildR�ReR�R�(
R�R�RRYR`t
exclusionst	file_nametexcluded_configsR�R4((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRRsc
Cs�i}x�|D]�}g}xk|dj�D]Y\}}gtD]}t|j|d��^q=}	||	kr*|j||f�q*q*W|||<q
WxR|D]J}g}x1|dj�D]\}}|j||f�q�W|||<q�W|S(NR�R	(R�R�R[R=Rf(
R�RRYR�RrR�R�R4R]t	precomped((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�s
+
cCsvt�}xH|dj�D]6\}}x'|jdg�D]}|j|�q9WqWx|D]}|j|�q[WdS(NR�tmsvs_tool_files(RR�R=R�R�(R�R�t
tool_filesR�R4Rr((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRM(s	
c	s�g�x��dj�D]�\}}|jd�}|rt|�}tjdidd6�}�j|t||�id|g�tjj	|�\}}|dkr�dd	d
g�q�dg�qqW����fd���r��|�ndS(NR�R-RnRaRyRts.cs.ccs.cpps.cxxcs�x�|D]�}t|tj�r/�|j�qtjj|�\}}|�krxl�dj�D]W\}}tjdidd6dd6�}�j	t
|�t||�id|g�qdWqqWdS(NR�Rnt0Rys$(NOINHERIT)R{Rt(R�RiRjRbR;RPR�R�R�R�R[R�(tsource_treeRSR:R�R�R4R�(tDisableForSourceTreet#extensions_excluded_from_precompileR�R�(sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�Fs
	

(
R�R=R[RiR�R�R�R;RPR�(	R�RkR�R�R4RSR�R:R�((R�R�R�R�sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRN2s 	c

Cs�|jdg�}t�}x�|D]�}|jd�p=|g}|d}||k}t||dtd|�}	|j|�t|d|d|jdg�d|jd|d	�d
|	�q"WdS(NR�R�iR�R�R�R�R�taction_nameR�(R=R�R�R�R�R�(
R�R�RVR�thave_setup_envR�R�tattached_totneed_setup_envR�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyROYs	

	
	c
Cs�d|krO|d}|jdg�}|jdg�}|jdd�}n7t|jdd��r�dd	g}g}d}ndSt|||�}x=|d
j�D]+\}}	|jt||	�|||�q�W|j�dS(Ntrun_asR�tenvironmenttworking_directoryR�ttestis
$(TargetPath)s--gtest_print_timeR�(R=R�R`R�tAddDebugSettingsR�R�(
tproject_pathR/R�R�R�R�R�R_R�R�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRQqs
	cCsOt|�}x<|D]4\}}}}t|d|d|d|d|�qWdS(NR�R�R�R�(t
_GetCopiesR�(R�R�R�R�R�R�R�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRP�sc		CsKg}x>|jdg�D]*}x!|jdg�D]
}tjj|dtjj|��}|jd�r�|d }tj|�d}tj|�d}dt|�|t|�|f}|j	|gd	|g|d
||ff�q2dt|d�t|�t|�f}|j	|g|g|d
||ff�q2WqW|S(NR�R@tdestinationRVi����iis'cd "%s" && xcopy /e /f /y "%s" "%s\%s\"tdummy_copiessCopying %s to %ss7mkdir "%s" 2>nul & set ERRORLEVEL=0 & copy /Y "%s" "%s"(
R=R;RPRYR:R�t	posixpathR�R[Rf(	R�R�R�tsrctdsttsrc_baretbase_dirt	outer_dirR�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR��s %
&1cCsh|s|jtj�r|Stjj|�\}}t||�}||kr`t�||<n||S(N(R�R;tsepRPR�t_GetPathDictR~(trootRPtparenttfoldertparent_dict((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR��scCs�g}x�|j�D]�\}}t|�tkr�ttjj||�||�}|re||7}q�tjtjj||�dd|dd|�}|j	|�q|j	|�qW|S(NR�t(t)tentries(
R�R|R~t_DictsToFoldersR;RPRYR't
MSVSFolderRf(t	base_pathtbuckettflattchildrenR�Rbtfolder_children((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�s
	cCs�t|�tkrPt|�dkrP|j�d|dkrP||j�dSt|�tkrf|Sx%|D]}t|||�||<qmW|S(Niis.vcproj(R|R~ReRt_CollapseSingles(R�tnodetchild((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�s
c	Cs�i}x`|D]X}tjj|�dd!\}}tjj|�}t||�}||||d<q
WxJt|�dkr�t||j	�d�t
kr�||j	�d}qlWtd|�}td||�S(Niis.vcprojiR	(
RR�tParseQualifiedTargetR;RPR�R�ReR|RR~RR(	tsln_projectstproject_objectsRR�R�RXttargetR�t	path_dict((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GatherSolutionFolders�s
5c
Cs�t|�}|jd�}|s?|d|j|j�}ntjj|�}tjj	tjj
|�|�}d}|jr�tjj
tjj
|��}	tjj	|j|�}tjj|	tjj
|��}n||fS(NR2R�(R"R=R�tProjectExtensionRR�t	BuildFileR;RPRYR�R�tgenerator_outputtabspathRF(
tqualified_targetR�R�RaR*t
proj_filenameRER)t
fix_prefixtproject_dir_path((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetPathOfProject�s!	cCs{i}xn|dj�D]\\}}t||�}|jdt|��}dt|t|��|f}|||<qW|S(NR�tmsvs_target_platforms%s|%s(R�R�R=R�R�(R�tconfig_platform_overridesR�R�tconfig_fullnameR8tfixed_config_fullname((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetPlatformOverridesOfProject�scCsdi}x�|D]�}||}|ddkr@td|��nt||||�\}at||�}t|�}	tjj|�}
tj	|d|dd|d|d|
d	|	d
t�}|j
�r�|jt|||��n|||<q
Wxh|j
�D]Z}|jjd�s|jjdg�}
g|
D]}||^q6}
|j|
�qqW|S(
sXCreate a MSVSProject object for the targets found in target list.

  Arguments:
    target_list: the list of targets to generate project objects for.
    target_dicts: the dictionary of specifications.
    options: global generator options.
    msvs_version: the MSVSVersion object.
  Returns:
    A set of created projects, keyed by target.
  R0Rs9Multiple toolsets not supported in msvs build (target %s)R�R�R+R�RERRWR!tdependencies(RRRWR,RRR�RR'RiRgtset_msbuild_toolsetR1tvaluesR�R=tset_dependencies(ttarget_listttarget_dictsR�RatprojectsRR�R)R+t	overridesREtobjR5tdepsR�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_CreateProjectObjectss<



	
	c
CsEx>|D]6}||}|jd�r,qn|jdd�}d|d<|jd�s�tjj|�\}}}tjj|�}d}	|jd�dkr�|	d	7}	ntjjtjj|d
j	|�t
j|�|	�|d<n|jd�s|dd
dg|d<n|jd�s|dd
ddg|d<qqWdS(s�Initialize targets for the ninja flavor.

  This sets up the necessary variables in the targets to generate msvs projects
  that use ninja as an external builder. The variables in the spec are only set
  if they have not been set. This allows individual specs to override the
  default values initialized here.
  Arguments:
    params: Params provided to the generator.
    target_list: List of target pairs: 'base/base.gyp:base'.
    target_dicts: Dict of target properties keyed on target pair.
  R!tmsvs_path_to_ninjas	ninja.exetninjaR"s$(Configuration)ttarget_archtx64t_x64R�R#s-Cs	$(OutDir)s$(ProjectName)R$s-tcleanN(R=RR�RR;RPR�RYRFttoplevel_dirtninja_generatortComputeOutputDir(
tparamsR#R$RR�t
path_to_ninjaRXR�R�R[((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_InitNinjaFlavor5s6



	cCs�|jdi�}tj|jdd��}||d<|j�|d<tjjdd�jd�dks�tjjd	d�jd�dkr�d
|d<n
d|d<tjj	|�d
kr�d|d<ndS(s4Generated variables that require params to be known.R6RatautotMSVS_VERSIONtPROCESSOR_ARCHITECTURER	t64itPROCESSOR_ARCHITEW6432i@tMSVS_OS_BITSi R+s$(OutDir)genRN(
R=tMSVSVersiontSelectVisualStudioVersiont	ShortNameR;R<R�RR�t	GetFlavor(tdefault_variablesR2R6Ra((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pytCalculateVariableses
$$

cCs�|d}|d}tjj|jddd�}xy|j�D]k\}}tjj|�\}}	|	dkruq?n||jd}
|jr?tjj|j|
�}
q?q?Wx>|D]6}||
d|g}d	||fGHtj|�}
q�WdS(
NR�RatCommon7tIDEs
devenv.coms.gyps.slns/BuildsBuilding [%s]: %s(	R;RPRYR�R�R�RR>t
check_call(tdataR�R2R�RatdevenvREtbuild_file_dicttbuild_file_roottbuild_file_exttsln_pathR4R�trtn((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pytPerformBuild�s

	
cCs�|d}|d}|jdi�}tj||�\}}tj||t�\}}|jd�dkr�t|||�nt�}xO|D]G}||}	x4|	dj�D]"\}
}|jt	|
|��q�Wq�Wt
|�}t||||�}g}
x9|j�D]+}|j
a
|
jt||||��qWda
x�|D]�}|jd�sgqLntjj|�d|jd	}|jr�tjj|j|�}ntjj||�}|tjj||�7}t||d
|j��}tj|d|d|d
t d|�}|j!�qLW|
r~ddjt|
��}|jdt �rjt"|��q~t#j$d|IJndS(s
Generate .sln and .vcproj files.

  This is the entry point for this generator.
  Arguments:
    target_list: List of target pairs: 'base/base.gyp:base'.
    target_dicts: Dict of target properties keyed on target pair.
    data: Dictionary containing per .gyp data.
  R�RaR6tflavorR+R�s.gypis.slnRRtvariantstwebsitePropertiesR/sMissing input files:
s
tmsvs_error_on_missing_sourcess	Warning: N(%R=tMSVSUtiltShardTargetstInsertLargePdbShimstgenerator_default_variablesR4R�R�R�R�RR)R!RWtextendR7R�R�R;RPR�R�RRYRR�tBuildFileTargetstDeepDependencyTargetsRtFlatSolutionR'tMSVSSolutionR�tWriteRR7R6(R#R$RDR2R�RaR6tconfigsRR�R�R4R
RZR5RERIRtroot_entriestslnt
error_message((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pytGenerateOutput�sX

	

		
!		cCs�g}g}td|||||�|rxdidd6dd6dg|dg|g}tj||dtd	t�n"tjj|�r�tj|�nd
S(sVGenerate the filters file.

  This file is used by Visual Studio to organize the presentation of source
  files into folders.

  Arguments:
      filters_path: The path of the file to be created.
      source_files: The hierarchical structure of all the sources.
      extension_to_rule_name: A dictionary mapping file extensions to rules.
  R	tProjects4.0tToolsVersions3http://schemas.microsoft.com/developer/msbuild/2003txmlnst	ItemGrouptprettyR.N(t_AppendFiltersForMSBuildteasy_xmltWriteXmlIfChangedR�R;RPtexiststunlink(tfilters_pathtsource_filestrule_dependenciestextension_to_rule_nametfilter_grouptsource_grouptcontent((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GenerateMSBuildFiltersFile�s


cCs�x�|D]�}t|tj�r�|s1|j}nd||jf}|jdi|d6dtj|j�gg�t||j||||�qt	|||�\}}	|	i|d6g}
|r�|
jd|g�n|j|
�qWdS(s�Creates the list of filters and sources to be added in the filter file.

  Args:
      parent_filter_name: The name of the filter under which the sources are
          found.
      sources: The hierarchy of filters and sources to process.
      extension_to_rule_name: A dictionary mapping file extensions to rules.
      filter_group: The list to which filter entries will be appended.
      source_group: The list to which source entries will be appeneded.
  s%s\%sRjtIncludetUniqueIdentifierN(
R�RiRjR�RfR'R(RdRbt_MapFileToMsBuildSourceType(tparent_filter_nameRkRkRlRmRnRStfilter_nameR�telementtsource_entry((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRds"



	cCs�tjj|�\}}||kr7d}||}n�|dkrRd}d}n�|dkrmd
}d}nx|dkr�d
}d}n]|dkr�d}d}nB|dkr�d}d}n'||kr�d}d}nd}d}||fS(sReturns the group and element type of the source file.

  Arguments:
      source: The source file name.
      extension_to_rule_name: A dictionary mapping file extensions to rules.

  Returns:
      A pair of (group this file should be part of, the label of element)
  R�s.ccs.cpps.cs.cxxRCt	ClCompiles.hs.hxxtincludet	ClIncludes.rctresourcetResourceCompiles.asmtmasmtMASMs.idltmidltMidltrule_dependencytCustomBuildRgR�(s.ccs.cpps.cs.cxx(s.hs.hxx(R;RPR�(RSRkRlR�R=RFRv((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRs*s2
						c
Cs�|jdg�}
g|
D]$}t|jdd��s|^q}g|
D]$}t|jdd��rJ|^qJ}
g}xx|D]p}d|kr�|jdg�r�q�nt||�}|j|�|j|jjd��|j|	|j<q�W|r�|d|j	}|d}|d	}|d
}|j
|�|j
|�tjj
||�}tjj
||�}tjj
||�}t||�t||�t||�n|
r�t|
|||||�nt|
||t�dS(NR�RiR�R�R�R�s.propss.targetss.xml(R=R�tMSBuildRuleRfR�R�R�R�R�R�R�R;RPRYt_GenerateMSBuildRulePropsFilet_GenerateMSBuildRuleTargetsFilet_GenerateMSBuildRuleXmlFileR�RR�(R�R�R�RkRtprops_files_of_rulesttargets_files_of_rulesR�RkRlR�R�RRt
msbuild_rulesR�tmsbuild_ruletbaset
props_namettargets_nametxml_namet
props_pathttargets_pathtxml_path((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GenerateRulesForMSBuildQs8	11








R�cBseZdZd�ZRS(s-Used to store information used to generate an MSBuild rule.

  Attributes:
    rule_name: The rule name, sanitized to use in XML.
    target_name: The name of the target.
    after_targets: The name of the AfterTargets element.
    before_targets: The name of the BeforeTargets element.
    depends_on: The name of the DependsOn element.
    compute_output: The name of the ComputeOutput element.
    dirs_to_make: The name of the DirsToMake element.
    inputs: The name of the _inputs element.
    tlog: The name of the _tlog element.
    extension: The extension this rule applies to.
    description: The message displayed when this rule is invoked.
    additional_dependencies: A string listing additional dependencies.
    outputs: The outputs of this rule.
    command: The command used to run the rule.
  cCs�|d|_tjdd|j�|_d|j|_|jd|_|jd|_|jd|_d|j|_|jd|_	|jd	|_
|jd
|_|d|_|jj
d�s�d|j|_ntj|jd
|j��|_t|jdg��}djg|D]}tj|�^q �|_t|jdg��}djg|D]}tj|�^qf�|_t||dtdt�}tj|�|_dS(NR�s\WR�tAfterTargetst
BeforeTargetst	DependsOnsCompute%sOutputt
DirsToMaket_inputst_tlogR�R�R�R�R�R�R�R�(tdisplay_nameRBRR�R�t
after_targetstbefore_targetst
depends_ontcompute_outputtdirs_to_makeR�ttlogR�t
startswithR�tConvertVCMacrosToMSBuildR=R�R^RYR�R�R�R�R�(tselfR�R�told_additional_dependenciesR]told_outputstold_command((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt__init__�s0

	%	%	(t__name__t
__module__t__doc__R�(((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�~scCs�didd6g}x�|D]�}|jdid|j|jfd6|jdg|jdggd|jid	d6d
|jggd|jd|jgd
|jgd|jgd|jgggg�qWt	j
||dtdt�dS(sGenerate the .props file.R_s3http://schemas.microsoft.com/developer/msbuild/2003Rat
PropertyGroupsH'$(%s)' == '' and '$(%s)' == '' and '$(ConfigurationType)' != 'Makefile't	ConditionR�R�s$'$(ConfigurationType)' != 'Makefile's_SelectedFiles;$(%s)tItemDefinitionGrouptCommandLineTemplateR�tExecutionDescriptionR�RcR.N(RTR�R�R�R�R�R�R�R�ReRfR�(R�R�RoR�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR��s*

cCsdidd6g}ddidd6gg}x7|D]/}|jdi|jd6d	|jgg�q3W|j|�xB|D]:}|jd
i|jd6dd
6dd6ddgg�qzWx6|D].}|j}d|}d||f}d|}d}	didd6|id|d6dd6gg}
d|jid|d6gg}d|jid|d6d||fd6dd|gdd|jggg}d id!d"6d#|d$6g}
d%id&|j|jfd6d'd(6d)|j|jfd*6g}d%id&|j|jfd6d+d(6d,|j|jfd*6g}|id&||fd6d-d.6d!d/6d!d06d1|d26d3|d46|d6g}|jd5i|jd66d7|jd86d7|jd96d:|d6d;|j|j	fd<6|d=6|d6|
|||
|||g	d>d?d@dA|j	gdBdCdA|j	ggd5i|j	d66d:|d6d|j
id&||fd6d|d6gdDid|j
d6|	d6gdEid|j
d6|	d6gdFid|j
d6|	d6ggdGidH|j
dI6ggg�q�Wtj||dJt
dKt
�dLS(MsGenerate the .targets file.R_s3http://schemas.microsoft.com/developer/msbuild/2003RaRbtPropertyPageSchemas5$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xmlRqtAvailableItemNametTargetst	UsingTasktTaskNametXamlTaskFactorytTaskFactorysMicrosoft.Build.Tasks.v4.0tAssemblyNametTasks%%(%s.Outputs)sC%%(%s.Identity);%%(%s.AdditionalDependencies);$(MSBuildProjectFile)s%%(%s.Identity)sd'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib's'@(SelectedFiles)' != ''R�s@(%s)tRemoves#'%(Identity)' != '@(SelectedFiles)'s%%(%s.AdditionalDependencies)s?'%%(%s.Outputs)' != '' and '%%(%s.ExcludedFromBuild)' != 'true'tSources
@(%s, '|')tInputss@(%s -> '%%(Fullpath)', ';')tMessagetHight
Importances%%(%s.ExecutionDescription)tTexttWriteLinesToFiles6'@(%s)' != '' and '%%(%s.ExcludedFromBuild)' != 'true's$$(IntDir)$(ProjectName).write.1.tlogtFiles$^%%(%s.Source);@(%s->'%%(Fullpath)')tLiness#$(IntDir)$(ProjectName).read.1.tlogs^%%(%s.Source);%%(%s.Inputs)R}tEchoOfftStandardOutputImportancetStandardErrorImportances%%(%s.CommandLineTemplate)R�s%%(%s.AdditionalOptions)R�tTargettNames$(%s)R�R�s
'@(%s)' != ''s$(%s);%stDependsOnTargetsR�R�tComputeLinkInputsTargetss$(ComputeLinkInputsTargets);s%s;tComputeLibInputsTargetss$(ComputeLibInputsTargets);R�R�tImpLibtMakeDirs!@(%s->'%%(RootDir)%%(Directory)')RzRcR.N(RfR�R�R�R�RTR�R�R�R�R�ReRfR�(R�R�Rot
item_groupR�R�ttarget_outputst
target_inputstrule_inputstextension_conditiontremove_sectiontinputs_sectiontlogging_sectiontmessage_sectiontwrite_tlog_sectiontread_tlog_sectiontcommand_and_input_section((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR��s�





	





	

	




cCs�didd6dd6dd6dd	6g}xD|D]<}|jd
i|jd6dd
6|jd6dd6ddidd6|jd6ggddidd6dddgggdidd6dd6dddggggdidd6dd6d d!6d"d#6d$didd6|jd6d%d&6gggd'id(d6dd6d)d*6d)d+6gd,i|jd6dd6d-d.6d)d+6d/dd0ggd1dd2ggd3d4id5d6d6|jd76ggd8didd6d d96gggd,i|jd6dd6d-d.6d)d+6d/dd:ggd1dd;ggd3d4id5d6d6|jd76ggd8didd6d<d6d d96gggdid=d6d=d6d)d*6d)d+6gd'id>d6d?d6d)d*6d)d+6gdid@d6dAd6d)d+6dBd*6gd'idCd6dCd6dd6dDddEggdFddEggggdi|jd6|jd6gdGidH|jd6|jdI6gdIi|jd6d<d6|jd6gg�q/Wtj||dJtdKt�dS(LNtProjectSchemaDefinitionssTclr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.FrameworkRas,http://schemas.microsoft.com/winfx/2006/xamlsxmlns:xs&clr-namespace:System;assembly=mscorlibs	xmlns:syss+Microsoft.Cpp.Dev10.ConvertPropertyCallbacksxmlns:transformCallbacktRuleR�R�tPageTemplatetDisplayNamet200tOrdersRule.DataSourcet
DataSourcetProjectFiletPersistencetItemTypesRule.CategoriestCategorytGeneralsCategory.DisplayNames
sys:StringsCommand LineR�tSubtypetStringListPropertyR�R}t
IsRequiredR�tSwitchsStringListProperty.DataSourcetItemt
SourceTypetStringPropertyR�R�tVisibletIncludeInCommandLinetDynamicEnumPropertyR�tEnumProvidersDynamicEnumProperty.DisplayNamesExecute BeforesDynamicEnumProperty.Descriptions@Specifies the targets for the build customization to run before.s$DynamicEnumProperty.ProviderSettingst
NameValuePairtExcludes^%s|^ComputetValuesDynamicEnumProperty.DataSourcetHasConfigurationConditions
Execute Afters?Specifies the targets for the build customization to run after.R	R�R�sExecution DescriptionR�sAdditional DependenciestfalseR�sStringProperty.DisplayNamesAdditional OptionssStringProperty.Descriptiont
FileExtensionRtContentTypeRcR.(	RTR�R�R�R�R�ReRfR�(R�R�RoR�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�x	s�





























cCs2|jdd�d}|jdd�}||fS(NR�iiR�R�(trsplitR=(R�R�R[R8((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetConfigurationAndPlatform*
scCsdt||�S(Ns''$(Configuration)|$(Platform)'=='%s|%s'(R�(R�R�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetConfigurationCondition0
scCs�didd6g}xqt|j��D]]\}}t||�\}}d||f}|jdi|d6d|gd|gg�q&W|gS(	NRbtProjectConfigurationstLabels%s|%stProjectConfigurationRqt
ConfigurationtPlatform(tsortedR�R�Rf(R�RFR�R�R[R8tdesignation((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt _GetMSBuildProjectConfigurations5
s
	cCs�tjj|�d}didd6d|gddgd|gd	d
ggg}tjjd�dks�tjjd
�dkr�|djddg�n|jd�r�|djddg�|djdd
g�|jd�r|jd�}|djd|g�n|djddg�|jd�r�|jd�}|djd|g�|jd�r�|jd�}|djd|g�q�|djd|g�n|jd�r�|djddg�q�|djddg�n|S(NiR�tGlobalsR�tProjectGuidtKeywordt	Win32Projt
RootNamespacet#IgnoreWarnCompileDuplicatedFilenameR}R7tAMD64R9tPreferredToolArchitectureR-R&tDefaultLanguagesen-UStAppContainerApplicationR)tApplicationTypeRevisions8.1R*tWindowsTargetPlatformVersionR+tWindowsTargetPlatformMinVersionR(tApplicationTypes
Windows Phones
Windows Store(R;RPR�R<R=Rf(R�R+t
gyp_file_namet	namespacet
propertiestapp_type_revisionttarget_platform_versionttarget_platform_minversion((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetMSBuildGlobalPropertiesA
s<
			





cCs�i}x�|dj�D]~\}}t|||�}t||�}|jd�}t||d|d�|rd|kr�t||d|�q�qqWt|d|�S(NR�tCharacterSetR�R&R�(R�t_GetMSBuildAttributesR�R=t_AddConditionalPropertyt_GetMSBuildPropertyGroup(R�RERR�R�tmsbuild_attributest	conditiont
character_set((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetMSBuildConfigurationDetailsk
scCs2i}|r.didd6d|ggg}n|S(NR�tLocalsR�tPlatformToolset((R-R((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetMSBuildLocalPropertiesz
s

cCsUd}i}t}xet|j��D]Q\}}t||�}|jd�rlt|d�||<t}q%d||<q%W|s�didd6di|d6d	|d
6dd6gggSg}x�|j�D]�\}}	didd6|d
6di|d6d	|d
6dd6gg}
x(|	D] }|
jdi|d6g�qW|j|
�q�W|SdS(Ns3$(UserRootDir)\Microsoft.Cpp.$(Platform).user.propst
msbuild_propsR	tImportGrouptPropertySheetsR�tImportR_sexists('%s')R�tLocalAppDataPlatform(R�R�R�R�thas_keyR^R�Rf(R�t
user_propstadditional_propstprops_specifiedR�R�R[tsheetsRtpropstimport_groupt
props_file((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetMSBuildPropertySheets�
s:	




cCs�t||�}t|||�}i}x�|D]�}|dkr|tj||�}|jd�so|d7}n|||<q.|dkr�t||�||<q.|dkr�t||�||<q.d|GHq.W|S(NR�R�s\RR�s3Warning: Do not know how to convert MSVS attribute (sIntermediateDirectorysOutputDirectory(RGR�R�R�R�t_ConvertMSVSCharacterSett_ConvertMSVSConfigurationType(R�R4RERWtmsvs_attributesRR�t	directory((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_ConvertMSVSBuildAttributes�
s



cCs2|j�r.idd6dd6dd6|}n|S(Nt	MultiByteR�tUnicodeRaRc(tisdigit(tchar_set((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR/�
s
cCs9|j�r5idd6dd6dd6dd6|}n|S(	NtApplicationRatDynamicLibraryRct
StaticLibraryRetUtilityRf(R6(RW((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR0�
s
cCs%d|kr!t|||�}n�t||�}t|�}|jdi�}|jd|�|jdd�}t|�d|d<d|kr�td�d}||d<nd|kr�t|d�|d<nd	|kr|jd
d�}|jdd
�}||}	|	|d	<nd|krOd|krO|jd�}
d|
|d<n|jd�r�|jdd�}t|�d|d<nidd6dd6dd6dd6}|j|d�}
|
r!|d}||
jd�}|r�t|�|d<n||
jd�}|r!||d<q!n|S(Nt msbuild_configuration_attributesR�R�s$(SolutionDir)$(Configuration)s\R�s$(Configuration)Rt
TargetNameR�R	R�s$(ProjectName)t	TargetExtR�R�R!R"R�RbR9RdR�R8R|tfinalized_msbuild_settingsRst
TargetPath(R3RGR0R=R;R[R/(R�R4RERRWR�R�RdR�R�R=texternal_out_dirtmsbuild_tool_mapR�tmsbuild_settingsR�t
target_ext((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�
sR		




cCsg}|jddg�d}|r�dt|�}|j|�|jdd�}|j|�|r�ddj|�}q�ni}x~t|j��D]j\}}	t||	�}
t||	|�}|	d	}t	||
d
|d�t	||
d|d
�t	||
d|d�d|kr;t	||
d|d�n|jd�rdt	||
d|d�n|jd�r�t	||
d|d�n|r�t	||
d|�n|jdi�}
xEt|
j��D]1\}}t
d||�}t	||
||�q�Wq�Wt|d|�S(NRR�is"$(MSBuildProjectDirectory)\%s\bin\s
cygwin\bint	python_26s$(ExecutablePath);R�R?tIntDirR�tOutDirR�R=R>R@tExecutablePathR	(
R=R[RfRZRYR�R�R�RRt_GetValueFormattedForMSBuildRR�(R�R�REt	new_pathstcygwin_dirstcyg_pathtpython_pathRR�R[RR�RCt
tool_settingsRwtformatted_value((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt(_GetMSBuildConfigurationGlobalPropertiessJ



cCsW||kri||<n||}||kr<g||<n||}|j|�dS(s�Adds a property / conditional value pair to a dictionary.

  Arguments:
    properties: The dictionary to be modified.  The key is the name of the
        property.  The value is itself a dictionary; its key is the value and
        the value a list of condition for which this value is true.
    condition: The condition under which the named property has the value.
    name: The name of the property.
    value: The value of the property.
  N(Rf(RRR�RwR!t
conditions((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR>s



s\$\(([a-zA-Z_][a-zA-Z0-9_]*)\)csdg}|r&|ji|d6�nt|d�}�fd�}tjj�j�|�}x�t|�D]�}�|}xvt|j��D]b\}	}
t|
�|kr�|j||	g�q�x+|
D]#}|j|i|d6|	g�q�Wq�WqmW|gS(s�Returns a PropertyGroup definition for the specified properties.

  Arguments:
    spec: The target project dict.
    label: An optional label for the PropertyGroup.
    properties: The dictionary to be converted.  The key is the name of the
        property.  The value is itself a dictionary; its key is the value and
        the value a list of condition for which this value is true.
  R�R�R�csut�}xet�|j��D]M}|jtgtj|�D]$}|�kr?||kr?|^q?��q W|S(N(R�R�RR�tMSVS_VARIABLE_REFERENCEtfindall(R	tedgesRwtv(R(sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pytGetEdgesds
		,R�(	RfReRR�tTopologicallySortedRR�R�R�(R�tlabelRRFtnum_configurationsRVtproperties_orderedR�R!RwRQR((RsW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRVs
		

)cCs�g}x�t|j��D]�\}}|d}dit||�d6g}x�t|j��D]|\}}|r^|r�|g}	xEt|j��D]1\}}
t|||
�}|	j||g�q�W|j|	�q�q^q^W|j|�qW|S(NR?R�R�(R�R�R�RIRf(R�R�tgroupsR�R[RCRFRuRNR�RwRO((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetMSBuildToolSettingsSections�s 
			cCs�d|kr,t}|d}tj|�n't}|jdi�}tj|�}t|�\}}}t|�}t|�}	t	|dt�\}
}}t
|�}
t|�}|r(g|D]}|dkr�|^q�}dg}x>|D]3}|j|�}|r�d|t|�fGHq�q�Wng|D]}t
|�^q/}t|�}|jd�}|jd�}t|�}|jd	�}t|d
d|�t|dd|�t|d
d|�t|dd|�t|dd|	�|
r
t||d|
dt�n|
r/t||d|
dt�nt|d
d|�t|d
d|�t|d
d|�|r�tjj|�d}t|d
dd�t|d
d|�t|d
d|g�nt|d
dd�t|d
dd�|jd�rt|dd d�n|d!d"kr4t|dd d#�n|rPt|dd$|�n||d%<|rvt|d&d'|�n|r�t|d(d'|�ndS()NRCRlRis
_HAS_TR1=0R�sXWarning: The automatic conversion to MSBuild does not handle %s.  Ignoring setting of %sRjRkR,RxRoR�R|R�R�RrRsRxR>RtRvitPrecompiledHeadertUsetPrecompiledHeaderFileR{tNotUsingtCompileAsWinRTR�R'R	R|R|RdR}R~R?t
PreBuildEventtCommandtPostBuildEvent(R�R�tValidateMSBuildSettingsR�R=tConvertToMSBuildSettingsRR�R�R�R�R�R}RR�R�RyRsR;RPR�(R�R[t	convertedRCRlR�R�R�R�R�R�R�R�RDR�R�tignored_settingstignored_settingRwR�R�R�R�R�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_FinalizeMSBuildSettings�s�
%	
	
	
	


	
	
	
	
	
cCs�t|�tkr�|d
kr2|jd|�nidgd6dgd	6dgd
6}||kr{|||kr{d}nd}|jg|D]}tj|�^q��}ntj|�}|S(NRoRrR�t
DelayLoadDLLsRvRts%%(%s)RxR�R�R�R�(sAdditionalIncludeDirectoriessAdditionalLibraryDirectoriessAdditionalOptionsRksDisableSpecificWarningssPreprocessorDefinitions(R|RRfRYR�R�(RuR�Rwt
exceptionstcharR]RO((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRI�s&	


	(cCs�g}x�|D]z}t|tj�rA|jt|j|��q
d|kr
tjj||�}tjj	|�s�|j
|�q�q
q
W|S(s�Verifies that all source files exist on disk.

  Checks that all regular source files, i.e. not created at run time,
  exist on disk.  Missing files cause needless recompilation but no otherwise
  visible errors.

  Arguments:
    sources: A recursive list of Filter/file names.
    root_dir: The root directory for the relative path names.
  Returns:
    A list of source files that cannot be found on disk.
  RO(R�RiRjRTRKRbR;RPRYRgRf(Rktroot_dirRZRSt	full_path((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRKs

c	Cs�ddddddddg}i}	x|D]}
g|	|
<q+Wt||||	||||�g}x3|D]+}
|	|
rk|jd	g|	|
�qkqkW|r�|jd	g|�n|S(
NRgR}RRyRCR{R�R�Rb(t_AddSources2Rf(R�RkR�RkRltactions_spectsources_handled_by_actionR`R[tgrouped_sourcestg((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetMSBuildSources0s	



c
CsHg}x;|D]3}	t|	tj�rJt||	j||||||�q
|	|kr
g}
|j|	g�}t|�t|d�kr�|
jddg�nIxFt|�D]8\}}
t	||
�}|
jdi|d6dg�q�Wx|dj
�D]\}}
|
jdd�}|dkr{t|�}|s{tj
j|�\}}|dkrldd	d
g}qxdg}q{n||	kr�t	||
�}|
jdi|d6dg�q�xF|D]>}|	j|�r�|
jddg�|
jd
dg�q�q�Wq�Wt|	||�\}}||j|i|	d6g|
�q
q
WdS(NR�R�R}R�R-R	s.cs.ccs.cpps.cxxR]tCreateR{Rq(R�RiRjRpRbR=ReRfR�R�R�R[R;RPR�R�Rs(R�RkR�RsRkRlRrR`R�RStdetailtexcluded_configurationsR�R[Rtprecompiled_sourceR:R�RFRv((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyRpEsL

	
	


	c	Cs�g}|jr�dg}x�|jD]�}|j}tjj|j�d}tjj|j|�}di|d6d|gddgg}xL|jj	di�j
�D]/}|j	d	d�r�|jd
dg�Pq�q�W|j|�q"W|j|�n|S(NRbitProjectReferenceRqR_tReferenceOutputAssemblyR�R�t&msvs_2010_disable_uldi_when_referencedtUseLibraryDependencyInputs(RR+R;RPR�RR�RFR�R=t
itervaluesRf(	R5t
referencesRFt
dependencyR+RTt
relative_pathtproject_refR4((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt_GetMSBuildProjectReferences~s$			
	"c!Cs8|j}|d}tjj|j�\}}tjj|j�t|j�}tjj	||�}	tjj|j�d}
t
|||
�\}}i}
t�}t�}t�}i}|jdt
�}|jd�st||||||||
||�
n%|jdg�}t|||t
�t|||||||�\}}}|jd�s�t|
||j�t|
|�t||
�}nt|||�}t||
�\}}t|jd|||�t||�}x!|j�D]}t||�q�Wdidd	6gg}did
d	6gg}didd	6gg}didd	6gg}did
d	6gg}didd6gg}d	idd6|j�d6dd6g} | t|�7} | t||j|�7} | |7} | t||j�7} |jd�r| td�7} n| t|j �7} | |7} | |7} | t!|�7} | t"|�7} | |7} | t#|||j�7} | t$||�7} | t%||||||||�7} | t&|�7} | |7} | |7} | t'|�7} |jd�r| t(|�7} nt)j*| |jdt
dt
�|S(NR�iRBR!R�s.filtersR$s,$(VCTargetsPath)\Microsoft.Cpp.Default.propsR_s$$(VCTargetsPath)\Microsoft.Cpp.propss&$(VCTargetsPath)\Microsoft.Cpp.targetss/$(VCTargetsPath)\BuildCustomizations\masm.propss1$(VCTargetsPath)\BuildCustomizations\masm.targetsR�t
UserMacrosR�s3http://schemas.microsoft.com/developer/msbuild/2003RaR`tBuildtDefaultTargetsR(t	v120_wp81RcR.(+R�R;RPR�RR�RCRURERFRIR�R=R�R�RRJRORPR R�t_GenerateActionsForMSBuildRpRKR~RjtProjectVersionRRR+RR R-t_GetMSBuildExtensionsR.RPR\RuR�t_GetMSBuildExtensionTargetst!_GetMSBuildExternalBuilderTargetsReRf(!R5R�R/R6R�R�RTtproject_file_nameRURVRXRkRR�R�R�RkRlR`R�RYR�RqRrRZR[timport_default_sectiontimport_cpp_props_sectiontimport_cpp_targets_sectiontimport_masm_props_sectiontimport_masm_targets_sectiont
macro_sectionRo((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR3�s�	
				
	










cCst||dtttt�}didd6g}|jdi|d6g�t||dtttt�}didd6g}|jdi|d6g�||g}|jd	�rt||d	tttt�}did
d6g}|jdi|d6g�|j|�n|S(snReturn a list of MSBuild targets for external builders.

  The "Build" and "Clean" targets are always generated.  If the spec contains
  'msvs_external_builder_clcompile_cmd', then the "ClCompile" target will also
  be generated, to support building selected C/C++ files.

  Arguments:
    spec: The gyp target spec.
  Returns:
    List of MSBuild 'Target' specs.
  R#R�R�R�tExecRcR$tCleanR%Rx(R�R�RfR=(R�t	build_cmdtbuild_targett	clean_cmdtclean_targetttargetst
clcompile_cmdtclcompile_target((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�

s&


cCsEdidd6g}x(|D] }|jdi|d6g�qW|gS(NR"tExtensionSettingsR�R$R_(Rf(R�R�R-((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�/
s
cCsKdidd6g}x.t|�D] }|jdi|d6g�q W|gS(NR"tExtensionTargetsR�R$R_(R�Rf(R�ttargets_nodettargets_file((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�6
sc
Cs.t�}g}x|j�D]\}}t�}t�}g}g}	x�|D]{}
|jt|
d��|jt|
d��|j|
d�|
d}|
jdt�r�d|}n|	j|�qMWdj|�}djg|	D]}
|
d	^q��}t||||||||�qW||fS(
sYAdd actions accumulated into an actions_to_add, merging as needed.

  Arguments:
    spec: the target project dict
    actions_to_add: dictionary keyed on input name, which maps to a list of
        dicts describing the actions attached to that input file.

  Returns:
    A pair of (action specification, the sources handled by this action).
  R�R�R�R�tmsbuild_use_callscall s, and also s
s,
if %errorlevel% neq 0 exit /b %errorlevel%(RR�R�RfR=R�RYt_AddMSBuildAction(R�R�RrRqR�R�R�R�R�R�R�R�R�R�R�((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�=
s6			


	cCs�tj|�}t|�}t|�}	t|�}
djg|	D]}||kr@|^q@�}dj|
�}|j|�di|d6g}
|
jddgd|gd|gd|gg�|r�|
jd	|g�n|j|
�dS(
NR�R�RqtFileTypetDocumentRcR�R�tAdditionalInputs(R�R�R[R^RYR�RTRf(R�R�R�R�R�R�RrRqR�tinputs_arrayt
outputs_arrayR]tadditional_inputstaction_spec((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyR�o
s"
			(�tcopyR�R;R�RBR>R7t
gyp.commonRtgyp.easy_xmlRetgyp.generator.ninjat	generatorR+R0tgyp.MSVSNewR'tgyp.MSVSProjectRitgyp.MSVSSettingsR�tgyp.MSVSToolFileR�tgyp.MSVSUserFileR]tgyp.MSVSUtilRPtgyp.MSVSVersionR;RRRRRCR$RSt"generator_additional_path_sectionst+generator_additional_non_configuration_keysR�R�R:R9RNRWRUR[R^R�RhR�RyRsR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RRRRR
RRRRRRR R"R,R1R7RAR4RDR`RGRHRR�R�R�R�R�R�R�R�R�R�R�RIRJR�R�RRR�RMRNRORQRPR�R�RRRRRR)R4R@RKR^RpRdRsR�tobjectR�R�R�R�R�R�RRRR R.R3R/R0RRPRRRRR\RjRIRKRuRpR�R3R�R�R�R�R�(((sW/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/generator/msvs.pyt<module>sb		
							@				K		#						&		Q			/							
					#	F				W				&									'	6					
	'										
	1	0			Q		'	'	-5	 	�	�				*			,		
		4	0		2		]				9		u	%			2

Zerion Mini Shell 1.0