Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.16.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : pretty_vcproj.pyo
�
�Rac@sdZdZddlZddlZddlmZddlmZe�Zda
defd��YZdefd	��YZ
d
d�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zedkr
ejeej��ndS(s�Make the format of a vcproj really pretty.

   This script normalize and sort an xml. It also fetches all the properties
   inside linked vsprops and include them explicitly in the vcproj.

   It outputs the resulting xml to stdout.
snsylvain (Nicolas Sylvain)i����N(tparse(tNodetCmpTuplecBseZdZd�ZRS(s!Compare function between 2 tuple.cCst|d|d�S(Ni(tcmp(tselftxty((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pyt__call__s(t__name__t
__module__t__doc__R(((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pyRstCmpNodecBseZdZd�ZRS(s%Compare function between 2 xml nodes.cCs"d�}t||�||��S(NcSs�d}||j7}|jr,||j7}n|jr�||jd�7}g}x0|jj�D]\}}|j||f�q^W|jt��x+|D] \}}||7}||7}q�Wn|S(NtnodetName(tnodeNamet	nodeValuet
attributestgetAttributetitemstappendtsortR(Rtnode_stringt	all_nodestnametvalue((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pyt
get_string%s
		
(R(RRRR((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pyR$s	(RR	R
R(((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pyR!sicCs�|jtjkrD|jj�r@dd||jj�fGHndS|jrZ|j�nd}|jrx|jj}n|dkr�dd||j	fGHn�dd||j	fGHg}x@|jj
�D]/\}}|j||f�|jt
��q�Wx*|D]"\}}dd|||fGHqWdd|GH|jrXdd||jfGHnx%|jD]}t|d	|d
�qbWdd||j	fGHdS(Ns%s%st is%s<%s>s%s<%ss%s  %s="%s"s%s>s%s  %stindentis%s</%s>(tnodeTypeRt	TEXT_NODEtdatatstript
childNodest	normalizeRtlengthRRRRRRtPrettyPrintNode(RRt
attr_counttall_attributesRRtsub_node((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pyR#=s0	
	
	cCsrg}|jr(|jd�dkr(gSxC|jD]8}|jdkr]|jt|��q2|j|�q2W|S(s-Returns a list of all the node and sub nodes.R
t_excluded_filestFilter(RRR Rtextendt
FlattenFilterR(Rt	node_listtcurrent((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pyR*_s	cCs�g}x�|D]�}|r
x$tD]}|j|t|�}q Wtj|�|jd�}|jd�r{|j|�q�|jtjj|��q
q
W|S(Ns"' t$(	tREPLACEMENTStreplacetostchdirRt
startswithRtpathtabspath(t	filenamestcurrent_directorytnew_listtfilenametkey((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pytFixFilenamesqs


 cCs�|jr�x�|jj�D]x\}}|d
kr{|jd�}t|tjjtd��}|j|dj	|��n|s|j
|�qqWnd	S(s=Makes all the properties we know about in this node absolute.tInheritedPropertySheetstRelativePathtAdditionalIncludeDirectoriestIntermediateDirectorytOutputDirectorytAdditionalLibraryDirectoriest;iN(R;R<R=R>R?R@(RRtsplitR:R0R3tdirnamet	ARGUMENTStsetAttributetjointremoveAttribute(RRRt	path_listR7((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pytAbsoluteNode�s		c
Cs8x%|jD]}t|�t|�q
Wxh|jD]]}|jtjkr2|jjdd�|_|jjdd�|_|jj�|_q2q2W|j	r9x�|j	j
�D]�\}}t|jd��}g}x-|D]%}|j
|�s�|j|�q�q�W|j|dj|��|s�|j|�q�q�Wn|jrO|j�ng}xf|jr�|jdr�|jd}|j|�|jdkr�|jt|��qX|j|�qXW|jt��xc|D][}	|	jdkr|	j	r|	j	jdkrq�qn|	jd	kr#q�n|j|	�q�Wd
S(s5For each sub node, we call recursively this function.s
ts
RAiR(tToolit	UserMacroN(R RIt
CleanupVcprojRRRRR/trstripRRtsortedRBtcountRRERFRGR!tremoveChildRR)R*RRR"tappendChild(
RR&RRtsorted_listtunique_listtit
node_arrayR,tnew_node((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pyRM�sF
	
	



	cCscg}xV|jD]K}|jdkrx3|jD]%}|jdkr/|j|�q/q/WqqW|S(NtConfigurationst
Configuration(R RR(tvcprojtnodesRR&((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pytGetConfiguationNodes�scCsPt|�}|jjrL|jjd�}t|jd�tjj|��SgS(NR;RA(	RtdocumentElementRRR:RBR0R3RC(R8tdomtvsprops((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pytGetChildrenVsprops�s
"cCs{|jtjkrdS|jd�}|s/dSxE|jD]:}|j|jkr9|jd�}||krs|Sq9q9WdS(NR
(RRRtNoneRR R(tnode1tchild2tcurrent_nameR&R((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pyt
SeekToNode�scCs�|js
dSx�|jj�D]�\}}|dkr;qn|j|�}|r�||kr�|j|dj||g��q�n|j||�|dkr|j|�qqWdS(NR
RAR;(RRRRERFRG(Rbtnode2Rtvalue2tvalue1((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pytMergeAttributes�s	%cCs`t||�xL|jD]A}t||�}|rBt||�q|j|jt��qWdS(N(RiR RetMergePropertiesRRt	cloneNodetTrue(RbRfRctchild1((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pyRj
s
c	Cs<|at|�dkr)d|dGHdSx@tdt|��D])}||jd�\}}|t|<q?Wt|d�}x�t|j�D]�}|jd�}t	|j
�jd�tjj
|d��}x!|D]}|jt|��q�Wx$|D]}t|t|�j�q�Wq�Wt|j�t|j�dS(s(Main function of this vcproj prettifier.is@Usage: %s "c:\path\to\vcproj.vcproj" [key1=value1] [key2=value2]iit=R;RA(RDtlentrangeRBR.RR\R]RR:RR0R3RCR)R`RjRMR#(	targvRUR9RR^tconfiguration_nodeR_tvsprops_listtcurrent_vsprops((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pytmains*




t__main__(R
t
__author__R0tsystxml.dom.minidomRRtdictR.RaRDtobjectRRR#R*R:RIRMR\R`ReRiRjRuRtexitRq(((sk/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_vcproj.pyt<module>
s,	"				;					
	1
© 2025 XylotrechusZ