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)); }
public void Execute(ITaskRunner taskRunner) { // generate IMG files foreach (ProductFile file in taskRunner.ListProductFiles(GenerateMapPolishFilesTask.PolishMapFileType)) { taskRunner.RunCGpsMapper("\"{0}\"", file.ProductFileName); string imgFileName = Path.ChangeExtension(file.ProductFileName, ".img"); taskRunner.RegisterProductFile(new ProductFile(MapImgFileName, imgFileName, false)); } }
public void Execute(ITaskRunner taskRunner) { ProductFile polishTypeFile = taskRunner.GetProductFile(GenerateMapTypesPolishFileTask.PolishTypeFile); string typeFileName = (Path.Combine( Path.GetDirectoryName(polishTypeFile.ProductFileName), Path.GetFileNameWithoutExtension(polishTypeFile.ProductFileName))); taskRunner.RunCGpsMapper( "typ \"{0}\" \"{1}\"", Path.GetFileName(polishTypeFile.ProductFileName), Path.GetFileName(typeFileName)); taskRunner.RegisterProductFile(new ProductFile(TypeFile, typeFileName, false)); }