public override bool Execute() { IEnumerable <string> rspPaths = TaskUtils.GetFullPaths(this.ResponseFiles, this.MSBuildProjectDirectory); TaskUtils.FilterRspFiles(rspPaths, this.OutputFileName, this.ValidSwitches.Split(';')); return(true); }
private bool AreNonPartitionFilesUpToDate() { IEnumerable <string> files = TaskUtils.GetFullPaths(this.ResponseFiles, this.MSBuildProjectDirectory); if (this.EnumsJson != null) { files = files.Concat(new string[] { TaskUtils.GetFullPath(this.EnumsJson, this.MSBuildProjectDirectory) }); } return(TaskUtils.IsUpToDate(files, this.MarkerFileName)); }
protected override string GenerateCommandLineCommands() { #if DEBUG if (System.Environment.GetEnvironmentVariable("DEBUG_EMITTER_TASK") == "1") { System.Diagnostics.Debugger.Launch(); } #endif var builder = new CommandLineBuilder(); builder.AppendFileNameIfNotNull(Path.Combine(this.ToolsBinDir, "ClangSharpSourceToWinmd.dll")); string interopPath = Path.Combine(this.Win32WinmdBinDir, "Windows.Win32.Interop.dll"); string win32WinmdPath = Path.Combine(this.Win32WinmdBinDir, "Windows.Win32.winmd"); this.outputWinmdFullPath = this.OutputWinmd; if (!Path.IsPathRooted(this.outputWinmdFullPath)) { this.outputWinmdFullPath = Path.GetFullPath(Path.Combine(this.MSBuildProjectDirectory, this.outputWinmdFullPath)); } builder.AppendSwitchIfNotNull("--sourceDir ", this.EmitterSourceDir); builder.AppendSwitchIfNotNull("--arch ", "crossarch"); builder.AppendSwitchIfNotNull("--interopFileName ", interopPath); if (!StringComparer.OrdinalIgnoreCase.Equals( Path.GetFileName(this.outputWinmdFullPath), Path.GetFileName(win32WinmdPath))) { builder.AppendSwitchIfNotNull("--ref ", win32WinmdPath); } builder.AppendSwitchIfNotNull("--version ", this.WinmdVersion); builder.AppendSwitchIfNotNull("--outputFileName ", this.outputWinmdFullPath); foreach (var autoTypeJson in TaskUtils.GetFullPaths(this.AutoTypes, this.MSBuildProjectDirectory)) { if (File.Exists(autoTypeJson)) { builder.AppendSwitchIfNotNull("--autoTypes ", autoTypeJson); } } IEnumerable <string> rspFiles = TaskUtils.GetFullPaths(this.ResponseFiles, this.MSBuildProjectDirectory); foreach (var rspFile in rspFiles) { if (File.Exists(rspFile)) { builder.AppendRspFile(rspFile); } } return(builder.ToString()); }
protected override string GenerateCommandLineCommands() { var builder = new CommandLineBuilder(); builder.AppendFileNameIfNotNull(Path.Combine(this.ToolsBinDir, "ConstantsScraper.dll")); builder.AppendSwitchIfNotNull("--headerTextFile ", this.HeaderTextFile); builder.AppendSwitchIfNotNull("--scraperOutputDir ", this.ScraperOutputDir); IEnumerable <string> reponseFiles = TaskUtils.GetFullPaths(this.ResponseFiles, this.MSBuildProjectDirectory); foreach (var file in reponseFiles) { builder.AppendRspFileIfNotNull(file); } return(builder.ToString()); }