public function generate() { $root = $this->dom->appendChild($this->dom->createElement('Project')); $root->setAttribute('ToolsVersion', '4.0'); $root->setAttribute('xmlns', 'http://schemas.microsoft.com/developer/msbuild/2003'); $filterParser = new FilterParser(); $filter = $filterParser->parse($this->project->getSource()); $this->writeItemGroupFilters($root, $filter); $this->writeItemGroupNone($root, $filter); $this->writeItemGroupIncludes($root, $filter); $this->writeItemGroupSource($root, $filter); $this->writeItemGroupResources($root, $filter); $this->dom->formatOutput = true; $this->dom->save($this->path); }
public function generate() { $root = $this->dom->appendChild($this->dom->createElement('Project')); $this->writeRootAttributes($root); $this->writeItemGroupProjectConfig($root); $this->writePropertyGroupGlobals($root); $this->writeImportProject($root, '$(VCTargetsPath)\\Microsoft.Cpp.Default.props'); foreach ($this->project->getConfigurations() as $configuration) { $this->variableParser->push('ide.config', $configuration); $this->writePropertyGroupConfiguration($root, $configuration); $this->variableParser->pop('ide.config'); } $this->writeImportProject($root, '$(VCTargetsPath)\\Microsoft.Cpp.props'); $this->writeImportGroupExtensionSettings($root); foreach ($this->project->getConfigurations() as $configuration) { $this->variableParser->push('ide.config', $configuration); $this->writeImportGroupPropertySheets($root, $configuration); $this->variableParser->pop('ide.config'); } $this->writePropertyGroupUserMacros($root); foreach ($this->project->getConfigurations() as $configuration) { $this->variableParser->push('ide.config', $configuration); $this->writePropertyGroup($root, $configuration); $this->variableParser->pop('ide.config'); } foreach ($this->project->getConfigurations() as $configuration) { $this->variableParser->push('ide.config', $configuration); $this->writeItemDefinitionGroup($root, $configuration); $this->variableParser->pop('ide.config'); } $filterParser = new FilterParser(); $this->writeItemGroupFilemap($root, $filterParser->parse($this->project->getSource())); $this->writeImportProject($root, '$(VCTargetsPath)\\Microsoft.Cpp.targets'); $this->writeImportGroupExtensionTargets($root); $this->dom->formatOutput = true; $this->dom->save($this->path); }