Esempio n. 1
0
 private function buildLinkManifest(Configuration $configuration)
 {
     $outputPath = sprintf('%s\\%s.%s', getcwd(), $this->variableParser->parse($configuration->getOutputPath()), $configuration->getParsedExtension());
     $result = [];
     $result[] = '/MANIFEST';
     $result[] = '"/ManifestFile:' . $outputPath . '.intermediate.manifest"';
     $result[] = '"/MANIFESTUAC:level=\'asInvoker\' uiAccess=\'false\'"';
     return $result;
 }
Esempio n. 2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $ide = $input->getArgument('ide');
     $config = $this->getConfig();
     if (!array_key_exists($ide, $this->generators)) {
         throw new InvalidArgumentException(sprintf('The "%s" generator is not supported.', $ide));
     }
     $output->writeln('Generating project files for ' . $this->generators[$ide]['name']);
     $variableParser = new Parser();
     $variableParser->push('config', $config);
     $variableParser->set('ide.type', $ide);
     $outputDirectory = $variableParser->parse('projects/$(ide.type)/');
     FileSystem::createDirectory($outputDirectory, 0777);
     $generatorFqcn = $this->generators[$ide]['fqcn'];
     $generator = new $generatorFqcn($config);
     $generator->setVariableParser($variableParser);
     $generator->generate($outputDirectory);
 }
 protected function writeItemGroupProjectConfig(DOMElement $parent)
 {
     /** @var DOMElement $element */
     $element = $parent->appendChild($this->dom->createElement('ItemGroup'));
     $element->setAttribute('Label', 'ProjectConfigurations');
     foreach ($this->project->getConfigurations() as $configuration) {
         $this->variableParser->push('ide.config', $configuration);
         $this->writeProjectConfig($element, $configuration);
         $this->variableParser->pop('ide.config');
     }
 }