private static bool ShouldCopy64BitDnaOutput(BuildItemSpec item, IEnumerable <BuildItemSpec> buildItems) { if (item.InputDnaFileName.Equals(item.InputDnaFileNameAs64Bit)) { return(true); } var specificFileExists = buildItems .Any(bi => item.InputDnaFileNameAs64Bit.Equals(bi.InputDnaFileName, StringComparison.OrdinalIgnoreCase)); return(!specificFileExists); }
private void TryBuildAddInFor64Bit(BuildItemSpec[] buildItemsForDnaFiles) { foreach (var item in buildItemsForDnaFiles) { if (Create64BitAddIn && ShouldCopy64BitDnaOutput(item, buildItemsForDnaFiles)) { // Copy .dna file to build output folder for 64-bit CopyFileToBuildOutput(item.InputDnaFileName, item.OutputDnaFileNameAs64Bit, overwrite: true); // Copy .xll file to build output folder for 64-bit CopyFileToBuildOutput(Xll64FilePath, item.OutputXllFileNameAs64Bit, overwrite: true); // Copy .config file to build output folder for 64-bit (if exist) TryCopyConfigFileToOutput(item.InputConfigFileNameAs64Bit, item.InputConfigFileNameFallbackAs64Bit, item.OutputConfigFileNameAs64Bit); AddDnaToListOfFilesToPack(item.OutputDnaFileNameAs64Bit, item.OutputXllFileNameAs64Bit, item.OutputConfigFileNameAs64Bit); } } }
private static bool ShouldCopy64BitDnaOutput(BuildItemSpec item, IEnumerable<BuildItemSpec> buildItems) { if (item.InputDnaFileName.Equals(item.InputDnaFileNameAs64Bit)) { return true; } var specificFileExists = buildItems .Any(bi => item.InputDnaFileNameAs64Bit.Equals(bi.InputDnaFileName, StringComparison.OrdinalIgnoreCase)); return !specificFileExists; }