public void Execute(ITaskRunner taskRunner) { ProductFile file = taskRunner.GetProductFile(GeneratePreviewPolishFileTask.PolishPreviewFile); if (file == null) { consoleLogger.WriteLine(log, Level.Warn, "WARNING: there is no polish preview file to process, preview file will not be generated"); return; } taskRunner.RunCPreview( "\"{0}\"", file.ProductFileName); string previewIntermediateFile = Path.GetFullPath( Path.Combine( taskRunner.MapMakerSettings.TempDir, String.Format( CultureInfo.InvariantCulture, "{0}.mp", taskRunner.MapMakerSettings.ProductCode))); taskRunner.RunCGpsMapper( "\"{0}\"", previewIntermediateFile); taskRunner.RegisterProductFile(new ProductFile(PreviewImgFile, Path.ChangeExtension(previewIntermediateFile, ".img"), false)); taskRunner.RegisterProductFile(new ProductFile(TdbFile, Path.ChangeExtension(previewIntermediateFile, ".tdb"), false)); }