public void Generate() { _consoleWriter.WriteLine("Creating a C++/clr project for RmiProd"); var projectName = _userInputProvider.Value(Variable.ProjectName); var tasks = new List <Task> { _fileGenerator.FromTemplate(Template.ProjectFile, Path.Combine(_pathProvider.GetProjectPath(), $"{projectName}.vcxproj"), Encoding.UTF8), _fileGenerator.FromTemplate(Template.ProjectFilter, Path.Combine(_pathProvider.GetProjectPath(), $"{projectName}.vcxproj.filter"), Encoding.UTF8), _fileGenerator.FromTemplate(Template.SampleSource, Path.Combine(_pathProvider.GetProjectPath(), SourceDirectory, projectName, $"{projectName}.cpp"), Encoding.UTF8), _fileGenerator.FromTemplate(Template.SampleHeader, Path.Combine(_pathProvider.GetProjectPath(), HeaderDirectory, projectName, $"{projectName}.h"), Encoding.UTF8), _fileGenerator.FromTemplate(Template.StdAfxSource, Path.Combine(_pathProvider.GetProjectPath(), SourceDirectory, "stdafx.cpp"), Encoding.UTF8), _fileGenerator.FromTemplate(Template.StdAfxHeader, Path.Combine(_pathProvider.GetProjectPath(), HeaderDirectory, "stdafx.h"), Encoding.UTF8), _fileGenerator.FromTemplate(Template.PackagesConfig, Path.Combine(_pathProvider.GetProjectPath(), "packages.config"), Encoding.UTF8), _fileGenerator.FromTemplate(Template.DebugProperties, Path.Combine(_pathProvider.GetProjectPath(), PropertyDirectory, $"{projectName}Debug.props"), Encoding.UTF8), _fileGenerator.FromTemplate(Template.ReleaseProperties, Path.Combine(_pathProvider.GetProjectPath(), PropertyDirectory, $"{projectName}Release.props"), Encoding.UTF8), _fileGenerator.FromTemplate(Template.UseProperties, Path.Combine(_pathProvider.GetProjectPath(), PropertyDirectory, $"Use{projectName}.props"), Encoding.UTF8), _fileGenerator.FromTemplate(Template.VersionInfo, Path.Combine(_pathProvider.GetVersionInfoPath(), $"{projectName}Version.h"), Encoding.UTF8), _fileManipulator.AppendTemplate(Template.FilesToSign, Path.Combine(_pathProvider.GetBuildStepSignDirectory(), "FileList_Win32.txt")), _fileManipulator.AppendTemplate(Template.FilesToSign, Path.Combine(_pathProvider.GetBuildStepSignDirectory(), "FileList_x64.txt")), _fileManipulator.AddProjectsToSolution(GetSolutionInfoBuilder().Build(), Sequence.FromNullable(GetProjectInfoBuilder().Build())), }; Task.WaitAll(tasks.ToArray()); }
public void Generate() { var projectName = _userInputProvider.Value(Variable.ProjectName); _consoleWriter.WriteLine($"Creating the C++ Project '{projectName}' for the All Projects.sln."); var tasks = new List <Task> { _fileGenerator.FromTemplate(ProjectFileTemplate, _projectInformation.ProjectPath($"{projectName}.vcxproj"), Encoding.UTF8), _fileGenerator.FromTemplate(ProjectFileFilterTemplate, _projectInformation.ProjectPath($"{projectName}.vcxproj.filters"), Encoding.UTF8), _fileGenerator.FromTemplate(ExampleSourceTemplate, _projectInformation.SourcePath($"{projectName}.cpp"), Encoding.UTF8), _fileGenerator.FromTemplate(ExampleHeaderTemplate, _projectInformation.HeaderPath($"{projectName}.h"), Encoding.UTF8), _fileGenerator.FromTemplate(StdafxHeaderTemplate, _projectInformation.SourcePath("stdafx.h"), Encoding.UTF8), _fileGenerator.FromTemplate(StdafxSourceTemplate, _projectInformation.SourcePath("stdafx.cpp"), Encoding.UTF8), _fileGenerator.FromTemplate(DebugPropertyTemplate, _projectInformation.PropertyPath($"{projectName}Debug.props"), Encoding.UTF8), _fileGenerator.FromTemplate(ReleasePropertyTemplate, _projectInformation.PropertyPath($"{projectName}Release.props"), Encoding.UTF8), _fileGenerator.FromTemplate(UsePropertyTemplate, _projectInformation.PropertyPath($"Use{projectName}.props"), Encoding.UTF8), _fileManipulator.AddProjectsToSolution(GetSolutionInfoBuilder().Build(), Sequence.FromNullable(GetProjectInfoBuilder().Build())), }; tasks.AddRange(SignFileLists().Select(s => _fileManipulator.AppendTemplate(SignListTemplate, s))); Task.WaitAll(tasks.ToArray()); }