File: //proc/self/root/usr/lib/python3.6/site-packages/gyp/__pycache__/MSVSToolFile.cpython-36.opt-1.pyc
3
e�AU � @ s* d Z ddlZddljZG 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 �"/usr/lib/python3.6/MSVSToolFile.py�__init__ s zWriter.__init__c C s8 d|||dj |�dj |�dj |�d�g}| jj|� 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 �cmd�descriptionZadditional_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