<commit_before>// <copyright file="CopyFile.cs" company="<NAME>">
//  Opus package
// </copyright>
// <summary>FileUtilities package</summary>
// <author><NAME></author>
namespace QMakeBuilder
{
    public sealed partial class QMakeBuilder2
    {
        public object Build(FileUtilities.CopyFile moduleToBuild, out bool success)
        {
            var options = moduleToBuild.Options;
            var node = moduleToBuild.OwningNode;
            var target = node.Target;

            var tool = target.Toolset.Tool(typeof(FileUtilities.ICopyFileTool));
            var toolExecutablePath = tool.Executable((Opus.Core.BaseTarget)target);

            var commandLineBuilder = new Opus.Core.StringArray();
            if (options is CommandLineProcessor.ICommandLineSupport)
            {
                var commandLineOption = options as CommandLineProcessor.ICommandLineSupport;
                commandLineOption.ToCommandLineArguments(commandLineBuilder, target, null);
            }
            else
            {
                throw new Opus.Core.Exception("Linker options does not support command line translation");
            }
            var copiedFilePath = options.OutputPaths[FileUtilities.OutputFileFlags.CopiedFile];
            var destinationDirectory = System.IO.Path.GetDirectoryName(copiedFilePath);

            var data = new QMakeData(node);

            var sourceFilePath = moduleToBuild.SourceFile.AbsolutePath;

            System.Text.StringBuilder postLinkCommand = new System.Text.StringBuilder();
            if (target.HasPlatform(Opus.Core.EPlatform.Windows))
            {
                postLinkCommand.AppendFormat("{0} {1} {2} {3}", toolExecutablePath, commandLineBuilder.ToString(' '), sourceFilePath, destinationDirectory);
            }
            else
            {
                postLinkCommand.AppendFormat("{0} {1} {2} {3}", toolExecutablePath, commandLineBuilder.ToString(' '), sourceFilePath, destinationDirectory);
            }
            data.PostLink.Add(postLinkCommand.ToString());

            success = true;<commit_msg>[050copyfiles] QMake copy fix for a single file copy<commit_after>// <copyright file="CopyFile.cs" company="<NAME>">
//  Opus package
// </copyright>
// <summary>FileUtilities package</summary>
// <author><NAME></author>
namespace QMakeBuilder
{
    public sealed partial class QMakeBuilder2
    {
        public object Build(FileUtilities.CopyFile moduleToBuild, out bool success)
        {
            var options = moduleToBuild.Options;
            var node = moduleToBuild.OwningNode;
            var target = node.Target;

            var tool = target.Toolset.Tool(typeof(FileUtilities.ICopyFileTool));
            var toolExecutablePath = tool.Executable((Opus.Core.BaseTarget)target);

            var commandLineBuilder = new Opus.Core.StringArray();
            if (options is CommandLineProcessor.ICommandLineSupport)
            {
                var commandLineOption = options as CommandLineProcessor.ICommandLineSupport;
                commandLineOption.ToCommandLineArguments(commandLineBuilder, target, null);
            }
            else
            {
                throw new Opus.Core.Exception("Linker options does not support command line translation");
            }
            var copiedFilePath = options.OutputPaths[FileUtilities.OutputFileFlags.CopiedFile];
            var destinationDirectory = System.IO.Path.GetDirectoryName(copiedFilePath);

            var data = new QMakeData(node);
            if (null == node.Parent)
            {
                var besideModuleType = moduleToBuild.BesideModuleType;
                if (null == besideModuleType)
                {
                    Opus.Core.Log.MessageAll("QMake support for copying to arbitrary locations is unavailable");
                    success = true;
                    return null;
                }

                var besideModuleNode = Opus.Core.ModuleUtilities.GetNode(besideModuleType, (Opus.Core.BaseTarget)target);
                data.Merge(besideModuleNode.Data as QMakeData);
            }

            var sourceFilePath = moduleToBuild.SourceFile.AbsolutePath;

            System.Text.StringBuilder postLinkCommand = new System.Text.StringBuilder();
            if (target.HasPlatform(Opus.Core.EPlatform.Windows))
            {
                postLinkCommand.AppendFormat("{0} {1} {2} {3}", toolExecutablePath, commandLineBuilder.ToString(' '), sourceFilePath, destinationDirectory);
            }
            else
            {
                postLinkCommand.AppendFormat("{0} {1} {2} {3}", toolExecutablePath, commandLineBuilder.ToString(' '), sourceFilePath, destinationDirectory);
            }
            data.PostLink.Add(postLinkCommand.ToString());

            success = true;
{'fraction_non_alphanumeric': 0.09291666666666666, 'fraction_numerical': 0.004375, 'mean_word_length': 2.311034482758621, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6340083', 'n_tokens_mistral': 1192, 'n_tokens_neox': 1166, 'n_words': 246}