File: //usr/lib/python3/dist-packages/gyp/__pycache__/MSVSToolFile.cpython-39.pyc
a
r�^ � @ s, d Z ddlZddlmZ G dd� de�ZdS )z$Visual Studio project reader/writer.� Nc @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �Writerz#Visual Studio XML tool file writer.c C s || _ || _dg| _dS )zzInitializes the tool file.
Args:
tool_file_path: Path to the tool file.
name: Name of the tool file.
ZRulesN)�tool_file_path�name�
rules_section)�selfr r � r �2/usr/lib/python3/dist-packages/gyp/MSVSToolFile.py�__init__ s zWriter.__init__c C s8 d|||d� |�d� |�d� |�d�g}| j�|� dS )a9 Adds a rule to the tool file.
Args:
name: Name of the rule.
description: Description of the rule.
cmd: Command line of the rule.
additional_dependencies: other files which may trigger the rule.
outputs: outputs of the rule.
extensions: extensions handled by the rule.
ZCustomBuildRule�;)�NameZExecutionDescriptionZCommandLineZOutputsZFileExtensionsZAdditionalDependenciesN)�joinr �append)r r �cmdZdescriptionZadditional_dependenciesZoutputs�
extensionsZruler r r �AddCustomBuildRule s
�� zWriter.AddCustomBuildRulec C s* dd| j d�| jg}tj|| jdd� dS )zWrites the tool file.ZVisualStudioToolFilez8.00)ZVersionr zWindows-1252)�encodingN)r r �easy_xmlZWriteXmlIfChangedr )r Zcontentr r r �WriteIfChanged1 s ��
�zWriter.WriteIfChangedN)�__name__�
__module__�__qualname__�__doc__r r r r r r r r s r )r Z
gyp.commonZgypZgyp.easy_xmlr �objectr r r r r �<module> s