<commit_before>// Automatically generated by Opus v 
namespace BundlingTest
{
    /// <summary>
    /// A simple command line application
    /// </summary>
    class Application : C.Application
    {
        class SourceFiles : C.Cxx.ObjectFileCollection
        {
            public SourceFiles()
            {
                var sourceDir = this.PackageLocation.SubDirectory("source");
                var appDir = sourceDir.SubDirectory("app");
                this.Include(appDir, "*.cpp");
            }
        }

        [Opus.Core.SourceFiles]
        SourceFiles source = new SourceFiles();

        [Opus.Core.DependentModules]
        Opus.Core.TypeArray dependents = new Opus.Core.TypeArray(
            typeof(DynamicLibrary)
            );
    }

    /// <summary>
    /// A windowed application. On OSX, this is an application bundle
    /// </summary>
    class WindowedApplication : C.WindowsApplication
    {
        public WindowedApplication()
        {
            this.UpdateOptions += delegate(Opus.Core.IModule module, Opus.Core.Target target)
            {
                var osxOptions = module.Options as C.ILinkerOptionsOSX;
                if (null != osxOptions)
                {
                    osxOptions.ApplicationBundle = true;
                }
            };
        }

        class SourceFiles : C.Cxx.ObjectFileCollection
        {
            public SourceFiles()
            {
                var sourceDir = this.PackageLocation.SubDirectory("source");
                var appDir = sourceDir.SubDirectory("app");
                this.Include(appDir, "*.cpp");
            }
        }

        [Opus.Core.SourceFiles]
        SourceFiles source = new SourceFiles();

        [Opus.Core.DependentModules]
        Opus.Core.TypeArray dependents = new Opus.Core.TypeArray(
            typeof(DynamicLibrary)
            );
    }

    class DynamicLibrary : C.DynamicLibrary
    {
        public DynamicLibrary()
        {
            var includeDir = this.PackageLocation.SubDirectory("include");
            var dynLibDir = includeDir.SubDirectory("dynlib");
            this.headers.Include(dynLibDir, "*.h");
        }

        class SourceFiles : C.Cxx.ObjectFileCollection
        {
            public SourceFiles()
            {
                var sourceDir = this.PackageLocation.SubDirectory("source");
                var dynLibDir = sourceDir.SubDirectory("dynlib");
                this.Include(dynLibDir, "*.cpp");

                this.UpdateOptions += IncludePaths;
            }
        }

        [C.ExportCompilerOptionsDelegate]
        public static void IncludePaths(Opus.Core.IModule module, Opus.Core.Target target)
        {
            var options = module.Options as C.ICCompilerOptions;
            if (null != options)
            {
                options.IncludePaths.Include((module as Opus.Core.BaseModule).PackageLocation.SubDirectory("include"));
            }
        }

        [C.HeaderFiles]
        Opus.Core.FileCollection headers = new Opus.Core.FileCollection();

        [Opus.Core.SourceFiles]
        SourceFiles source = new SourceFiles();
    }
}<commit_msg>[trunk] Implement bundling for the debugger<commit_after>// Automatically generated by Opus v 
namespace BundlingTest
{
    /// <summary>
    /// A simple command line application
    /// </summary>
    class Application : C.Application
    {
        class SourceFiles : C.Cxx.ObjectFileCollection
        {
            public SourceFiles()
            {
                var sourceDir = this.PackageLocation.SubDirectory("source");
                var appDir = sourceDir.SubDirectory("app");
                this.Include(appDir, "*.cpp");
            }
        }

        [Opus.Core.SourceFiles]
        SourceFiles source = new SourceFiles();

        [Opus.Core.DependentModules]
        Opus.Core.TypeArray dependents = new Opus.Core.TypeArray(
            typeof(DynamicLibrary)
            );
    }

    /// <summary>
    /// A windowed application. On OSX, this is an application bundle
    /// </summary>
    class WindowedApplication : C.WindowsApplication
    {
        public WindowedApplication()
        {
            this.UpdateOptions += delegate(Opus.Core.IModule module, Opus.Core.Target target)
            {
                var osxOptions = module.Options as C.ILinkerOptionsOSX;
                if (null != osxOptions)
                {
                    osxOptions.ApplicationBundle = true;
                }
            };
        }

        class SourceFiles : C.Cxx.ObjectFileCollection
        {
            public SourceFiles()
            {
                var sourceDir = this.PackageLocation.SubDirectory("source");
                var appDir = sourceDir.SubDirectory("app");
                this.Include(appDir, "*.cpp");
            }
        }

        [Opus.Core.SourceFiles]
        SourceFiles source = new SourceFiles();

        [Opus.Core.DependentModules]
        Opus.Core.TypeArray dependents = new Opus.Core.TypeArray(
            typeof(DynamicLibrary)
            );
    }

    class DynamicLibrary : C.DynamicLibrary
    {
        public DynamicLibrary()
        {
            var includeDir = this.PackageLocation.SubDirectory("include");
            var dynLibDir = includeDir.SubDirectory("dynlib");
            this.headers.Include(dynLibDir, "*.h");
        }

        class SourceFiles : C.Cxx.ObjectFileCollection
        {
            public SourceFiles()
            {
                var sourceDir = this.PackageLocation.SubDirectory("source");
                var dynLibDir = sourceDir.SubDirectory("dynlib");
                this.Include(dynLibDir, "*.cpp");

                this.UpdateOptions += IncludePaths;
            }
        }

        [C.ExportCompilerOptionsDelegate]
        public static void IncludePaths(Opus.Core.IModule module, Opus.Core.Target target)
        {
            var options = module.Options as C.ICCompilerOptions;
            if (null != options)
            {
                options.IncludePaths.Include((module as Opus.Core.BaseModule).PackageLocation.SubDirectory("include"));
            }
        }

        [C.HeaderFiles]
        Opus.Core.FileCollection headers = new Opus.Core.FileCollection();

        [Opus.Core.SourceFiles]
        SourceFiles source = new SourceFiles();
    }

    class BundlingApplicationForDebugger : FileUtilities.CopyFileCollection
    {
        public BundlingApplicationForDebugger(Opus.Core.Target target)
        {
            this.Include(target, C.OutputFileFlags.Executable, typeof(DynamicLibrary));
        }

        [FileUtilities.BesideModule(C.OutputFileFlags.Executable)]
        System.Type nextTo = typeof(Application);
    }

    class BundlingWindowedApplicationForDebugger : FileUtilities.CopyFileCollection
    {
        public BundlingWindowedApplicationForDebugger(Opus.Core.Target target)
        {
            this.Include(target, C.OutputFileFlags.Executable, typeof(DynamicLibrary));
        }

        [FileUtilities.BesideModule(C.OutputFileFlags.Executable)]
        System.Type nextTo = typeof(WindowedApplication);
    }
}
{'fraction_non_alphanumeric': 0.0964936886395512, 'fraction_numerical': 0.0, 'mean_word_length': 1.7986656200941915, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2393225', 'n_tokens_mistral': 1853, 'n_tokens_neox': 1797, 'n_words': 341}